hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hive QA (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-16993) ThriftHiveMetastore.create_database can fail if the locationUri is not set
Date Wed, 05 Jul 2017 23:29:00 GMT

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

Hive QA commented on HIVE-16993:
--------------------------------



Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12875800/HIVE-17008.7.patch

{color:green}SUCCESS:{color} +1 due to 10 test(s) being added or modified.

{color:red}ERROR:{color} -1 due to 19 failed/errored test(s), 10817 tests executed
*Failed tests:*
{noformat}
org.apache.hadoop.hive.cli.TestMiniLlapCliDriver.testCliDriver[llap_smb] (batchId=143)
org.apache.hadoop.hive.cli.TestMiniLlapCliDriver.testCliDriver[orc_ppd_basic] (batchId=140)
org.apache.hadoop.hive.cli.TestMiniSparkOnYarnCliDriver.testCliDriver[orc_merge9] (batchId=167)
org.apache.hadoop.hive.cli.TestPerfCliDriver.testCliDriver[query14] (batchId=232)
org.apache.hadoop.hive.cli.TestSparkCliDriver.org.apache.hadoop.hive.cli.TestSparkCliDriver
(batchId=101)
org.apache.hadoop.hive.metastore.hbase.TestHBaseImport.importAll (batchId=208)
org.apache.hadoop.hive.metastore.hbase.TestHBaseImport.importOneDb (batchId=208)
org.apache.hadoop.hive.metastore.hbase.TestHBaseImport.importOneFunc (batchId=208)
org.apache.hadoop.hive.metastore.hbase.TestHBaseImport.importOneRole (batchId=208)
org.apache.hadoop.hive.metastore.hbase.TestHBaseImport.importOneTableNonPartitioned (batchId=208)
org.apache.hadoop.hive.metastore.hbase.TestHBaseImport.importOneTablePartitioned (batchId=208)
org.apache.hadoop.hive.metastore.hbase.TestHBaseImport.importSecurity (batchId=208)
org.apache.hadoop.hive.metastore.hbase.TestHBaseImport.importTablesWithConstraints (batchId=208)
org.apache.hadoop.hive.metastore.hbase.TestHBaseImport.parallel (batchId=208)
org.apache.hadoop.hive.metastore.hbase.TestHBaseImport.parallelOdd (batchId=208)
org.apache.hive.hcatalog.api.TestHCatClient.testPartitionRegistrationWithCustomSchema (batchId=177)
org.apache.hive.hcatalog.api.TestHCatClient.testPartitionSpecRegistrationWithCustomSchema
(batchId=177)
org.apache.hive.hcatalog.api.TestHCatClient.testTableSchemaPropagation (batchId=177)
org.apache.hive.jdbc.TestJdbcDriver2.testSelectExecAsync2 (batchId=224)
{noformat}

Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/5895/testReport
Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/5895/console
Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-5895/

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.TestCheckPhase
Executing org.apache.hive.ptest.execution.PrepPhase
Executing org.apache.hive.ptest.execution.ExecutionPhase
Executing org.apache.hive.ptest.execution.ReportingPhase
Tests exited with: TestsFailedException: 19 tests failed
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12875800 - PreCommit-HIVE-Build

> ThriftHiveMetastore.create_database can fail if the locationUri is not set
> --------------------------------------------------------------------------
>
>                 Key: HIVE-16993
>                 URL: https://issues.apache.org/jira/browse/HIVE-16993
>             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}}|https://github.com/apache/hive/blob/3fa48346d509813977cd3c7622d581c0ccd51e99/metastore/if/hive_metastore.thrift#L1078]
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}}|https://github.com/apache/hive/blob/3fa48346d509813977cd3c7622d581c0ccd51e99/metastore/if/hive_metastore.thrift#L270]
Thrift field is 'default requiredness (implicit)', and Thrift [does not specify|https://thrift.apache.org/docs/idl#default-requiredness-implicit]
whether unset default requiredness fields are encoded.  Empirically, the Java generated code
[does not write the {{locationUri}}|https://github.com/apache/hive/blob/3fa48346d509813977cd3c7622d581c0ccd51e99/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java#L938-L942]
when the field is unset, while the C++ generated code [does|https://github.com/apache/hive/blob/3fa48346d509813977cd3c7622d581c0ccd51e99/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp#L3888-L3890].
> The MetaStore treats the field as optional, and [fills in a default value|https://github.com/apache/hive/blob/3fa48346d509813977cd3c7622d581c0ccd51e99/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java#L867-L871]
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
(v6.4.14#64029)

Mime
View raw message