hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ser...@apache.org
Subject [02/16] hive git commit: HIVE-17748 : ReplCopyTask doesn't support multi-file CopyWork (Sergey Shelukhin, reviewed by Eugene Koifman)
Date Mon, 30 Oct 2017 19:13:21 GMT
HIVE-17748 : ReplCopyTask doesn't support multi-file CopyWork (Sergey Shelukhin, reviewed by
Eugene Koifman)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/e10adddf
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/e10adddf
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/e10adddf

Branch: refs/heads/master
Commit: e10adddf328d7d1d542fdf9574c16dabaaade9c1
Parents: adaa084
Author: sergey <sershe@apache.org>
Authored: Mon Oct 30 11:52:40 2017 -0700
Committer: sergey <sershe@apache.org>
Committed: Mon Oct 30 11:52:40 2017 -0700

----------------------------------------------------------------------
 ql/src/java/org/apache/hadoop/hive/ql/exec/ReplCopyTask.java | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/e10adddf/ql/src/java/org/apache/hadoop/hive/ql/exec/ReplCopyTask.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/ReplCopyTask.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/ReplCopyTask.java
index 33a6c04..7ec490b 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/ReplCopyTask.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/ReplCopyTask.java
@@ -61,6 +61,12 @@ public class ReplCopyTask extends Task<ReplCopyWork> implements Serializable
{
     FileSystem dstFs = null;
     Path toPath = null;
     try {
+      // Note: CopyWork supports copying multiple files, but ReplCopyWork doesn't.
+      //       Not clear of ReplCopyWork should inherit from CopyWork.
+      if (work.getFromPaths().length > 1 || work.getToPaths().length > 1) {
+        throw new RuntimeException("Invalid ReplCopyWork: "
+            + work.getFromPaths() + ", " + work.getToPaths());
+      }
       Path fromPath = work.getFromPaths()[0];
       toPath = work.getToPaths()[0];
 


Mime
View raw message