[ 
https://issues.apache.org/jira/browse/HIVE-29461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18076521#comment-18076521
 ] 

Stefan Wang commented on HIVE-29461:
------------------------------------

[~Aggarwal_Raghav]  — your Feb analysis nailed the root cause (the
  externalwarehouse / external-warehouse key mismatch + initialize not
  reading the property).

 

  I picked it up since I did not see open / draft PRs
  if your week has freed up and you'd rather take this through, say the
  word and I'll close my PR :p

  PR: https://github.com/apache/hive/pull/6454

  HiveCatalog.initialize was propagating CatalogProperties.URI and
  CatalogProperties.WAREHOUSE_LOCATION to the Hadoop config but silently
  dropping the external-warehouse value, so getExternalWarehouseLocation()
  failed with "hive.metastore.warehouse.external.dir=null". Patch adds
  HiveCatalog.EXTERNAL_WAREHOUSE_LOCATION as a canonical catalog property
  and unifies HMSCatalogFactory + IcebergSummaryHandler onto it.

> 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, pull-request-available
>
> 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)

Reply via email to