accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [4/4] git commit: Merge branch '1.6'
Date Thu, 16 Oct 2014 00:11:11 GMT
Merge branch '1.6'

Conflicts:
	server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java
	server/master/pom.xml
	server/master/src/main/java/org/apache/accumulo/master/tableOps/ImportTable.java
	server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java


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

Branch: refs/heads/master
Commit: f118b22116215aa1f7d816b31f56aafa1656b643
Parents: a21d2d3 6ad16a9
Author: Josh Elser <elserj@apache.org>
Authored: Wed Oct 15 20:10:16 2014 -0400
Committer: Josh Elser <elserj@apache.org>
Committed: Wed Oct 15 20:10:16 2014 -0400

----------------------------------------------------------------------
 .../org/apache/accumulo/core/Constants.java     |  4 ++
 .../accumulo/server/util/MetadataTableUtil.java |  3 +-
 .../accumulo/gc/SimpleGarbageCollector.java     |  2 +-
 .../accumulo/master/tableOps/ImportTable.java   | 34 ++++++++++--
 .../master/tableOps/ImportTableTest.java        | 54 ++++++++++++++++++++
 .../apache/accumulo/tserver/tablet/Tablet.java  |  2 +-
 .../apache/accumulo/test/ImportExportIT.java    | 35 ++++++++++---
 7 files changed, 121 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/f118b221/core/src/main/java/org/apache/accumulo/core/Constants.java
----------------------------------------------------------------------
diff --cc core/src/main/java/org/apache/accumulo/core/Constants.java
index 76b86d4,2a570f4..e7162c2
--- a/core/src/main/java/org/apache/accumulo/core/Constants.java
+++ b/core/src/main/java/org/apache/accumulo/core/Constants.java
@@@ -16,6 -16,7 +16,7 @@@
   */
  package org.apache.accumulo.core;
  
 -import java.nio.charset.Charset;
++import java.nio.charset.StandardCharsets;
  import java.util.Arrays;
  import java.util.Collection;
  import java.util.Collections;
@@@ -88,6 -88,9 +89,9 @@@ public class Constants 
  
    public static final String BULK_PREFIX = "b-";
  
+   public static final String CLONE_PREFIX = "c-";
 -  public static final byte[] CLONE_PREFIX_BYTES = CLONE_PREFIX.getBytes(UTF8);
++  public static final byte[] CLONE_PREFIX_BYTES = CLONE_PREFIX.getBytes(StandardCharsets.UTF_8);
+ 
    // this affects the table client caching of metadata
    public static final int SCAN_BATCH_SIZE = 1000;
  

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f118b221/server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java
----------------------------------------------------------------------
diff --cc server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java
index 8d14cad,f908d25..5f34279
--- a/server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java
@@@ -881,8 -881,8 +882,8 @@@ public class MetadataTableUtil 
        Mutation m = new Mutation(k.getRow());
        m.putDelete(k.getColumnFamily(), k.getColumnQualifier());
        String dir = volumeManager.choose(ServerConstants.getTablesDirs()) + "/" + tableId
-           + new String(FastFormat.toZeroPaddedString(dirCount++, 8, 16, "/c-".getBytes(StandardCharsets.UTF_8)));
+           + new String(FastFormat.toZeroPaddedString(dirCount++, 8, 16, Constants.CLONE_PREFIX_BYTES));
 -      TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.put(m, new Value(dir.getBytes(Constants.UTF8)));
 +      TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.put(m, new Value(dir.getBytes(StandardCharsets.UTF_8)));
        bw.addMutation(m);
      }
  

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f118b221/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f118b221/server/master/src/main/java/org/apache/accumulo/master/tableOps/ImportTable.java
----------------------------------------------------------------------
diff --cc server/master/src/main/java/org/apache/accumulo/master/tableOps/ImportTable.java
index 1129ede,8de6bce..44ca898
--- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/ImportTable.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/ImportTable.java
@@@ -261,15 -262,28 +263,28 @@@ class PopulateMetadataTable extends Mas
              }
  
              if (m == null) {
+               // Make a unique directory inside the table's dir. Cannot import multiple
tables into one table, so don't need to use unique allocator
 -              String tabletDir = new String(FastFormat.toZeroPaddedString(dirCount++, 8,
16, Constants.CLONE_PREFIX_BYTES), Constants.UTF8);
++              String tabletDir = new String(FastFormat.toZeroPaddedString(dirCount++, 8,
16, Constants.CLONE_PREFIX_BYTES), StandardCharsets.UTF_8);
+ 
+               // Build up a full hdfs://localhost:8020/accumulo/tables/$id/c-XXXXXXX
+               String absolutePath = getClonedTabletDir(master, tableDirs, tabletDir);
+ 
                m = new Mutation(metadataRow);
-               TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.put(m, new Value(FastFormat.toZeroPaddedString(dirCount++,
8, 16, "/c-".getBytes(StandardCharsets.UTF_8))));
 -              TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.put(m, new Value(absolutePath.getBytes(Constants.UTF8)));
++              TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.put(m, new Value(absolutePath.getBytes(StandardCharsets.UTF_8)));
                currentRow = metadataRow;
              }
  
              if (!currentRow.equals(metadataRow)) {
                mbw.addMutation(m);
+ 
+               // Make a unique directory inside the table's dir. Cannot import multiple
tables into one table, so don't need to use unique allocator
 -              String tabletDir = new String(FastFormat.toZeroPaddedString(dirCount++, 8,
16, Constants.CLONE_PREFIX_BYTES), Constants.UTF8);
++              String tabletDir = new String(FastFormat.toZeroPaddedString(dirCount++, 8,
16, Constants.CLONE_PREFIX_BYTES), StandardCharsets.UTF_8);
+ 
+               // Build up a full hdfs://localhost:8020/accumulo/tables/$id/c-XXXXXXX
+               String absolutePath = getClonedTabletDir(master, tableDirs, tabletDir);
+ 
                m = new Mutation(metadataRow);
-               TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.put(m, new Value(FastFormat.toZeroPaddedString(dirCount++,
8, 16, "/c-".getBytes(StandardCharsets.UTF_8))));
 -              TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.put(m, new Value(absolutePath.getBytes(Constants.UTF8)));
++              TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.put(m, new Value(absolutePath.getBytes(StandardCharsets.UTF_8)));
              }
  
              m.put(key.getColumnFamily(), cq, val);


Mime
View raw message