accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [4/7] ACCUMULO-1965 Fix exception handling for namespaces
Date Sat, 28 Dec 2013 01:03:17 GMT
http://git-wip-us.apache.org/repos/asf/accumulo/blob/f35e3f47/core/src/main/java/org/apache/accumulo/core/master/thrift/TableOperation.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/master/thrift/TableOperation.java b/core/src/main/java/org/apache/accumulo/core/master/thrift/TableOperation.java
deleted file mode 100644
index bafddcd..0000000
--- a/core/src/main/java/org/apache/accumulo/core/master/thrift/TableOperation.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/**
- * Autogenerated by Thrift Compiler (0.9.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *  @generated
- */
-package org.apache.accumulo.core.master.thrift;
-
-
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-
-@SuppressWarnings("all") public enum TableOperation implements org.apache.thrift.TEnum {
-  CREATE(0),
-  CLONE(1),
-  DELETE(2),
-  RENAME(3),
-  ONLINE(4),
-  OFFLINE(5),
-  MERGE(6),
-  DELETE_RANGE(7),
-  BULK_IMPORT(8),
-  COMPACT(9),
-  IMPORT(10),
-  EXPORT(11),
-  COMPACT_CANCEL(12);
-
-  private final int value;
-
-  private TableOperation(int value) {
-    this.value = value;
-  }
-
-  /**
-   * Get the integer value of this enum value, as defined in the Thrift IDL.
-   */
-  public int getValue() {
-    return value;
-  }
-
-  /**
-   * Find a the enum type by its integer value, as defined in the Thrift IDL.
-   * @return null if the value is not found.
-   */
-  public static TableOperation findByValue(int value) { 
-    switch (value) {
-      case 0:
-        return CREATE;
-      case 1:
-        return CLONE;
-      case 2:
-        return DELETE;
-      case 3:
-        return RENAME;
-      case 4:
-        return ONLINE;
-      case 5:
-        return OFFLINE;
-      case 6:
-        return MERGE;
-      case 7:
-        return DELETE_RANGE;
-      case 8:
-        return BULK_IMPORT;
-      case 9:
-        return COMPACT;
-      case 10:
-        return IMPORT;
-      case 11:
-        return EXPORT;
-      case 12:
-        return COMPACT_CANCEL;
-      default:
-        return null;
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f35e3f47/core/src/main/java/org/apache/accumulo/core/metadata/MetadataTable.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/metadata/MetadataTable.java b/core/src/main/java/org/apache/accumulo/core/metadata/MetadataTable.java
index c31cb0d..56966d3 100644
--- a/core/src/main/java/org/apache/accumulo/core/metadata/MetadataTable.java
+++ b/core/src/main/java/org/apache/accumulo/core/metadata/MetadataTable.java
@@ -16,13 +16,13 @@
  */
 package org.apache.accumulo.core.metadata;
 
-import org.apache.accumulo.core.Constants;
+import org.apache.accumulo.core.client.impl.Namespaces;
 
 public class MetadataTable {
 
   public static final String OLD_NAME = "!METADATA";
 
   public static final String ID = "!0";
-  public static final String NAME = Constants.ACCUMULO_NAMESPACE + ".metadata";
+  public static final String NAME = Namespaces.ACCUMULO_NAMESPACE + ".metadata";
 
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f35e3f47/core/src/main/java/org/apache/accumulo/core/metadata/RootTable.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/metadata/RootTable.java b/core/src/main/java/org/apache/accumulo/core/metadata/RootTable.java
index 527f242..85219eb 100644
--- a/core/src/main/java/org/apache/accumulo/core/metadata/RootTable.java
+++ b/core/src/main/java/org/apache/accumulo/core/metadata/RootTable.java
@@ -16,7 +16,7 @@
  */
 package org.apache.accumulo.core.metadata;
 
-import org.apache.accumulo.core.Constants;
+import org.apache.accumulo.core.client.impl.Namespaces;
 import org.apache.accumulo.core.data.KeyExtent;
 import org.apache.hadoop.io.Text;
 
@@ -26,7 +26,7 @@ import org.apache.hadoop.io.Text;
 public class RootTable {
 
   public static final String ID = "+r";
-  public static final String NAME = Constants.ACCUMULO_NAMESPACE + ".root";
+  public static final String NAME = Namespaces.ACCUMULO_NAMESPACE + ".root";
 
   /**
    * DFS location relative to the Accumulo directory

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f35e3f47/core/src/main/java/org/apache/accumulo/core/util/shell/commands/NamespacesCommand.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/util/shell/commands/NamespacesCommand.java b/core/src/main/java/org/apache/accumulo/core/util/shell/commands/NamespacesCommand.java
index cbbc105..7f41c32 100644
--- a/core/src/main/java/org/apache/accumulo/core/util/shell/commands/NamespacesCommand.java
+++ b/core/src/main/java/org/apache/accumulo/core/util/shell/commands/NamespacesCommand.java
@@ -22,9 +22,9 @@ import java.util.Map;
 import java.util.Map.Entry;
 import java.util.TreeMap;
 
-import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.AccumuloException;
 import org.apache.accumulo.core.client.AccumuloSecurityException;
+import org.apache.accumulo.core.client.impl.Namespaces;
 import org.apache.accumulo.core.util.shell.Shell;
 import org.apache.accumulo.core.util.shell.Shell.Command;
 import org.apache.commons.cli.CommandLine;
@@ -47,7 +47,7 @@ public class NamespacesCommand extends Command {
       @Override
       public String apply(Map.Entry<String,String> entry) {
         String name = entry.getKey();
-        if (Constants.DEFAULT_NAMESPACE.equals(name))
+        if (Namespaces.DEFAULT_NAMESPACE.equals(name))
           name = DEFAULT_NAMESPACE_DISPLAY_NAME;
         String id = entry.getValue();
         if (cl.hasOption(namespaceIdOption.getOpt()))

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f35e3f47/core/src/main/thrift/client.thrift
----------------------------------------------------------------------
diff --git a/core/src/main/thrift/client.thrift b/core/src/main/thrift/client.thrift
index 601a7b2..38a8076 100644
--- a/core/src/main/thrift/client.thrift
+++ b/core/src/main/thrift/client.thrift
@@ -21,128 +21,131 @@ include "security.thrift"
 include "trace.thrift"
 
 enum TableOperation {
-    CREATE,
-    DELETE,
-    RENAME,
-    SET_PROPERTY,
-    REMOVE_PROPERTY,
-    OFFLINE,
-    ONLINE,
-    FLUSH,
-    PERMISSION,
-    CLONE,
-    MERGE,
-    DELETE_RANGE,
-    BULK_IMPORT,
-    COMPACT
-    IMPORT
-    EXPORT
-    COMPACT_CANCEL
+  CREATE
+  DELETE
+  RENAME
+  SET_PROPERTY
+  REMOVE_PROPERTY
+  OFFLINE
+  ONLINE
+  FLUSH
+  PERMISSION
+  CLONE
+  MERGE
+  DELETE_RANGE
+  BULK_IMPORT
+  COMPACT
+  IMPORT
+  EXPORT
+  COMPACT_CANCEL
 }
 
 enum TableOperationExceptionType {
-    EXISTS,
-    NOTFOUND,
-    OFFLINE,
-    BULK_BAD_INPUT_DIRECTORY,
-    BULK_BAD_ERROR_DIRECTORY,
-    BAD_RANGE,
-    OTHER
+  EXISTS
+  NOTFOUND
+  OFFLINE
+  BULK_BAD_INPUT_DIRECTORY
+  BULK_BAD_ERROR_DIRECTORY
+  BAD_RANGE
+  OTHER
+  NAMESPACE_EXISTS
+  NAMESPACE_NOTFOUND
+  INVALID_NAME
 }
 
 enum ConfigurationType {
-    CURRENT,
-    SITE,
-    DEFAULT
+  CURRENT
+  SITE
+  DEFAULT
 }
 
 enum SecurityErrorCode {
-    DEFAULT_SECURITY_ERROR = 0,
-    BAD_CREDENTIALS = 1,
-    PERMISSION_DENIED = 2,
-    USER_DOESNT_EXIST = 3,
-    CONNECTION_ERROR = 4,
-    USER_EXISTS = 5,
-    GRANT_INVALID = 6,
-    BAD_AUTHORIZATIONS = 7,
-    INVALID_INSTANCEID = 8,
-    TABLE_DOESNT_EXIST = 9,
-    UNSUPPORTED_OPERATION = 10,
-    INVALID_TOKEN = 11,
-    AUTHENTICATOR_FAILED = 12,
-    AUTHORIZOR_FAILED = 13,
-    PERMISSIONHANDLER_FAILED = 14,
-    TOKEN_EXPIRED = 15,
-    SERIALIZATION_ERROR = 16,
-    INSUFFICIENT_PROPERTIES = 17,
-    NAMESPACE_DOESNT_EXIST = 18;
+  DEFAULT_SECURITY_ERROR = 0
+  BAD_CREDENTIALS = 1
+  PERMISSION_DENIED = 2
+  USER_DOESNT_EXIST = 3
+  CONNECTION_ERROR = 4
+  USER_EXISTS = 5
+  GRANT_INVALID = 6
+  BAD_AUTHORIZATIONS = 7
+  INVALID_INSTANCEID = 8
+  TABLE_DOESNT_EXIST = 9
+  UNSUPPORTED_OPERATION = 10
+  INVALID_TOKEN = 11
+  AUTHENTICATOR_FAILED = 12
+  AUTHORIZOR_FAILED = 13
+  PERMISSIONHANDLER_FAILED = 14
+  TOKEN_EXPIRED = 15
+  SERIALIZATION_ERROR = 16
+  INSUFFICIENT_PROPERTIES = 17
+  NAMESPACE_DOESNT_EXIST = 18;
 }
 
 exception ThriftSecurityException {
-    1:string user,
-    2:SecurityErrorCode code
+  1:string user
+  2:SecurityErrorCode code
 }
 
 exception ThriftTableOperationException {
-    1:string tableId,
-    2:string tableName,
-    3:TableOperation op,
-    4:TableOperationExceptionType type,
-    5:string description
+  1:string tableId
+  2:string tableName
+  3:TableOperation op
+  4:TableOperationExceptionType type
+  5:string description
 }
 
 struct TDiskUsage {
-    1:list<string> tables
-    2:i64 usage
+  1:list<string> tables
+  2:i64 usage
 }
 
 service ClientService {
 
-    // system management methods
-    string getRootTabletLocation()
-    string getInstanceId()
-    string getZooKeepers()
-    
-    list<string> bulkImportFiles(1:trace.TInfo tinfo, 8:security.TCredentials credentials, 3:i64 tid, 4:string tableId, 5:list<string> files, 6:string errorDir, 7:bool setTime) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope);
-    // ensures that nobody is working on the transaction id above
-    bool isActive(1:trace.TInfo tinfo, 2:i64 tid),
-
-    void ping(2:security.TCredentials credentials) throws (1:ThriftSecurityException sec)
-
-    list<TDiskUsage> getDiskUsage(2:set<string> tables, 1:security.TCredentials credentials) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException toe)
-
-    // user management methods
-    set<string> listLocalUsers(2:trace.TInfo tinfo, 3:security.TCredentials credentials) throws (1:ThriftSecurityException sec)
-    void createLocalUser(5:trace.TInfo tinfo, 6:security.TCredentials credentials, 2:string principal, 3:binary password) throws (1:ThriftSecurityException sec)
-    void dropLocalUser(3:trace.TInfo tinfo, 4:security.TCredentials credentials, 2:string principal) throws (1:ThriftSecurityException sec)
-    void changeLocalUserPassword(4:trace.TInfo tinfo, 5:security.TCredentials credentials, 2:string principal, 3:binary password) throws (1:ThriftSecurityException sec)
-
-    // authentication-related methods
-    bool authenticate(1:trace.TInfo tinfo, 2:security.TCredentials credentials) throws (1:ThriftSecurityException sec)
-    bool authenticateUser(1:trace.TInfo tinfo, 2:security.TCredentials credentials, 3:security.TCredentials toAuth) throws (1:ThriftSecurityException sec)
-
-    // authorization-related methods
-    void changeAuthorizations(4:trace.TInfo tinfo, 5:security.TCredentials credentials, 2:string principal, 3:list<binary> authorizations) throws (1:ThriftSecurityException sec)
-    list<binary> getUserAuthorizations(3:trace.TInfo tinfo, 4:security.TCredentials credentials, 2:string principal) throws (1:ThriftSecurityException sec)
-
-    // permissions-related methods
-    bool hasSystemPermission(4:trace.TInfo tinfo, 5:security.TCredentials credentials, 2:string principal, 3:byte sysPerm) throws (1:ThriftSecurityException sec)
-    bool hasTablePermission(5:trace.TInfo tinfo, 6:security.TCredentials credentials, 2:string principal, 3:string tableName, 4:byte tblPerm) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope)
-    bool hasNamespacePermission(1:trace.TInfo tinfo, 2:security.TCredentials credentials, 3:string principal, 4:string ns, 5:byte tblNspcPerm) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope)
-    void grantSystemPermission(4:trace.TInfo tinfo, 5:security.TCredentials credentials, 2:string principal, 3:byte permission) throws (1:ThriftSecurityException sec)
-    void revokeSystemPermission(4:trace.TInfo tinfo, 5:security.TCredentials credentials, 2:string principal, 3:byte permission) throws (1:ThriftSecurityException sec)
-    void grantTablePermission(5:trace.TInfo tinfo, 6:security.TCredentials credentials, 2:string principal, 3:string tableName, 4:byte permission) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope)
-    void revokeTablePermission(5:trace.TInfo tinfo, 6:security.TCredentials credentials, 2:string principal, 3:string tableName, 4:byte permission) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope)
-    void grantNamespacePermission(1:trace.TInfo tinfo, 2:security.TCredentials credentials, 3:string principal, 4:string ns, 5:byte permission) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope)
-    void revokeNamespacePermission(1:trace.TInfo tinfo, 2:security.TCredentials credentials, 3:string principal, 4:string ns, 5:byte permission) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope)
-
-    // configuration methods
-    map<string, string> getConfiguration(2:trace.TInfo tinfo, 3:security.TCredentials credentials, 1:ConfigurationType type);
-    map<string, string> getTableConfiguration(1:trace.TInfo tinfo, 3:security.TCredentials credentials, 2:string tableName) throws (1:ThriftTableOperationException tope);
-    map<string, string> getNamespaceConfiguration(1:trace.TInfo tinfo, 2:security.TCredentials credentials, 3:string ns) throws (1:ThriftTableOperationException tope);
-    bool checkClass(1:trace.TInfo tinfo, 4:security.TCredentials credentials, 2:string className, 3:string interfaceMatch);
-    bool checkTableClass(1:trace.TInfo tinfo, 5:security.TCredentials credentials, 2:string tableId, 3:string className, 4:string interfaceMatch) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope);
-    bool checkNamespaceClass(1:trace.TInfo tinfo, 2:security.TCredentials credentials, 3:string namespaceId, 4:string className, 5:string interfaceMatch) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope);
+  // system management methods
+  string getRootTabletLocation()
+  string getInstanceId()
+  string getZooKeepers()
+
+  list<string> bulkImportFiles(1:trace.TInfo tinfo, 8:security.TCredentials credentials, 3:i64 tid, 4:string tableId, 5:list<string> files, 6:string errorDir, 7:bool setTime) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope);
+  // ensures that nobody is working on the transaction id above
+  bool isActive(1:trace.TInfo tinfo, 2:i64 tid)
+
+  void ping(2:security.TCredentials credentials) throws (1:ThriftSecurityException sec)
+
+  list<TDiskUsage> getDiskUsage(2:set<string> tables, 1:security.TCredentials credentials) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException toe)
+
+  // user management methods
+  set<string> listLocalUsers(2:trace.TInfo tinfo, 3:security.TCredentials credentials) throws (1:ThriftSecurityException sec)
+  void createLocalUser(5:trace.TInfo tinfo, 6:security.TCredentials credentials, 2:string principal, 3:binary password) throws (1:ThriftSecurityException sec)
+  void dropLocalUser(3:trace.TInfo tinfo, 4:security.TCredentials credentials, 2:string principal) throws (1:ThriftSecurityException sec)
+  void changeLocalUserPassword(4:trace.TInfo tinfo, 5:security.TCredentials credentials, 2:string principal, 3:binary password) throws (1:ThriftSecurityException sec)
+
+  // authentication-related methods
+  bool authenticate(1:trace.TInfo tinfo, 2:security.TCredentials credentials) throws (1:ThriftSecurityException sec)
+  bool authenticateUser(1:trace.TInfo tinfo, 2:security.TCredentials credentials, 3:security.TCredentials toAuth) throws (1:ThriftSecurityException sec)
+
+  // authorization-related methods
+  void changeAuthorizations(4:trace.TInfo tinfo, 5:security.TCredentials credentials, 2:string principal, 3:list<binary> authorizations) throws (1:ThriftSecurityException sec)
+  list<binary> getUserAuthorizations(3:trace.TInfo tinfo, 4:security.TCredentials credentials, 2:string principal) throws (1:ThriftSecurityException sec)
+
+  // permissions-related methods
+  bool hasSystemPermission(4:trace.TInfo tinfo, 5:security.TCredentials credentials, 2:string principal, 3:byte sysPerm) throws (1:ThriftSecurityException sec)
+  bool hasTablePermission(5:trace.TInfo tinfo, 6:security.TCredentials credentials, 2:string principal, 3:string tableName, 4:byte tblPerm) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope)
+  bool hasNamespacePermission(1:trace.TInfo tinfo, 2:security.TCredentials credentials, 3:string principal, 4:string ns, 5:byte tblNspcPerm) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope)
+  void grantSystemPermission(4:trace.TInfo tinfo, 5:security.TCredentials credentials, 2:string principal, 3:byte permission) throws (1:ThriftSecurityException sec)
+  void revokeSystemPermission(4:trace.TInfo tinfo, 5:security.TCredentials credentials, 2:string principal, 3:byte permission) throws (1:ThriftSecurityException sec)
+  void grantTablePermission(5:trace.TInfo tinfo, 6:security.TCredentials credentials, 2:string principal, 3:string tableName, 4:byte permission) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope)
+  void revokeTablePermission(5:trace.TInfo tinfo, 6:security.TCredentials credentials, 2:string principal, 3:string tableName, 4:byte permission) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope)
+  void grantNamespacePermission(1:trace.TInfo tinfo, 2:security.TCredentials credentials, 3:string principal, 4:string ns, 5:byte permission) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope)
+  void revokeNamespacePermission(1:trace.TInfo tinfo, 2:security.TCredentials credentials, 3:string principal, 4:string ns, 5:byte permission) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope)
+
+  // configuration methods
+  map<string, string> getConfiguration(2:trace.TInfo tinfo, 3:security.TCredentials credentials, 1:ConfigurationType type);
+  map<string, string> getTableConfiguration(1:trace.TInfo tinfo, 3:security.TCredentials credentials, 2:string tableName) throws (1:ThriftTableOperationException tope);
+  map<string, string> getNamespaceConfiguration(1:trace.TInfo tinfo, 2:security.TCredentials credentials, 3:string ns) throws (1:ThriftTableOperationException tope);
+  bool checkClass(1:trace.TInfo tinfo, 4:security.TCredentials credentials, 2:string className, 3:string interfaceMatch);
+  bool checkTableClass(1:trace.TInfo tinfo, 5:security.TCredentials credentials, 2:string tableId, 3:string className, 4:string interfaceMatch) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope);
+  bool checkNamespaceClass(1:trace.TInfo tinfo, 2:security.TCredentials credentials, 3:string namespaceId, 4:string className, 5:string interfaceMatch) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope);
 }
 
 // Only used for a unit test

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f35e3f47/core/src/main/thrift/master.thrift
----------------------------------------------------------------------
diff --git a/core/src/main/thrift/master.thrift b/core/src/main/thrift/master.thrift
index 1ec5c33..38e9227 100644
--- a/core/src/main/thrift/master.thrift
+++ b/core/src/main/thrift/master.thrift
@@ -23,148 +23,150 @@ include "client.thrift"
 include "trace.thrift"
 
 struct Compacting {
-    1:i32 running
-    2:i32 queued
+  1:i32 running
+  2:i32 queued
 }
 
 struct TableInfo {
-    1:i64 recs
-    2:i64 recsInMemory
-    3:i32 tablets
-    4:i32 onlineTablets
-    5:double ingestRate
-    6:double ingestByteRate
-    7:double queryRate
-    8:double queryByteRate
-    9:Compacting minors;
-    10:Compacting majors;
-    11:Compacting scans;
-    12:double scanRate;
+  1:i64 recs
+  2:i64 recsInMemory
+  3:i32 tablets
+  4:i32 onlineTablets
+  5:double ingestRate
+  6:double ingestByteRate
+  7:double queryRate
+  8:double queryByteRate
+  9:Compacting minors;
+  10:Compacting majors;
+  11:Compacting scans;
+  12:double scanRate;
 }
 
 struct RecoveryStatus {
-    2:string name
-    5:i32 runtime                   // in millis
-    6:double progress
+  2:string name
+  5:i32 runtime                   // in millis
+  6:double progress
 }
 
 struct TabletServerStatus {
-    1:map<string, TableInfo> tableMap
-    2:i64 lastContact
-    3:string name
-    5:double osLoad
-    7:i64 holdTime
-    8:i64 lookups
-    10:i64 indexCacheHits    
-    11:i64 indexCacheRequest   
-    12:i64 dataCacheHits   
-    13:i64 dataCacheRequest
-    14:list<RecoveryStatus> logSorts
+  1:map<string, TableInfo> tableMap
+  2:i64 lastContact
+  3:string name
+  5:double osLoad
+  7:i64 holdTime
+  8:i64 lookups
+  10:i64 indexCacheHits
+  11:i64 indexCacheRequest
+  12:i64 dataCacheHits
+  13:i64 dataCacheRequest
+  14:list<RecoveryStatus> logSorts
 }
 
 enum MasterState {
-    INITIAL,
-    HAVE_LOCK,
-    SAFE_MODE,
-    NORMAL, 
-    UNLOAD_METADATA_TABLETS, 
-    UNLOAD_ROOT_TABLET, 
-    STOP
+  INITIAL
+  HAVE_LOCK
+  SAFE_MODE
+  NORMAL
+  UNLOAD_METADATA_TABLETS
+  UNLOAD_ROOT_TABLET
+  STOP
 }
 
 enum MasterGoalState {
-    CLEAN_STOP,
-    SAFE_MODE,
-    NORMAL,
+  CLEAN_STOP
+  SAFE_MODE
+  NORMAL
 }
 
 struct DeadServer {
-    1:string server,
-    2:i64 lastStatus,
-    3:string status,
+  1:string server
+  2:i64 lastStatus
+  3:string status
 }
 
 struct MasterMonitorInfo {
-    1:map<string, TableInfo> tableMap
-    2:list<TabletServerStatus> tServerInfo
-    3:map<string, byte> badTServers
-    6:MasterState state
-    8:MasterGoalState goalState
-    7:i32 unassignedTablets
-    9:set<string> serversShuttingDown
-    10:list<DeadServer> deadTabletServers
+  1:map<string, TableInfo> tableMap
+  2:list<TabletServerStatus> tServerInfo
+  3:map<string, byte> badTServers
+  6:MasterState state
+  8:MasterGoalState goalState
+  7:i32 unassignedTablets
+  9:set<string> serversShuttingDown
+  10:list<DeadServer> deadTabletServers
 }
 
 struct TabletSplit {
-    1:data.TKeyExtent oldTablet
-    2:list<data.TKeyExtent> newTablets
+  1:data.TKeyExtent oldTablet
+  2:list<data.TKeyExtent> newTablets
 }
 
 exception RecoveryException {
-    1:string why
+  1:string why
 }
 
 enum TabletLoadState {
-    LOADED,
-    LOAD_FAILURE,
-    UNLOADED,
-    UNLOAD_FAILURE_NOT_SERVING,
-    UNLOAD_ERROR,
-    CHOPPED
+  LOADED
+  LOAD_FAILURE
+  UNLOADED
+  UNLOAD_FAILURE_NOT_SERVING
+  UNLOAD_ERROR
+  CHOPPED
 }
 
-enum TableOperation {
-  CREATE
-  CLONE
-  DELETE
-  RENAME
-  ONLINE
-  OFFLINE
-  MERGE
-  DELETE_RANGE
-  BULK_IMPORT
-  COMPACT
-  IMPORT
-  EXPORT
-  COMPACT_CANCEL
+enum FateOperation {
+  TABLE_CREATE
+  TABLE_CLONE
+  TABLE_DELETE
+  TABLE_RENAME
+  TABLE_ONLINE
+  TABLE_OFFLINE
+  TABLE_MERGE
+  TABLE_DELETE_RANGE
+  TABLE_BULK_IMPORT
+  TABLE_COMPACT
+  TABLE_IMPORT
+  TABLE_EXPORT
+  TABLE_CANCEL_COMPACT
+  NAMESPACE_CREATE
+  NAMESPACE_DELETE
+  NAMESPACE_RENAME
 }
 
-service MasterClientService {
-
-    // table management methods
-    i64 initiateFlush(3:trace.TInfo tinfo, 1:security.TCredentials credentials, 2:string tableName) throws (1:client.ThriftSecurityException sec, 2:client.ThriftTableOperationException tope)
-    void waitForFlush(5:trace.TInfo tinfo, 1:security.TCredentials credentials, 2:string tableName, 6:binary startRow, 7:binary endRow, 3:i64 flushID, 4:i64 maxLoops) throws (1:client.ThriftSecurityException sec, 2:client.ThriftTableOperationException tope)
-    
-    void setTableProperty(5:trace.TInfo tinfo, 1:security.TCredentials credentials, 2:string tableName, 3:string property, 4:string value) throws (1:client.ThriftSecurityException sec, 2:client.ThriftTableOperationException tope)
-    void removeTableProperty(4:trace.TInfo tinfo, 1:security.TCredentials credentials, 2:string tableName, 3:string property) throws (1:client.ThriftSecurityException sec, 2:client.ThriftTableOperationException tope)
-    
-    void setNamespaceProperty(5:trace.TInfo tinfo, 1:security.TCredentials credentials, 2:string ns, 3:string property, 4:string value) throws (1:client.ThriftSecurityException sec, 2:client.ThriftTableOperationException tope)
-    void removeNamespaceProperty(4:trace.TInfo tinfo, 1:security.TCredentials credentials, 2:string ns, 3:string property) throws (1:client.ThriftSecurityException sec, 2:client.ThriftTableOperationException tope)
-
-    // system management methods
-    void setMasterGoalState(3:trace.TInfo tinfo, 1:security.TCredentials credentials, 2:MasterGoalState state) throws (1:client.ThriftSecurityException sec);
-    void shutdown(3:trace.TInfo tinfo, 1:security.TCredentials credentials, 2:bool stopTabletServers) throws (1:client.ThriftSecurityException sec)
-    void shutdownTabletServer(3:trace.TInfo tinfo, 1:security.TCredentials credentials, 2:string tabletServer, 4:bool force) throws (1: client.ThriftSecurityException sec)
-    void setSystemProperty(4:trace.TInfo tinfo, 1:security.TCredentials credentials, 2:string property, 3:string value) throws (1:client.ThriftSecurityException sec)
-    void removeSystemProperty(3:trace.TInfo tinfo, 1:security.TCredentials credentials, 2:string property) throws (1:client.ThriftSecurityException sec)
-
-    // system monitoring methods
-    MasterMonitorInfo getMasterStats(2:trace.TInfo tinfo, 1:security.TCredentials credentials) throws (1:client.ThriftSecurityException sec)
-    
-    // tablet server reporting
-    oneway void reportSplitExtent(4:trace.TInfo tinfo, 1:security.TCredentials credentials, 2:string serverName, 3:TabletSplit split)
-    oneway void reportTabletStatus(5:trace.TInfo tinfo, 1:security.TCredentials credentials, 2:string serverName, 3:TabletLoadState status, 4:data.TKeyExtent tablet)
-
-   //table operations
-   i64 beginTableOperation(2:trace.TInfo tinfo, 1:security.TCredentials credentials) throws (1:client.ThriftSecurityException sec)
-   void executeTableOperation(7:trace.TInfo tinfo, 1:security.TCredentials credentials, 2:i64 opid, 3:TableOperation op, 4:list<binary> arguments, 5:map<string, string> options, 6:bool autoClean) throws (1:client.ThriftSecurityException sec, 2:client.ThriftTableOperationException tope)
-   string waitForTableOperation(3:trace.TInfo tinfo, 1:security.TCredentials credentials, 2:i64 opid) throws (1:client.ThriftSecurityException sec, 2:client.ThriftTableOperationException tope)
-   void finishTableOperation(3:trace.TInfo tinfo, 1:security.TCredentials credentials, 2:i64 opid) throws (1:client.ThriftSecurityException sec)
-
-   //namespace operations
-   i64 beginNamespaceOperation(1:trace.TInfo tinfo, 2:security.TCredentials credentials) throws (1:client.ThriftSecurityException sec)
-   void executeNamespaceOperation(1:trace.TInfo tinfo, 2:security.TCredentials credentials, 3:i64 opid, 4:TableOperation op, 5:list<binary> arguments, 6:map<string, string> options, 7:bool autoClean) throws (1:client.ThriftSecurityException sec, 2:client.ThriftTableOperationException tope)
-   string waitForNamespaceOperation(1:trace.TInfo tinfo, 2:security.TCredentials credentials, 3:i64 opid) throws (1:client.ThriftSecurityException sec, 2:client.ThriftTableOperationException tope)
-   void finishNamespaceOperation(1:trace.TInfo tinfo, 2:security.TCredentials credentials, 3:i64 opid) throws (1:client.ThriftSecurityException sec)
-   
+service FateService {
+  // register a fate operation by reserving an opid
+  i64 beginFateOperation(2:trace.TInfo tinfo, 1:security.TCredentials credentials) throws (1:client.ThriftSecurityException sec)
+  // initiate execution of the fate operation; set autoClean to true if not waiting for completion
+  void executeFateOperation(7:trace.TInfo tinfo, 1:security.TCredentials credentials, 2:i64 opid, 3:FateOperation op, 4:list<binary> arguments, 5:map<string, string> options, 6:bool autoClean) throws (1:client.ThriftSecurityException sec, 2:client.ThriftTableOperationException tope)
+  // wait for completion of the operation and get the returned exception, if any
+  string waitForFateOperation(3:trace.TInfo tinfo, 1:security.TCredentials credentials, 2:i64 opid) throws (1:client.ThriftSecurityException sec, 2:client.ThriftTableOperationException tope)
+  // clean up fate operation if autoClean was not set, after waiting
+  void finishFateOperation(3:trace.TInfo tinfo, 1:security.TCredentials credentials, 2:i64 opid) throws (1:client.ThriftSecurityException sec)
+}
+
+service MasterClientService extends FateService {
+
+  // table management methods
+  i64 initiateFlush(3:trace.TInfo tinfo, 1:security.TCredentials credentials, 2:string tableName) throws (1:client.ThriftSecurityException sec, 2:client.ThriftTableOperationException tope)
+  void waitForFlush(5:trace.TInfo tinfo, 1:security.TCredentials credentials, 2:string tableName, 6:binary startRow, 7:binary endRow, 3:i64 flushID, 4:i64 maxLoops) throws (1:client.ThriftSecurityException sec, 2:client.ThriftTableOperationException tope)
+
+  void setTableProperty(5:trace.TInfo tinfo, 1:security.TCredentials credentials, 2:string tableName, 3:string property, 4:string value) throws (1:client.ThriftSecurityException sec, 2:client.ThriftTableOperationException tope)
+  void removeTableProperty(4:trace.TInfo tinfo, 1:security.TCredentials credentials, 2:string tableName, 3:string property) throws (1:client.ThriftSecurityException sec, 2:client.ThriftTableOperationException tope)
+
+  void setNamespaceProperty(5:trace.TInfo tinfo, 1:security.TCredentials credentials, 2:string ns, 3:string property, 4:string value) throws (1:client.ThriftSecurityException sec, 2:client.ThriftTableOperationException tope)
+  void removeNamespaceProperty(4:trace.TInfo tinfo, 1:security.TCredentials credentials, 2:string ns, 3:string property) throws (1:client.ThriftSecurityException sec, 2:client.ThriftTableOperationException tope)
+
+  // system management methods
+  void setMasterGoalState(3:trace.TInfo tinfo, 1:security.TCredentials credentials, 2:MasterGoalState state) throws (1:client.ThriftSecurityException sec);
+  void shutdown(3:trace.TInfo tinfo, 1:security.TCredentials credentials, 2:bool stopTabletServers) throws (1:client.ThriftSecurityException sec)
+  void shutdownTabletServer(3:trace.TInfo tinfo, 1:security.TCredentials credentials, 2:string tabletServer, 4:bool force) throws (1: client.ThriftSecurityException sec)
+  void setSystemProperty(4:trace.TInfo tinfo, 1:security.TCredentials credentials, 2:string property, 3:string value) throws (1:client.ThriftSecurityException sec)
+  void removeSystemProperty(3:trace.TInfo tinfo, 1:security.TCredentials credentials, 2:string property) throws (1:client.ThriftSecurityException sec)
+
+  // system monitoring methods
+  MasterMonitorInfo getMasterStats(2:trace.TInfo tinfo, 1:security.TCredentials credentials) throws (1:client.ThriftSecurityException sec)
+
+  // tablet server reporting
+  oneway void reportSplitExtent(4:trace.TInfo tinfo, 1:security.TCredentials credentials, 2:string serverName, 3:TabletSplit split)
+  oneway void reportTabletStatus(5:trace.TInfo tinfo, 1:security.TCredentials credentials, 2:string serverName, 3:TabletLoadState status, 4:data.TKeyExtent tablet)
+
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f35e3f47/core/src/test/java/org/apache/accumulo/core/client/mock/MockNamespacesTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/accumulo/core/client/mock/MockNamespacesTest.java b/core/src/test/java/org/apache/accumulo/core/client/mock/MockNamespacesTest.java
index 50a9fbe..009be17 100644
--- a/core/src/test/java/org/apache/accumulo/core/client/mock/MockNamespacesTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/mock/MockNamespacesTest.java
@@ -39,6 +39,7 @@ import org.apache.accumulo.core.client.NamespaceNotFoundException;
 import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.client.TableNotFoundException;
 import org.apache.accumulo.core.client.admin.NamespaceOperations;
+import org.apache.accumulo.core.client.impl.Namespaces;
 import org.apache.accumulo.core.client.security.tokens.PasswordToken;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.data.Key;
@@ -66,7 +67,7 @@ public class MockNamespacesTest {
     Instance instance = new MockInstance("default");
     Connector c = instance.getConnector("user", new PasswordToken("pass"));
 
-    assertTrue(c.namespaceOperations().exists(Constants.DEFAULT_NAMESPACE));
+    assertTrue(c.namespaceOperations().exists(Namespaces.DEFAULT_NAMESPACE));
     c.tableOperations().create(tableName);
     assertTrue(c.tableOperations().exists(tableName));
   }
@@ -170,7 +171,7 @@ public class MockNamespacesTest {
     propVal = "13K";
     String tableName = "some_table";
     c.tableOperations().create(tableName);
-    c.namespaceOperations().setProperty(Constants.DEFAULT_NAMESPACE, propKey, propVal);
+    c.namespaceOperations().setProperty(Namespaces.DEFAULT_NAMESPACE, propKey, propVal);
 
     assertTrue(checkTableHasProp(c, tableName, propKey, propVal));
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f35e3f47/core/src/test/java/org/apache/accumulo/core/client/mock/MockTableOperationsTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/accumulo/core/client/mock/MockTableOperationsTest.java b/core/src/test/java/org/apache/accumulo/core/client/mock/MockTableOperationsTest.java
index de24881..216b3ba 100644
--- a/core/src/test/java/org/apache/accumulo/core/client/mock/MockTableOperationsTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/mock/MockTableOperationsTest.java
@@ -61,43 +61,43 @@ import org.junit.Assert;
 import org.junit.Test;
 
 public class MockTableOperationsTest {
-  
+
   @Test
   public void testCreateUseVersions() throws AccumuloException, AccumuloSecurityException, TableExistsException, TableNotFoundException {
     Instance instance = new MockInstance("topstest");
     Connector conn = instance.getConnector("user", new PasswordToken("pass"));
     String t = "tableName1";
-    
+
     {
       conn.tableOperations().create(t, false, TimeType.LOGICAL);
-      
+
       writeVersionable(conn, t, 3);
       assertVersionable(conn, t, 3);
-      
+
       IteratorSetting settings = new IteratorSetting(20, VersioningIterator.class);
       conn.tableOperations().attachIterator(t, settings);
-      
+
       assertVersionable(conn, t, 1);
-      
+
       conn.tableOperations().delete(t);
     }
-    
+
     {
       conn.tableOperations().create(t, true, TimeType.MILLIS);
-      
+
       try {
         IteratorSetting settings = new IteratorSetting(20, VersioningIterator.class);
         conn.tableOperations().attachIterator(t, settings);
         Assert.fail();
       } catch (AccumuloException ex) {}
-      
+
       writeVersionable(conn, t, 3);
       assertVersionable(conn, t, 1);
-      
+
       conn.tableOperations().delete(t);
     }
   }
-  
+
   protected void writeVersionable(Connector c, String tableName, int size) throws TableNotFoundException, MutationsRejectedException {
     for (int i = 0; i < size; i++) {
       BatchWriter w = c.createBatchWriter(tableName, new BatchWriterConfig());
@@ -107,7 +107,7 @@ public class MockTableOperationsTest {
       w.close();
     }
   }
-  
+
   protected void assertVersionable(Connector c, String tableName, int size) throws TableNotFoundException {
     BatchScanner s = c.createBatchScanner(tableName, Authorizations.EMPTY, 1);
     s.setRanges(Collections.singleton(Range.exact("row1", "cf", "cq")));
@@ -117,23 +117,24 @@ public class MockTableOperationsTest {
       Assert.assertEquals("cf", e.getKey().getColumnFamily().toString());
       Assert.assertEquals("cq", e.getKey().getColumnQualifier().toString());
       count++;
-      
+
     }
     Assert.assertEquals(size, count);
     s.close();
   }
-  
+
   @Test
   public void testTableNotFound() throws AccumuloException, AccumuloSecurityException, TableExistsException, TableNotFoundException {
     Instance instance = new MockInstance("topstest");
     Connector conn = instance.getConnector("user", new PasswordToken("pass"));
+    IteratorSetting setting = new IteratorSetting(100, "myvers", VersioningIterator.class);
     String t = "tableName";
     try {
-      conn.tableOperations().attachIterator(t, null);
+      conn.tableOperations().attachIterator(t, setting);
       Assert.fail();
     } catch (TableNotFoundException e) {}
     try {
-      conn.tableOperations().checkIteratorConflicts(t, null, EnumSet.allOf(IteratorScope.class));
+      conn.tableOperations().checkIteratorConflicts(t, setting, EnumSet.allOf(IteratorScope.class));
       Assert.fail();
     } catch (TableNotFoundException e) {}
     try {
@@ -141,7 +142,7 @@ public class MockTableOperationsTest {
       Assert.fail();
     } catch (TableNotFoundException e) {}
     try {
-      conn.tableOperations().getIteratorSetting(t, null, null);
+      conn.tableOperations().getIteratorSetting(t, "myvers", IteratorScope.scan);
       Assert.fail();
     } catch (TableNotFoundException e) {}
     try {
@@ -174,13 +175,13 @@ public class MockTableOperationsTest {
       Assert.fail();
     } catch (TableExistsException e) {}
   }
-  
+
   private static class ImportTestFilesAndData {
     Path importPath;
     Path failurePath;
     List<Pair<Key,Value>> keyVals;
   }
-  
+
   @Test
   public void testImport() throws Throwable {
     ImportTestFilesAndData dataAndFiles = prepareTestFiles();
@@ -200,7 +201,7 @@ public class MockTableOperationsTest {
     }
     Assert.assertFalse(iterator.hasNext());
   }
-  
+
   private ImportTestFilesAndData prepareTestFiles() throws Throwable {
     Configuration defaultConf = new Configuration();
     Path tempFile = new Path("target/accumulo-test/import/sample.rf");
@@ -228,7 +229,7 @@ public class MockTableOperationsTest {
     files.keyVals = keyVals;
     return files;
   }
-  
+
   @Test(expected = TableNotFoundException.class)
   public void testFailsWithNoTable() throws Throwable {
     Instance instance = new MockInstance("foo");
@@ -237,7 +238,7 @@ public class MockTableOperationsTest {
     ImportTestFilesAndData testFiles = prepareTestFiles();
     tableOperations.importDirectory("doesnt_exist_table", testFiles.importPath.toString(), testFiles.failurePath.toString(), false);
   }
-  
+
   @Test(expected = IOException.class)
   public void testFailsWithNonEmptyFailureDirectory() throws Throwable {
     Instance instance = new MockInstance("foo");
@@ -248,7 +249,7 @@ public class MockTableOperationsTest {
     fs.open(testFiles.failurePath.suffix("/something")).close();
     tableOperations.importDirectory("doesnt_exist_table", testFiles.importPath.toString(), testFiles.failurePath.toString(), false);
   }
-  
+
   @Test
   public void testDeleteRows() throws Exception {
     Instance instance = new MockInstance("rows");
@@ -270,5 +271,5 @@ public class MockTableOperationsTest {
       Assert.assertTrue(entry.getKey().getRow().toString().charAt(0) != '1');
     }
   }
-  
+
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f35e3f47/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 d522582..4df7c88 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
@@ -34,6 +34,7 @@ import org.apache.accumulo.core.client.AccumuloSecurityException;
 import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.client.NamespaceNotFoundException;
+import org.apache.accumulo.core.client.TableNotFoundException;
 import org.apache.accumulo.core.client.impl.Namespaces;
 import org.apache.accumulo.core.client.impl.Tables;
 import org.apache.accumulo.core.client.impl.thrift.ClientService;
@@ -79,16 +80,16 @@ public class ClientServiceHandler implements ClientService.Iface {
     this.fs = fs;
   }
 
-  protected String checkTableId(String tableName, TableOperation operation) throws ThriftTableOperationException {
-    String tableId = Tables.getNameToIdMap(instance).get(tableName);
-    if (tableId == null) {
-      // maybe the table exist, but the cache was not updated yet... so try to clear the cache and check again
-      Tables.clearCache(instance);
-      tableId = Tables.getNameToIdMap(instance).get(tableName);
-      if (tableId == null)
-        throw new ThriftTableOperationException(null, tableName, operation, TableOperationExceptionType.NOTFOUND, null);
+  public static String checkTableId(Instance instance, String tableName, TableOperation operation) throws ThriftTableOperationException {
+    TableOperationExceptionType reason = null;
+    try {
+      return Tables._getTableId(instance, tableName);
+    } catch (NamespaceNotFoundException e) {
+      reason = TableOperationExceptionType.NAMESPACE_NOTFOUND;
+    } catch (TableNotFoundException e) {
+      reason = TableOperationExceptionType.NOTFOUND;
     }
-    return tableId;
+    throw new ThriftTableOperationException(null, tableName, operation, reason, null);
   }
 
   protected String checkNamespaceId(String namespace, TableOperation operation) throws ThriftTableOperationException {
@@ -98,7 +99,7 @@ public class ClientServiceHandler implements ClientService.Iface {
       Tables.clearCache(instance);
       namespaceId = Namespaces.getNameToIdMap(instance).get(namespace);
       if (namespaceId == null)
-        throw new ThriftTableOperationException(null, namespace, operation, TableOperationExceptionType.NOTFOUND, null);
+        throw new ThriftTableOperationException(null, namespace, operation, TableOperationExceptionType.NAMESPACE_NOTFOUND, null);
     }
     return namespaceId;
   }
@@ -181,7 +182,7 @@ public class ClientServiceHandler implements ClientService.Iface {
   @Override
   public void grantTablePermission(TInfo tinfo, TCredentials credentials, String user, String tableName, byte permission) throws ThriftSecurityException,
       ThriftTableOperationException {
-    String tableId = checkTableId(tableName, TableOperation.PERMISSION);
+    String tableId = checkTableId(instance, tableName, TableOperation.PERMISSION);
     security.grantTablePermission(credentials, user, tableId, TablePermission.getPermissionById(permission));
   }
 
@@ -200,7 +201,7 @@ public class ClientServiceHandler implements ClientService.Iface {
   @Override
   public void revokeTablePermission(TInfo tinfo, TCredentials credentials, String user, String tableName, byte permission) throws ThriftSecurityException,
       ThriftTableOperationException {
-    String tableId = checkTableId(tableName, TableOperation.PERMISSION);
+    String tableId = checkTableId(instance, tableName, TableOperation.PERMISSION);
     security.revokeTablePermission(credentials, user, tableId, TablePermission.getPermissionById(permission));
   }
 
@@ -212,7 +213,7 @@ public class ClientServiceHandler implements ClientService.Iface {
   @Override
   public boolean hasTablePermission(TInfo tinfo, TCredentials credentials, String user, String tableName, byte tblPerm) throws ThriftSecurityException,
       ThriftTableOperationException {
-    String tableId = checkTableId(tableName, TableOperation.PERMISSION);
+    String tableId = checkTableId(instance, tableName, TableOperation.PERMISSION);
     return security.hasTablePermission(credentials, user, tableId, TablePermission.getPermissionById(tblPerm));
   }
 
@@ -263,8 +264,8 @@ public class ClientServiceHandler implements ClientService.Iface {
 
   @Override
   public Map<String,String> getTableConfiguration(TInfo tinfo, TCredentials credentials, String tableName) throws TException, ThriftTableOperationException {
-    String tableId = checkTableId(tableName, null);
-    AccumuloConfiguration config = new ServerConfiguration(instance).getTableConfiguration(tableId);
+    String tableId = checkTableId(instance, tableName, null);
+    AccumuloConfiguration config = ServerConfiguration.getTableConfiguration(instance, tableId);
     return conf(credentials, config);
   }
 
@@ -326,7 +327,7 @@ public class ClientServiceHandler implements ClientService.Iface {
 
     security.authenticateUser(credentials, credentials);
 
-    String tableId = checkTableId(tableName, null);
+    String tableId = checkTableId(instance, tableName, null);
 
     ClassLoader loader = getClass().getClassLoader();
     Class<?> shouldMatch;
@@ -398,7 +399,7 @@ public class ClientServiceHandler implements ClientService.Iface {
 
       for (String table : tables) {
         // ensure that table table exists
-        String tableId = checkTableId(table, null);
+        String tableId = checkTableId(instance, table, null);
         tableIds.add(tableId);
         if (!security.canScan(credentials, tableId))
           throw new ThriftSecurityException(credentials.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
@@ -428,7 +429,7 @@ public class ClientServiceHandler implements ClientService.Iface {
       namespaceId = Namespaces.getNamespaceId(instance, ns);
     } catch (NamespaceNotFoundException e) {
       String why = "Could not find namespace while getting configuration.";
-      throw new ThriftTableOperationException(null, ns, null, TableOperationExceptionType.NOTFOUND, why);
+      throw new ThriftTableOperationException(null, ns, null, TableOperationExceptionType.NAMESPACE_NOTFOUND, why);
     }
     AccumuloConfiguration config = ServerConfiguration.getNamespaceConfiguration(instance, namespaceId);
     return conf(credentials, config);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f35e3f47/server/base/src/main/java/org/apache/accumulo/server/conf/NamespaceConfiguration.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/conf/NamespaceConfiguration.java b/server/base/src/main/java/org/apache/accumulo/server/conf/NamespaceConfiguration.java
index 131426e..2a1f9a1 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/conf/NamespaceConfiguration.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/conf/NamespaceConfiguration.java
@@ -25,6 +25,7 @@ import java.util.Set;
 
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.Instance;
+import org.apache.accumulo.core.client.impl.Namespaces;
 import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.conf.ConfigurationObserver;
 import org.apache.accumulo.core.conf.Property;
@@ -57,7 +58,7 @@ public class NamespaceConfiguration extends AccumuloConfiguration {
     if (value == null || !property.getType().isValidFormat(value)) {
       if (value != null)
         log.error("Using default value for " + key + " due to improperly formatted " + property.getType() + ": " + value);
-      if (!(namespaceId.equals(Constants.ACCUMULO_NAMESPACE_ID) && isIteratorOrConstraint(property.getKey()))) {
+      if (!(namespaceId.equals(Namespaces.ACCUMULO_NAMESPACE_ID) && isIteratorOrConstraint(property.getKey()))) {
         // ignore iterators from parent if system namespace
         value = parent.get(property);
       }
@@ -108,7 +109,7 @@ public class NamespaceConfiguration extends AccumuloConfiguration {
 
     // exclude system iterators/constraints from the system namespace
     // so they don't affect the metadata or root tables.
-    if (this.namespaceId.equals(Constants.ACCUMULO_NAMESPACE_ID))
+    if (getNamespaceId().equals(Namespaces.ACCUMULO_NAMESPACE_ID))
       parentFilter = new SystemNamespaceFilter(filter);
 
     parent.getProperties(props, parentFilter);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f35e3f47/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java b/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java
index 7f5e44e..ce1547e 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java
@@ -29,6 +29,7 @@ import jline.console.ConsoleReader;
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.cli.Help;
 import org.apache.accumulo.core.client.AccumuloSecurityException;
+import org.apache.accumulo.core.client.impl.Namespaces;
 import org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException;
 import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.conf.Property;
@@ -395,10 +396,10 @@ public class Initialize {
     zoo.putPersistentData(zkInstanceRoot, new byte[0], NodeExistsPolicy.FAIL);
     zoo.putPersistentData(zkInstanceRoot + Constants.ZTABLES, Constants.ZTABLES_INITIAL_ID, NodeExistsPolicy.FAIL);
     zoo.putPersistentData(zkInstanceRoot + Constants.ZNAMESPACES, new byte[0], NodeExistsPolicy.FAIL);
-    TableManager.prepareNewNamespaceState(uuid, Constants.DEFAULT_NAMESPACE_ID, Constants.DEFAULT_NAMESPACE, NodeExistsPolicy.FAIL);
-    TableManager.prepareNewNamespaceState(uuid, Constants.ACCUMULO_NAMESPACE_ID, Constants.ACCUMULO_NAMESPACE, NodeExistsPolicy.FAIL);
-    TableManager.prepareNewTableState(uuid, RootTable.ID, Constants.ACCUMULO_NAMESPACE_ID, RootTable.NAME, TableState.ONLINE, NodeExistsPolicy.FAIL);
-    TableManager.prepareNewTableState(uuid, MetadataTable.ID, Constants.ACCUMULO_NAMESPACE_ID, MetadataTable.NAME, TableState.ONLINE, NodeExistsPolicy.FAIL);
+    TableManager.prepareNewNamespaceState(uuid, Namespaces.DEFAULT_NAMESPACE_ID, Namespaces.DEFAULT_NAMESPACE, NodeExistsPolicy.FAIL);
+    TableManager.prepareNewNamespaceState(uuid, Namespaces.ACCUMULO_NAMESPACE_ID, Namespaces.ACCUMULO_NAMESPACE, NodeExistsPolicy.FAIL);
+    TableManager.prepareNewTableState(uuid, RootTable.ID, Namespaces.ACCUMULO_NAMESPACE_ID, RootTable.NAME, TableState.ONLINE, NodeExistsPolicy.FAIL);
+    TableManager.prepareNewTableState(uuid, MetadataTable.ID, Namespaces.ACCUMULO_NAMESPACE_ID, MetadataTable.NAME, TableState.ONLINE, NodeExistsPolicy.FAIL);
     zoo.putPersistentData(zkInstanceRoot + Constants.ZTSERVERS, new byte[0], NodeExistsPolicy.FAIL);
     zoo.putPersistentData(zkInstanceRoot + Constants.ZPROBLEMS, new byte[0], NodeExistsPolicy.FAIL);
     zoo.putPersistentData(zkInstanceRoot + RootTable.ZROOT_TABLET, new byte[0], NodeExistsPolicy.FAIL);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f35e3f47/server/base/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java b/server/base/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java
index 6b81539..a9cdb15 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java
@@ -59,29 +59,29 @@ import org.apache.zookeeper.data.Stat;
 import com.google.common.net.HostAndPort;
 
 public class LiveTServerSet implements Watcher {
-  
+
   public interface Listener {
     void update(LiveTServerSet current, Set<TServerInstance> deleted, Set<TServerInstance> added);
   }
-  
+
   private static final Logger log = Logger.getLogger(LiveTServerSet.class);
-  
+
   private final Listener cback;
   private final Instance instance;
   private final AccumuloConfiguration conf;
   private ZooCache zooCache;
-  
+
   public class TServerConnection {
     private final HostAndPort address;
-    
+
     public TServerConnection(HostAndPort addr) throws TException {
       address = addr;
     }
-    
+
     private String lockString(ZooLock mlock) {
       return mlock.getLockID().serialize(ZooUtil.getRoot(instance) + Constants.ZMASTER_LOCK);
     }
-    
+
     public void assignTablet(ZooLock lock, KeyExtent extent) throws TException {
       TabletClientService.Client client = ThriftUtil.getClient(new TabletClientService.Client.Factory(), address, conf);
       try {
@@ -90,7 +90,7 @@ public class LiveTServerSet implements Watcher {
         ThriftUtil.returnClient(client);
       }
     }
-    
+
     public void unloadTablet(ZooLock lock, KeyExtent extent, boolean save) throws TException {
       TabletClientService.Client client = ThriftUtil.getClient(new TabletClientService.Client.Factory(), address, conf);
       try {
@@ -99,14 +99,14 @@ public class LiveTServerSet implements Watcher {
         ThriftUtil.returnClient(client);
       }
     }
-    
+
     public TabletServerStatus getTableMap(boolean usePooledConnection) throws TException, ThriftSecurityException {
-      
+
       if (usePooledConnection == true)
         throw new UnsupportedOperationException();
-      
+
       TTransport transport = ThriftUtil.createTransport(address, conf);
-      
+
       try {
         TabletClientService.Client client = ThriftUtil.createClient(new TabletClientService.Client.Factory(), transport);
         return client.getTabletServerStatus(Tracer.traceInfo(), SystemCredentials.get().toThrift(instance));
@@ -115,7 +115,7 @@ public class LiveTServerSet implements Watcher {
           transport.close();
       }
     }
-    
+
     public void halt(ZooLock lock) throws TException, ThriftSecurityException {
       TabletClientService.Client client = ThriftUtil.getClient(new TabletClientService.Client.Factory(), address, conf);
       try {
@@ -124,7 +124,7 @@ public class LiveTServerSet implements Watcher {
         ThriftUtil.returnClient(client);
       }
     }
-    
+
     public void fastHalt(ZooLock lock) throws TException {
       TabletClientService.Client client = ThriftUtil.getClient(new TabletClientService.Client.Factory(), address, conf);
       try {
@@ -133,7 +133,7 @@ public class LiveTServerSet implements Watcher {
         ThriftUtil.returnClient(client);
       }
     }
-    
+
     public void flush(ZooLock lock, String tableId, byte[] startRow, byte[] endRow) throws TException {
       TabletClientService.Client client = ThriftUtil.getClient(new TabletClientService.Client.Factory(), address, conf);
       try {
@@ -143,7 +143,7 @@ public class LiveTServerSet implements Watcher {
         ThriftUtil.returnClient(client);
       }
     }
-    
+
     public void chop(ZooLock lock, KeyExtent extent) throws TException {
       TabletClientService.Client client = ThriftUtil.getClient(new TabletClientService.Client.Factory(), address, conf);
       try {
@@ -152,7 +152,7 @@ public class LiveTServerSet implements Watcher {
         ThriftUtil.returnClient(client);
       }
     }
-    
+
     public void splitTablet(ZooLock lock, KeyExtent extent, Text splitPoint) throws TException, ThriftSecurityException, NotServingTabletException {
       TabletClientService.Client client = ThriftUtil.getClient(new TabletClientService.Client.Factory(), address, conf);
       try {
@@ -162,7 +162,7 @@ public class LiveTServerSet implements Watcher {
         ThriftUtil.returnClient(client);
       }
     }
-    
+
     public void flushTablet(ZooLock lock, KeyExtent extent) throws TException {
       TabletClientService.Client client = ThriftUtil.getClient(new TabletClientService.Client.Factory(), address, conf);
       try {
@@ -171,7 +171,7 @@ public class LiveTServerSet implements Watcher {
         ThriftUtil.returnClient(client);
       }
     }
-    
+
     public void compact(ZooLock lock, String tableId, byte[] startRow, byte[] endRow) throws TException {
       TabletClientService.Client client = ThriftUtil.getClient(new TabletClientService.Client.Factory(), address, conf);
       try {
@@ -181,7 +181,7 @@ public class LiveTServerSet implements Watcher {
         ThriftUtil.returnClient(client);
       }
     }
-    
+
     public boolean isActive(long tid) throws TException {
       TabletClientService.Client client = ThriftUtil.getClient(new TabletClientService.Client.Factory(), address, conf);
       try {
@@ -190,40 +190,40 @@ public class LiveTServerSet implements Watcher {
         ThriftUtil.returnClient(client);
       }
     }
-    
+
   }
-  
+
   static class TServerInfo {
     TServerConnection connection;
     TServerInstance instance;
-    
+
     TServerInfo(TServerInstance instance, TServerConnection connection) {
       this.connection = connection;
       this.instance = instance;
     }
   };
-  
+
   // The set of active tservers with locks, indexed by their name in zookeeper
   private Map<String,TServerInfo> current = new HashMap<String,TServerInfo>();
   // as above, indexed by TServerInstance
   private Map<TServerInstance,TServerInfo> currentInstances = new HashMap<TServerInstance,TServerInfo>();
-  
+
   // The set of entries in zookeeper without locks, and the first time each was noticed
   private Map<String,Long> locklessServers = new HashMap<String,Long>();
-  
+
   public LiveTServerSet(Instance instance, AccumuloConfiguration conf, Listener cback) {
     this.cback = cback;
     this.instance = instance;
     this.conf = conf;
-    
+
   }
-  
+
   public synchronized ZooCache getZooCache() {
     if (zooCache == null)
       zooCache = new ZooCache(this);
     return zooCache;
   }
-  
+
   public synchronized void startListeningForTabletServerChanges() {
     scanServers();
     SimpleTimer.getInstance().schedule(new Runnable() {
@@ -233,23 +233,23 @@ public class LiveTServerSet implements Watcher {
       }
     }, 0, 5000);
   }
-  
+
   public synchronized void scanServers() {
     try {
       final Set<TServerInstance> updates = new HashSet<TServerInstance>();
       final Set<TServerInstance> doomed = new HashSet<TServerInstance>();
-      
+
       final String path = ZooUtil.getRoot(instance) + Constants.ZTSERVERS;
-      
+
       HashSet<String> all = new HashSet<String>(current.keySet());
       all.addAll(getZooCache().getChildren(path));
-      
+
       locklessServers.keySet().retainAll(all);
-      
+
       for (String zPath : all) {
         checkServer(updates, doomed, path, zPath);
       }
-      
+
       // log.debug("Current: " + current.keySet());
       if (!doomed.isEmpty() || !updates.isEmpty())
         this.cback.update(this, doomed, updates);
@@ -257,7 +257,7 @@ public class LiveTServerSet implements Watcher {
       log.error(ex, ex);
     }
   }
-  
+
   private void deleteServerNode(String serverNode) throws InterruptedException, KeeperException {
     try {
       ZooReaderWriter.getInstance().delete(serverNode, -1);
@@ -267,23 +267,23 @@ public class LiveTServerSet implements Watcher {
       // someone else deleted it
     }
   }
-  
+
   private synchronized void checkServer(final Set<TServerInstance> updates, final Set<TServerInstance> doomed, final String path, final String zPath)
       throws TException, InterruptedException, KeeperException {
-    
+
     TServerInfo info = current.get(zPath);
-    
+
     final String lockPath = path + "/" + zPath;
     Stat stat = new Stat();
     byte[] lockData = ZooLock.getLockData(getZooCache(), lockPath, stat);
-    
+
     if (lockData == null) {
       if (info != null) {
         doomed.add(info.instance);
         current.remove(zPath);
         currentInstances.remove(info.instance);
       }
-      
+
       Long firstSeen = locklessServers.get(zPath);
       if (firstSeen == null) {
         locklessServers.put(zPath, System.currentTimeMillis());
@@ -296,7 +296,7 @@ public class LiveTServerSet implements Watcher {
       ServerServices services = new ServerServices(new String(lockData));
       HostAndPort client = services.getAddress(ServerServices.Service.TSERV_CLIENT);
       TServerInstance instance = new TServerInstance(client, stat.getEphemeralOwner());
-      
+
       if (info == null) {
         updates.add(instance);
         TServerInfo tServerInfo = new TServerInfo(instance, new TServerConnection(client));
@@ -311,29 +311,29 @@ public class LiveTServerSet implements Watcher {
       }
     }
   }
-  
+
   @Override
   public void process(WatchedEvent event) {
-    
+
     // its important that these event are propagated by ZooCache, because this ensures when reading zoocache that is has already processed the event and cleared
     // relevant nodes before code below reads from zoocache
-    
+
     if (event.getPath() != null) {
       if (event.getPath().endsWith(Constants.ZTSERVERS)) {
         scanServers();
       } else if (event.getPath().contains(Constants.ZTSERVERS)) {
         int pos = event.getPath().lastIndexOf('/');
-        
+
         // do only if ZTSERVER is parent
         if (pos >= 0 && event.getPath().substring(0, pos).endsWith(Constants.ZTSERVERS)) {
-          
+
           String server = event.getPath().substring(pos + 1);
-          
+
           final Set<TServerInstance> updates = new HashSet<TServerInstance>();
           final Set<TServerInstance> doomed = new HashSet<TServerInstance>();
-          
+
           final String path = ZooUtil.getRoot(instance) + Constants.ZTSERVERS;
-          
+
           try {
             checkServer(updates, doomed, path, server);
             if (!doomed.isEmpty() || !updates.isEmpty())
@@ -345,8 +345,8 @@ public class LiveTServerSet implements Watcher {
       }
     }
   }
-  
-  public synchronized TServerConnection getConnection(TServerInstance server) throws TException {
+
+  public synchronized TServerConnection getConnection(TServerInstance server) {
     if (server == null)
       return null;
     TServerInfo tServerInfo = currentInstances.get(server);
@@ -354,15 +354,15 @@ public class LiveTServerSet implements Watcher {
       return null;
     return tServerInfo.connection;
   }
-  
+
   public synchronized Set<TServerInstance> getCurrentServers() {
     return new HashSet<TServerInstance>(currentInstances.keySet());
   }
-  
+
   public synchronized int size() {
     return current.size();
   }
-  
+
   public synchronized TServerInstance find(String tabletServer) {
     HostAndPort addr = AddressUtil.parseAddress(tabletServer, false);
     for (Entry<String,TServerInfo> entry : current.entrySet()) {
@@ -371,7 +371,7 @@ public class LiveTServerSet implements Watcher {
     }
     return null;
   }
-  
+
   public synchronized void remove(TServerInstance server) {
     String zPath = null;
     for (Entry<String,TServerInfo> entry : current.entrySet()) {
@@ -384,7 +384,7 @@ public class LiveTServerSet implements Watcher {
       return;
     current.remove(zPath);
     currentInstances.remove(server);
-    
+
     log.info("Removing zookeeper lock for " + server);
     String fullpath = ZooUtil.getRoot(instance) + Constants.ZTSERVERS + "/" + zPath;
     try {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f35e3f47/server/base/src/main/java/org/apache/accumulo/server/security/AuditedSecurityOperation.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/security/AuditedSecurityOperation.java b/server/base/src/main/java/org/apache/accumulo/server/security/AuditedSecurityOperation.java
index eca7dfe..bbfa71b 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/security/AuditedSecurityOperation.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/security/AuditedSecurityOperation.java
@@ -35,7 +35,7 @@ import org.apache.accumulo.core.data.thrift.IterInfo;
 import org.apache.accumulo.core.data.thrift.TColumn;
 import org.apache.accumulo.core.data.thrift.TKeyExtent;
 import org.apache.accumulo.core.data.thrift.TRange;
-import org.apache.accumulo.core.master.thrift.TableOperation;
+import org.apache.accumulo.core.master.thrift.FateOperation;
 import org.apache.accumulo.core.metadata.MetadataTable;
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.security.Credentials;
@@ -417,12 +417,12 @@ public class AuditedSecurityOperation extends SecurityOperation {
   public static final String CAN_ONLINE_OFFLINE_TABLE_AUDIT_TEMPLATE = "action: %s; targetTable: %s;";
 
   @Override
-  public boolean canOnlineOfflineTable(TCredentials credentials, String tableId, TableOperation op) throws ThriftSecurityException {
+  public boolean canOnlineOfflineTable(TCredentials credentials, String tableId, FateOperation op) throws ThriftSecurityException {
     String tableName = getTableName(tableId);
     String operation = null;
-    if (op == TableOperation.ONLINE)
+    if (op == FateOperation.TABLE_ONLINE)
       operation = "onlineTable";
-    if (op == TableOperation.OFFLINE)
+    if (op == FateOperation.TABLE_OFFLINE)
       operation = "offlineTable";
     try {
       boolean result = super.canOnlineOfflineTable(credentials, tableId, op);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f35e3f47/server/base/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java b/server/base/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java
index 010efa8..4b302f0 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java
@@ -37,7 +37,7 @@ import org.apache.accumulo.core.data.thrift.IterInfo;
 import org.apache.accumulo.core.data.thrift.TColumn;
 import org.apache.accumulo.core.data.thrift.TKeyExtent;
 import org.apache.accumulo.core.data.thrift.TRange;
-import org.apache.accumulo.core.master.thrift.TableOperation;
+import org.apache.accumulo.core.master.thrift.FateOperation;
 import org.apache.accumulo.core.metadata.MetadataTable;
 import org.apache.accumulo.core.metadata.RootTable;
 import org.apache.accumulo.core.security.Authorizations;
@@ -356,7 +356,7 @@ public class SecurityOperation {
   protected boolean _hasNamespacePermission(String user, String namespace, NamespacePermission permission, boolean useCached) throws ThriftSecurityException {
     targetUserExists(user);
 
-    if (namespace.equals(Constants.ACCUMULO_NAMESPACE_ID) && permission.equals(NamespacePermission.READ))
+    if (namespace.equals(Namespaces.ACCUMULO_NAMESPACE_ID) && permission.equals(NamespacePermission.READ))
       return true;
 
     try {
@@ -478,7 +478,7 @@ public class SecurityOperation {
         || hasNamespacePermissionForTableId(c, tableId, NamespacePermission.DROP_TABLE, false);
   }
 
-  public boolean canOnlineOfflineTable(TCredentials c, String tableId, TableOperation op) throws ThriftSecurityException {
+  public boolean canOnlineOfflineTable(TCredentials c, String tableId, FateOperation op) throws ThriftSecurityException {
     authenticate(c);
     return hasSystemPermission(c, SystemPermission.SYSTEM, false) || hasSystemPermission(c, SystemPermission.ALTER_TABLE, false)
         || hasTablePermission(c, tableId, TablePermission.ALTER_TABLE, false)

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f35e3f47/server/base/src/main/java/org/apache/accumulo/server/security/handler/ZKPermHandler.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/security/handler/ZKPermHandler.java b/server/base/src/main/java/org/apache/accumulo/server/security/handler/ZKPermHandler.java
index 1fb0b16..0ea556f 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/security/handler/ZKPermHandler.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/security/handler/ZKPermHandler.java
@@ -23,10 +23,10 @@ import java.util.Map.Entry;
 import java.util.Set;
 import java.util.TreeSet;
 
-import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.AccumuloSecurityException;
 import org.apache.accumulo.core.client.NamespaceNotFoundException;
 import org.apache.accumulo.core.client.TableNotFoundException;
+import org.apache.accumulo.core.client.impl.Namespaces;
 import org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode;
 import org.apache.accumulo.core.metadata.MetadataTable;
 import org.apache.accumulo.core.metadata.RootTable;
@@ -386,8 +386,8 @@ public class ZKPermHandler implements PermissionHandler {
     tablePerms.put(MetadataTable.ID, Collections.singleton(TablePermission.ALTER_TABLE));
     // essentially the same but on the system namespace, the ALTER_TABLE permission is now redundant
     Map<String,Set<NamespacePermission>> namespacePerms = new HashMap<String,Set<NamespacePermission>>();
-    namespacePerms.put(Constants.ACCUMULO_NAMESPACE_ID, Collections.singleton(NamespacePermission.ALTER_NAMESPACE));
-    namespacePerms.put(Constants.ACCUMULO_NAMESPACE_ID, Collections.singleton(NamespacePermission.ALTER_TABLE));
+    namespacePerms.put(Namespaces.ACCUMULO_NAMESPACE_ID, Collections.singleton(NamespacePermission.ALTER_NAMESPACE));
+    namespacePerms.put(Namespaces.ACCUMULO_NAMESPACE_ID, Collections.singleton(NamespacePermission.ALTER_TABLE));
 
     try {
       // prep parent node of users with root username


Mime
View raw message