hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1640684 - /hive/branches/HIVE-8065/common/src/java/org/apache/hadoop/hive/common/FileUtils.java
Date Thu, 20 Nov 2014 06:10:45 GMT
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);



Mime
View raw message