// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
//
// http:// www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

drill.metastore.iceberg: {

  // File system config can be specified
  config.properties: {
    // Iceberg tables location will be created under default file system
    // taken from Hadoop configuration unless the below property is set
    // fs.defaultFS: "file:///"
  }

  // Iceberg Metastore location is constructed based on
  // combination of base_path and relative_path config values
  location: {
    // Iceberg table base path, if not indicated, user home directory will be used
    // base_path: "/app",

    // Iceberg table relative path unique among clusters
    // ${drill.exec.zk.root} value will be substituted from Drill main config
    relative_path: ${drill.exec.zk.root}"/metastore/iceberg"
  }

  // Specifies time period after which outdated Iceberg table metadata will be expired,
  // unit names must correspond to java.time.temporal.ChronoUnit enum values
  // that do not have estimated duration (millis, seconds, minutes, hours, days).
  // Example: hours: 10, minutes: 20
  expiration.period: {
    days: 5
  }

  components: {
        // Common properties for all Iceberg tables from org.apache.iceberg.TableProperties can be specified
       common.properties: {
          write.metadata.compression-codec: "none"
       },

    tables: {
      // Iceberg table location in Iceberg Metastore
      location: "tables",

      // Specific tables properties from org.apache.iceberg.TableProperties can be specified
      properties: {}
    },

    views: {
      // Iceberg table location in Iceberg Metastore
      location: "views",

      // Specific views properties from org.apache.iceberg.TableProperties can be specified
      properties: {}
    }
  }
}
