[
https://issues.apache.org/jira/browse/HIVE-29461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18059930#comment-18059930
]
Denys Kuzmenko edited comment on HIVE-29461 at 2/20/26 4:02 PM:
----------------------------------------------------------------
[~Aggarwal_Raghav] in Hive we compensate the problem by calling `setConf` and
`initialize` is actually redundant.
{code}
hiveCatalog.setConf(configuration);
final String catalogName = MetastoreConf.getVar(configuration,
MetastoreConf.ConfVars.CATALOG_DEFAULT);
hiveCatalog.initialize(catalogName, properties);
{code}
i think we need to strive for clean API: propagate all the configs in
`initialize` without selective filtering and drop the setConf() method.
was (Author: dkuzmenko):
[~Aggarwal_Raghav] in Hive we compensate the problem by calling `setConf` and
`initialize` is actually redundant.
{code}
hiveCatalog.setConf(configuration);
final String catalogName = MetastoreConf.getVar(configuration,
MetastoreConf.ConfVars.CATALOG_DEFAULT);
hiveCatalog.initialize(catalogName, properties);
{code}
i think we need to strive for clean API: propagate all the configs in
`initialize` without selective filtering and drop the set method.
> Iceberg: HIVE_METASTORE_WAREHOUSE_EXTERNAL is ignored when initializing
> HiveCatalog
> -----------------------------------------------------------------------------------
>
> Key: HIVE-29461
> URL: https://issues.apache.org/jira/browse/HIVE-29461
> Project: Hive
> Issue Type: Bug
> Components: Iceberg integration
> Affects Versions: 4.2.0
> Reporter: Denys Kuzmenko
> Priority: Major
> Labels: hive-4.3.0-must
>
> stacktrace
> {code}
> (executor-thread-1) Unhandled exception returning INTERNAL_SERVER_ERROR :
> java.lang.NullPointerException: Warehouse location is not set:
> hive.metastore.warehouse.external.dir=null
> {code}
> invocation
> {code}
> private String getExternalWarehouseLocation() {
> String warehouseLocation =
> conf.get(HiveConf.ConfVars.HIVE_METASTORE_WAREHOUSE_EXTERNAL.varname);
> Preconditions.checkNotNull(warehouseLocation,
> "Warehouse location is not set:
> hive.metastore.warehouse.external.dir=null");
> return warehouseLocation;
> }
> {code}
> HIVE_METASTORE_WAREHOUSE_EXTERNAL is missing in
> {code}
> public void initialize(String inputName, Map<String, String> properties) {
> this.catalogProperties = ImmutableMap.copyOf(properties);
> ....
> if (properties.containsKey(CatalogProperties.WAREHOUSE_LOCATION)) {
> this.conf.set(HiveConf.ConfVars.METASTORE_WAREHOUSE.varname,
>
> LocationUtil.stripTrailingSlash(properties.get(CatalogProperties.WAREHOUSE_LOCATION)));
> }
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)