accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [3/5] accumulo git commit: ACCUMULO-4145 Eliminate Text wrapping of tableIDs
Date Sat, 20 Feb 2016 02:58:37 GMT
http://git-wip-us.apache.org/repos/asf/accumulo/blob/a14bc292/server/base/src/test/java/org/apache/accumulo/server/problems/ProblemReportTest.java
----------------------------------------------------------------------
diff --git a/server/base/src/test/java/org/apache/accumulo/server/problems/ProblemReportTest.java b/server/base/src/test/java/org/apache/accumulo/server/problems/ProblemReportTest.java
index 1ca3e8d..3a9cbc0 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/problems/ProblemReportTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/problems/ProblemReportTest.java
@@ -43,7 +43,7 @@ import org.junit.Before;
 import org.junit.Test;
 
 public class ProblemReportTest {
-  private static final String TABLE = "table";
+  private static final String TABLE_ID = "table";
   private static final String RESOURCE = "resource";
   private static final String SERVER = "server";
 
@@ -63,8 +63,8 @@ public class ProblemReportTest {
   @Test
   public void testGetters() {
     long now = System.currentTimeMillis();
-    r = new ProblemReport(TABLE, ProblemType.FILE_READ, RESOURCE, SERVER, null, now);
-    assertEquals(TABLE, r.getTableName());
+    r = new ProblemReport(TABLE_ID, ProblemType.FILE_READ, RESOURCE, SERVER, null, now);
+    assertEquals(TABLE_ID, r.getTableName());
     assertSame(ProblemType.FILE_READ, r.getProblemType());
     assertEquals(RESOURCE, r.getResource());
     assertEquals(SERVER, r.getServer());
@@ -75,43 +75,43 @@ public class ProblemReportTest {
   @Test
   public void testWithException() {
     Exception e = new IllegalArgumentException("Oh noes");
-    r = new ProblemReport(TABLE, ProblemType.FILE_READ, RESOURCE, SERVER, e);
+    r = new ProblemReport(TABLE_ID, ProblemType.FILE_READ, RESOURCE, SERVER, e);
     assertEquals("Oh noes", r.getException());
   }
 
   @Test
   public void testEquals() {
-    r = new ProblemReport(TABLE, ProblemType.FILE_READ, RESOURCE, SERVER, null);
+    r = new ProblemReport(TABLE_ID, ProblemType.FILE_READ, RESOURCE, SERVER, null);
     assertTrue(r.equals(r));
-    ProblemReport r2 = new ProblemReport(TABLE, ProblemType.FILE_READ, RESOURCE, SERVER, null);
+    ProblemReport r2 = new ProblemReport(TABLE_ID, ProblemType.FILE_READ, RESOURCE, SERVER, null);
     assertTrue(r.equals(r2));
     assertTrue(r2.equals(r));
-    ProblemReport rx1 = new ProblemReport(TABLE + "x", ProblemType.FILE_READ, RESOURCE, SERVER, null);
+    ProblemReport rx1 = new ProblemReport(TABLE_ID + "x", ProblemType.FILE_READ, RESOURCE, SERVER, null);
     assertFalse(r.equals(rx1));
-    ProblemReport rx2 = new ProblemReport(TABLE, ProblemType.FILE_WRITE, RESOURCE, SERVER, null);
+    ProblemReport rx2 = new ProblemReport(TABLE_ID, ProblemType.FILE_WRITE, RESOURCE, SERVER, null);
     assertFalse(r.equals(rx2));
-    ProblemReport rx3 = new ProblemReport(TABLE, ProblemType.FILE_READ, RESOURCE + "x", SERVER, null);
+    ProblemReport rx3 = new ProblemReport(TABLE_ID, ProblemType.FILE_READ, RESOURCE + "x", SERVER, null);
     assertFalse(r.equals(rx3));
-    ProblemReport re1 = new ProblemReport(TABLE, ProblemType.FILE_READ, RESOURCE, SERVER + "x", null);
+    ProblemReport re1 = new ProblemReport(TABLE_ID, ProblemType.FILE_READ, RESOURCE, SERVER + "x", null);
     assertTrue(r.equals(re1));
-    ProblemReport re2 = new ProblemReport(TABLE, ProblemType.FILE_READ, RESOURCE, SERVER, new IllegalArgumentException("yikes"));
+    ProblemReport re2 = new ProblemReport(TABLE_ID, ProblemType.FILE_READ, RESOURCE, SERVER, new IllegalArgumentException("yikes"));
     assertTrue(r.equals(re2));
   }
 
   @Test
   public void testEqualsNull() {
-    r = new ProblemReport(TABLE, ProblemType.FILE_READ, RESOURCE, SERVER, null);
+    r = new ProblemReport(TABLE_ID, ProblemType.FILE_READ, RESOURCE, SERVER, null);
     assertFalse(r.equals(null));
   }
 
   @Test
   public void testHashCode() {
-    r = new ProblemReport(TABLE, ProblemType.FILE_READ, RESOURCE, SERVER, null);
-    ProblemReport r2 = new ProblemReport(TABLE, ProblemType.FILE_READ, RESOURCE, SERVER, null);
+    r = new ProblemReport(TABLE_ID, ProblemType.FILE_READ, RESOURCE, SERVER, null);
+    ProblemReport r2 = new ProblemReport(TABLE_ID, ProblemType.FILE_READ, RESOURCE, SERVER, null);
     assertEquals(r.hashCode(), r2.hashCode());
-    ProblemReport re1 = new ProblemReport(TABLE, ProblemType.FILE_READ, RESOURCE, SERVER + "x", null);
+    ProblemReport re1 = new ProblemReport(TABLE_ID, ProblemType.FILE_READ, RESOURCE, SERVER + "x", null);
     assertEquals(r.hashCode(), re1.hashCode());
-    ProblemReport re2 = new ProblemReport(TABLE, ProblemType.FILE_READ, RESOURCE, SERVER, new IllegalArgumentException("yikes"));
+    ProblemReport re2 = new ProblemReport(TABLE_ID, ProblemType.FILE_READ, RESOURCE, SERVER, new IllegalArgumentException("yikes"));
     assertEquals(r.hashCode(), re2.hashCode());
   }
 
@@ -143,8 +143,8 @@ public class ProblemReportTest {
 
   @Test
   public void testRemoveFromZooKeeper() throws Exception {
-    r = new ProblemReport(TABLE, ProblemType.FILE_READ, RESOURCE, SERVER, null);
-    byte[] zpathFileName = makeZPathFileName(TABLE, ProblemType.FILE_READ, RESOURCE);
+    r = new ProblemReport(TABLE_ID, ProblemType.FILE_READ, RESOURCE, SERVER, null);
+    byte[] zpathFileName = makeZPathFileName(TABLE_ID, ProblemType.FILE_READ, RESOURCE);
     String path = ZooUtil.getRoot("instance") + Constants.ZPROBLEMS + "/" + Encoding.encodeAsBase64FileName(new Text(zpathFileName));
     zoorw.recursiveDelete(path, NodeMissingPolicy.SKIP);
     replay(zoorw);
@@ -156,8 +156,8 @@ public class ProblemReportTest {
   @Test
   public void testSaveToZooKeeper() throws Exception {
     long now = System.currentTimeMillis();
-    r = new ProblemReport(TABLE, ProblemType.FILE_READ, RESOURCE, SERVER, null, now);
-    byte[] zpathFileName = makeZPathFileName(TABLE, ProblemType.FILE_READ, RESOURCE);
+    r = new ProblemReport(TABLE_ID, ProblemType.FILE_READ, RESOURCE, SERVER, null, now);
+    byte[] zpathFileName = makeZPathFileName(TABLE_ID, ProblemType.FILE_READ, RESOURCE);
     String path = ZooUtil.getRoot("instance") + Constants.ZPROBLEMS + "/" + Encoding.encodeAsBase64FileName(new Text(zpathFileName));
     byte[] encoded = encodeReportData(now, SERVER, null);
     expect(zoorw.putPersistentData(eq(path), aryEq(encoded), eq(NodeExistsPolicy.OVERWRITE))).andReturn(true);
@@ -169,7 +169,7 @@ public class ProblemReportTest {
 
   @Test
   public void testDecodeZooKeeperEntry() throws Exception {
-    byte[] zpathFileName = makeZPathFileName(TABLE, ProblemType.FILE_READ, RESOURCE);
+    byte[] zpathFileName = makeZPathFileName(TABLE_ID, ProblemType.FILE_READ, RESOURCE);
     String node = Encoding.encodeAsBase64FileName(new Text(zpathFileName));
     long now = System.currentTimeMillis();
     byte[] encoded = encodeReportData(now, SERVER, "excmsg");
@@ -178,7 +178,7 @@ public class ProblemReportTest {
     replay(zoorw);
 
     r = ProblemReport.decodeZooKeeperEntry(node, zoorw, instance);
-    assertEquals(TABLE, r.getTableName());
+    assertEquals(TABLE_ID, r.getTableName());
     assertSame(ProblemType.FILE_READ, r.getProblemType());
     assertEquals(RESOURCE, r.getResource());
     assertEquals(SERVER, r.getServer());

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a14bc292/server/base/src/test/java/org/apache/accumulo/server/problems/ProblemReportingIteratorTest.java
----------------------------------------------------------------------
diff --git a/server/base/src/test/java/org/apache/accumulo/server/problems/ProblemReportingIteratorTest.java b/server/base/src/test/java/org/apache/accumulo/server/problems/ProblemReportingIteratorTest.java
index 76d0171..1bcf165 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/problems/ProblemReportingIteratorTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/problems/ProblemReportingIteratorTest.java
@@ -37,7 +37,7 @@ import org.junit.Before;
 import org.junit.Test;
 
 public class ProblemReportingIteratorTest {
-  private static final String TABLE = "table";
+  private static final String TABLE_ID = "table";
   private static final String RESOURCE = "resource";
 
   private InterruptibleIterator ii;
@@ -46,7 +46,7 @@ public class ProblemReportingIteratorTest {
   @Before
   public void setUp() throws Exception {
     ii = EasyMock.createMock(InterruptibleIterator.class);
-    pri = new ProblemReportingIterator(null, TABLE, RESOURCE, false, ii);
+    pri = new ProblemReportingIterator(null, TABLE_ID, RESOURCE, false, ii);
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a14bc292/server/base/src/test/java/org/apache/accumulo/server/util/AdminCommandsTest.java
----------------------------------------------------------------------
diff --git a/server/base/src/test/java/org/apache/accumulo/server/util/AdminCommandsTest.java b/server/base/src/test/java/org/apache/accumulo/server/util/AdminCommandsTest.java
index ab799ec..7a665b3 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/util/AdminCommandsTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/util/AdminCommandsTest.java
@@ -39,7 +39,7 @@ public class AdminCommandsTest {
   public void testCheckTabletsCommand() {
     Admin.CheckTabletsCommand cmd = new Admin.CheckTabletsCommand();
     assertFalse(cmd.fixFiles);
-    assertNull(cmd.table);
+    assertNull(cmd.tableName);
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a14bc292/server/base/src/test/java/org/apache/accumulo/server/util/ReplicationTableUtilTest.java
----------------------------------------------------------------------
diff --git a/server/base/src/test/java/org/apache/accumulo/server/util/ReplicationTableUtilTest.java b/server/base/src/test/java/org/apache/accumulo/server/util/ReplicationTableUtilTest.java
index 59720e9..828732d 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/util/ReplicationTableUtilTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/util/ReplicationTableUtilTest.java
@@ -91,7 +91,7 @@ public class ReplicationTableUtilTest {
     String myFile = "file:////home/user/accumulo/wal/server+port/" + uuid;
 
     long createdTime = System.currentTimeMillis();
-    ReplicationTableUtil.updateFiles(context, new KeyExtent(new Text("1"), null, null), myFile, StatusUtil.fileCreated(createdTime));
+    ReplicationTableUtil.updateFiles(context, new KeyExtent("1", null, null), myFile, StatusUtil.fileCreated(createdTime));
 
     verify(writer);
 
@@ -116,7 +116,7 @@ public class ReplicationTableUtilTest {
     String file = "file:///accumulo/wal/127.0.0.1+9997" + UUID.randomUUID();
     Path filePath = new Path(file);
     Text row = new Text(filePath.toString());
-    KeyExtent extent = new KeyExtent(new Text("1"), new Text("b"), new Text("a"));
+    KeyExtent extent = new KeyExtent("1", new Text("b"), new Text("a"));
 
     Mutation m = ReplicationTableUtil.createUpdateMutation(filePath, ProtobufUtil.toValue(stat), extent);
 
@@ -125,7 +125,7 @@ public class ReplicationTableUtilTest {
     ColumnUpdate col = m.getUpdates().get(0);
 
     Assert.assertEquals(MetadataSchema.ReplicationSection.COLF, new Text(col.getColumnFamily()));
-    Assert.assertEquals(extent.getTableId(), new Text(col.getColumnQualifier()));
+    Assert.assertEquals(extent.getTableId(), new Text(col.getColumnQualifier()).toString());
     Assert.assertEquals(0, col.getColumnVisibility().length);
     Assert.assertArrayEquals(stat.toByteArray(), col.getValue());
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a14bc292/server/gc/src/test/java/org/apache/accumulo/gc/GarbageCollectionTest.java
----------------------------------------------------------------------
diff --git a/server/gc/src/test/java/org/apache/accumulo/gc/GarbageCollectionTest.java b/server/gc/src/test/java/org/apache/accumulo/gc/GarbageCollectionTest.java
index 1548fa1..14933fb 100644
--- a/server/gc/src/test/java/org/apache/accumulo/gc/GarbageCollectionTest.java
+++ b/server/gc/src/test/java/org/apache/accumulo/gc/GarbageCollectionTest.java
@@ -92,7 +92,7 @@ public class GarbageCollectionTest {
     }
 
     public Key newFileReferenceKey(String tableId, String endRow, String file) {
-      String row = new KeyExtent(new Text(tableId), endRow == null ? null : new Text(endRow), null).getMetadataEntry().toString();
+      String row = new KeyExtent(tableId, endRow == null ? null : new Text(endRow), null).getMetadataEntry().toString();
       String cf = MetadataSchema.TabletsSection.DataFileColumnFamily.NAME.toString();
       String cq = file;
       Key key = new Key(row, cf, cq);
@@ -110,7 +110,7 @@ public class GarbageCollectionTest {
     }
 
     Key newDirReferenceKey(String tableId, String endRow) {
-      String row = new KeyExtent(new Text(tableId), endRow == null ? null : new Text(endRow), null).getMetadataEntry().toString();
+      String row = new KeyExtent(tableId, endRow == null ? null : new Text(endRow), null).getMetadataEntry().toString();
       String cf = MetadataSchema.TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.getColumnFamily().toString();
       String cq = MetadataSchema.TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.getColumnQualifier().toString();
       Key key = new Key(row, cf, cq);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a14bc292/server/master/src/main/java/org/apache/accumulo/master/Master.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/Master.java b/server/master/src/main/java/org/apache/accumulo/master/Master.java
index f719748..acc1d4e 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/Master.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/Master.java
@@ -149,7 +149,6 @@ import org.apache.accumulo.start.classloader.vfs.ContextManager;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.io.DataInputBuffer;
 import org.apache.hadoop.io.DataOutputBuffer;
-import org.apache.hadoop.io.Text;
 import org.apache.thrift.TException;
 import org.apache.thrift.server.TServer;
 import org.apache.thrift.transport.TTransportException;
@@ -174,8 +173,6 @@ public class Master extends AccumuloServerContext implements LiveTServerSet.List
   final static Logger log = LoggerFactory.getLogger(Master.class);
 
   final static int ONE_SECOND = 1000;
-  final private static Text METADATA_TABLE_ID = new Text(MetadataTable.ID);
-  final private static Text ROOT_TABLE_ID = new Text(RootTable.ID);
   final static long TIME_TO_WAIT_BETWEEN_SCANS = 60 * ONE_SECOND;
   final private static long TIME_BETWEEN_MIGRATION_CLEANUPS = 5 * 60 * ONE_SECOND;
   final static long WAIT_BETWEEN_ERRORS = ONE_SECOND;
@@ -509,7 +506,7 @@ public class Master extends AccumuloServerContext implements LiveTServerSet.List
     }
   }
 
-  private int assignedOrHosted(Text tableId) {
+  private int assignedOrHosted(String tableId) {
     int result = 0;
     for (TabletGroupWatcher watcher : watchers) {
       TableCounts count = watcher.getStats(tableId);
@@ -529,7 +526,7 @@ public class Master extends AccumuloServerContext implements LiveTServerSet.List
   }
 
   private int nonMetaDataTabletsAssignedOrHosted() {
-    return totalAssignedOrHosted() - assignedOrHosted(new Text(MetadataTable.ID)) - assignedOrHosted(new Text(RootTable.ID));
+    return totalAssignedOrHosted() - assignedOrHosted(MetadataTable.ID) - assignedOrHosted(RootTable.ID);
   }
 
   private int notHosted() {
@@ -550,10 +547,10 @@ public class Master extends AccumuloServerContext implements LiveTServerSet.List
         // Count offline tablets for online tables
         for (TabletGroupWatcher watcher : watchers) {
           TableManager manager = TableManager.getInstance();
-          for (Entry<Text,TableCounts> entry : watcher.getStats().entrySet()) {
-            Text tableId = entry.getKey();
+          for (Entry<String,TableCounts> entry : watcher.getStats().entrySet()) {
+            String tableId = entry.getKey();
             TableCounts counts = entry.getValue();
-            TableState tableState = manager.getTableState(tableId.toString());
+            TableState tableState = manager.getTableState(tableId);
             if (tableState != null && tableState.equals(TableState.ONLINE)) {
               result += counts.unassigned() + counts.assignedToDeadServers() + counts.assigned();
             }
@@ -563,13 +560,13 @@ public class Master extends AccumuloServerContext implements LiveTServerSet.List
       case SAFE_MODE:
         // Count offline tablets for the metadata table
         for (TabletGroupWatcher watcher : watchers) {
-          result += watcher.getStats(METADATA_TABLE_ID).unassigned();
+          result += watcher.getStats(MetadataTable.ID).unassigned();
         }
         break;
       case UNLOAD_METADATA_TABLETS:
       case UNLOAD_ROOT_TABLET:
         for (TabletGroupWatcher watcher : watchers) {
-          result += watcher.getStats(METADATA_TABLE_ID).unassigned();
+          result += watcher.getStats(MetadataTable.ID).unassigned();
         }
         break;
       default:
@@ -635,10 +632,10 @@ public class Master extends AccumuloServerContext implements LiveTServerSet.List
     return tserverSet.getConnection(server);
   }
 
-  public MergeInfo getMergeInfo(Text tableId) {
+  public MergeInfo getMergeInfo(String tableId) {
     synchronized (mergeLock) {
       try {
-        String path = ZooUtil.getRoot(getInstance().getInstanceID()) + Constants.ZTABLES + "/" + tableId.toString() + "/merge";
+        String path = ZooUtil.getRoot(getInstance().getInstanceID()) + Constants.ZTABLES + "/" + tableId + "/merge";
         if (!ZooReaderWriter.getInstance().exists(path))
           return new MergeInfo();
         byte[] data = ZooReaderWriter.getInstance().getData(path, new Stat());
@@ -659,7 +656,7 @@ public class Master extends AccumuloServerContext implements LiveTServerSet.List
 
   public void setMergeState(MergeInfo info, MergeState state) throws IOException, KeeperException, InterruptedException {
     synchronized (mergeLock) {
-      String path = ZooUtil.getRoot(getInstance().getInstanceID()) + Constants.ZTABLES + "/" + info.getExtent().getTableId().toString() + "/merge";
+      String path = ZooUtil.getRoot(getInstance().getInstanceID()) + Constants.ZTABLES + "/" + info.getExtent().getTableId() + "/merge";
       info.setState(state);
       if (state.equals(MergeState.NONE)) {
         ZooReaderWriter.getInstance().recursiveDelete(path, NodeMissingPolicy.SKIP);
@@ -678,9 +675,9 @@ public class Master extends AccumuloServerContext implements LiveTServerSet.List
     nextEvent.event("Merge state of %s set to %s", info.getExtent(), state);
   }
 
-  public void clearMergeState(Text tableId) throws IOException, KeeperException, InterruptedException {
+  public void clearMergeState(String tableId) throws IOException, KeeperException, InterruptedException {
     synchronized (mergeLock) {
-      String path = ZooUtil.getRoot(getInstance().getInstanceID()) + Constants.ZTABLES + "/" + tableId.toString() + "/merge";
+      String path = ZooUtil.getRoot(getInstance().getInstanceID()) + Constants.ZTABLES + "/" + tableId + "/merge";
       ZooReaderWriter.getInstance().recursiveDelete(path, NodeMissingPolicy.SKIP);
       mergeLock.notifyAll();
     }
@@ -721,7 +718,7 @@ public class Master extends AccumuloServerContext implements LiveTServerSet.List
       Iterator<KeyExtent> iterator = migrations.keySet().iterator();
       while (iterator.hasNext()) {
         KeyExtent extent = iterator.next();
-        if (extent.getTableId().toString().equals(tableId)) {
+        if (extent.getTableId().equals(tableId)) {
           iterator.remove();
         }
       }
@@ -756,7 +753,7 @@ public class Master extends AccumuloServerContext implements LiveTServerSet.List
   }
 
   TabletGoalState getTableGoalState(KeyExtent extent) {
-    TableState tableState = TableManager.getInstance().getTableState(extent.getTableId().toString());
+    TableState tableState = TableManager.getInstance().getTableState(extent.getTableId());
     if (tableState == null)
       return TabletGoalState.DELETED;
     switch (tableState) {
@@ -925,19 +922,19 @@ public class Master extends AccumuloServerContext implements LiveTServerSet.List
                 }
                   break;
                 case UNLOAD_METADATA_TABLETS: {
-                  int count = assignedOrHosted(METADATA_TABLE_ID);
+                  int count = assignedOrHosted(MetadataTable.ID);
                   log.debug(String.format("There are %d metadata tablets assigned or hosted", count));
                   if (count == 0 && goodStats())
                     setMasterState(MasterState.UNLOAD_ROOT_TABLET);
                 }
                   break;
                 case UNLOAD_ROOT_TABLET: {
-                  int count = assignedOrHosted(METADATA_TABLE_ID);
+                  int count = assignedOrHosted(MetadataTable.ID);
                   if (count > 0 && goodStats()) {
                     log.debug(String.format("%d metadata tablets online", count));
                     setMasterState(MasterState.UNLOAD_ROOT_TABLET);
                   }
-                  int root_count = assignedOrHosted(ROOT_TABLE_ID);
+                  int root_count = assignedOrHosted(RootTable.ID);
                   if (root_count > 0 && goodStats())
                     log.debug("The root tablet is still assigned or hosted");
                   if (count + root_count == 0 && goodStats()) {
@@ -1501,7 +1498,7 @@ public class Master extends AccumuloServerContext implements LiveTServerSet.List
   public Collection<MergeInfo> merges() {
     List<MergeInfo> result = new ArrayList<MergeInfo>();
     for (String tableId : Tables.getIdToNameMap(getInstance()).keySet()) {
-      result.add(getMergeInfo(new Text(tableId)));
+      result.add(getMergeInfo(tableId));
     }
     return result;
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a14bc292/server/master/src/main/java/org/apache/accumulo/master/MasterClientServiceHandler.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/MasterClientServiceHandler.java b/server/master/src/main/java/org/apache/accumulo/master/MasterClientServiceHandler.java
index ad70b96..590f483 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/MasterClientServiceHandler.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/MasterClientServiceHandler.java
@@ -177,7 +177,7 @@ public class MasterClientServiceHandler extends FateServiceHandler implements Ma
           scanner.setRange(MetadataSchema.TabletsSection.getRange());
         } else {
           scanner = new IsolatedScanner(conn.createScanner(MetadataTable.NAME, Authorizations.EMPTY));
-          Range range = new KeyExtent(new Text(tableId), null, ByteBufferUtil.toText(startRow)).toMetadataRange();
+          Range range = new KeyExtent(tableId, null, ByteBufferUtil.toText(startRow)).toMetadataRange();
           scanner.setRange(range.clip(MetadataSchema.TabletsSection.getRange()));
         }
         TabletsSection.ServerColumnFamily.FLUSH_COLUMN.fetch(scanner);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a14bc292/server/master/src/main/java/org/apache/accumulo/master/TabletGroupWatcher.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/TabletGroupWatcher.java b/server/master/src/main/java/org/apache/accumulo/master/TabletGroupWatcher.java
index d1272e8..e8df759 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/TabletGroupWatcher.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/TabletGroupWatcher.java
@@ -16,6 +16,7 @@
  */
 package org.apache.accumulo.master;
 
+import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
 import static java.lang.Math.min;
 
 import java.io.IOException;
@@ -91,7 +92,6 @@ import org.apache.thrift.TException;
 
 import com.google.common.base.Optional;
 import com.google.common.collect.Iterators;
-import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
 
 class TabletGroupWatcher extends Daemon {
   // Constants used to make sure assignment logging isn't excessive in quantity or size
@@ -111,7 +111,7 @@ class TabletGroupWatcher extends Daemon {
     this.dependentWatcher = dependentWatcher;
   }
 
-  Map<Text,TableCounts> getStats() {
+  Map<String,TableCounts> getStats() {
     return stats.getLast();
   }
 
@@ -120,7 +120,7 @@ class TabletGroupWatcher extends Daemon {
     return masterState;
   }
 
-  TableCounts getStats(Text tableId) {
+  TableCounts getStats(String tableId) {
     return stats.getLast(tableId);
   }
 
@@ -142,8 +142,8 @@ class TabletGroupWatcher extends Daemon {
       int unloaded = 0;
       ClosableIterator<TabletLocationState> iter = null;
       try {
-        Map<Text,MergeStats> mergeStatsCache = new HashMap<Text,MergeStats>();
-        Map<Text,MergeStats> currentMerges = new HashMap<Text,MergeStats>();
+        Map<String,MergeStats> mergeStatsCache = new HashMap<String,MergeStats>();
+        Map<String,MergeStats> currentMerges = new HashMap<String,MergeStats>();
         for (MergeInfo merge : master.merges()) {
           if (merge.getExtent() != null) {
             currentMerges.put(merge.getExtent().getTableId(), new MergeStats(merge));
@@ -184,7 +184,7 @@ class TabletGroupWatcher extends Daemon {
           }
           Master.log.debug(store.name() + " location State: " + tls);
           // ignore entries for tables that do not exist in zookeeper
-          if (TableManager.getInstance().getTableState(tls.extent.getTableId().toString()) == null)
+          if (TableManager.getInstance().getTableState(tls.extent.getTableId()) == null)
             continue;
 
           if (Master.log.isTraceEnabled())
@@ -200,7 +200,7 @@ class TabletGroupWatcher extends Daemon {
             unloaded = 0;
             eventListener.waitForEvents(Master.TIME_TO_WAIT_BETWEEN_SCANS);
           }
-          Text tableId = tls.extent.getTableId();
+          String tableId = tls.extent.getTableId();
           MergeStats mergeStats = mergeStatsCache.get(tableId);
           if (mergeStats == null) {
             mergeStats = currentMerges.get(tableId);
@@ -278,7 +278,7 @@ class TabletGroupWatcher extends Daemon {
             switch (state) {
               case UNASSIGNED:
                 TServerInstance dest = this.master.migrations.get(tls.extent);
-                TableState tableState = TableManager.getInstance().getTableState(tls.extent.getTableId().toString());
+                TableState tableState = TableManager.getInstance().getTableState(tls.extent.getTableId());
                 if (dest != null && tableState == TableState.OFFLINE) {
                   this.master.migrations.remove(tls.extent);
                 }
@@ -478,7 +478,7 @@ class TabletGroupWatcher extends Daemon {
     }
   }
 
-  private void updateMergeState(Map<Text,MergeStats> mergeStatsCache) {
+  private void updateMergeState(Map<String,MergeStats> mergeStatsCache) {
     for (MergeStats stats : mergeStatsCache.values()) {
       try {
         MergeState update = stats.nextMergeState(this.master.getConnector(), this.master);
@@ -587,7 +587,7 @@ class TabletGroupWatcher extends Daemon {
       } else {
         // Recreate the default tablet to hold the end of the table
         Master.log.debug("Recreating the last tablet to point to " + extent.getPrevEndRow());
-        String tdir = master.getFileSystem().choose(Optional.of(extent.getTableId().toString()), ServerConstants.getBaseUris()) + Constants.HDFS_TABLES_DIR
+        String tdir = master.getFileSystem().choose(Optional.of(extent.getTableId()), ServerConstants.getBaseUris()) + Constants.HDFS_TABLES_DIR
             + Path.SEPARATOR + extent.getTableId() + Constants.DEFAULT_TABLET_LOCATION;
         MetadataTableUtil.addTablet(new KeyExtent(extent.getTableId(), null, extent.getPrevEndRow()), tdir, master, timeType, this.master.masterLock);
       }
@@ -639,7 +639,7 @@ class TabletGroupWatcher extends Daemon {
         } else if (TabletsSection.ServerColumnFamily.TIME_COLUMN.hasColumns(key)) {
           maxLogicalTime = TabletTime.maxMetadataTime(maxLogicalTime, value.toString());
         } else if (TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.hasColumns(key)) {
-          bw.addMutation(MetadataTableUtil.createDeleteMutation(range.getTableId().toString(), entry.getValue().toString()));
+          bw.addMutation(MetadataTableUtil.createDeleteMutation(range.getTableId(), entry.getValue().toString()));
         }
       }
 
@@ -739,7 +739,7 @@ class TabletGroupWatcher extends Daemon {
       }
       Entry<Key,Value> entry = iterator.next();
       KeyExtent highTablet = new KeyExtent(entry.getKey().getRow(), KeyExtent.decodePrevEndRow(entry.getValue()));
-      if (highTablet.getTableId() != range.getTableId()) {
+      if (!highTablet.getTableId().equals(range.getTableId())) {
         throw new AccumuloException("No last tablet for merge " + range + " " + highTablet);
       }
       return highTablet;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a14bc292/server/master/src/main/java/org/apache/accumulo/master/replication/FinishedWorkUpdater.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/replication/FinishedWorkUpdater.java b/server/master/src/main/java/org/apache/accumulo/master/replication/FinishedWorkUpdater.java
index c40743e..e394b57 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/replication/FinishedWorkUpdater.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/replication/FinishedWorkUpdater.java
@@ -145,10 +145,10 @@ public class FinishedWorkUpdater implements Runnable {
           Value serializedUpdatedStatus = ProtobufUtil.toValue(updatedStatus);
 
           // Pull the sourceTableId into a Text
-          buffer.set(entry.getKey());
+          String srcTableId = entry.getKey();
 
           // Make the mutation
-          StatusSection.add(replMutation, buffer, serializedUpdatedStatus);
+          StatusSection.add(replMutation, srcTableId, serializedUpdatedStatus);
 
           log.debug("Updating replication status entry for {} with {}", serializedRow.getKey().getRow(), ProtobufUtil.toString(updatedStatus));
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a14bc292/server/master/src/main/java/org/apache/accumulo/master/replication/StatusMaker.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/replication/StatusMaker.java b/server/master/src/main/java/org/apache/accumulo/master/replication/StatusMaker.java
index 1ebe65f..4a0ed52 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/replication/StatusMaker.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/replication/StatusMaker.java
@@ -90,7 +90,7 @@ public class StatusMaker {
       s.fetchColumnFamily(ReplicationSection.COLF);
       s.setRange(ReplicationSection.getRange());
 
-      Text file = new Text(), tableId = new Text();
+      Text file = new Text();
       for (Entry<Key,Value> entry : s) {
         // Get a writer to the replication table
         if (null == replicationWriter) {
@@ -106,7 +106,7 @@ public class StatusMaker {
         }
         // Extract the useful bits from the status key
         MetadataSchema.ReplicationSection.getFile(entry.getKey(), file);
-        MetadataSchema.ReplicationSection.getTableId(entry.getKey(), tableId);
+        String tableId = MetadataSchema.ReplicationSection.getTableId(entry.getKey());
 
         Status status;
         try {
@@ -158,10 +158,10 @@ public class StatusMaker {
   /**
    * Create a status record in the replication table
    */
-  protected boolean addStatusRecord(Text file, Text tableId, Value v) {
+  protected boolean addStatusRecord(Text file, String tableId, Value v) {
     try {
       Mutation m = new Mutation(file);
-      m.put(StatusSection.NAME, tableId, v);
+      m.put(StatusSection.NAME, new Text(tableId), v);
 
       try {
         replicationWriter.addMutation(m);
@@ -194,7 +194,7 @@ public class StatusMaker {
    * @param value
    *          Serialized version of the Status msg
    */
-  protected boolean addOrderRecord(Text file, Text tableId, Status stat, Value value) {
+  protected boolean addOrderRecord(Text file, String tableId, Status stat, Value value) {
     try {
       if (!stat.hasCreatedTime()) {
         log.error("Status record ({}) for {} in table {} was written to metadata table which lacked createdTime", ProtobufUtil.toString(stat), file, tableId);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a14bc292/server/master/src/main/java/org/apache/accumulo/master/replication/WorkMaker.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/replication/WorkMaker.java b/server/master/src/main/java/org/apache/accumulo/master/replication/WorkMaker.java
index 6fbd949..6c5645d 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/replication/WorkMaker.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/replication/WorkMaker.java
@@ -89,11 +89,11 @@ public class WorkMaker {
 
       TableConfiguration tableConf;
 
-      Text file = new Text(), tableId = new Text();
+      Text file = new Text();
       for (Entry<Key,Value> entry : s) {
         // Extract the useful bits from the status key
         ReplicationSchema.StatusSection.getFile(entry.getKey(), file);
-        ReplicationSchema.StatusSection.getTableId(entry.getKey(), tableId);
+        String tableId = ReplicationSchema.StatusSection.getTableId(entry.getKey());
         log.info("Processing replication status record for " + file + " on table " + tableId);
 
         Status status;
@@ -112,7 +112,7 @@ public class WorkMaker {
         }
 
         // Get the table configuration for the table specified by the status record
-        tableConf = context.getServerConfigurationFactory().getTableConfiguration(tableId.toString());
+        tableConf = context.getServerConfigurationFactory().getTableConfiguration(tableId);
 
         // getTableConfiguration(String) returns null if the table no longer exists
         if (null == tableConf) {
@@ -129,7 +129,7 @@ public class WorkMaker {
         if (!replicationTargets.isEmpty()) {
           Span workSpan = Trace.start("createWorkMutations");
           try {
-            addWorkRecord(file, entry.getValue(), replicationTargets, tableId.toString());
+            addWorkRecord(file, entry.getValue(), replicationTargets, tableId);
           } finally {
             workSpan.stop();
           }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a14bc292/server/master/src/main/java/org/apache/accumulo/master/state/MergeStats.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/state/MergeStats.java b/server/master/src/main/java/org/apache/accumulo/master/state/MergeStats.java
index f1763be..a89100e 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/state/MergeStats.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/state/MergeStats.java
@@ -185,7 +185,7 @@ public class MergeStats {
     if (start == null) {
       start = new Text();
     }
-    Text tableId = extent.getTableId();
+    String tableId = extent.getTableId();
     Text first = KeyExtent.getMetadataEntry(tableId, start);
     Range range = new Range(first, false, null, true);
     scanner.setRange(range.clip(MetadataSchema.TabletsSection.getRange()));

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a14bc292/server/master/src/main/java/org/apache/accumulo/master/state/TableStats.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/state/TableStats.java b/server/master/src/main/java/org/apache/accumulo/master/state/TableStats.java
index 8d87896..1fe72a3 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/state/TableStats.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/state/TableStats.java
@@ -21,21 +21,20 @@ import java.util.Map;
 
 import org.apache.accumulo.core.master.thrift.MasterState;
 import org.apache.accumulo.server.master.state.TabletState;
-import org.apache.hadoop.io.Text;
 
 public class TableStats {
-  private Map<Text,TableCounts> last = new HashMap<Text,TableCounts>();
-  private Map<Text,TableCounts> next;
+  private Map<String,TableCounts> last = new HashMap<String,TableCounts>();
+  private Map<String,TableCounts> next;
   private long startScan = 0;
   private long endScan = 0;
   private MasterState state;
 
   public synchronized void begin() {
-    next = new HashMap<Text,TableCounts>();
+    next = new HashMap<String,TableCounts>();
     startScan = System.currentTimeMillis();
   }
 
-  public synchronized void update(Text tableId, TabletState state) {
+  public synchronized void update(String tableId, TabletState state) {
     TableCounts counts = next.get(tableId);
     if (counts == null) {
       counts = new TableCounts();
@@ -51,7 +50,7 @@ public class TableStats {
     this.state = state;
   }
 
-  public synchronized Map<Text,TableCounts> getLast() {
+  public synchronized Map<String,TableCounts> getLast() {
     return last;
   }
 
@@ -59,7 +58,7 @@ public class TableStats {
     return state;
   }
 
-  public synchronized TableCounts getLast(Text tableId) {
+  public synchronized TableCounts getLast(String tableId) {
     TableCounts result = last.get(tableId);
     if (result == null)
       return new TableCounts();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a14bc292/server/master/src/main/java/org/apache/accumulo/master/tableOps/CleanUp.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/tableOps/CleanUp.java b/server/master/src/main/java/org/apache/accumulo/master/tableOps/CleanUp.java
index f221775..6685eaf 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/CleanUp.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/CleanUp.java
@@ -52,7 +52,6 @@ import org.apache.accumulo.server.tables.TableManager;
 import org.apache.accumulo.server.util.MetadataTableUtil;
 import org.apache.hadoop.fs.FileStatus;
 import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.io.Text;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -90,7 +89,7 @@ class CleanUp extends MasterRepo {
     }
 
     boolean done = true;
-    Range tableRange = new KeyExtent(new Text(tableId), null, null).toMetadataRange();
+    Range tableRange = new KeyExtent(tableId, null, null).toMetadataRange();
     Scanner scanner = master.getConnector().createScanner(MetadataTable.NAME, Authorizations.EMPTY);
     MetaDataTableScanner.configureScanner(scanner, master);
     scanner.setRange(tableRange);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a14bc292/server/master/src/main/java/org/apache/accumulo/master/tableOps/CompactionDriver.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/tableOps/CompactionDriver.java b/server/master/src/main/java/org/apache/accumulo/master/tableOps/CompactionDriver.java
index f4fe037..2346ecc 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/CompactionDriver.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/CompactionDriver.java
@@ -90,7 +90,7 @@ class CompactionDriver extends MasterRepo {
       scanner.setRange(MetadataSchema.TabletsSection.getRange());
     } else {
       scanner = new IsolatedScanner(conn.createScanner(MetadataTable.NAME, Authorizations.EMPTY));
-      Range range = new KeyExtent(new Text(tableId), null, startRow == null ? null : new Text(startRow)).toMetadataRange();
+      Range range = new KeyExtent(tableId, null, startRow == null ? null : new Text(startRow)).toMetadataRange();
       scanner.setRange(range);
     }
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a14bc292/server/master/src/main/java/org/apache/accumulo/master/tableOps/CopyFailed.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/tableOps/CopyFailed.java b/server/master/src/main/java/org/apache/accumulo/master/tableOps/CopyFailed.java
index e57a678..068aa81 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/CopyFailed.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/CopyFailed.java
@@ -44,7 +44,6 @@ import org.apache.accumulo.server.master.LiveTServerSet.TServerConnection;
 import org.apache.accumulo.server.master.state.TServerInstance;
 import org.apache.accumulo.server.zookeeper.DistributedWorkQueue;
 import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.io.Text;
 import org.apache.thrift.TException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -113,7 +112,7 @@ class CopyFailed extends MasterRepo {
     // determine which failed files were loaded
     Connector conn = master.getConnector();
     Scanner mscanner = new IsolatedScanner(conn.createScanner(MetadataTable.NAME, Authorizations.EMPTY));
-    mscanner.setRange(new KeyExtent(new Text(tableId), null, null).toMetadataRange());
+    mscanner.setRange(new KeyExtent(tableId, null, null).toMetadataRange());
     mscanner.fetchColumnFamily(TabletsSection.BulkFileColumnFamily.NAME);
 
     for (Entry<Key,Value> entry : mscanner) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a14bc292/server/master/src/main/java/org/apache/accumulo/master/tableOps/PopulateMetadata.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/tableOps/PopulateMetadata.java b/server/master/src/main/java/org/apache/accumulo/master/tableOps/PopulateMetadata.java
index 45a370d..564f6d0 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/PopulateMetadata.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/PopulateMetadata.java
@@ -20,7 +20,6 @@ import org.apache.accumulo.core.data.impl.KeyExtent;
 import org.apache.accumulo.fate.Repo;
 import org.apache.accumulo.master.Master;
 import org.apache.accumulo.server.util.MetadataTableUtil;
-import org.apache.hadoop.io.Text;
 
 class PopulateMetadata extends MasterRepo {
 
@@ -39,7 +38,7 @@ class PopulateMetadata extends MasterRepo {
 
   @Override
   public Repo<Master> call(long tid, Master environment) throws Exception {
-    KeyExtent extent = new KeyExtent(new Text(tableInfo.tableId), null, null);
+    KeyExtent extent = new KeyExtent(tableInfo.tableId, null, null);
     MetadataTableUtil.addTablet(extent, tableInfo.dir, environment, tableInfo.timeType, environment.getMasterLock());
 
     return new FinishCreateTable(tableInfo);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a14bc292/server/master/src/main/java/org/apache/accumulo/master/tableOps/PopulateMetadataTable.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/tableOps/PopulateMetadataTable.java b/server/master/src/main/java/org/apache/accumulo/master/tableOps/PopulateMetadataTable.java
index 6e19b61..9e596f8 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/PopulateMetadataTable.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/PopulateMetadataTable.java
@@ -125,7 +125,7 @@ class PopulateMetadataTable extends MasterRepo {
             val.readFields(in);
 
             Text endRow = new KeyExtent(key.getRow(), (Text) null).getEndRow();
-            Text metadataRow = new KeyExtent(new Text(tableInfo.tableId), endRow, null).getMetadataEntry();
+            Text metadataRow = new KeyExtent(tableInfo.tableId, endRow, null).getMetadataEntry();
 
             Text cq;
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a14bc292/server/master/src/main/java/org/apache/accumulo/master/tableOps/TableRangeOp.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/tableOps/TableRangeOp.java b/server/master/src/main/java/org/apache/accumulo/master/tableOps/TableRangeOp.java
index ca8a171..e2e7018 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/TableRangeOp.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/TableRangeOp.java
@@ -65,7 +65,6 @@ public class TableRangeOp extends MasterRepo {
 
     Text start = startRow.length == 0 ? null : new Text(startRow);
     Text end = endRow.length == 0 ? null : new Text(endRow);
-    Text tableIdText = new Text(tableId);
 
     if (start != null && end != null)
       if (start.compareTo(end) >= 0)
@@ -74,10 +73,10 @@ public class TableRangeOp extends MasterRepo {
 
     env.mustBeOnline(tableId);
 
-    MergeInfo info = env.getMergeInfo(tableIdText);
+    MergeInfo info = env.getMergeInfo(tableId);
 
     if (info.getState() == MergeState.NONE) {
-      KeyExtent range = new KeyExtent(tableIdText, end, start);
+      KeyExtent range = new KeyExtent(tableId, end, start);
       env.setMergeState(new MergeInfo(range, op), MergeState.STARTED);
     }
 
@@ -88,11 +87,10 @@ public class TableRangeOp extends MasterRepo {
   public void undo(long tid, Master env) throws Exception {
     String namespaceId = Tables.getNamespaceId(env.getInstance(), tableId);
     // Not sure this is a good thing to do. The Master state engine should be the one to remove it.
-    Text tableIdText = new Text(tableId);
-    MergeInfo mergeInfo = env.getMergeInfo(tableIdText);
+    MergeInfo mergeInfo = env.getMergeInfo(tableId);
     if (mergeInfo.getState() != MergeState.NONE)
       log.info("removing merge information " + mergeInfo);
-    env.clearMergeState(tableIdText);
+    env.clearMergeState(tableId);
     Utils.unreserveNamespace(namespaceId, tid, false);
     Utils.unreserveTable(tableId, tid, true);
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a14bc292/server/master/src/main/java/org/apache/accumulo/master/tableOps/TableRangeOpWait.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/tableOps/TableRangeOpWait.java b/server/master/src/main/java/org/apache/accumulo/master/tableOps/TableRangeOpWait.java
index 668c790..a7c82b1 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/TableRangeOpWait.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/TableRangeOpWait.java
@@ -21,7 +21,6 @@ import org.apache.accumulo.fate.Repo;
 import org.apache.accumulo.master.Master;
 import org.apache.accumulo.server.master.state.MergeInfo;
 import org.apache.accumulo.server.master.state.MergeState;
-import org.apache.hadoop.io.Text;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -50,8 +49,7 @@ class TableRangeOpWait extends MasterRepo {
 
   @Override
   public long isReady(long tid, Master env) throws Exception {
-    Text tableIdText = new Text(tableId);
-    if (!env.getMergeInfo(tableIdText).getState().equals(MergeState.NONE)) {
+    if (!env.getMergeInfo(tableId).getState().equals(MergeState.NONE)) {
       return 50;
     }
     return 0;
@@ -60,10 +58,9 @@ class TableRangeOpWait extends MasterRepo {
   @Override
   public Repo<Master> call(long tid, Master master) throws Exception {
     String namespaceId = Tables.getNamespaceId(master.getInstance(), tableId);
-    Text tableIdText = new Text(tableId);
-    MergeInfo mergeInfo = master.getMergeInfo(tableIdText);
+    MergeInfo mergeInfo = master.getMergeInfo(tableId);
     log.info("removing merge information " + mergeInfo);
-    master.clearMergeState(tableIdText);
+    master.clearMergeState(tableId);
     Utils.unreserveNamespace(namespaceId, tid, false);
     Utils.unreserveTable(tableId, tid, true);
     return null;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a14bc292/server/master/src/main/java/org/apache/accumulo/master/tableOps/WriteExportFiles.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/tableOps/WriteExportFiles.java b/server/master/src/main/java/org/apache/accumulo/master/tableOps/WriteExportFiles.java
index 78ed2c0..3ea2767 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/WriteExportFiles.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/WriteExportFiles.java
@@ -59,7 +59,6 @@ import org.apache.accumulo.server.conf.TableConfiguration;
 import org.apache.accumulo.server.fs.VolumeManager;
 import org.apache.hadoop.fs.FSDataOutputStream;
 import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.io.Text;
 
 class WriteExportFiles extends MasterRepo {
 
@@ -93,7 +92,7 @@ class WriteExportFiles extends MasterRepo {
     checkOffline(conn);
 
     Scanner metaScanner = conn.createScanner(MetadataTable.NAME, Authorizations.EMPTY);
-    metaScanner.setRange(new KeyExtent(new Text(tableInfo.tableID), null, null).toMetadataRange());
+    metaScanner.setRange(new KeyExtent(tableInfo.tableID, null, null).toMetadataRange());
 
     // scan for locations
     metaScanner.fetchColumnFamily(TabletsSection.CurrentLocationColumnFamily.NAME);
@@ -209,7 +208,7 @@ class WriteExportFiles extends MasterRepo {
     metaScanner.fetchColumnFamily(DataFileColumnFamily.NAME);
     TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN.fetch(metaScanner);
     TabletsSection.ServerColumnFamily.TIME_COLUMN.fetch(metaScanner);
-    metaScanner.setRange(new KeyExtent(new Text(tableID), null, null).toMetadataRange());
+    metaScanner.setRange(new KeyExtent(tableID, null, null).toMetadataRange());
 
     for (Entry<Key,Value> entry : metaScanner) {
       entry.getKey().write(dataOut);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a14bc292/server/master/src/test/java/org/apache/accumulo/master/state/RootTabletStateStoreTest.java
----------------------------------------------------------------------
diff --git a/server/master/src/test/java/org/apache/accumulo/master/state/RootTabletStateStoreTest.java b/server/master/src/test/java/org/apache/accumulo/master/state/RootTabletStateStoreTest.java
index 4002da5..0a78d59 100644
--- a/server/master/src/test/java/org/apache/accumulo/master/state/RootTabletStateStoreTest.java
+++ b/server/master/src/test/java/org/apache/accumulo/master/state/RootTabletStateStoreTest.java
@@ -36,7 +36,6 @@ import org.apache.accumulo.server.master.state.TServerInstance;
 import org.apache.accumulo.server.master.state.TabletLocationState;
 import org.apache.accumulo.server.master.state.TabletLocationState.BadLocationStateException;
 import org.apache.accumulo.server.master.state.ZooTabletStateStore;
-import org.apache.hadoop.io.Text;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -191,7 +190,7 @@ public class RootTabletStateStoreTest {
     }
     assertEquals(count, 1);
 
-    KeyExtent notRoot = new KeyExtent(new Text("0"), null, null);
+    KeyExtent notRoot = new KeyExtent("0", null, null);
     try {
       tstore.setLocations(Collections.singletonList(new Assignment(notRoot, server)));
       Assert.fail("should not get here");

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a14bc292/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/TServersServlet.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/TServersServlet.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/TServersServlet.java
index 16b05d4..c01a6a9 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/TServersServlet.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/TServersServlet.java
@@ -166,7 +166,7 @@ public class TServersServlet extends BasicServlet {
       ActionStatsUpdator.update(total.majors, info.majors);
 
       KeyExtent extent = new KeyExtent(info.extent);
-      String tableId = extent.getTableId().toString();
+      String tableId = extent.getTableId();
       MessageDigest digester = MessageDigest.getInstance("MD5");
       if (extent.getEndRow() != null && extent.getEndRow().getLength() > 0) {
         digester.update(extent.getEndRow().getBytes(), 0, extent.getEndRow().getLength());

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a14bc292/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/TablesServlet.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/TablesServlet.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/TablesServlet.java
index cb177ac..1431698 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/TablesServlet.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/TablesServlet.java
@@ -150,8 +150,8 @@ public class TablesServlet extends BasicServlet {
       locs.add(instance.getRootTabletLocation());
     } else {
       String systemTableName = MetadataTable.ID.equals(tableId) ? RootTable.NAME : MetadataTable.NAME;
-      MetaDataTableScanner scanner = new MetaDataTableScanner(Monitor.getContext(), new Range(KeyExtent.getMetadataEntry(new Text(tableId), new Text()),
-          KeyExtent.getMetadataEntry(new Text(tableId), null)), systemTableName);
+      MetaDataTableScanner scanner = new MetaDataTableScanner(Monitor.getContext(), new Range(KeyExtent.getMetadataEntry(tableId, new Text()),
+          KeyExtent.getMetadataEntry(tableId, null)), systemTableName);
 
       while (scanner.hasNext()) {
         TabletLocationState state = scanner.next();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a14bc292/server/monitor/src/main/java/org/apache/accumulo/monitor/util/Table.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/util/Table.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/util/Table.java
index 522ebb6..caf70a1 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/util/Table.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/util/Table.java
@@ -26,7 +26,7 @@ import org.apache.accumulo.monitor.util.celltypes.CellType;
 import org.apache.accumulo.monitor.util.celltypes.StringType;
 
 public class Table {
-  private String table;
+  private String tableName;
   private String caption;
   private String captionclass;
   private String subcaption;
@@ -39,7 +39,7 @@ public class Table {
   }
 
   public Table(String tableName, String caption, String captionClass) {
-    this.table = tableName;
+    this.tableName = tableName;
     this.caption = caption;
     this.captionclass = captionClass;
     this.subcaption = null;
@@ -109,8 +109,8 @@ public class Table {
       if (row.size() != columns.size())
         throw new RuntimeException("Each row must have the same number of columns");
 
-    boolean sortAscending = !"false".equals(BasicServlet.getCookieValue(req, "tableSort." + BasicServlet.encode(page) + "." + BasicServlet.encode(table) + "."
-        + "sortAsc"));
+    boolean sortAscending = !"false".equals(BasicServlet.getCookieValue(req, "tableSort." + BasicServlet.encode(page) + "." + BasicServlet.encode(tableName)
+        + "." + "sortAsc"));
 
     int sortCol = -1; // set to first sortable column by default
     int numLegends = 0;
@@ -124,7 +124,7 @@ public class Table {
 
     // only get cookie if there is a possibility that it is sortable
     if (sortCol >= 0) {
-      String sortColStr = BasicServlet.getCookieValue(req, "tableSort." + BasicServlet.encode(page) + "." + BasicServlet.encode(table) + "." + "sortCol");
+      String sortColStr = BasicServlet.getCookieValue(req, "tableSort." + BasicServlet.encode(page) + "." + BasicServlet.encode(tableName) + "." + "sortCol");
       if (sortColStr != null) {
         try {
           int col = Integer.parseInt(sortColStr);
@@ -139,13 +139,13 @@ public class Table {
 
     boolean showLegend = false;
     if (numLegends > 0) {
-      String showStr = BasicServlet.getCookieValue(req, "tableLegend." + BasicServlet.encode(page) + "." + BasicServlet.encode(table) + "." + "show");
+      String showStr = BasicServlet.getCookieValue(req, "tableLegend." + BasicServlet.encode(page) + "." + BasicServlet.encode(tableName) + "." + "show");
       showLegend = showStr != null && Boolean.parseBoolean(showStr);
     }
 
     sb.append("<div>\n");
-    sb.append("<a name='").append(table).append("'>&nbsp;</a>\n");
-    sb.append("<table id='").append(table).append("' class='sortable'>\n");
+    sb.append("<a name='").append(tableName).append("'>&nbsp;</a>\n");
+    sb.append("<table id='").append(tableName).append("' class='sortable'>\n");
     sb.append("<caption");
     if (captionclass != null && !captionclass.isEmpty())
       sb.append(" class='").append(captionclass).append("'");
@@ -157,7 +157,7 @@ public class Table {
 
     String redir = BasicServlet.currentPage(req);
     if (numLegends > 0) {
-      String legendUrl = String.format("/op?action=toggleLegend&redir=%s&page=%s&table=%s&show=%s", redir, page, table, !showLegend);
+      String legendUrl = String.format("/op?action=toggleLegend&redir=%s&page=%s&table=%s&show=%s", redir, page, tableName, !showLegend);
       sb.append("<a href='").append(legendUrl).append("'>").append(showLegend ? "Hide" : "Show").append("&nbsp;Legend</a>\n");
       if (showLegend)
         sb.append("<div class='left show'><dl>\n");
@@ -166,7 +166,7 @@ public class Table {
       TableColumn<?> col = columns.get(i);
       String title = col.getTitle();
       if (rows.size() > 1 && col.getCellType().isSortable()) {
-        String url = String.format("/op?action=sortTable&redir=%s&page=%s&table=%s&%s=%s", redir, page, table, sortCol == i ? "asc" : "col",
+        String url = String.format("/op?action=sortTable&redir=%s&page=%s&table=%s&%s=%s", redir, page, tableName, sortCol == i ? "asc" : "col",
             sortCol == i ? !sortAscending : i);
         String img = "";
         if (sortCol == i)

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a14bc292/server/tracer/src/main/java/org/apache/accumulo/tracer/TraceServer.java
----------------------------------------------------------------------
diff --git a/server/tracer/src/main/java/org/apache/accumulo/tracer/TraceServer.java b/server/tracer/src/main/java/org/apache/accumulo/tracer/TraceServer.java
index db963a9..f4a99f8 100644
--- a/server/tracer/src/main/java/org/apache/accumulo/tracer/TraceServer.java
+++ b/server/tracer/src/main/java/org/apache/accumulo/tracer/TraceServer.java
@@ -86,7 +86,7 @@ public class TraceServer implements Watcher {
   final private TServer server;
   final private AtomicReference<BatchWriter> writer;
   final private Connector connector;
-  final String table;
+  final String tableName;
   final private static int BATCH_WRITER_MAX_LATENCY = 5;
   final private static long SCHEDULE_PERIOD = 1000;
   final private static long SCHEDULE_DELAY = 1000;
@@ -182,7 +182,7 @@ public class TraceServer implements Watcher {
     log.info("Version " + Constants.VERSION);
     log.info("Instance " + serverConfiguration.getInstance().getInstanceID());
     AccumuloConfiguration conf = serverConfiguration.getConfiguration();
-    table = conf.get(Property.TRACE_TABLE);
+    tableName = conf.get(Property.TRACE_TABLE);
     Connector connector = null;
     while (true) {
       try {
@@ -214,13 +214,13 @@ public class TraceServer implements Watcher {
         }
 
         connector = serverConfiguration.getInstance().getConnector(principal, at);
-        if (!connector.tableOperations().exists(table)) {
-          connector.tableOperations().create(table);
+        if (!connector.tableOperations().exists(tableName)) {
+          connector.tableOperations().create(tableName);
           IteratorSetting setting = new IteratorSetting(10, "ageoff", AgeOffFilter.class.getName());
           AgeOffFilter.setTTL(setting, 7 * 24 * 60 * 60 * 1000l);
-          connector.tableOperations().attachIterator(table, setting);
+          connector.tableOperations().attachIterator(tableName, setting);
         }
-        connector.tableOperations().setProperty(table, Property.TABLE_FORMATTER_CLASS.getKey(), TraceFormatter.class.getName());
+        connector.tableOperations().setProperty(tableName, Property.TABLE_FORMATTER_CLASS.getKey(), TraceFormatter.class.getName());
         break;
       } catch (RuntimeException ex) {
         log.info("Waiting to checking/create the trace table.", ex);
@@ -240,7 +240,7 @@ public class TraceServer implements Watcher {
     options.processor(new Processor<Iface>(new Receiver()));
     server = new TThreadPoolServer(options);
     registerInZooKeeper(sock.getInetAddress().getHostAddress() + ":" + sock.getLocalPort(), conf.get(Property.TRACE_ZK_PATH));
-    writer = new AtomicReference<BatchWriter>(this.connector.createBatchWriter(table,
+    writer = new AtomicReference<BatchWriter>(this.connector.createBatchWriter(tableName,
         new BatchWriterConfig().setMaxLatency(BATCH_WRITER_MAX_LATENCY, TimeUnit.SECONDS)));
   }
 
@@ -261,7 +261,7 @@ public class TraceServer implements Watcher {
         writer.flush();
       } else {
         // We don't have a writer. If the table exists, try to make a new writer.
-        if (connector.tableOperations().exists(table)) {
+        if (connector.tableOperations().exists(tableName)) {
           resetWriter();
         }
       }
@@ -280,7 +280,7 @@ public class TraceServer implements Watcher {
   private void resetWriter() {
     BatchWriter writer = null;
     try {
-      writer = connector.createBatchWriter(table, new BatchWriterConfig().setMaxLatency(BATCH_WRITER_MAX_LATENCY, TimeUnit.SECONDS));
+      writer = connector.createBatchWriter(tableName, new BatchWriterConfig().setMaxLatency(BATCH_WRITER_MAX_LATENCY, TimeUnit.SECONDS));
     } catch (Exception ex) {
       log.warn("Unable to create a batch writer, will retry. Set log level to DEBUG to see stacktrace. cause: " + ex);
       log.debug("batch writer creation failed with exception.", ex);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a14bc292/server/tserver/src/main/java/org/apache/accumulo/tserver/FileManager.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/FileManager.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/FileManager.java
index 2227b25..2928418 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/FileManager.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/FileManager.java
@@ -322,7 +322,7 @@ public class FileManager {
         readersReserved.put(reader, file);
       } catch (Exception e) {
 
-        ProblemReports.getInstance(context).report(new ProblemReport(tablet.getTableId().toString(), ProblemType.FILE_READ, file, e));
+        ProblemReports.getInstance(context).report(new ProblemReport(tablet.getTableId(), ProblemType.FILE_READ, file, e));
 
         if (continueOnFailure) {
           // release the permit for the file that failed to open
@@ -526,9 +526,9 @@ public class FileManager {
           FileDataSource fds = new FileDataSource(filename, source);
           dataSources.add(fds);
           SourceSwitchingIterator ssi = new SourceSwitchingIterator(fds);
-          iter = new ProblemReportingIterator(context, tablet.getTableId().toString(), filename, continueOnFailure, ssi);
+          iter = new ProblemReportingIterator(context, tablet.getTableId(), filename, continueOnFailure, ssi);
         } else {
-          iter = new ProblemReportingIterator(context, tablet.getTableId().toString(), filename, continueOnFailure, source);
+          iter = new ProblemReportingIterator(context, tablet.getTableId(), filename, continueOnFailure, source);
         }
         DataFileValue value = files.get(new FileRef(filename));
         if (value.isTimeSet()) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a14bc292/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
index 1b09841..b854a53 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
@@ -598,8 +598,8 @@ public class TabletServer extends AccumuloServerContext implements Runnable {
       if (ss != null) {
         long t2 = System.currentTimeMillis();
 
-        log.debug(String.format("ScanSess tid %s %s %,d entries in %.2f secs, nbTimes = [%s] ", TServerUtils.clientAddress.get(), ss.extent.getTableId()
-            .toString(), ss.entriesReturned, (t2 - ss.startTime) / 1000.0, ss.nbTimes.toString()));
+        log.debug(String.format("ScanSess tid %s %s %,d entries in %.2f secs, nbTimes = [%s] ", TServerUtils.clientAddress.get(), ss.extent.getTableId(),
+            ss.entriesReturned, (t2 - ss.startTime) / 1000.0, ss.nbTimes.toString()));
         if (scanMetrics.isEnabled()) {
           scanMetrics.add(TabletServerScanMetrics.SCAN, t2 - ss.startTime);
           scanMetrics.add(TabletServerScanMetrics.RESULT_SIZE, ss.entriesReturned);
@@ -754,7 +754,7 @@ public class TabletServer extends AccumuloServerContext implements Runnable {
         // if user has no permission to write to this table, add it to
         // the failures list
         boolean sameTable = us.currentTablet != null && (us.currentTablet.getExtent().getTableId().equals(keyExtent.getTableId()));
-        String tableId = keyExtent.getTableId().toString();
+        String tableId = keyExtent.getTableId();
         if (sameTable || security.canWrite(us.getCredentials(), tableId, Tables.getNamespaceId(getInstance(), tableId))) {
           long t2 = System.currentTimeMillis();
           us.authTimes.addStat(t2 - t1);
@@ -1301,7 +1301,7 @@ public class TabletServer extends AccumuloServerContext implements Runnable {
         }
       }
 
-      Text tid = new Text(cs.tableId);
+      String tid = cs.tableId;
       long opid = writeTracker.startWrite(TabletType.type(new KeyExtent(tid, null, null)));
 
       try {
@@ -1395,7 +1395,7 @@ public class TabletServer extends AccumuloServerContext implements Runnable {
         onlineTabletsCopy = new TreeMap<KeyExtent,Tablet>(onlineTablets);
       }
       List<TabletStats> result = new ArrayList<TabletStats>();
-      Text text = new Text(tableId);
+      String text = tableId;
       KeyExtent start = new KeyExtent(text, new Text(), null);
       for (Entry<KeyExtent,Tablet> entry : onlineTabletsCopy.tailMap(start).entrySet()) {
         KeyExtent ke = entry.getKey();
@@ -1570,7 +1570,7 @@ public class TabletServer extends AccumuloServerContext implements Runnable {
 
       ArrayList<Tablet> tabletsToFlush = new ArrayList<Tablet>();
 
-      KeyExtent ke = new KeyExtent(new Text(tableId), ByteBufferUtil.toText(endRow), ByteBufferUtil.toText(startRow));
+      KeyExtent ke = new KeyExtent(tableId, ByteBufferUtil.toText(endRow), ByteBufferUtil.toText(startRow));
 
       synchronized (onlineTablets) {
         for (Tablet tablet : onlineTablets.values())
@@ -1688,7 +1688,7 @@ public class TabletServer extends AccumuloServerContext implements Runnable {
         throw new RuntimeException(e);
       }
 
-      KeyExtent ke = new KeyExtent(new Text(tableId), ByteBufferUtil.toText(endRow), ByteBufferUtil.toText(startRow));
+      KeyExtent ke = new KeyExtent(tableId, ByteBufferUtil.toText(endRow), ByteBufferUtil.toText(startRow));
 
       ArrayList<Tablet> tabletsToCompact = new ArrayList<Tablet>();
       synchronized (onlineTablets) {
@@ -2160,8 +2160,8 @@ public class TabletServer extends AccumuloServerContext implements Runnable {
           log.warn("{}", e.getMessage());
         }
 
-        String table = extent.getTableId().toString();
-        ProblemReports.getInstance(TabletServer.this).report(new ProblemReport(table, TABLET_LOAD, extent.getUUID().toString(), getClientAddressString(), e));
+        String tableId = extent.getTableId();
+        ProblemReports.getInstance(TabletServer.this).report(new ProblemReport(tableId, TABLET_LOAD, extent.getUUID().toString(), getClientAddressString(), e));
       } finally {
         releaseRecoveryMemory(extent);
       }
@@ -2759,7 +2759,7 @@ public class TabletServer extends AccumuloServerContext implements Runnable {
           extents = new ArrayList<KeyExtent>(onlineTablets.keySet());
         }
 
-        Set<Text> tables = new HashSet<Text>();
+        Set<String> tables = new HashSet<String>();
 
         for (KeyExtent keyExtent : extents) {
           tables.add(keyExtent.getTableId());
@@ -2767,7 +2767,7 @@ public class TabletServer extends AccumuloServerContext implements Runnable {
 
         HashSet<String> contexts = new HashSet<String>();
 
-        for (Text tableid : tables) {
+        for (String tableid : tables) {
           String context = getTableConfiguration(new KeyExtent(tableid, null, null)).get(Property.TABLE_CLASSPATH);
           if (!context.equals("")) {
             contexts.add(context);
@@ -2825,7 +2825,7 @@ public class TabletServer extends AccumuloServerContext implements Runnable {
     Map<String,TableInfo> tables = new HashMap<String,TableInfo>();
 
     for (Entry<KeyExtent,Tablet> entry : onlineTabletsCopy.entrySet()) {
-      String tableId = entry.getKey().getTableId().toString();
+      String tableId = entry.getKey().getTableId();
       TableInfo table = tables.get(tableId);
       if (table == null) {
         table = new TableInfo();
@@ -2878,7 +2878,7 @@ public class TabletServer extends AccumuloServerContext implements Runnable {
     }
 
     for (KeyExtent extent : offlineTabletsCopy) {
-      String tableId = extent.getTableId().toString();
+      String tableId = extent.getTableId();
       TableInfo table = tables.get(tableId);
       if (table == null) {
         table = new TableInfo();
@@ -2984,7 +2984,7 @@ public class TabletServer extends AccumuloServerContext implements Runnable {
   }
 
   public TableConfiguration getTableConfiguration(KeyExtent extent) {
-    return confFactory.getTableConfiguration(extent.getTableId().toString());
+    return confFactory.getTableConfiguration(extent.getTableId());
   }
 
   public DfsLogger.ServerResources getServerConfig() {
@@ -3035,6 +3035,7 @@ public class TabletServer extends AccumuloServerContext implements Runnable {
   // avoid unnecessary redundant markings to meta
   final ConcurrentHashMap<DfsLogger,EnumSet<TabletLevel>> metadataTableLogs = new ConcurrentHashMap<>();
   final Object levelLocks[] = new Object[TabletLevel.values().length];
+
   {
     for (int i = 0; i < levelLocks.length; i++) {
       levelLocks[i] = new Object();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a14bc292/server/tserver/src/main/java/org/apache/accumulo/tserver/compaction/MajorCompactionRequest.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/compaction/MajorCompactionRequest.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/compaction/MajorCompactionRequest.java
index c6733f8..26b1b12 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/compaction/MajorCompactionRequest.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/compaction/MajorCompactionRequest.java
@@ -56,15 +56,6 @@ public class MajorCompactionRequest implements Cloneable {
     this.files = mcr.files;
   }
 
-  /**
-   * @return org.apache.accumulo.core.data.KeyExtent
-   * @deprecated since 1.7. Use {@link #getTabletId()} instead.
-   */
-  @Deprecated
-  public org.apache.accumulo.core.data.KeyExtent getExtent() {
-    return new org.apache.accumulo.core.data.KeyExtent(extent.getTableId(), extent.getEndRow(), extent.getPrevEndRow());
-  }
-
   public TabletId getTabletId() {
     return new TabletIdImpl(extent);
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a14bc292/server/tserver/src/main/java/org/apache/accumulo/tserver/logger/LogReader.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/logger/LogReader.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/logger/LogReader.java
index 6ceba5a..01db8aa 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/logger/LogReader.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/logger/LogReader.java
@@ -84,7 +84,7 @@ public class LogReader {
       row = new Text(opts.row);
     if (opts.extent != null) {
       String sa[] = opts.extent.split(";");
-      ke = new KeyExtent(new Text(sa[0]), new Text(sa[1]), new Text(sa[2]));
+      ke = new KeyExtent(sa[0], new Text(sa[1]), new Text(sa[2]));
     }
     if (opts.regexp != null) {
       Pattern pattern = Pattern.compile(opts.regexp);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a14bc292/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystem.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystem.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystem.java
index 328c591..0bd467c 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystem.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystem.java
@@ -16,6 +16,7 @@
  */
 package org.apache.accumulo.tserver.replication;
 
+import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
 import static java.util.Objects.requireNonNull;
 
 import java.io.ByteArrayOutputStream;
@@ -82,7 +83,6 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import com.google.common.net.HostAndPort;
-import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
 
 public class AccumuloReplicaSystem implements ReplicaSystem {
   private static final Logger log = LoggerFactory.getLogger(AccumuloReplicaSystem.class);
@@ -671,7 +671,7 @@ public class AccumuloReplicaSystem implements ReplicaSystem {
 
       switch (key.event) {
         case DEFINE_TABLET:
-          if (target.getSourceTableId().equals(key.tablet.getTableId().toString())) {
+          if (target.getSourceTableId().equals(key.tablet.getTableId())) {
             desiredTids.add(key.tid);
           }
           break;
@@ -716,7 +716,7 @@ public class AccumuloReplicaSystem implements ReplicaSystem {
       switch (key.event) {
         case DEFINE_TABLET:
           // For new DEFINE_TABLETs, we also need to record the new tids we see
-          if (target.getSourceTableId().equals(key.tablet.getTableId().toString())) {
+          if (target.getSourceTableId().equals(key.tablet.getTableId())) {
             desiredTids.add(key.tid);
           }
           break;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a14bc292/server/tserver/src/main/java/org/apache/accumulo/tserver/session/SessionManager.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/session/SessionManager.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/session/SessionManager.java
index 5fbd1c3..1d9c2f7 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/session/SessionManager.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/session/SessionManager.java
@@ -253,11 +253,11 @@ public class SessionManager {
       if (session instanceof ScanSession) {
         ScanSession ss = (ScanSession) session;
         nbt = ss.nextBatchTask;
-        tableID = ss.extent.getTableId().toString();
+        tableID = ss.extent.getTableId();
       } else if (session instanceof MultiScanSession) {
         MultiScanSession mss = (MultiScanSession) session;
         nbt = mss.lookupTask;
-        tableID = mss.threadPoolExtent.getTableId().toString();
+        tableID = mss.threadPoolExtent.getTableId();
       }
 
       if (nbt == null)
@@ -320,9 +320,8 @@ public class SessionManager {
           }
         }
 
-        ActiveScan activeScan = new ActiveScan(ss.client, ss.getUser(), ss.extent.getTableId().toString(), ct - ss.startTime, ct - ss.lastAccessTime,
-            ScanType.SINGLE, state, ss.extent.toThrift(), Translator.translate(ss.columnSet, Translators.CT), ss.ssiList, ss.ssio,
-            ss.auths.getAuthorizationsBB(), ss.context);
+        ActiveScan activeScan = new ActiveScan(ss.client, ss.getUser(), ss.extent.getTableId(), ct - ss.startTime, ct - ss.lastAccessTime, ScanType.SINGLE,
+            state, ss.extent.toThrift(), Translator.translate(ss.columnSet, Translators.CT), ss.ssiList, ss.ssio, ss.auths.getAuthorizationsBB(), ss.context);
 
         // scanId added by ACCUMULO-2641 is an optional thrift argument and not available in ActiveScan constructor
         activeScan.setScanId(entry.getKey());
@@ -351,7 +350,7 @@ public class SessionManager {
           }
         }
 
-        activeScans.add(new ActiveScan(mss.client, mss.getUser(), mss.threadPoolExtent.getTableId().toString(), ct - mss.startTime, ct - mss.lastAccessTime,
+        activeScans.add(new ActiveScan(mss.client, mss.getUser(), mss.threadPoolExtent.getTableId(), ct - mss.startTime, ct - mss.lastAccessTime,
             ScanType.BATCH, state, mss.threadPoolExtent.toThrift(), Translator.translate(mss.columnSet, Translators.CT), mss.ssiList, mss.ssio, mss.auths
                 .getAuthorizationsBB(), mss.context));
       }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a14bc292/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Compactor.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Compactor.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Compactor.java
index d8d726b..2ef4a34 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Compactor.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Compactor.java
@@ -284,7 +284,7 @@ public class Compactor implements Callable<CompactionStats> {
 
         readers.add(reader);
 
-        SortedKeyValueIterator<Key,Value> iter = new ProblemReportingIterator(context, extent.getTableId().toString(), mapFile.path().toString(), false, reader);
+        SortedKeyValueIterator<Key,Value> iter = new ProblemReportingIterator(context, extent.getTableId(), mapFile.path().toString(), false, reader);
 
         if (filesToCompact.get(mapFile).isTimeSet()) {
           iter = new TimeSettingIterator(iter, filesToCompact.get(mapFile).getTime());
@@ -294,7 +294,7 @@ public class Compactor implements Callable<CompactionStats> {
 
       } catch (Throwable e) {
 
-        ProblemReports.getInstance(context).report(new ProblemReport(extent.getTableId().toString(), ProblemType.FILE_READ, mapFile.path().toString(), e));
+        ProblemReports.getInstance(context).report(new ProblemReport(extent.getTableId(), ProblemType.FILE_READ, mapFile.path().toString(), e));
 
         log.warn("Some problem opening map file {} {}", mapFile, e.getMessage(), e);
         // failed to open some map file... close the ones that were opened

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a14bc292/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/DatafileManager.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/DatafileManager.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/DatafileManager.java
index 6b19b26..fd1ea33 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/DatafileManager.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/DatafileManager.java
@@ -16,6 +16,8 @@
  */
 package org.apache.accumulo.tserver.tablet;
 
+import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
+
 import java.io.IOException;
 import java.util.Collection;
 import java.util.Collections;
@@ -51,8 +53,6 @@ import org.apache.accumulo.tserver.TLevel;
 import org.apache.hadoop.fs.Path;
 import org.apache.log4j.Logger;
 
-import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
-
 class DatafileManager {
   private final Logger log = Logger.getLogger(DatafileManager.class);
   // access to datafilesizes needs to be synchronized: see CompactionRunner#getNumFiles
@@ -218,7 +218,7 @@ class DatafileManager {
       boolean inTheRightDirectory = false;
       Path parent = tpath.path().getParent().getParent();
       for (String tablesDir : ServerConstants.getTablesDirs()) {
-        if (parent.equals(new Path(tablesDir, tablet.getExtent().getTableId().toString()))) {
+        if (parent.equals(new Path(tablesDir, tablet.getExtent().getTableId()))) {
           inTheRightDirectory = true;
           break;
         }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a14bc292/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/MinorCompactor.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/MinorCompactor.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/MinorCompactor.java
index c1ed720..e3f8193 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/MinorCompactor.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/MinorCompactor.java
@@ -16,6 +16,8 @@
  */
 package org.apache.accumulo.tserver.tablet;
 
+import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
+
 import java.io.IOException;
 import java.util.Collections;
 import java.util.Map;
@@ -39,8 +41,6 @@ import org.apache.hadoop.fs.Path;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
-
 public class MinorCompactor extends Compactor {
 
   private static final Logger log = LoggerFactory.getLogger(MinorCompactor.class);
@@ -75,7 +75,7 @@ public class MinorCompactor extends Compactor {
 
   private boolean isTableDeleting() {
     try {
-      return Tables.getTableState(tabletServer.getInstance(), extent.getTableId().toString()) == TableState.DELETING;
+      return Tables.getTableState(tabletServer.getInstance(), extent.getTableId()) == TableState.DELETING;
     } catch (Exception e) {
       log.warn("Failed to determine if table " + extent.getTableId() + " was deleting ", e);
       return false; // can not get positive confirmation that its deleting.
@@ -103,19 +103,19 @@ public class MinorCompactor extends Compactor {
           // (int)(map.size()/((t2 - t1)/1000.0)), (t2 - t1)/1000.0, estimatedSizeInBytes()));
 
           if (reportedProblem) {
-            ProblemReports.getInstance(tabletServer).deleteProblemReport(getExtent().getTableId().toString(), ProblemType.FILE_WRITE, outputFileName);
+            ProblemReports.getInstance(tabletServer).deleteProblemReport(getExtent().getTableId(), ProblemType.FILE_WRITE, outputFileName);
           }
 
           return ret;
         } catch (IOException e) {
           log.warn("MinC failed ({}) to create {} retrying ...", e.getMessage(), outputFileName);
-          ProblemReports.getInstance(tabletServer).report(new ProblemReport(getExtent().getTableId().toString(), ProblemType.FILE_WRITE, outputFileName, e));
+          ProblemReports.getInstance(tabletServer).report(new ProblemReport(getExtent().getTableId(), ProblemType.FILE_WRITE, outputFileName, e));
           reportedProblem = true;
         } catch (RuntimeException e) {
           // if this is coming from a user iterator, it is possible that the user could change the iterator config and that the
           // minor compaction would succeed
           log.warn("MinC failed ({}) to create {} retrying ...", e.getMessage(), outputFileName, e);
-          ProblemReports.getInstance(tabletServer).report(new ProblemReport(getExtent().getTableId().toString(), ProblemType.FILE_WRITE, outputFileName, e));
+          ProblemReports.getInstance(tabletServer).report(new ProblemReport(getExtent().getTableId(), ProblemType.FILE_WRITE, outputFileName, e));
           reportedProblem = true;
         } catch (CompactionCanceledException e) {
           throw new IllegalStateException(e);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a14bc292/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java
index 90fba75..cf99dbd 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java
@@ -327,7 +327,7 @@ public class Tablet implements TabletCommitter {
     if (null == tblConf) {
       Tables.clearCache(tabletServer.getInstance());
       tblConf = tabletServer.getTableConfiguration(extent);
-      requireNonNull(tblConf, "Could not get table configuration for " + extent.getTableId().toString());
+      requireNonNull(tblConf, "Could not get table configuration for " + extent.getTableId());
     }
 
     this.tableConfiguration = tblConf;
@@ -343,7 +343,7 @@ public class Tablet implements TabletCommitter {
     if (tabletPaths.dir.contains(":")) {
       locationPath = new Path(tabletPaths.dir);
     } else {
-      locationPath = tabletServer.getFileSystem().getFullPath(FileType.TABLE, extent.getTableId().toString() + tabletPaths.dir);
+      locationPath = tabletServer.getFileSystem().getFullPath(FileType.TABLE, extent.getTableId() + tabletPaths.dir);
     }
     this.location = locationPath;
     this.tabletDirectory = tabletPaths.dir;
@@ -1322,8 +1322,7 @@ public class Tablet implements TabletCommitter {
         }
       }
       if (err != null) {
-        ProblemReports.getInstance(tabletServer)
-            .report(new ProblemReport(extent.getTableId().toString(), ProblemType.TABLET_LOAD, this.extent.toString(), err));
+        ProblemReports.getInstance(tabletServer).report(new ProblemReport(extent.getTableId(), ProblemType.TABLET_LOAD, this.extent.toString(), err));
         log.error("Tablet closed consistency check has failed for " + this.extent + " giving up and closing");
       }
     }
@@ -2108,7 +2107,7 @@ public class Tablet implements TabletCommitter {
       KeyExtent low = new KeyExtent(extent.getTableId(), midRow, extent.getPrevEndRow());
       KeyExtent high = new KeyExtent(extent.getTableId(), extent.getEndRow(), midRow);
 
-      String lowDirectory = createTabletDirectory(getTabletServer().getFileSystem(), extent.getTableId().toString(), midRow);
+      String lowDirectory = createTabletDirectory(getTabletServer().getFileSystem(), extent.getTableId(), midRow);
 
       // write new tablet information to MetadataTable
       SortedMap<FileRef,DataFileValue> lowDatafileSizes = new TreeMap<FileRef,DataFileValue>();


Mime
View raw message