pkumarsinha commented on a change in pull request #1084:
URL: https://github.com/apache/hive/pull/1084#discussion_r440929491



##########
File path: 
ql/src/java/org/apache/hadoop/hive/ql/exec/repl/bootstrap/load/table/LoadPartitions.java
##########
@@ -243,29 +246,34 @@ private void addPartition(boolean hasMorePartitions, 
AlterTableAddPartitionDesc
               : LoadFileType.OVERWRITE_EXISTING);
       stagingDir = 
PathUtils.getExternalTmpPath(replicaWarehousePartitionLocation, 
context.pathInfo);
     }
-
-    Task<?> copyTask = ReplCopyTask.getLoadCopyTask(
-        event.replicationSpec(),
-        new Path(event.dataPath() + Path.SEPARATOR + 
getPartitionName(sourceWarehousePartitionLocation)),
-        stagingDir,
-        context.hiveConf, false, false
-    );
-
+    Path partDataSrc = new Path(event.dataPath() + File.separator + 
getPartitionName(sourceWarehousePartitionLocation));
+    Path moveSource = performOnlyMove ? partDataSrc : stagingDir;
     Task<?> movePartitionTask = null;
     if (loadFileType != LoadFileType.IGNORE) {
       // no need to create move task, if file is moved directly to target 
location.
-      movePartitionTask = movePartitionTask(table, partSpec, stagingDir, 
loadFileType);
+      movePartitionTask = movePartitionTask(table, partSpec, moveSource, 
loadFileType);
     }
-
-    if (ptnRootTask == null) {
-      ptnRootTask = copyTask;
+    if (performOnlyMove) {
+      if (ptnRootTask == null) {
+        ptnRootTask = addPartTask;

Review comment:
       Not changing anything with respect to addPartTask. Just the copy-move is 
getting replaced with single move. 




----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to