Repository: hive Updated Branches: refs/heads/master 8d9b84294 -> 317922af8
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/317922af Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/317922af Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/317922af Branch: refs/heads/master Commit: 317922af80060fcc12c72c0627396f2908f4fea5 Parents: 8d9b842 Author: Mithun RK <mit...@apache.org> Authored: Fri Oct 13 14:21:39 2017 -0700 Committer: Mithun RK <mit...@apache.org> Committed: Thu Oct 19 10:53:44 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/317922af/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 f787d4f..04d78ee 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 @@ -582,9 +582,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(); }