Search in sources :

Example 1 with HadoopFileIO

use of org.apache.iceberg.hadoop.HadoopFileIO in project hive by apache.

the class HiveCatalog method initialize.

@Override
public void initialize(String inputName, Map<String, String> properties) {
    this.name = inputName;
    if (conf == null) {
        LOG.warn("No Hadoop Configuration was set, using the default environment Configuration");
        this.conf = new Configuration();
    }
    if (properties.containsKey(CatalogProperties.URI)) {
        this.conf.set(HiveConf.ConfVars.METASTOREURIS.varname, properties.get(CatalogProperties.URI));
    }
    if (properties.containsKey(CatalogProperties.WAREHOUSE_LOCATION)) {
        this.conf.set(HiveConf.ConfVars.METASTOREWAREHOUSE.varname, properties.get(CatalogProperties.WAREHOUSE_LOCATION));
    }
    String fileIOImpl = properties.get(CatalogProperties.FILE_IO_IMPL);
    this.fileIO = fileIOImpl == null ? new HadoopFileIO(conf) : CatalogUtil.loadFileIO(fileIOImpl, properties, conf);
    this.clients = new CachedClientPool(conf, properties);
}
Also used : HadoopFileIO(org.apache.iceberg.hadoop.HadoopFileIO) Configuration(org.apache.hadoop.conf.Configuration)

Aggregations

Configuration (org.apache.hadoop.conf.Configuration)1 HadoopFileIO (org.apache.iceberg.hadoop.HadoopFileIO)1