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

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

                Author: ASF GitHub Bot
            Created on: 26/Feb/20 08:55
            Start Date: 26/Feb/20 08:55
    Worklog Time Spent: 10m 
      Work Description: aasha commented on pull request #911: HIVE-22865 
Include data in replication staging directory
URL: https://github.com/apache/hive/pull/911#discussion_r384348340
 
 

 ##########
 File path: ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ReplDumpTask.java
 ##########
 @@ -582,10 +592,20 @@ void dumpTable(String dbName, String tblName, String 
validTxnList, Path dbRoot,
     }
     MmContext mmCtx = MmContext.createIfNeeded(tableSpec.tableHandle);
     tuple.replicationSpec.setRepl(true);
-    new TableExport(
-        exportPaths, tableSpec, tuple.replicationSpec, hiveDb, distCpDoAsUser, 
conf, mmCtx).write();
-
+    Path replDataDir = new Path(dumproot, EximUtil.DATA_PATH_NAME);
+    new TableExport(exportPaths, tableSpec, tuple.replicationSpec, hiveDb, 
distCpDoAsUser, conf, mmCtx).write();
+    if (conf.getBoolVar(HiveConf.ConfVars.REPL_DUMP_METADATA_ONLY) ||
+            (TableType.EXTERNAL_TABLE.equals(tuple.object.getTableType())
+                    && 
(!conf.getBoolVar(HiveConf.ConfVars.REPL_INCLUDE_EXTERNAL_TABLES)))) {
+          return;
+    }
     replLogger.tableLog(tblName, tableSpec.tableHandle.getTableType());
+    Path dumpDataDir = new Path(dumproot, EximUtil.DATA_PATH_NAME);
+    Path tblCopyPath = new Path(dumpDataDir, dbName);
+    tblCopyPath = new Path(tblCopyPath, tblName);
+    Task<?> copyTask = ReplCopyTask.getLoadCopyTask(
+            tuple.replicationSpec, tuple.object.getPath(), tblCopyPath, conf, 
false);
+    this.addDependentTask(copyTask);
 
 Review comment:
   We are not using dynamic DAG traversal for this?
 
----------------------------------------------------------------
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:
us...@infra.apache.org


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

    Worklog Id:     (was: 393259)
    Time Spent: 1h 50m  (was: 1h 40m)

> Include data in replication staging directory
> ---------------------------------------------
>
>                 Key: HIVE-22865
>                 URL: https://issues.apache.org/jira/browse/HIVE-22865
>             Project: Hive
>          Issue Type: Task
>            Reporter: PRAVIN KUMAR SINHA
>            Assignee: PRAVIN KUMAR SINHA
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: HIVE-22865.1.patch, HIVE-22865.2.patch, 
> HIVE-22865.3.patch
>
>          Time Spent: 1h 50m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to