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/77b7fc3d Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/77b7fc3d Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/77b7fc3d Branch: refs/heads/llap Commit: 77b7fc3df9c783bef7da13dd3a5762e89d3bb7ba Parents: 65d6366 Author: Prasanth Jayachandran <[email protected]> Authored: Fri May 1 17:38:43 2015 -0700 Committer: Prasanth Jayachandran <[email protected]> Committed: Fri May 1 17:38:43 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/77b7fc3d/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/77b7fc3d/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);
