From 432b2197fdee4f1615d6ef651b1102faf16a48a5 Mon Sep 17 00:00:00 2001 From: Aditya Kishore Date: Fri, 13 Feb 2015 18:35:33 -0800 Subject: [PATCH] HBASE-13010 HFileOutputFormat2 partitioner's path is hard-coded as '/tmp' Signed-off-by: Andrew Purtell --- .../hadoop/hbase/mapreduce/HFileOutputFormat2.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/HFileOutputFormat2.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/HFileOutputFormat2.java index 6572684d212..465be5656ad 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/HFileOutputFormat2.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/HFileOutputFormat2.java @@ -585,17 +585,17 @@ public class HFileOutputFormat2 */ static void configurePartitioner(Job job, List splitPoints) throws IOException { - + Configuration conf = job.getConfiguration(); // create the partitions file - FileSystem fs = FileSystem.get(job.getConfiguration()); - Path partitionsPath = new Path("/tmp", "partitions_" + UUID.randomUUID()); + FileSystem fs = FileSystem.get(conf); + Path partitionsPath = new Path(conf.get("hadoop.tmp.dir"), "partitions_" + UUID.randomUUID()); fs.makeQualified(partitionsPath); - writePartitions(job.getConfiguration(), partitionsPath, splitPoints); + writePartitions(conf, partitionsPath, splitPoints); fs.deleteOnExit(partitionsPath); // configure job to use it job.setPartitionerClass(TotalOrderPartitioner.class); - TotalOrderPartitioner.setPartitionFile(job.getConfiguration(), partitionsPath); + TotalOrderPartitioner.setPartitionFile(conf, partitionsPath); } /**