accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [6/6] git commit: Merge branch '1.6.2-SNAPSHOT'
Date Wed, 24 Sep 2014 21:23:09 GMT
Merge branch '1.6.2-SNAPSHOT'

Conflicts:
	server/master/src/main/java/org/apache/accumulo/master/FateServiceHandler.java


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

Branch: refs/heads/master
Commit: 0ad47e218f3d164ac86a866ee091e3ceadca6fe0
Parents: a697516 443888b
Author: Josh Elser <elserj@apache.org>
Authored: Wed Sep 24 17:22:44 2014 -0400
Committer: Josh Elser <elserj@apache.org>
Committed: Wed Sep 24 17:22:44 2014 -0400

----------------------------------------------------------------------
 .../accumulo/master/FateServiceHandler.java     | 156 +++++++++++++++++--
 1 file changed, 140 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/0ad47e21/server/master/src/main/java/org/apache/accumulo/master/FateServiceHandler.java
----------------------------------------------------------------------
diff --cc server/master/src/main/java/org/apache/accumulo/master/FateServiceHandler.java
index 5562a6a,a3ea117..219ef60
--- a/server/master/src/main/java/org/apache/accumulo/master/FateServiceHandler.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/FateServiceHandler.java
@@@ -230,10 -251,18 +256,18 @@@ class FateServiceHandler implements Fat
        }
        case TABLE_ONLINE: {
          TableOperation tableOp = TableOperation.ONLINE;
 -        final String tableId = validateTableIdArgument(arguments.get(0), tableOp, Tables.NOT_ROOT_ID);
 +        final String tableId = validateTableIdArgument(arguments.get(0), tableOp, NOT_ROOT_ID);
          String namespaceId = Tables.getNamespaceId(master.getInstance(), tableId);
  
-         if (!master.security.canOnlineOfflineTable(c, tableId, op, namespaceId))
+         final boolean canOnlineOfflineTable;
+         try {
+           canOnlineOfflineTable = master.security.canOnlineOfflineTable(c, tableId, op,
namespaceId);
+         } catch (ThriftSecurityException e) {
+           throwIfTableMissingSecurityException(e, tableId, null, TableOperation.ONLINE);
+           throw e;
+         }
+ 
+         if (!canOnlineOfflineTable)
            throw new ThriftSecurityException(c.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
  
          master.fate.seedTransaction(opid, new TraceRepo<Master>(new ChangeTableState(tableId,
tableOp)), autoCleanup);
@@@ -241,10 -270,18 +275,18 @@@
        }
        case TABLE_OFFLINE: {
          TableOperation tableOp = TableOperation.OFFLINE;
 -        final String tableId = validateTableIdArgument(arguments.get(0), tableOp, Tables.NOT_ROOT_ID);
 +        final String tableId = validateTableIdArgument(arguments.get(0), tableOp, NOT_ROOT_ID);
          String namespaceId = Tables.getNamespaceId(master.getInstance(), tableId);
  
-         if (!master.security.canOnlineOfflineTable(c, tableId, op, namespaceId))
+         final boolean canOnlineOfflineTable;
+         try {
+           canOnlineOfflineTable = master.security.canOnlineOfflineTable(c, tableId, op,
namespaceId);
+         } catch (ThriftSecurityException e) {
+           throwIfTableMissingSecurityException(e, tableId, null, TableOperation.OFFLINE);
+           throw e;
+         }
+ 
+         if (!canOnlineOfflineTable)
            throw new ThriftSecurityException(c.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
  
          master.fate.seedTransaction(opid, new TraceRepo<Master>(new ChangeTableState(tableId,
tableOp)), autoCleanup);


Mime
View raw message