diff --git hcatalog/core/src/main/java/org/apache/hive/hcatalog/mapreduce/FileOutputCommitterContainer.java hcatalog/core/src/main/java/org/apache/hive/hcatalog/mapreduce/FileOutputCommitterContainer.java index 4a76010904..75aebe076b 100644 --- hcatalog/core/src/main/java/org/apache/hive/hcatalog/mapreduce/FileOutputCommitterContainer.java +++ hcatalog/core/src/main/java/org/apache/hive/hcatalog/mapreduce/FileOutputCommitterContainer.java @@ -361,9 +361,9 @@ private Partition constructPartition( && Boolean.parseBoolean((String)table.getProperty("EXTERNAL")) && jobInfo.getLocation() != null && jobInfo.getLocation().length() > 0) { // Now, we need to de-scratchify this location - i.e., get rid of any - // _SCRATCH[\d].?[\d]+ from the location. + // _SCRATCH[\d]+.?[\d]+[eE]?[-]?[\d]* from the location. String jobLocation = jobInfo.getLocation(); - String finalLocn = jobLocation.replaceAll(Path.SEPARATOR + SCRATCH_DIR_NAME + "\\d\\.?\\d+",""); + String finalLocn = jobLocation.replaceAll(Path.SEPARATOR + SCRATCH_DIR_NAME + "\\d+\\.?\\d+[eE]?[-]?\\d*", ""); partPath = new Path(finalLocn); } else { partPath = new Path(partLocnRoot);