hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mberto...@apache.org
Subject [5/6] git commit: Revert "LoadIncrementalHFiles is not picking up the -D option"
Date Thu, 21 Aug 2014 18:15:06 GMT
Revert "LoadIncrementalHFiles is not picking up the -D option"

This reverts commit 1f053b274b980a02ca50843dff5c02f037c0a3bc.


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/fa1a3452
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/fa1a3452
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/fa1a3452

Branch: refs/heads/0.98
Commit: fa1a34520a3780937c3ece7844d3f46a73a3968b
Parents: 1f053b2
Author: Matteo Bertozzi <matteo.bertozzi@cloudera.com>
Authored: Thu Aug 21 19:12:19 2014 +0100
Committer: Matteo Bertozzi <matteo.bertozzi@cloudera.com>
Committed: Thu Aug 21 19:12:19 2014 +0100

----------------------------------------------------------------------
 .../hbase/mapreduce/LoadIncrementalHFiles.java  | 31 +++++++-------------
 1 file changed, 10 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/fa1a3452/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.java
index 1188448..bb0c022 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.java
@@ -120,26 +120,17 @@ public class LoadIncrementalHFiles extends Configured implements Tool
{
   private String bulkToken;
   private UserProvider userProvider;
 
-  private LoadIncrementalHFiles() {}
-
   public LoadIncrementalHFiles(Configuration conf) throws Exception {
     super(conf);
-    initialize();
-  }
-
-  private void initialize() throws Exception {
-    if (hbAdmin == null) {
-      // make a copy, just to be sure we're not overriding someone else's config
-      setConf(HBaseConfiguration.create(getConf()));
-      Configuration conf = getConf();
-      // disable blockcache for tool invocation, see HBASE-10500
-      conf.setFloat(HConstants.HFILE_BLOCK_CACHE_SIZE_KEY, 0);
-      this.hbAdmin = new HBaseAdmin(conf);
-      this.userProvider = UserProvider.instantiate(conf);
-      this.fsDelegationToken = new FsDelegationToken(userProvider, "renewer");
-      assignSeqIds = conf.getBoolean(ASSIGN_SEQ_IDS, true);
-      maxFilesPerRegionPerFamily = conf.getInt(MAX_FILES_PER_REGION_PER_FAMILY, 32);
-    }
+    // make a copy, just to be sure we're not overriding someone else's config
+    setConf(HBaseConfiguration.create(getConf()));
+    // disable blockcache for tool invocation, see HBASE-10500
+    getConf().setFloat(HConstants.HFILE_BLOCK_CACHE_SIZE_KEY, 0);
+    this.hbAdmin = new HBaseAdmin(conf);
+    this.userProvider = UserProvider.instantiate(conf);
+    this.fsDelegationToken = new FsDelegationToken(userProvider, "renewer");
+    assignSeqIds = conf.getBoolean(ASSIGN_SEQ_IDS, true);
+    maxFilesPerRegionPerFamily = conf.getInt(MAX_FILES_PER_REGION_PER_FAMILY, 32);
   }
 
   private void usage() {
@@ -882,8 +873,6 @@ public class LoadIncrementalHFiles extends Configured implements Tool
{
       return -1;
     }
 
-    initialize();
-
     String dirPath = args[0];
     TableName tableName = TableName.valueOf(args[1]);
 
@@ -899,7 +888,7 @@ public class LoadIncrementalHFiles extends Configured implements Tool
{
 
   public static void main(String[] args) throws Exception {
     Configuration conf = HBaseConfiguration.create();
-    int ret = ToolRunner.run(conf, new LoadIncrementalHFiles(), args);
+    int ret = ToolRunner.run(new LoadIncrementalHFiles(conf), args);
     System.exit(ret);
   }
 


Mime
View raw message