accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vi...@apache.org
Subject [07/10] git commit: ACCUMULO-2289 Correcting Tables.getNamespace to Tables.getNamespaceId
Date Thu, 30 Jan 2014 21:57:58 GMT
ACCUMULO-2289 Correcting Tables.getNamespace to Tables.getNamespaceId


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

Branch: refs/heads/master
Commit: 939a4f9d2cc41e7734bfbc1da0180b394e142014
Parents: 90e1f22
Author: John Vines <vines@apache.org>
Authored: Thu Jan 30 16:01:43 2014 -0500
Committer: John Vines <vines@apache.org>
Committed: Thu Jan 30 16:01:43 2014 -0500

----------------------------------------------------------------------
 .../accumulo/core/client/impl/Tables.java       |  6 +++---
 .../core/util/shell/commands/ConfigCommand.java |  2 +-
 .../server/client/ClientServiceHandler.java     |  6 +++---
 .../server/conf/TableParentConfiguration.java   |  2 +-
 .../accumulo/master/FateServiceHandler.java     | 20 ++++++++++----------
 .../master/MasterClientServiceHandler.java      |  6 +++---
 .../master/tableOps/CancelCompactions.java      |  2 +-
 .../master/tableOps/ChangeTableState.java       |  2 +-
 .../accumulo/master/tableOps/CloneTable.java    |  2 +-
 .../accumulo/master/tableOps/CompactRange.java  |  4 ++--
 .../accumulo/master/tableOps/DeleteTable.java   |  2 +-
 .../accumulo/master/tableOps/ExportTable.java   |  2 +-
 .../accumulo/master/tableOps/RenameTable.java   |  2 +-
 .../accumulo/master/tableOps/TableRangeOp.java  |  4 ++--
 .../apache/accumulo/tserver/TabletServer.java   | 12 ++++++------
 15 files changed, 37 insertions(+), 37 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/939a4f9d/core/src/main/java/org/apache/accumulo/core/client/impl/Tables.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/Tables.java b/core/src/main/java/org/apache/accumulo/core/client/impl/Tables.java
index bed4234..8a2c2c7 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/Tables.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/Tables.java
@@ -286,13 +286,13 @@ public class Tables {
   }
 
   /**
-   * Returns the namespace for a given table ID.
+   * Returns the namespace id for a given table ID.
    * @param instance The Accumulo Instance
    * @param tableId The tableId
-   * @return The namespace which this table resides in.
+   * @return The namespace id which this table resides in.
    * @throws IllegalArgumentException if the table doesn't exist in ZooKeeper
    */
-  public static String getNamespace(Instance instance, String tableId) throws IllegalArgumentException
{
+  public static String getNamespaceId(Instance instance, String tableId) throws IllegalArgumentException
{
     ArgumentChecker.notNull(instance, tableId);
     
     ZooCache zc = getZooCache(instance);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/939a4f9d/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ConfigCommand.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ConfigCommand.java
b/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ConfigCommand.java
index 90d02de..81cce7b 100644
--- a/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ConfigCommand.java
+++ b/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ConfigCommand.java
@@ -156,7 +156,7 @@ public class ConfigCommand extends Command {
       final TreeMap<String,String> namespaceConfig = new TreeMap<String,String>();
       if (tableName != null) {
         String n = Namespaces.getNamespaceName(shellState.getInstance(),
-            Tables.getNamespace(shellState.getInstance(), Tables.getTableId(shellState.getInstance(),
tableName)));
+            Tables.getNamespaceId(shellState.getInstance(), Tables.getTableId(shellState.getInstance(),
tableName)));
         for (Entry<String,String> e : shellState.getConnector().namespaceOperations().getProperties(n))
{
           namespaceConfig.put(e.getKey(), e.getValue());
         }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/939a4f9d/server/base/src/main/java/org/apache/accumulo/server/client/ClientServiceHandler.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/client/ClientServiceHandler.java
b/server/base/src/main/java/org/apache/accumulo/server/client/ClientServiceHandler.java
index 9b39582..3571d7f 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/client/ClientServiceHandler.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/client/ClientServiceHandler.java
@@ -183,7 +183,7 @@ public class ClientServiceHandler implements ClientService.Iface {
   public void grantTablePermission(TInfo tinfo, TCredentials credentials, String user, String
tableName, byte permission) throws ThriftSecurityException,
       ThriftTableOperationException {
     String tableId = checkTableId(instance, tableName, TableOperation.PERMISSION);
-    String namespaceId = Tables.getNamespace(instance, tableId); 
+    String namespaceId = Tables.getNamespaceId(instance, tableId); 
 
     security.grantTablePermission(credentials, user, tableId, TablePermission.getPermissionById(permission),
namespaceId);
   }
@@ -204,7 +204,7 @@ public class ClientServiceHandler implements ClientService.Iface {
   public void revokeTablePermission(TInfo tinfo, TCredentials credentials, String user, String
tableName, byte permission) throws ThriftSecurityException,
       ThriftTableOperationException {
     String tableId = checkTableId(instance, tableName, TableOperation.PERMISSION);
-    String namespaceId = Tables.getNamespace(instance, tableId); 
+    String namespaceId = Tables.getNamespaceId(instance, tableId); 
 
     security.revokeTablePermission(credentials, user, tableId, TablePermission.getPermissionById(permission),
namespaceId);
   }
@@ -405,7 +405,7 @@ public class ClientServiceHandler implements ClientService.Iface {
         // ensure that table table exists
         String tableId = checkTableId(instance, table, null);
         tableIds.add(tableId);
-        String namespaceId = Tables.getNamespace(instance, tableId);
+        String namespaceId = Tables.getNamespaceId(instance, tableId);
         if (!security.canScan(credentials, tableId, namespaceId))
           throw new ThriftSecurityException(credentials.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
       }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/939a4f9d/server/base/src/main/java/org/apache/accumulo/server/conf/TableParentConfiguration.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/conf/TableParentConfiguration.java
b/server/base/src/main/java/org/apache/accumulo/server/conf/TableParentConfiguration.java
index 902ecd0..34eb781 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/conf/TableParentConfiguration.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/conf/TableParentConfiguration.java
@@ -34,6 +34,6 @@ public class TableParentConfiguration extends NamespaceConfiguration {
 
   @Override
   protected String getNamespaceId() {
-    return Tables.getNamespace(inst, tableId);
+    return Tables.getNamespaceId(inst, tableId);
   }
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/939a4f9d/server/master/src/main/java/org/apache/accumulo/master/FateServiceHandler.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/FateServiceHandler.java
b/server/master/src/main/java/org/apache/accumulo/master/FateServiceHandler.java
index 6f2c39a..f3428a6 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/FateServiceHandler.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/FateServiceHandler.java
@@ -161,7 +161,7 @@ class FateServiceHandler implements FateService.Iface {
         });
 
         String tableId = ClientServiceHandler.checkTableId(master.getInstance(), oldTableName,
tableOp);
-        String namespaceId = Tables.getNamespace(master.getInstance(), tableId);
+        String namespaceId = Tables.getNamespaceId(master.getInstance(), tableId);
 
         if (!master.security.canRenameTable(c, tableId, oldTableName, newTableName, namespaceId))
           throw new ThriftSecurityException(c.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
@@ -216,7 +216,7 @@ class FateServiceHandler implements FateService.Iface {
         String tableName = validateTableNameArgument(arguments.get(0), tableOp, Tables.NOT_SYSTEM);
 
         final String tableId = ClientServiceHandler.checkTableId(master.getInstance(), tableName,
tableOp);
-        String namespaceId = Tables.getNamespace(master.getInstance(), tableId);
+        String namespaceId = Tables.getNamespaceId(master.getInstance(), tableId);
 
         if (!master.security.canDeleteTable(c, tableId, namespaceId))
           throw new ThriftSecurityException(c.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
@@ -226,7 +226,7 @@ class FateServiceHandler implements FateService.Iface {
       case TABLE_ONLINE: {
         TableOperation tableOp = TableOperation.ONLINE;
         final String tableId = validateTableIdArgument(arguments.get(0), tableOp, Tables.NOT_ROOT_ID);
-        String namespaceId = Tables.getNamespace(master.getInstance(), tableId);
+        String namespaceId = Tables.getNamespaceId(master.getInstance(), tableId);
 
         if (!master.security.canOnlineOfflineTable(c, tableId, op, namespaceId))
           throw new ThriftSecurityException(c.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
@@ -237,7 +237,7 @@ class FateServiceHandler implements FateService.Iface {
       case TABLE_OFFLINE: {
         TableOperation tableOp = TableOperation.OFFLINE;
         final String tableId = validateTableIdArgument(arguments.get(0), tableOp, Tables.NOT_ROOT_ID);
-        String namespaceId = Tables.getNamespace(master.getInstance(), tableId);
+        String namespaceId = Tables.getNamespaceId(master.getInstance(), tableId);
 
         if (!master.security.canOnlineOfflineTable(c, tableId, op, namespaceId))
           throw new ThriftSecurityException(c.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
@@ -252,7 +252,7 @@ class FateServiceHandler implements FateService.Iface {
         Text endRow = ByteBufferUtil.toText(arguments.get(2));
 
         final String tableId = ClientServiceHandler.checkTableId(master.getInstance(), tableName,
tableOp);
-        String namespaceId = Tables.getNamespace(master.getInstance(), tableId);
+        String namespaceId = Tables.getNamespaceId(master.getInstance(), tableId);
 
         if (!master.security.canMerge(c, tableId, namespaceId))
           throw new ThriftSecurityException(c.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
@@ -268,7 +268,7 @@ class FateServiceHandler implements FateService.Iface {
         Text endRow = ByteBufferUtil.toText(arguments.get(2));
 
         final String tableId = ClientServiceHandler.checkTableId(master.getInstance(), tableName,
tableOp);
-        String namespaceId = Tables.getNamespace(master.getInstance(), tableId);
+        String namespaceId = Tables.getNamespaceId(master.getInstance(), tableId);
 
         if (!master.security.canDeleteRange(c, tableId, tableName, startRow, endRow, namespaceId))
           throw new ThriftSecurityException(c.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
@@ -284,7 +284,7 @@ class FateServiceHandler implements FateService.Iface {
         boolean setTime = Boolean.parseBoolean(ByteBufferUtil.toString(arguments.get(3)));
 
         final String tableId = ClientServiceHandler.checkTableId(master.getInstance(), tableName,
tableOp);
-        String namespaceId = Tables.getNamespace(master.getInstance(), tableId);
+        String namespaceId = Tables.getNamespaceId(master.getInstance(), tableId);
         
         if (!master.security.canBulkImport(c, tableId, tableName, dir, failDir, namespaceId))
           throw new ThriftSecurityException(c.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
@@ -298,7 +298,7 @@ class FateServiceHandler implements FateService.Iface {
         byte[] startRow = ByteBufferUtil.toBytes(arguments.get(1));
         byte[] endRow = ByteBufferUtil.toBytes(arguments.get(2));
         List<IteratorSetting> iterators = IteratorUtil.decodeIteratorSettings(ByteBufferUtil.toBytes(arguments.get(3)));
-        String namespaceId = Tables.getNamespace(master.getInstance(), tableId);
+        String namespaceId = Tables.getNamespaceId(master.getInstance(), tableId);
 
         if (!master.security.canCompact(c, tableId, namespaceId))
           throw new ThriftSecurityException(c.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
@@ -309,7 +309,7 @@ class FateServiceHandler implements FateService.Iface {
       case TABLE_CANCEL_COMPACT: {
         TableOperation tableOp = TableOperation.COMPACT_CANCEL;
         String tableId = validateTableIdArgument(arguments.get(0), tableOp, null);
-        String namespaceId = Tables.getNamespace(master.getInstance(), tableId);
+        String namespaceId = Tables.getNamespaceId(master.getInstance(), tableId);
 
         if (!master.security.canCompact(c, tableId, namespaceId))
           throw new ThriftSecurityException(c.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
@@ -340,7 +340,7 @@ class FateServiceHandler implements FateService.Iface {
         String exportDir = ByteBufferUtil.toString(arguments.get(1));
 
         String tableId = ClientServiceHandler.checkTableId(master.getInstance(), tableName,
tableOp);
-        String namespaceId = Tables.getNamespace(master.getInstance(), tableId);
+        String namespaceId = Tables.getNamespaceId(master.getInstance(), tableId);
         
         if (!master.security.canExport(c, tableId, tableName, exportDir, namespaceId))
           throw new ThriftSecurityException(c.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/939a4f9d/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 e9914ab..8023169 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
@@ -100,7 +100,7 @@ class MasterClientServiceHandler extends FateServiceHandler implements
MasterCli
 
   @Override
   public long initiateFlush(TInfo tinfo, TCredentials c, String tableId) throws ThriftSecurityException,
ThriftTableOperationException {
-    String namespaceId = Tables.getNamespace(instance, tableId);
+    String namespaceId = Tables.getNamespaceId(instance, tableId);
     master.security.canFlush(c, tableId, namespaceId);
 
     String zTablePath = Constants.ZROOT + "/" + master.getConfiguration().getInstance().getInstanceID()
+ Constants.ZTABLES + "/" + tableId
@@ -129,7 +129,7 @@ class MasterClientServiceHandler extends FateServiceHandler implements
MasterCli
   @Override
   public void waitForFlush(TInfo tinfo, TCredentials c, String tableId, ByteBuffer startRow,
ByteBuffer endRow, long flushID, long maxLoops)
       throws ThriftSecurityException, ThriftTableOperationException {
-    String namespaceId = Tables.getNamespace(instance, tableId);
+    String namespaceId = Tables.getNamespaceId(instance, tableId);
     master.security.canFlush(c, tableId, namespaceId);
 
     if (endRow != null && startRow != null && ByteBufferUtil.toText(startRow).compareTo(ByteBufferUtil.toText(endRow))
>= 0)
@@ -435,7 +435,7 @@ class MasterClientServiceHandler extends FateServiceHandler implements
MasterCli
   private void alterTableProperty(TCredentials c, String tableName, String property, String
value, TableOperation op) throws ThriftSecurityException,
       ThriftTableOperationException {
     final String tableId = ClientServiceHandler.checkTableId(master.getInstance(), tableName,
op);
-    String namespaceId = Tables.getNamespace(master.getInstance(), tableId); 
+    String namespaceId = Tables.getNamespaceId(master.getInstance(), tableId); 
     if (!master.security.canAlterTable(c, tableId, namespaceId))
       throw new ThriftSecurityException(c.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/939a4f9d/server/master/src/main/java/org/apache/accumulo/master/tableOps/CancelCompactions.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/tableOps/CancelCompactions.java
b/server/master/src/main/java/org/apache/accumulo/master/tableOps/CancelCompactions.java
index 0e3af9d..d1c3c40 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/CancelCompactions.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/CancelCompactions.java
@@ -59,7 +59,7 @@ public class CancelCompactions extends MasterRepo {
   public CancelCompactions(String tableId) {
     this.tableId = tableId;
     Instance inst = HdfsZooInstance.getInstance();
-    this.namespaceId = Tables.getNamespace(inst, tableId);
+    this.namespaceId = Tables.getNamespaceId(inst, tableId);
   }
   
   @Override

http://git-wip-us.apache.org/repos/asf/accumulo/blob/939a4f9d/server/master/src/main/java/org/apache/accumulo/master/tableOps/ChangeTableState.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/tableOps/ChangeTableState.java
b/server/master/src/main/java/org/apache/accumulo/master/tableOps/ChangeTableState.java
index 7859c0e..f1878b0 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/ChangeTableState.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/ChangeTableState.java
@@ -37,7 +37,7 @@ public class ChangeTableState extends MasterRepo {
     this.tableId = tableId;
     this.top = top;
     Instance inst = HdfsZooInstance.getInstance();
-    this.namespaceId = Tables.getNamespace(inst, tableId);
+    this.namespaceId = Tables.getNamespaceId(inst, tableId);
 
     if (top != TableOperation.ONLINE && top != TableOperation.OFFLINE)
       throw new IllegalArgumentException(top.toString());

http://git-wip-us.apache.org/repos/asf/accumulo/blob/939a4f9d/server/master/src/main/java/org/apache/accumulo/master/tableOps/CloneTable.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/tableOps/CloneTable.java
b/server/master/src/main/java/org/apache/accumulo/master/tableOps/CloneTable.java
index bfaab82..da0afd8 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/CloneTable.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/CloneTable.java
@@ -239,7 +239,7 @@ public class CloneTable extends MasterRepo {
     cloneInfo.propertiesToExclude = propertiesToExclude;
     cloneInfo.propertiesToSet = propertiesToSet;
     Instance inst = HdfsZooInstance.getInstance();
-    cloneInfo.srcNamespaceId = Tables.getNamespace(inst, cloneInfo.srcTableId);
+    cloneInfo.srcNamespaceId = Tables.getNamespaceId(inst, cloneInfo.srcTableId);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/accumulo/blob/939a4f9d/server/master/src/main/java/org/apache/accumulo/master/tableOps/CompactRange.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/tableOps/CompactRange.java
b/server/master/src/main/java/org/apache/accumulo/master/tableOps/CompactRange.java
index df474b3..6081ff2 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/CompactRange.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/CompactRange.java
@@ -80,7 +80,7 @@ class CompactionDriver extends MasterRepo {
     this.startRow = startRow;
     this.endRow = endRow;
     Instance inst = HdfsZooInstance.getInstance();
-    this.namespaceId = Tables.getNamespace(inst, tableId);
+    this.namespaceId = Tables.getNamespaceId(inst, tableId);
   }
 
   @Override
@@ -294,7 +294,7 @@ public class CompactRange extends MasterRepo {
     this.startRow = startRow.length == 0 ? null : startRow;
     this.endRow = endRow.length == 0 ? null : endRow;
     Instance inst = HdfsZooInstance.getInstance();
-    this.namespaceId = Tables.getNamespace(inst, tableId);
+    this.namespaceId = Tables.getNamespaceId(inst, tableId);
 
     if (iterators.size() > 0) {
       this.iterators = WritableUtils.toByteArray(new CompactionIterators(this.startRow, this.endRow,
iterators));

http://git-wip-us.apache.org/repos/asf/accumulo/blob/939a4f9d/server/master/src/main/java/org/apache/accumulo/master/tableOps/DeleteTable.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/tableOps/DeleteTable.java
b/server/master/src/main/java/org/apache/accumulo/master/tableOps/DeleteTable.java
index 64c1d99..f30618e 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/DeleteTable.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/DeleteTable.java
@@ -233,7 +233,7 @@ public class DeleteTable extends MasterRepo {
   public DeleteTable(String tableId) {
     this.tableId = tableId;
     Instance inst = HdfsZooInstance.getInstance();
-    this.namespaceId = Tables.getNamespace(inst, tableId);
+    this.namespaceId = Tables.getNamespaceId(inst, tableId);
   }
   
   @Override

http://git-wip-us.apache.org/repos/asf/accumulo/blob/939a4f9d/server/master/src/main/java/org/apache/accumulo/master/tableOps/ExportTable.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/tableOps/ExportTable.java
b/server/master/src/main/java/org/apache/accumulo/master/tableOps/ExportTable.java
index dd2d3f4..4b177b5 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/ExportTable.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/ExportTable.java
@@ -290,7 +290,7 @@ public class ExportTable extends MasterRepo {
     tableInfo.exportDir = exportDir;
     tableInfo.tableID = tableId;
     Instance inst = HdfsZooInstance.getInstance();
-    tableInfo.namespaceID = Tables.getNamespace(inst, tableId);
+    tableInfo.namespaceID = Tables.getNamespaceId(inst, tableId);
   }
   
   @Override

http://git-wip-us.apache.org/repos/asf/accumulo/blob/939a4f9d/server/master/src/main/java/org/apache/accumulo/master/tableOps/RenameTable.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/tableOps/RenameTable.java
b/server/master/src/main/java/org/apache/accumulo/master/tableOps/RenameTable.java
index 7e3a6f9..a261cbb 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/RenameTable.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/RenameTable.java
@@ -52,7 +52,7 @@ public class RenameTable extends MasterRepo {
     this.oldTableName = oldTableName;
     this.newTableName = newTableName;
     Instance inst = HdfsZooInstance.getInstance();
-    this.namespaceId = Tables.getNamespace(inst, tableId);
+    this.namespaceId = Tables.getNamespaceId(inst, tableId);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/accumulo/blob/939a4f9d/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 a972d46..12849b6 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
@@ -54,7 +54,7 @@ class TableRangeOpWait extends MasterRepo {
   public TableRangeOpWait(String tableId) {
     this.tableId = tableId;
     Instance inst = HdfsZooInstance.getInstance();
-    this.namespaceId = Tables.getNamespace(inst, tableId);
+    this.namespaceId = Tables.getNamespaceId(inst, tableId);
   }
 
   @Override
@@ -102,7 +102,7 @@ public class TableRangeOp extends MasterRepo {
     this.endRow = TextUtil.getBytes(endRow);
     this.op = op;
     Instance inst = HdfsZooInstance.getInstance();
-    this.namespaceId = Tables.getNamespace(inst, tableId);
+    this.namespaceId = Tables.getNamespaceId(inst, tableId);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/accumulo/blob/939a4f9d/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 b5a8b2a..9d08c81 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
@@ -1183,7 +1183,7 @@ public class TabletServer extends AbstractMetricsImpl implements org.apache.accu
         long readaheadThreshold) throws NotServingTabletException, ThriftSecurityException,
org.apache.accumulo.core.tabletserver.thrift.TooManyFilesException {
 
       String tableId = new String(textent.getTable());
-      if (!security.canScan(credentials, tableId, Tables.getNamespace(instance, tableId),
range, columns, ssiList, ssio, authorizations))
+      if (!security.canScan(credentials, tableId, Tables.getNamespaceId(instance, tableId),
range, columns, ssiList, ssio, authorizations))
         throw new ThriftSecurityException(credentials.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
 
       if (!security.userHasAuthorizations(credentials, authorizations))
@@ -1341,7 +1341,7 @@ public class TabletServer extends AbstractMetricsImpl implements org.apache.accu
 
       // check if user has permission to the tables
       for (String tableId : tables)
-        if (!security.canScan(credentials, tableId, Tables.getNamespace(instance, tableId),
tbatch, tcolumns, ssiList, ssio, authorizations))
+        if (!security.canScan(credentials, tableId, Tables.getNamespaceId(instance, tableId),
tbatch, tcolumns, ssiList, ssio, authorizations))
           throw new ThriftSecurityException(credentials.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
 
       try {
@@ -1478,7 +1478,7 @@ public class TabletServer extends AbstractMetricsImpl implements org.apache.accu
         // the failures list
         boolean sameTable = us.currentTablet != null && (us.currentTablet.getExtent().getTableId().equals(keyExtent.getTableId()));
         String tableId = keyExtent.getTableId().toString();
-        if (sameTable || security.canWrite(us.credentials, tableId, Tables.getNamespace(instance,
tableId))) {
+        if (sameTable || security.canWrite(us.credentials, tableId, Tables.getNamespaceId(instance,
tableId))) {
           long t2 = System.currentTimeMillis();
           us.authTimes.addStat(t2 - t1);
           us.currentTablet = onlineTablets.get(keyExtent);
@@ -1743,7 +1743,7 @@ public class TabletServer extends AbstractMetricsImpl implements org.apache.accu
         ConstraintViolationException, ThriftSecurityException {
 
       String tableId = new String(tkeyExtent.getTable());
-      if (!security.canWrite(credentials, tableId, Tables.getNamespace(instance, tableId)))
+      if (!security.canWrite(credentials, tableId, Tables.getNamespaceId(instance, tableId)))
         throw new ThriftSecurityException(credentials.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
       KeyExtent keyExtent = new KeyExtent(tkeyExtent);
       Tablet tablet = onlineTablets.get(new KeyExtent(keyExtent));
@@ -2005,7 +2005,7 @@ public class TabletServer extends AbstractMetricsImpl implements org.apache.accu
         throws ThriftSecurityException, TException {
 
       Authorizations userauths = null;
-      if (!security.canConditionallyUpdate(credentials, tableId, Tables.getNamespace(instance,
tableId), authorizations))
+      if (!security.canConditionallyUpdate(credentials, tableId, Tables.getNamespaceId(instance,
tableId), authorizations))
         throw new ThriftSecurityException(credentials.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
 
       userauths = security.getUserAuthorizations(credentials);
@@ -2087,7 +2087,7 @@ public class TabletServer extends AbstractMetricsImpl implements org.apache.accu
         ThriftSecurityException {
 
       String tableId = new String(ByteBufferUtil.toBytes(tkeyExtent.table));
-      String namespaceId = Tables.getNamespace(instance, tableId);
+      String namespaceId = Tables.getNamespaceId(instance, tableId);
       
       if (!security.canSplitTablet(credentials, tableId, namespaceId))
         throw new ThriftSecurityException(credentials.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);


Mime
View raw message