You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by pr...@apache.org on 2015/05/02 02:38:25 UTC

hive git commit: HIVE-10444: HIVE-10223 breaks hadoop-1 build (Chris Nauroth reviewed by Alexander Pivovarov)

Repository: hive
Updated Branches:
  refs/heads/branch-1.2 ff1f11785 -> a0d84d837


HIVE-10444: HIVE-10223 breaks hadoop-1 build (Chris Nauroth reviewed by Alexander Pivovarov)


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

Branch: refs/heads/branch-1.2
Commit: a0d84d837dd9824859c8d482ba2c8f3025c354df
Parents: ff1f117
Author: Prasanth Jayachandran <j....@gmail.com>
Authored: Fri May 1 17:38:11 2015 -0700
Committer: Prasanth Jayachandran <j....@gmail.com>
Committed: Fri May 1 17:38:11 2015 -0700

----------------------------------------------------------------------
 .../hcatalog/mapreduce/FileOutputCommitterContainer.java     | 8 ++------
 .../apache/hive/hcatalog/templeton/tool/LaunchMapper.java    | 2 +-
 2 files changed, 3 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/a0d84d83/hcatalog/core/src/main/java/org/apache/hive/hcatalog/mapreduce/FileOutputCommitterContainer.java
----------------------------------------------------------------------
diff --git a/hcatalog/core/src/main/java/org/apache/hive/hcatalog/mapreduce/FileOutputCommitterContainer.java b/hcatalog/core/src/main/java/org/apache/hive/hcatalog/mapreduce/FileOutputCommitterContainer.java
index ad5122d..8146d85 100644
--- a/hcatalog/core/src/main/java/org/apache/hive/hcatalog/mapreduce/FileOutputCommitterContainer.java
+++ b/hcatalog/core/src/main/java/org/apache/hive/hcatalog/mapreduce/FileOutputCommitterContainer.java
@@ -512,7 +512,7 @@ class FileOutputCommitterContainer extends OutputCommitterContainer {
     final Path finalOutputPath = getFinalPath(fs, file, srcDir, destDir, immutable);
     FileStatus fileStatus = fs.getFileStatus(file);
 
-    if (fileStatus.isFile()) {
+    if (!fileStatus.isDir()) {
       if (dryRun){
         if (immutable){
           // Dryrun checks are meaningless for mutable table - we should always succeed
@@ -542,7 +542,7 @@ class FileOutputCommitterContainer extends OutputCommitterContainer {
           }
         }
       }
-    } else if (fileStatus.isDirectory()) {
+    } else {
 
       FileStatus[] children = fs.listStatus(file);
       FileStatus firstChild = null;
@@ -612,10 +612,6 @@ class FileOutputCommitterContainer extends OutputCommitterContainer {
 
         }
       }
-    } else {
-      // Should never happen
-      final String msg = "Unknown file type being asked to be moved, erroring out";
-      throw new HCatException(ErrorType.ERROR_MOVE_FAILED, msg);
     }
   }
 

http://git-wip-us.apache.org/repos/asf/hive/blob/a0d84d83/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/tool/LaunchMapper.java
----------------------------------------------------------------------
diff --git a/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/tool/LaunchMapper.java b/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/tool/LaunchMapper.java
index 2d1af4b..3edd449 100644
--- a/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/tool/LaunchMapper.java
+++ b/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/tool/LaunchMapper.java
@@ -128,7 +128,7 @@ public class LaunchMapper extends Mapper<NullWritable, NullWritable, Text, Text>
       Path p = new Path(f);
       FileStatus fileStatus = fs.getFileStatus(p);
       paths.append(f);
-      if(fileStatus.isDirectory()) {
+      if(fileStatus.isDir()) {
         paths.append(File.separator).append("*");
       }
       paths.append(File.pathSeparator);