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

svn commit: r1637317 - /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/AbstractFileMergeOperator.java

Author: gunther
Date: Fri Nov  7 09:11:35 2014
New Revision: 1637317

URL: http://svn.apache.org/r1637317
Log:
HIVE-8771: Abstract merge file operator does not move/rename incompatible files correctly (Prasanth J via Gunther Hagleitner)

Modified:
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/AbstractFileMergeOperator.java

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/AbstractFileMergeOperator.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/AbstractFileMergeOperator.java?rev=1637317&r1=1637316&r2=1637317&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/AbstractFileMergeOperator.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/AbstractFileMergeOperator.java Fri Nov  7 09:11:35 2014
@@ -212,14 +212,13 @@ public abstract class AbstractFileMergeO
         // move any incompatible files to final path
         if (!incompatFileSet.isEmpty()) {
           for (Path incompatFile : incompatFileSet) {
-            String fileName = incompatFile.getName();
-            Path destFile = new Path(finalPath.getParent(), fileName);
+            Path destDir = finalPath.getParent();
             try {
-              Utilities.renameOrMoveFiles(fs, incompatFile, destFile);
+              Utilities.renameOrMoveFiles(fs, incompatFile, destDir);
               LOG.info("Moved incompatible file " + incompatFile + " to " +
-                  destFile);
+                  destDir);
             } catch (HiveException e) {
-              LOG.error("Unable to move " + incompatFile + " to " + destFile);
+              LOG.error("Unable to move " + incompatFile + " to " + destDir);
               throw new IOException(e);
             }
           }