hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mberto...@apache.org
Subject [1/3] git commit: HBASE-11609 LoadIncrementalHFiles fails if the namespace is specified
Date Wed, 30 Jul 2014 07:58:04 GMT
Repository: hbase
Updated Branches:
  refs/heads/0.98 5e8aa60ab -> e426d43e8
  refs/heads/branch-1 90eb08eda -> a14921970
  refs/heads/master 85853f69c -> fa160bd12


HBASE-11609 LoadIncrementalHFiles fails if the namespace is specified


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

Branch: refs/heads/master
Commit: fa160bd124136069a6c4440b2b3807c7ed608ff7
Parents: 85853f6
Author: Matteo Bertozzi <matteo.bertozzi@cloudera.com>
Authored: Wed Jul 30 08:41:58 2014 +0100
Committer: Matteo Bertozzi <matteo.bertozzi@cloudera.com>
Committed: Wed Jul 30 08:41:58 2014 +0100

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


http://git-wip-us.apache.org/repos/asf/hbase/blob/fa160bd1/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 6a6647c..df8a840 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
@@ -96,6 +96,8 @@ import com.google.common.collect.Multimap;
 import com.google.common.collect.Multimaps;
 import com.google.common.util.concurrent.ThreadFactoryBuilder;
 
+import java.util.UUID;
+
 /**
  * Tool to load the output of HFileOutputFormat into an existing table.
  * @see #usage()
@@ -104,7 +106,6 @@ import com.google.common.util.concurrent.ThreadFactoryBuilder;
 @InterfaceStability.Stable
 public class LoadIncrementalHFiles extends Configured implements Tool {
   private static final Log LOG = LogFactory.getLog(LoadIncrementalHFiles.class);
-  static final AtomicLong regionCount = new AtomicLong(0);
   private HBaseAdmin hbAdmin;
 
   public static final String NAME = "completebulkload";
@@ -467,9 +468,8 @@ public class LoadIncrementalHFiles extends Configured implements Tool
{
   }
 
   // unique file name for the table
-  String getUniqueName(TableName tableName) {
-    String name = tableName + "," + regionCount.incrementAndGet();
-    return name;
+  private String getUniqueName() {
+    return UUID.randomUUID().toString().replaceAll("-", "");
   }
 
   protected List<LoadQueueItem> splitStoreFile(final LoadQueueItem item,
@@ -484,7 +484,7 @@ public class LoadIncrementalHFiles extends Configured implements Tool
{
     LOG.info("HFile at " + hfilePath + " no longer fits inside a single " +
     "region. Splitting...");
 
-    String uniqueName = getUniqueName(table.getName());
+    String uniqueName = getUniqueName();
     HColumnDescriptor familyDesc = table.getTableDescriptor().getFamily(item.family);
     Path botOut = new Path(tmpDir, uniqueName + ".bottom");
     Path topOut = new Path(tmpDir, uniqueName + ".top");


Mime
View raw message