Return-Path: X-Original-To: apmail-hbase-commits-archive@www.apache.org Delivered-To: apmail-hbase-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1BD6910764 for ; Sat, 14 Feb 2015 03:19:46 +0000 (UTC) Received: (qmail 73739 invoked by uid 500); 14 Feb 2015 03:19:41 -0000 Delivered-To: apmail-hbase-commits-archive@hbase.apache.org Received: (qmail 73469 invoked by uid 500); 14 Feb 2015 03:19:40 -0000 Mailing-List: contact commits-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list commits@hbase.apache.org Received: (qmail 73443 invoked by uid 99); 14 Feb 2015 03:19:40 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 14 Feb 2015 03:19:40 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 7FF33E01C2; Sat, 14 Feb 2015 03:19:40 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: apurtell@apache.org To: commits@hbase.apache.org Date: Sat, 14 Feb 2015 03:19:41 -0000 Message-Id: <3271d010e6414927ac0f816b8510466a@git.apache.org> In-Reply-To: <2ec27dbc72b54bfe882ee0e0f6a57945@git.apache.org> References: <2ec27dbc72b54bfe882ee0e0f6a57945@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [2/4] hbase git commit: HBASE-13010 HFileOutputFormat2 partitioner's path is hard-coded as '/tmp' HBASE-13010 HFileOutputFormat2 partitioner's path is hard-coded as '/tmp' Signed-off-by: Andrew Purtell Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/432b2197 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/432b2197 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/432b2197 Branch: refs/heads/branch-1 Commit: 432b2197fdee4f1615d6ef651b1102faf16a48a5 Parents: 9114ede Author: Aditya Kishore Authored: Fri Feb 13 18:35:33 2015 -0800 Committer: Andrew Purtell Committed: Fri Feb 13 18:53:26 2015 -0800 ---------------------------------------------------------------------- .../apache/hadoop/hbase/mapreduce/HFileOutputFormat2.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/432b2197/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/HFileOutputFormat2.java ---------------------------------------------------------------------- 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 6572684..465be56 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); } /**