accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [3/8] git commit: ACCUMULO-2293 Check the correct SecurityErrorCode on ThriftSecurityException in the _flush method
Date Thu, 30 Jan 2014 22:00:52 GMT
ACCUMULO-2293 Check the correct SecurityErrorCode on ThriftSecurityException in the _flush
method


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

Branch: refs/heads/master
Commit: 5fe2cccaf2266e3f8d2d8ebcb4d2fafb0e24e181
Parents: 688d4e4
Author: Josh Elser <elserj@apache.org>
Authored: Thu Jan 30 16:39:44 2014 -0500
Committer: Josh Elser <elserj@apache.org>
Committed: Thu Jan 30 16:39:44 2014 -0500

----------------------------------------------------------------------
 .../accumulo/core/client/admin/TableOperationsImpl.java | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/5fe2ccca/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
b/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
index cdb813a..fdb7014 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
@@ -62,9 +62,9 @@ import org.apache.accumulo.core.client.impl.Tables;
 import org.apache.accumulo.core.client.impl.TabletLocator;
 import org.apache.accumulo.core.client.impl.TabletLocator.TabletLocation;
 import org.apache.accumulo.core.client.impl.thrift.ClientService;
+import org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode;
 import org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException;
 import org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException;
-import org.apache.accumulo.core.client.security.SecurityErrorCode;
 import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.conf.ConfigurationCopy;
 import org.apache.accumulo.core.conf.Property;
@@ -829,11 +829,13 @@ public class TableOperationsImpl extends TableOperationsHelper {
         }
       }
     } catch (ThriftSecurityException e) {
-      if (e.getCode().equals(SecurityErrorCode.TABLE_DOESNT_EXIST)) {
-        throw new TableNotFoundException(tableId, null, e.getMessage(), e);
+      switch (e.getCode()) {
+        case TABLE_DOESNT_EXIST:
+          throw new TableNotFoundException(tableId, null, e.getMessage(), e);
+        default:
+          log.debug("flush security exception on table id " + tableId);
+          throw new AccumuloSecurityException(e.user, e.code, e);
       }
-      log.debug("flush security exception on table id " + tableId);
-      throw new AccumuloSecurityException(e.user, e.code, e);
     } catch (ThriftTableOperationException e) {
       switch (e.getType()) {
         case NOTFOUND:


Mime
View raw message