You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by br...@apache.org on 2014/11/20 07:10:45 UTC

svn commit: r1640684 - /hive/branches/HIVE-8065/common/src/java/org/apache/hadoop/hive/common/FileUtils.java

Author: brock
Date: Thu Nov 20 06:10:44 2014
New Revision: 1640684

URL: http://svn.apache.org/r1640684
Log:
HIVE-8919 - Fix FileUtils.copy() method to call distcp only for HDFS files (not local files) (Sergio Pena via Brock)

Modified:
    hive/branches/HIVE-8065/common/src/java/org/apache/hadoop/hive/common/FileUtils.java

Modified: hive/branches/HIVE-8065/common/src/java/org/apache/hadoop/hive/common/FileUtils.java
URL: http://svn.apache.org/viewvc/hive/branches/HIVE-8065/common/src/java/org/apache/hadoop/hive/common/FileUtils.java?rev=1640684&r1=1640683&r2=1640684&view=diff
==============================================================================
--- hive/branches/HIVE-8065/common/src/java/org/apache/hadoop/hive/common/FileUtils.java (original)
+++ hive/branches/HIVE-8065/common/src/java/org/apache/hadoop/hive/common/FileUtils.java Thu Nov 20 06:10:44 2014
@@ -537,7 +537,8 @@ public final class FileUtils {
     boolean copied;
 
     /* Run distcp if source file/dir is too big */
-    if (srcFS.getFileStatus(src).getLen() > conf.getLongVar(HiveConf.ConfVars.HIVE_EXEC_COPYFILE_MAXSIZE)) {
+    if (srcFS.getUri().getScheme().equals("hdfs") &&
+        srcFS.getFileStatus(src).getLen() > conf.getLongVar(HiveConf.ConfVars.HIVE_EXEC_COPYFILE_MAXSIZE)) {
       LOG.info("Source is " + srcFS.getFileStatus(src).getLen() + " bytes. (MAX: " + conf.getLongVar(HiveConf.ConfVars.HIVE_EXEC_COPYFILE_MAXSIZE) + ")");
       LOG.info("Launch distributed copy (distcp) job.");
       copied = shims.runDistCp(src, dst, conf);