hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Burkert (JIRA)" <>
Subject [jira] [Updated] (HIVE-16993) ThriftHiveMetastore.create_database can fail if the locationUri is not set
Date Wed, 05 Jul 2017 18:23:00 GMT


Dan Burkert updated HIVE-16993:
    Attachment: HIVE-17008.7.patch

> ThriftHiveMetastore.create_database can fail if the locationUri is not set
> --------------------------------------------------------------------------
>                 Key: HIVE-16993
>                 URL:
>             Project: Hive
>          Issue Type: Bug
>          Components: Metastore
>            Reporter: Dan Burkert
>            Assignee: Dan Burkert
>         Attachments: HIVE-16993.0-master.patch, HIVE-16993.1-master.patch, HIVE-16993.2.patch,
HIVE-16993.3.patch, HIVE-16993.4.patch, HIVE-16993.5.patch, HIVE-17008.6.patch, HIVE-17008.7.patch
> Calling [{{ThriftHiveMetastore.create_database}}|]
with a database with an unset {{locationUri}} field through the C++ implementation fails with:
> {code}
> MetaException(message=java.lang.IllegalArgumentException: Can not create a Path from
an empty string)
> {code}
> The [{{locationUri}}|]
Thrift field is 'default requiredness (implicit)', and Thrift [does not specify|]
whether unset default requiredness fields are encoded.  Empirically, the Java generated code
[does not write the {{locationUri}}|]
when the field is unset, while the C++ generated code [does|].
> The MetaStore treats the field as optional, and [fills in a default value|]
if the field is unset.
> The end result is that when the C++ implementation sends a {{Database}} without the field
set, it actually writes an empty string, and the MetaStore treats it as a set field (non-null),
and then calls a {{Path}} API which rejects the empty string.  The fix is simple: make the
{{locationUri}} field optional in metastore.thrift.

This message was sent by Atlassian JIRA

View raw message