You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by mb...@apache.org on 2014/07/30 09:58:05 UTC
[2/3] git commit: HBASE-11609 LoadIncrementalHFiles fails if the
namespace is specified
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/a1492197
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/a1492197
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/a1492197
Branch: refs/heads/branch-1
Commit: a149219707c2810c4887568313db10cdad4d9391
Parents: 90eb08e
Author: Matteo Bertozzi <ma...@cloudera.com>
Authored: Wed Jul 30 08:41:58 2014 +0100
Committer: Matteo Bertozzi <ma...@cloudera.com>
Committed: Wed Jul 30 08:42:37 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/a1492197/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");