hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Work logged] (HIVE-21678) CTAS creating a partitioned table fails because of no writeId
Date Mon, 06 May 2019 11:50:00 GMT

     [ https://issues.apache.org/jira/browse/HIVE-21678?focusedWorklogId=237735&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-237735
]

ASF GitHub Bot logged work on HIVE-21678:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 06/May/19 11:49
            Start Date: 06/May/19 11:49
    Worklog Time Spent: 10m 
      Work Description: sankarh commented on pull request #614: HIVE-21678
URL: https://github.com/apache/hive/pull/614#discussion_r281151762
 
 

 ##########
 File path: ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java
 ##########
 @@ -398,11 +398,20 @@ public int execute(DriverContext driverContext) {
         // for transactional table if write id is not set during replication from a cluster
with STRICT_MANAGED set
         // to false then set it now.
         if (tbd.getWriteId() <= 0 && AcidUtils.isTransactionalTable(table.getParameters()))
{
-          Long writeId = ReplUtils.getMigrationCurrentTblWriteId(conf);
-          if (writeId == null) {
-            throw new HiveException("MoveTask : Write id is not set in the config by open
txn task for migration");
+          if (work.getIsInReplicationScope()) {
+            Long writeId = ReplUtils.getMigrationCurrentTblWriteId(conf);
+            if (writeId == null) {
+              throw new HiveException("MoveTask : Write id is not set in the config by open
txn task for migration");
+            }
+            tbd.setWriteId(writeId);
+          } else if (tbd.isCtas()) {
+            // In CTAS flow, the table may not have got created when creating load table
task.
+            // So, fetch the writeId here from the table.
+            tbd.setWriteId(table.getTTable().getWriteId());
+          } else {
+            throw new HiveException("MoveTask : Write id is not provided for transactiona
table " +
 
 Review comment:
   Spelling error in "transactiona".
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 237735)
    Time Spent: 40m  (was: 0.5h)

> CTAS creating a partitioned table fails because of no writeId
> -------------------------------------------------------------
>
>                 Key: HIVE-21678
>                 URL: https://issues.apache.org/jira/browse/HIVE-21678
>             Project: Hive
>          Issue Type: Sub-task
>          Components: HiveServer2, repl
>    Affects Versions: 4.0.0
>            Reporter: Ashutosh Bapat
>            Assignee: Ashutosh Bapat
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: HIVE-21678.01.patch, HIVE-21678.02.patch
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> create table t1(a int, b int);
> insert into t1 values (1, 2), (3, 4);
> create table t6_part partitioned by (a) stored as orc tblproperties ("transactional"="true")
as select * from t1;
> ERROR : FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask.
MoveTask : Write id is not set in the config by open txn task for migration
> Error: Error while processing statement: FAILED: Execution Error, return code 1 from
org.apache.hadoop.hive.ql.exec.MoveTask. MoveTask : Write id is not set in the config by open
txn task for migration (state=08S01,code=1)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message