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-17309) alter partition onto a table not in current database throw InvalidOperationException
Date Sun, 13 Aug 2017 16:59:01 GMT

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

Hive QA commented on HIVE-17309:
--------------------------------



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

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

{color:red}ERROR:{color} -1 due to 11 failed/errored test(s), 11005 tests executed
*Failed tests:*
{noformat}
org.apache.hadoop.hive.cli.TestBeeLineDriver.testCliDriver[insert_overwrite_local_directory_1]
(batchId=240)
org.apache.hadoop.hive.cli.TestBlobstoreCliDriver.testCliDriver[insert_overwrite_dynamic_partitions_merge_move]
(batchId=243)
org.apache.hadoop.hive.cli.TestBlobstoreCliDriver.testCliDriver[insert_overwrite_dynamic_partitions_merge_only]
(batchId=243)
org.apache.hadoop.hive.cli.TestBlobstoreCliDriver.testCliDriver[insert_overwrite_dynamic_partitions_move_only]
(batchId=243)
org.apache.hadoop.hive.cli.TestMiniSparkOnYarnCliDriver.testCliDriver[spark_dynamic_partition_pruning]
(batchId=169)
org.apache.hadoop.hive.cli.TestMiniSparkOnYarnCliDriver.testCliDriver[spark_dynamic_partition_pruning_mapjoin_only]
(batchId=170)
org.apache.hadoop.hive.cli.TestMiniSparkOnYarnCliDriver.testCliDriver[spark_vectorized_dynamic_partition_pruning]
(batchId=169)
org.apache.hadoop.hive.cli.TestMiniTezCliDriver.testCliDriver[explainuser_3] (batchId=99)
org.apache.hive.hcatalog.api.TestHCatClient.testPartitionRegistrationWithCustomSchema (batchId=180)
org.apache.hive.hcatalog.api.TestHCatClient.testPartitionSpecRegistrationWithCustomSchema
(batchId=180)
org.apache.hive.hcatalog.api.TestHCatClient.testTableSchemaPropagation (batchId=180)
{noformat}

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

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: 11 tests failed
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12881656 - PreCommit-HIVE-Build

> alter partition onto a table not in current database throw InvalidOperationException
> ------------------------------------------------------------------------------------
>
>                 Key: HIVE-17309
>                 URL: https://issues.apache.org/jira/browse/HIVE-17309
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 1.2.2, 2.1.1, 2.2.0
>            Reporter: Wang Haihua
>            Assignee: Wang Haihua
>         Attachments: HIVE-17309.1.patch
>
>
> When executor alter partition onto a table which existed not in current database, InvalidOperationException
thrown.
> SQL example:
> {code}
> use default;
> ALTER TABLE anotherdb.test_table_for_alter_partition_nocurrentdb partition(ds='haihua001')
CHANGE COLUMN a a_new BOOLEAN;
> {code}
> We see this code in {{DDLTask.java}} potential problem that not transfer the qualified
table name with database name when {{db.alterPartitions}} called.
> {code}
>       if (allPartitions == null) {
>         db.alterTable(alterTbl.getOldName(), tbl, alterTbl.getIsCascade(), alterTbl.getEnvironmentContext());
>       } else {
>         db.alterPartitions(tbl.getTableName(), allPartitions, alterTbl.getEnvironmentContext());
>       }
> {code}
> stacktrace:
> {code}
> 2017-07-19T11:06:39,639  INFO [main] metastore.HiveMetaStore: New partition values:[2017-07-14]
> 2017-07-19T11:06:39,654 ERROR [main] metastore.RetryingHMSHandler: InvalidOperationException(message:alter
is not possible)
>     at org.apache.hadoop.hive.metastore.HiveAlterHandler.alterPartitions(HiveAlterHandler.java:526)
>     at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.alter_partitions_with_environment_context(HiveMetaStore.java:3560)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:606)
>     at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invokeInternal(RetryingHMSHandler.java:140)
>     at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:99)
>     at com.sun.proxy.$Proxy21.alter_partitions_with_environment_context(Unknown Source)
>     at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.alter_partitions(HiveMetaStoreClient.java:1486)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:606)
>     at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.invoke(RetryingMetaStoreClient.java:154)
>     at com.sun.proxy.$Proxy22.alter_partitions(Unknown Source)
>     at org.apache.hadoop.hive.ql.metadata.Hive.alterPartitions(Hive.java:712)
>     at org.apache.hadoop.hive.ql.exec.DDLTask.alterTable(DDLTask.java:3338)
>     at org.apache.hadoop.hive.ql.exec.DDLTask.execute(DDLTask.java:368)
>     at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:197)
>     at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:100)
>     at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:2166)
>     at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1837)
>     at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1713)
>     at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1543)
>     at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1174)
>     at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1164)
>     at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:232)
>     at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:183)
>     at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:399)
>     at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:776)
>     at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:714)
>     at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:641)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:606)
>     at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
>     at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
> 2017-07-19T11:06:39,669 ERROR [main] exec.DDLTask: org.apache.hadoop.hive.ql.metadata.HiveException:
Unable to alter partition. alter is not possible
>     at org.apache.hadoop.hive.ql.metadata.Hive.alterPartitions(Hive.java:716)
>     at org.apache.hadoop.hive.ql.exec.DDLTask.alterTable(DDLTask.java:3338)
>     at org.apache.hadoop.hive.ql.exec.DDLTask.execute(DDLTask.java:368)
>     at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:197)
>     at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:100)
>     at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:2166)
>     at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1837)
>     at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1713)
>     at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1543)
>     at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1174)
>     at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1164)
>     at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:232)
>     at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:183)
>     at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:399)
>     at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:776)
>     at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:714)
>     at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:641)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:606)
>     at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
>     at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
> Caused by: InvalidOperationException(message:alter is not possible)
>     at org.apache.hadoop.hive.metastore.HiveAlterHandler.alterPartitions(HiveAlterHandler.java:526)
>     at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.alter_partitions_with_environment_context(HiveMetaStore.java:3560)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:606)
>     at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invokeInternal(RetryingHMSHandler.java:140)
>     at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:99)
>     at com.sun.proxy.$Proxy21.alter_partitions_with_environment_context(Unknown Source)
>     at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.alter_partitions(HiveMetaStoreClient.java:1486)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:606)
>     at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.invoke(RetryingMetaStoreClient.java:154)
>     at com.sun.proxy.$Proxy22.alter_partitions(Unknown Source)
>     at org.apache.hadoop.hive.ql.metadata.Hive.alterPartitions(Hive.java:712)
>     ... 22 more
> FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Unable
to alter partition. alter is not possible
> 2017-07-19T11:06:39,671 ERROR [main] ql.Driver: FAILED: Execution Error, return code
1 from org.apache.hadoop.hive.ql.exec.DDLTask. Unable to alter partition. alter is not possible
> {code}
> Fix proposal is transfer the qualified table name when {{db.alterPartitions}} called.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message