apache/iceberg · warning

No Hadoop Configuration was set, using the default…

Error message

No Hadoop Configuration was set, using the default environment Configuration

What it means

HiveCatalog.initialize logs this warning when no Hadoop Configuration was supplied (e.g. via the constructor accepting a Configuration, or setConf) and falls back to a new default org.apache.hadoop.conf.Configuration from the environment. Without an explicit conf, metastore connection settings may not match the environment the caller intended.

Solutions

  1. Pass the engine's Hadoop Configuration: new HiveCatalog(conf) or catalog.setConf(conf) before initialize
  2. Ensure hive-site.xml / core-site.xml with metastore URI settings are on the classpath
  3. Set uri/warehouse in catalog properties so the default conf is at least pointed at the right metastore
  4. Prefer loading via HadoopCatalogs/CatalogUtil so conf wiring is automatic

Example fix

// before
HiveCatalog catalog = new HiveCatalog();
catalog.initialize("hive", props);
// after
HiveCatalog catalog = new HiveCatalog();
catalog.setConf(spark.sparkContext().hadoopConfiguration());
catalog.initialize("hive", props);
Defensive patterns

Strategy: validation

Validate before calling

Configuration conf = spark.sparkContext().hadoopConfiguration();
if (conf.get("hive.metastore.uris") == null) { /* set uri property or fix classpath */ }

Prevention

When it happens

Trigger: Instantiating HiveCatalog (e.g. via CatalogUtil.loadCatalog) without passing a Hadoop Configuration and without hadoop-conf resources on the classpath so conf remains null at initialize time.

Common situations: Spark/Flink jobs constructing HiveCatalog directly instead of through the engine's Hadoop conf; missing core-site.xml/hive-site.xml on the classpath; tests that use the no-conf constructor.

Understand the failure class

Background: "missing required config value" errors: why libraries refuse to start when a configuration key is empty, unset, or blank — this error's family across 48 libraries.

Related errors


AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12). Data as JSON: /api/errors/5d78e8b60fe53b75. Report an issue: GitHub.

Appendix: source

Thrown at hive-metastore/src/main/java/org/apache/iceberg/hive/HiveCatalog.java:112

  private String name;
  private Configuration conf;
  private FileIO fileIO;
  private KeyManagementClient keyManagementClient;
  private ClientPool<IMetaStoreClient, TException> clients;
  private boolean listAllTables = false;
  private boolean uniqueTableLocation;
  private Map<String, String> catalogProperties;
  private CloseableGroup closeableGroup;

  public HiveCatalog() {}

  @Override
  public void initialize(String inputName, Map<String, String> properties) {
    this.catalogProperties = ImmutableMap.copyOf(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,
          LocationUtil.stripTrailingSlash(properties.get(CatalogProperties.WAREHOUSE_LOCATION)));
    }

    this.listAllTables =
        Boolean.parseBoolean(properties.getOrDefault(LIST_ALL_TABLES, LIST_ALL_TABLES_DEFAULT));

    String fileIOImpl = properties.get(CatalogProperties.FILE_IO_IMPL);
    this.fileIO =

View on GitHub (pinned to 86d9c8fc54)