Repository: hive Updated Branches: refs/heads/branch-2.2 b8cff2d22 -> fbbffda3a
HIVE-17803: With Pig multi-query, 2 HCatStorers writing to the same table will trample each other's outputs (Chris Drome, reviewed by Mithun Radhakrishnan) Project: http://git-wip-us.apache.org/repos/asf/hive/repo Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/fbbffda3 Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/fbbffda3 Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/fbbffda3 Branch: refs/heads/branch-2.2 Commit: fbbffda3ad634c607237093452dbebda11392aaa Parents: b8cff2d Author: Mithun RK <mit...@apache.org> Authored: Fri Oct 13 14:21:39 2017 -0700 Committer: Mithun Radhakrishnan <mit...@apache.org> Committed: Fri Oct 13 14:23:46 2017 -0700 ---------------------------------------------------------------------- .../hive/hcatalog/mapreduce/FileOutputCommitterContainer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hive/blob/fbbffda3/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 fb14ced..afdf168 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 @@ -597,9 +597,9 @@ class FileOutputCommitterContainer extends OutputCommitterContainer { final Path parentDir = finalOutputPath.getParent(); // Create the directory - Path placeholder = new Path(parentDir, "_placeholder"); + Path placeholder = new Path(parentDir, "_placeholder" + String.valueOf(Math.random())); if (fs.mkdirs(parentDir)) { - // It is weired but we need a placeholder, + // It is weird but we need a placeholder, // otherwise rename cannot move file to the right place fs.create(placeholder).close(); }