[
https://issues.apache.org/jira/browse/HIVE-29461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18059766#comment-18059766
]
Raghav Aggarwal commented on HIVE-29461:
----------------------------------------
Hi [~dkuzmenko] , Good day
I was able to repro the stacktrace using the following command
{code:java}
curl -v -X POST "http://localhost:9001/iceberg/v1/namespaces" \
-H "Content-Type: application/json" \
-d '{
"namespace": ["testing"]
}' | jq {code}
Stacktrace:
{code:java}
{
"error": {
"message": "Warehouse location is not set:
hive.metastore.warehouse.external.dir=null",
"type": "NullPointerException",
"code": 500,
"stack": [
"java.lang.NullPointerException: Warehouse location is not set:
hive.metastore.warehouse.external.dir=null",
"\tat
org.apache.iceberg.relocated.com.google.common.base.Preconditions.checkNotNull(Preconditions.java:920)",
"\tat
org.apache.iceberg.hive.HiveCatalog.getExternalWarehouseLocation(HiveCatalog.java:717)",
"\tat
org.apache.iceberg.hive.HiveCatalog.convertToDatabase(HiveCatalog.java:750)",{code}
*IMPORTANT NOTE* : In
[HIVE-29391|https://github.com/apache/hive/commit/399200af7cb11cf6ee3329ebdabe17792e5e7e85]
https://github.com/apache/hive/blob/399200af7cb11cf6ee3329ebdabe17792e5e7e85/standalone-metastore/metastore-rest-catalog/src/main/java/org/apache/iceberg/rest/HMSCatalogFactory.java#L90
t{*}he configuration object contains the value of
`hive.metastore.warehouse.external.dir` now{*}
The new stacktrace if `hive.metastore.warehouse.external.dir` is not set in
`hive-site.xml`
{code:java}
{
"error": {
"message": "Can not create a Path from an empty string",
"type": "IllegalArgumentException",
"code": 400,
"stack": [
"java.lang.IllegalArgumentException: Can not create a Path from an empty
string",
"\tat org.apache.hadoop.fs.Path.checkPathArg(Path.java:173)",
"\tat org.apache.hadoop.fs.Path.<init>(Path.java:185)",
"\tat org.apache.hadoop.fs.Path.<init>(Path.java:120)",
"\tat
org.apache.iceberg.hive.HiveCatalog.convertToDatabase(HiveCatalog.java:750)",
"\tat
org.apache.iceberg.hive.HiveCatalog.lambda$createNamespace$12(HiveCatalog.java:475)",
{code}
Could you please clarify the acceptance criteria or remaining expectations to
resolve this ticket?
> 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)