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 @@ private void moveTaskOutputs(FileSystem fs, Path file, Path srcDir, 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 @@ private void moveTaskOutputs(FileSystem fs, Path file, Path srcDir, } } } - } else if (fileStatus.isDirectory()) { + } else { FileStatus[] children = fs.listStatus(file); FileStatus firstChild = null; @@ -612,10 +612,6 @@ private void moveTaskOutputs(FileSystem fs, Path file, Path srcDir, } } - } 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); } } 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 @@ private static void handleHadoopClasspathExtras(Configuration conf, Map