accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject svn commit: r1470954 [3/4] - in /accumulo/branches/1.4/src: proxy/ proxy/src/main/java/org/apache/accumulo/proxy/ proxy/src/main/java/org/apache/accumulo/proxy/thrift/ proxy/src/main/thrift/ proxy/src/test/java/org/apache/accumulo/proxy/ proxy/src/test...
Date Tue, 23 Apr 2013 13:45:21 GMT
Modified: accumulo/branches/1.4/src/proxy/src/main/java/org/apache/accumulo/proxy/Util.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.4/src/proxy/src/main/java/org/apache/accumulo/proxy/Util.java?rev=1470954&r1=1470953&r2=1470954&view=diff
==============================================================================
--- accumulo/branches/1.4/src/proxy/src/main/java/org/apache/accumulo/proxy/Util.java (original)
+++ accumulo/branches/1.4/src/proxy/src/main/java/org/apache/accumulo/proxy/Util.java Tue Apr 23 13:45:21 2013
@@ -16,6 +16,8 @@
  */
 package org.apache.accumulo.proxy;
 
+import org.apache.accumulo.core.client.AccumuloSecurityException;
+import org.apache.accumulo.core.security.thrift.AuthInfo;
 import org.apache.accumulo.proxy.thrift.IteratorSetting;
 import org.apache.accumulo.proxy.thrift.Key;
 
@@ -54,6 +56,9 @@ public class Util {
   }
 
 
+  public static ByteBuffer encodeUserPrincipal(String principal, String token, String instanceId) throws AccumuloSecurityException {
+    return ByteBuffer.wrap(CredentialHelper.asByteArray(new AuthInfo(principal, ByteBuffer.wrap(token.getBytes()), instanceId)));
+  }
 
   protected static byte[] deNullify(byte[] in) {
     if (in == null)

Modified: accumulo/branches/1.4/src/proxy/src/main/java/org/apache/accumulo/proxy/thrift/AccumuloProxy.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.4/src/proxy/src/main/java/org/apache/accumulo/proxy/thrift/AccumuloProxy.java?rev=1470954&r1=1470953&r2=1470954&view=diff
==============================================================================
--- accumulo/branches/1.4/src/proxy/src/main/java/org/apache/accumulo/proxy/thrift/AccumuloProxy.java (original)
+++ accumulo/branches/1.4/src/proxy/src/main/java/org/apache/accumulo/proxy/thrift/AccumuloProxy.java Tue Apr 23 13:45:21 2013
@@ -62,7 +62,7 @@ import org.slf4j.LoggerFactory;
 
     public void deleteRows(ByteBuffer login, String tableName, ByteBuffer startRow, ByteBuffer endRow) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
 
-    public void flushTable(ByteBuffer login, String tableName, ByteBuffer startRow, ByteBuffer endRow, boolean wait) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
+    public void flushTable(ByteBuffer login, String tableName, ByteBuffer startRow, ByteBuffer endRow, boolean wait) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
 
     public Map<String,Set<String>> getLocalityGroups(ByteBuffer login, String tableName) throws AccumuloException, TableNotFoundException, org.apache.thrift.TException;
 
@@ -88,17 +88,17 @@ import org.slf4j.LoggerFactory;
 
     public void onlineTable(ByteBuffer login, String tableName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
 
-    public void removeConstraint(ByteBuffer login, String tableName, int constraint) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
+    public void removeConstraint(ByteBuffer login, String tableName, int constraint) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
 
     public void removeIterator(ByteBuffer login, String tableName, String iterName, Set<IteratorScope> scopes) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
 
-    public void removeTableProperty(ByteBuffer login, String tableName, String property) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
+    public void removeTableProperty(ByteBuffer login, String tableName, String property) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
 
     public void renameTable(ByteBuffer login, String oldTableName, String newTableName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, TableExistsException, org.apache.thrift.TException;
 
     public void setLocalityGroups(ByteBuffer login, String tableName, Map<String,Set<String>> groups) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
 
-    public void setTableProperty(ByteBuffer login, String tableName, String property, String value) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
+    public void setTableProperty(ByteBuffer login, String tableName, String property, String value) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
 
     public Set<Range> splitRangeByTablets(ByteBuffer login, String tableName, Range range, int maxSplits) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
 
@@ -138,7 +138,7 @@ import org.slf4j.LoggerFactory;
 
     public boolean hasSystemPermission(ByteBuffer login, String user, SystemPermission perm) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
 
-    public boolean hasTablePermission(ByteBuffer login, String user, String table, TablePermission perm) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
+    public boolean hasTablePermission(ByteBuffer login, String user, String table, TablePermission perm) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
 
     public Set<String> listLocalUsers(ByteBuffer login) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
 
@@ -833,7 +833,7 @@ import org.slf4j.LoggerFactory;
       return;
     }
 
-    public void flushTable(ByteBuffer login, String tableName, ByteBuffer startRow, ByteBuffer endRow, boolean wait) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException
+    public void flushTable(ByteBuffer login, String tableName, ByteBuffer startRow, ByteBuffer endRow, boolean wait) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException
     {
       send_flushTable(login, tableName, startRow, endRow, wait);
       recv_flushTable();
@@ -853,7 +853,7 @@ import org.slf4j.LoggerFactory;
       oprot_.getTransport().flush();
     }
 
-    public void recv_flushTable() throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException
+    public void recv_flushTable() throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException
     {
       org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin();
       if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) {
@@ -873,6 +873,9 @@ import org.slf4j.LoggerFactory;
       if (result.ouch2 != null) {
         throw result.ouch2;
       }
+      if (result.ouch3 != null) {
+        throw result.ouch3;
+      }
       return;
     }
 
@@ -1410,7 +1413,7 @@ import org.slf4j.LoggerFactory;
       return;
     }
 
-    public void removeConstraint(ByteBuffer login, String tableName, int constraint) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException
+    public void removeConstraint(ByteBuffer login, String tableName, int constraint) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException
     {
       send_removeConstraint(login, tableName, constraint);
       recv_removeConstraint();
@@ -1428,7 +1431,7 @@ import org.slf4j.LoggerFactory;
       oprot_.getTransport().flush();
     }
 
-    public void recv_removeConstraint() throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException
+    public void recv_removeConstraint() throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException
     {
       org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin();
       if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) {
@@ -1448,6 +1451,9 @@ import org.slf4j.LoggerFactory;
       if (result.ouch2 != null) {
         throw result.ouch2;
       }
+      if (result.ouch3 != null) {
+        throw result.ouch3;
+      }
       return;
     }
 
@@ -1496,7 +1502,7 @@ import org.slf4j.LoggerFactory;
       return;
     }
 
-    public void removeTableProperty(ByteBuffer login, String tableName, String property) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException
+    public void removeTableProperty(ByteBuffer login, String tableName, String property) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException
     {
       send_removeTableProperty(login, tableName, property);
       recv_removeTableProperty();
@@ -1514,7 +1520,7 @@ import org.slf4j.LoggerFactory;
       oprot_.getTransport().flush();
     }
 
-    public void recv_removeTableProperty() throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException
+    public void recv_removeTableProperty() throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException
     {
       org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin();
       if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) {
@@ -1534,6 +1540,9 @@ import org.slf4j.LoggerFactory;
       if (result.ouch2 != null) {
         throw result.ouch2;
       }
+      if (result.ouch3 != null) {
+        throw result.ouch3;
+      }
       return;
     }
 
@@ -1628,7 +1637,7 @@ import org.slf4j.LoggerFactory;
       return;
     }
 
-    public void setTableProperty(ByteBuffer login, String tableName, String property, String value) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException
+    public void setTableProperty(ByteBuffer login, String tableName, String property, String value) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException
     {
       send_setTableProperty(login, tableName, property, value);
       recv_setTableProperty();
@@ -1647,7 +1656,7 @@ import org.slf4j.LoggerFactory;
       oprot_.getTransport().flush();
     }
 
-    public void recv_setTableProperty() throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException
+    public void recv_setTableProperty() throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException
     {
       org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin();
       if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) {
@@ -1667,6 +1676,9 @@ import org.slf4j.LoggerFactory;
       if (result.ouch2 != null) {
         throw result.ouch2;
       }
+      if (result.ouch3 != null) {
+        throw result.ouch3;
+      }
       return;
     }
 
@@ -2459,7 +2471,7 @@ import org.slf4j.LoggerFactory;
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "hasSystemPermission failed: unknown result");
     }
 
-    public boolean hasTablePermission(ByteBuffer login, String user, String table, TablePermission perm) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException
+    public boolean hasTablePermission(ByteBuffer login, String user, String table, TablePermission perm) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException
     {
       send_hasTablePermission(login, user, table, perm);
       return recv_hasTablePermission();
@@ -2478,7 +2490,7 @@ import org.slf4j.LoggerFactory;
       oprot_.getTransport().flush();
     }
 
-    public boolean recv_hasTablePermission() throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException
+    public boolean recv_hasTablePermission() throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException
     {
       org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin();
       if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) {
@@ -2501,6 +2513,9 @@ import org.slf4j.LoggerFactory;
       if (result.ouch2 != null) {
         throw result.ouch2;
       }
+      if (result.ouch3 != null) {
+        throw result.ouch3;
+      }
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "hasTablePermission failed: unknown result");
     }
 
@@ -3650,7 +3665,7 @@ import org.slf4j.LoggerFactory;
         prot.writeMessageEnd();
       }
 
-      public void getResult() throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException {
+      public void getResult() throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
@@ -4144,7 +4159,7 @@ import org.slf4j.LoggerFactory;
         prot.writeMessageEnd();
       }
 
-      public void getResult() throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException {
+      public void getResult() throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
@@ -4223,7 +4238,7 @@ import org.slf4j.LoggerFactory;
         prot.writeMessageEnd();
       }
 
-      public void getResult() throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException {
+      public void getResult() throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
@@ -4340,7 +4355,7 @@ import org.slf4j.LoggerFactory;
         prot.writeMessageEnd();
       }
 
-      public void getResult() throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException {
+      public void getResult() throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
@@ -5070,7 +5085,7 @@ import org.slf4j.LoggerFactory;
         prot.writeMessageEnd();
       }
 
-      public boolean getResult() throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException {
+      public boolean getResult() throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException {
         if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
@@ -6217,6 +6232,8 @@ import org.slf4j.LoggerFactory;
           result.ouch1 = ouch1;
         } catch (AccumuloSecurityException ouch2) {
           result.ouch2 = ouch2;
+        } catch (TableNotFoundException ouch3) {
+          result.ouch3 = ouch3;
         } catch (Throwable th) {
           LOGGER.error("Internal error processing flushTable", th);
           org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, "Internal error processing flushTable");
@@ -6739,6 +6756,8 @@ import org.slf4j.LoggerFactory;
           result.ouch1 = ouch1;
         } catch (AccumuloSecurityException ouch2) {
           result.ouch2 = ouch2;
+        } catch (TableNotFoundException ouch3) {
+          result.ouch3 = ouch3;
         } catch (Throwable th) {
           LOGGER.error("Internal error processing removeConstraint", th);
           org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, "Internal error processing removeConstraint");
@@ -6821,6 +6840,8 @@ import org.slf4j.LoggerFactory;
           result.ouch1 = ouch1;
         } catch (AccumuloSecurityException ouch2) {
           result.ouch2 = ouch2;
+        } catch (TableNotFoundException ouch3) {
+          result.ouch3 = ouch3;
         } catch (Throwable th) {
           LOGGER.error("Internal error processing removeTableProperty", th);
           org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, "Internal error processing removeTableProperty");
@@ -6947,6 +6968,8 @@ import org.slf4j.LoggerFactory;
           result.ouch1 = ouch1;
         } catch (AccumuloSecurityException ouch2) {
           result.ouch2 = ouch2;
+        } catch (TableNotFoundException ouch3) {
+          result.ouch3 = ouch3;
         } catch (Throwable th) {
           LOGGER.error("Internal error processing setTableProperty", th);
           org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, "Internal error processing setTableProperty");
@@ -7714,6 +7737,8 @@ import org.slf4j.LoggerFactory;
           result.ouch1 = ouch1;
         } catch (AccumuloSecurityException ouch2) {
           result.ouch2 = ouch2;
+        } catch (TableNotFoundException ouch3) {
+          result.ouch3 = ouch3;
         } catch (Throwable th) {
           LOGGER.error("Internal error processing hasTablePermission", th);
           org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, "Internal error processing hasTablePermission");
@@ -20470,14 +20495,17 @@ import org.slf4j.LoggerFactory;
 
     private static final org.apache.thrift.protocol.TField OUCH1_FIELD_DESC = new org.apache.thrift.protocol.TField("ouch1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
     private static final org.apache.thrift.protocol.TField OUCH2_FIELD_DESC = new org.apache.thrift.protocol.TField("ouch2", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+    private static final org.apache.thrift.protocol.TField OUCH3_FIELD_DESC = new org.apache.thrift.protocol.TField("ouch3", org.apache.thrift.protocol.TType.STRUCT, (short)3);
 
     public AccumuloException ouch1;
     public AccumuloSecurityException ouch2;
+    public TableNotFoundException ouch3;
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
     @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
       OUCH1((short)1, "ouch1"),
-      OUCH2((short)2, "ouch2");
+      OUCH2((short)2, "ouch2"),
+      OUCH3((short)3, "ouch3");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -20496,6 +20524,8 @@ import org.slf4j.LoggerFactory;
             return OUCH1;
           case 2: // OUCH2
             return OUCH2;
+          case 3: // OUCH3
+            return OUCH3;
           default:
             return null;
         }
@@ -20544,6 +20574,8 @@ import org.slf4j.LoggerFactory;
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
       tmpMap.put(_Fields.OUCH2, new org.apache.thrift.meta_data.FieldMetaData("ouch2", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+      tmpMap.put(_Fields.OUCH3, new org.apache.thrift.meta_data.FieldMetaData("ouch3", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(flushTable_result.class, metaDataMap);
     }
@@ -20553,11 +20585,13 @@ import org.slf4j.LoggerFactory;
 
     public flushTable_result(
       AccumuloException ouch1,
-      AccumuloSecurityException ouch2)
+      AccumuloSecurityException ouch2,
+      TableNotFoundException ouch3)
     {
       this();
       this.ouch1 = ouch1;
       this.ouch2 = ouch2;
+      this.ouch3 = ouch3;
     }
 
     /**
@@ -20570,6 +20604,9 @@ import org.slf4j.LoggerFactory;
       if (other.isSetOuch2()) {
         this.ouch2 = new AccumuloSecurityException(other.ouch2);
       }
+      if (other.isSetOuch3()) {
+        this.ouch3 = new TableNotFoundException(other.ouch3);
+      }
     }
 
     public flushTable_result deepCopy() {
@@ -20580,6 +20617,7 @@ import org.slf4j.LoggerFactory;
     public void clear() {
       this.ouch1 = null;
       this.ouch2 = null;
+      this.ouch3 = null;
     }
 
     public AccumuloException getOuch1() {
@@ -20630,6 +20668,30 @@ import org.slf4j.LoggerFactory;
       }
     }
 
+    public TableNotFoundException getOuch3() {
+      return this.ouch3;
+    }
+
+    public flushTable_result setOuch3(TableNotFoundException ouch3) {
+      this.ouch3 = ouch3;
+      return this;
+    }
+
+    public void unsetOuch3() {
+      this.ouch3 = null;
+    }
+
+    /** Returns true if field ouch3 is set (has been assigned a value) and false otherwise */
+    public boolean isSetOuch3() {
+      return this.ouch3 != null;
+    }
+
+    public void setOuch3IsSet(boolean value) {
+      if (!value) {
+        this.ouch3 = null;
+      }
+    }
+
     public void setFieldValue(_Fields field, Object value) {
       switch (field) {
       case OUCH1:
@@ -20648,6 +20710,14 @@ import org.slf4j.LoggerFactory;
         }
         break;
 
+      case OUCH3:
+        if (value == null) {
+          unsetOuch3();
+        } else {
+          setOuch3((TableNotFoundException)value);
+        }
+        break;
+
       }
     }
 
@@ -20659,6 +20729,9 @@ import org.slf4j.LoggerFactory;
       case OUCH2:
         return getOuch2();
 
+      case OUCH3:
+        return getOuch3();
+
       }
       throw new IllegalStateException();
     }
@@ -20674,6 +20747,8 @@ import org.slf4j.LoggerFactory;
         return isSetOuch1();
       case OUCH2:
         return isSetOuch2();
+      case OUCH3:
+        return isSetOuch3();
       }
       throw new IllegalStateException();
     }
@@ -20709,6 +20784,15 @@ import org.slf4j.LoggerFactory;
           return false;
       }
 
+      boolean this_present_ouch3 = true && this.isSetOuch3();
+      boolean that_present_ouch3 = true && that.isSetOuch3();
+      if (this_present_ouch3 || that_present_ouch3) {
+        if (!(this_present_ouch3 && that_present_ouch3))
+          return false;
+        if (!this.ouch3.equals(that.ouch3))
+          return false;
+      }
+
       return true;
     }
 
@@ -20745,6 +20829,16 @@ import org.slf4j.LoggerFactory;
           return lastComparison;
         }
       }
+      lastComparison = Boolean.valueOf(isSetOuch3()).compareTo(typedOther.isSetOuch3());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetOuch3()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ouch3, typedOther.ouch3);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
       return 0;
     }
 
@@ -20778,6 +20872,14 @@ import org.slf4j.LoggerFactory;
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
             }
             break;
+          case 3: // OUCH3
+            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
+              this.ouch3 = new TableNotFoundException();
+              this.ouch3.read(iprot);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
           default:
             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
         }
@@ -20800,6 +20902,10 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(OUCH2_FIELD_DESC);
         this.ouch2.write(oprot);
         oprot.writeFieldEnd();
+      } else if (this.isSetOuch3()) {
+        oprot.writeFieldBegin(OUCH3_FIELD_DESC);
+        this.ouch3.write(oprot);
+        oprot.writeFieldEnd();
       }
       oprot.writeFieldStop();
       oprot.writeStructEnd();
@@ -20825,6 +20931,14 @@ import org.slf4j.LoggerFactory;
         sb.append(this.ouch2);
       }
       first = false;
+      if (!first) sb.append(", ");
+      sb.append("ouch3:");
+      if (this.ouch3 == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.ouch3);
+      }
+      first = false;
       sb.append(")");
       return sb.toString();
     }
@@ -33448,14 +33562,17 @@ import org.slf4j.LoggerFactory;
 
     private static final org.apache.thrift.protocol.TField OUCH1_FIELD_DESC = new org.apache.thrift.protocol.TField("ouch1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
     private static final org.apache.thrift.protocol.TField OUCH2_FIELD_DESC = new org.apache.thrift.protocol.TField("ouch2", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+    private static final org.apache.thrift.protocol.TField OUCH3_FIELD_DESC = new org.apache.thrift.protocol.TField("ouch3", org.apache.thrift.protocol.TType.STRUCT, (short)3);
 
     public AccumuloException ouch1;
     public AccumuloSecurityException ouch2;
+    public TableNotFoundException ouch3;
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
     @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
       OUCH1((short)1, "ouch1"),
-      OUCH2((short)2, "ouch2");
+      OUCH2((short)2, "ouch2"),
+      OUCH3((short)3, "ouch3");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -33474,6 +33591,8 @@ import org.slf4j.LoggerFactory;
             return OUCH1;
           case 2: // OUCH2
             return OUCH2;
+          case 3: // OUCH3
+            return OUCH3;
           default:
             return null;
         }
@@ -33522,6 +33641,8 @@ import org.slf4j.LoggerFactory;
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
       tmpMap.put(_Fields.OUCH2, new org.apache.thrift.meta_data.FieldMetaData("ouch2", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+      tmpMap.put(_Fields.OUCH3, new org.apache.thrift.meta_data.FieldMetaData("ouch3", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(removeConstraint_result.class, metaDataMap);
     }
@@ -33531,11 +33652,13 @@ import org.slf4j.LoggerFactory;
 
     public removeConstraint_result(
       AccumuloException ouch1,
-      AccumuloSecurityException ouch2)
+      AccumuloSecurityException ouch2,
+      TableNotFoundException ouch3)
     {
       this();
       this.ouch1 = ouch1;
       this.ouch2 = ouch2;
+      this.ouch3 = ouch3;
     }
 
     /**
@@ -33548,6 +33671,9 @@ import org.slf4j.LoggerFactory;
       if (other.isSetOuch2()) {
         this.ouch2 = new AccumuloSecurityException(other.ouch2);
       }
+      if (other.isSetOuch3()) {
+        this.ouch3 = new TableNotFoundException(other.ouch3);
+      }
     }
 
     public removeConstraint_result deepCopy() {
@@ -33558,6 +33684,7 @@ import org.slf4j.LoggerFactory;
     public void clear() {
       this.ouch1 = null;
       this.ouch2 = null;
+      this.ouch3 = null;
     }
 
     public AccumuloException getOuch1() {
@@ -33608,6 +33735,30 @@ import org.slf4j.LoggerFactory;
       }
     }
 
+    public TableNotFoundException getOuch3() {
+      return this.ouch3;
+    }
+
+    public removeConstraint_result setOuch3(TableNotFoundException ouch3) {
+      this.ouch3 = ouch3;
+      return this;
+    }
+
+    public void unsetOuch3() {
+      this.ouch3 = null;
+    }
+
+    /** Returns true if field ouch3 is set (has been assigned a value) and false otherwise */
+    public boolean isSetOuch3() {
+      return this.ouch3 != null;
+    }
+
+    public void setOuch3IsSet(boolean value) {
+      if (!value) {
+        this.ouch3 = null;
+      }
+    }
+
     public void setFieldValue(_Fields field, Object value) {
       switch (field) {
       case OUCH1:
@@ -33626,6 +33777,14 @@ import org.slf4j.LoggerFactory;
         }
         break;
 
+      case OUCH3:
+        if (value == null) {
+          unsetOuch3();
+        } else {
+          setOuch3((TableNotFoundException)value);
+        }
+        break;
+
       }
     }
 
@@ -33637,6 +33796,9 @@ import org.slf4j.LoggerFactory;
       case OUCH2:
         return getOuch2();
 
+      case OUCH3:
+        return getOuch3();
+
       }
       throw new IllegalStateException();
     }
@@ -33652,6 +33814,8 @@ import org.slf4j.LoggerFactory;
         return isSetOuch1();
       case OUCH2:
         return isSetOuch2();
+      case OUCH3:
+        return isSetOuch3();
       }
       throw new IllegalStateException();
     }
@@ -33687,6 +33851,15 @@ import org.slf4j.LoggerFactory;
           return false;
       }
 
+      boolean this_present_ouch3 = true && this.isSetOuch3();
+      boolean that_present_ouch3 = true && that.isSetOuch3();
+      if (this_present_ouch3 || that_present_ouch3) {
+        if (!(this_present_ouch3 && that_present_ouch3))
+          return false;
+        if (!this.ouch3.equals(that.ouch3))
+          return false;
+      }
+
       return true;
     }
 
@@ -33723,6 +33896,16 @@ import org.slf4j.LoggerFactory;
           return lastComparison;
         }
       }
+      lastComparison = Boolean.valueOf(isSetOuch3()).compareTo(typedOther.isSetOuch3());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetOuch3()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ouch3, typedOther.ouch3);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
       return 0;
     }
 
@@ -33756,6 +33939,14 @@ import org.slf4j.LoggerFactory;
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
             }
             break;
+          case 3: // OUCH3
+            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
+              this.ouch3 = new TableNotFoundException();
+              this.ouch3.read(iprot);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
           default:
             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
         }
@@ -33778,6 +33969,10 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(OUCH2_FIELD_DESC);
         this.ouch2.write(oprot);
         oprot.writeFieldEnd();
+      } else if (this.isSetOuch3()) {
+        oprot.writeFieldBegin(OUCH3_FIELD_DESC);
+        this.ouch3.write(oprot);
+        oprot.writeFieldEnd();
       }
       oprot.writeFieldStop();
       oprot.writeStructEnd();
@@ -33803,6 +33998,14 @@ import org.slf4j.LoggerFactory;
         sb.append(this.ouch2);
       }
       first = false;
+      if (!first) sb.append(", ");
+      sb.append("ouch3:");
+      if (this.ouch3 == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.ouch3);
+      }
+      first = false;
       sb.append(")");
       return sb.toString();
     }
@@ -35407,14 +35610,17 @@ import org.slf4j.LoggerFactory;
 
     private static final org.apache.thrift.protocol.TField OUCH1_FIELD_DESC = new org.apache.thrift.protocol.TField("ouch1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
     private static final org.apache.thrift.protocol.TField OUCH2_FIELD_DESC = new org.apache.thrift.protocol.TField("ouch2", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+    private static final org.apache.thrift.protocol.TField OUCH3_FIELD_DESC = new org.apache.thrift.protocol.TField("ouch3", org.apache.thrift.protocol.TType.STRUCT, (short)3);
 
     public AccumuloException ouch1;
     public AccumuloSecurityException ouch2;
+    public TableNotFoundException ouch3;
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
     @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
       OUCH1((short)1, "ouch1"),
-      OUCH2((short)2, "ouch2");
+      OUCH2((short)2, "ouch2"),
+      OUCH3((short)3, "ouch3");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -35433,6 +35639,8 @@ import org.slf4j.LoggerFactory;
             return OUCH1;
           case 2: // OUCH2
             return OUCH2;
+          case 3: // OUCH3
+            return OUCH3;
           default:
             return null;
         }
@@ -35481,6 +35689,8 @@ import org.slf4j.LoggerFactory;
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
       tmpMap.put(_Fields.OUCH2, new org.apache.thrift.meta_data.FieldMetaData("ouch2", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+      tmpMap.put(_Fields.OUCH3, new org.apache.thrift.meta_data.FieldMetaData("ouch3", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(removeTableProperty_result.class, metaDataMap);
     }
@@ -35490,11 +35700,13 @@ import org.slf4j.LoggerFactory;
 
     public removeTableProperty_result(
       AccumuloException ouch1,
-      AccumuloSecurityException ouch2)
+      AccumuloSecurityException ouch2,
+      TableNotFoundException ouch3)
     {
       this();
       this.ouch1 = ouch1;
       this.ouch2 = ouch2;
+      this.ouch3 = ouch3;
     }
 
     /**
@@ -35507,6 +35719,9 @@ import org.slf4j.LoggerFactory;
       if (other.isSetOuch2()) {
         this.ouch2 = new AccumuloSecurityException(other.ouch2);
       }
+      if (other.isSetOuch3()) {
+        this.ouch3 = new TableNotFoundException(other.ouch3);
+      }
     }
 
     public removeTableProperty_result deepCopy() {
@@ -35517,6 +35732,7 @@ import org.slf4j.LoggerFactory;
     public void clear() {
       this.ouch1 = null;
       this.ouch2 = null;
+      this.ouch3 = null;
     }
 
     public AccumuloException getOuch1() {
@@ -35567,6 +35783,30 @@ import org.slf4j.LoggerFactory;
       }
     }
 
+    public TableNotFoundException getOuch3() {
+      return this.ouch3;
+    }
+
+    public removeTableProperty_result setOuch3(TableNotFoundException ouch3) {
+      this.ouch3 = ouch3;
+      return this;
+    }
+
+    public void unsetOuch3() {
+      this.ouch3 = null;
+    }
+
+    /** Returns true if field ouch3 is set (has been assigned a value) and false otherwise */
+    public boolean isSetOuch3() {
+      return this.ouch3 != null;
+    }
+
+    public void setOuch3IsSet(boolean value) {
+      if (!value) {
+        this.ouch3 = null;
+      }
+    }
+
     public void setFieldValue(_Fields field, Object value) {
       switch (field) {
       case OUCH1:
@@ -35585,6 +35825,14 @@ import org.slf4j.LoggerFactory;
         }
         break;
 
+      case OUCH3:
+        if (value == null) {
+          unsetOuch3();
+        } else {
+          setOuch3((TableNotFoundException)value);
+        }
+        break;
+
       }
     }
 
@@ -35596,6 +35844,9 @@ import org.slf4j.LoggerFactory;
       case OUCH2:
         return getOuch2();
 
+      case OUCH3:
+        return getOuch3();
+
       }
       throw new IllegalStateException();
     }
@@ -35611,6 +35862,8 @@ import org.slf4j.LoggerFactory;
         return isSetOuch1();
       case OUCH2:
         return isSetOuch2();
+      case OUCH3:
+        return isSetOuch3();
       }
       throw new IllegalStateException();
     }
@@ -35646,6 +35899,15 @@ import org.slf4j.LoggerFactory;
           return false;
       }
 
+      boolean this_present_ouch3 = true && this.isSetOuch3();
+      boolean that_present_ouch3 = true && that.isSetOuch3();
+      if (this_present_ouch3 || that_present_ouch3) {
+        if (!(this_present_ouch3 && that_present_ouch3))
+          return false;
+        if (!this.ouch3.equals(that.ouch3))
+          return false;
+      }
+
       return true;
     }
 
@@ -35682,6 +35944,16 @@ import org.slf4j.LoggerFactory;
           return lastComparison;
         }
       }
+      lastComparison = Boolean.valueOf(isSetOuch3()).compareTo(typedOther.isSetOuch3());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetOuch3()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ouch3, typedOther.ouch3);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
       return 0;
     }
 
@@ -35715,6 +35987,14 @@ import org.slf4j.LoggerFactory;
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
             }
             break;
+          case 3: // OUCH3
+            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
+              this.ouch3 = new TableNotFoundException();
+              this.ouch3.read(iprot);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
           default:
             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
         }
@@ -35737,6 +36017,10 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(OUCH2_FIELD_DESC);
         this.ouch2.write(oprot);
         oprot.writeFieldEnd();
+      } else if (this.isSetOuch3()) {
+        oprot.writeFieldBegin(OUCH3_FIELD_DESC);
+        this.ouch3.write(oprot);
+        oprot.writeFieldEnd();
       }
       oprot.writeFieldStop();
       oprot.writeStructEnd();
@@ -35762,6 +36046,14 @@ import org.slf4j.LoggerFactory;
         sb.append(this.ouch2);
       }
       first = false;
+      if (!first) sb.append(", ");
+      sb.append("ouch3:");
+      if (this.ouch3 == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.ouch3);
+      }
+      first = false;
       sb.append(")");
       return sb.toString();
     }
@@ -38445,14 +38737,17 @@ import org.slf4j.LoggerFactory;
 
     private static final org.apache.thrift.protocol.TField OUCH1_FIELD_DESC = new org.apache.thrift.protocol.TField("ouch1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
     private static final org.apache.thrift.protocol.TField OUCH2_FIELD_DESC = new org.apache.thrift.protocol.TField("ouch2", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+    private static final org.apache.thrift.protocol.TField OUCH3_FIELD_DESC = new org.apache.thrift.protocol.TField("ouch3", org.apache.thrift.protocol.TType.STRUCT, (short)3);
 
     public AccumuloException ouch1;
     public AccumuloSecurityException ouch2;
+    public TableNotFoundException ouch3;
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
     @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
       OUCH1((short)1, "ouch1"),
-      OUCH2((short)2, "ouch2");
+      OUCH2((short)2, "ouch2"),
+      OUCH3((short)3, "ouch3");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -38471,6 +38766,8 @@ import org.slf4j.LoggerFactory;
             return OUCH1;
           case 2: // OUCH2
             return OUCH2;
+          case 3: // OUCH3
+            return OUCH3;
           default:
             return null;
         }
@@ -38519,6 +38816,8 @@ import org.slf4j.LoggerFactory;
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
       tmpMap.put(_Fields.OUCH2, new org.apache.thrift.meta_data.FieldMetaData("ouch2", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+      tmpMap.put(_Fields.OUCH3, new org.apache.thrift.meta_data.FieldMetaData("ouch3", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setTableProperty_result.class, metaDataMap);
     }
@@ -38528,11 +38827,13 @@ import org.slf4j.LoggerFactory;
 
     public setTableProperty_result(
       AccumuloException ouch1,
-      AccumuloSecurityException ouch2)
+      AccumuloSecurityException ouch2,
+      TableNotFoundException ouch3)
     {
       this();
       this.ouch1 = ouch1;
       this.ouch2 = ouch2;
+      this.ouch3 = ouch3;
     }
 
     /**
@@ -38545,6 +38846,9 @@ import org.slf4j.LoggerFactory;
       if (other.isSetOuch2()) {
         this.ouch2 = new AccumuloSecurityException(other.ouch2);
       }
+      if (other.isSetOuch3()) {
+        this.ouch3 = new TableNotFoundException(other.ouch3);
+      }
     }
 
     public setTableProperty_result deepCopy() {
@@ -38555,6 +38859,7 @@ import org.slf4j.LoggerFactory;
     public void clear() {
       this.ouch1 = null;
       this.ouch2 = null;
+      this.ouch3 = null;
     }
 
     public AccumuloException getOuch1() {
@@ -38605,6 +38910,30 @@ import org.slf4j.LoggerFactory;
       }
     }
 
+    public TableNotFoundException getOuch3() {
+      return this.ouch3;
+    }
+
+    public setTableProperty_result setOuch3(TableNotFoundException ouch3) {
+      this.ouch3 = ouch3;
+      return this;
+    }
+
+    public void unsetOuch3() {
+      this.ouch3 = null;
+    }
+
+    /** Returns true if field ouch3 is set (has been assigned a value) and false otherwise */
+    public boolean isSetOuch3() {
+      return this.ouch3 != null;
+    }
+
+    public void setOuch3IsSet(boolean value) {
+      if (!value) {
+        this.ouch3 = null;
+      }
+    }
+
     public void setFieldValue(_Fields field, Object value) {
       switch (field) {
       case OUCH1:
@@ -38623,6 +38952,14 @@ import org.slf4j.LoggerFactory;
         }
         break;
 
+      case OUCH3:
+        if (value == null) {
+          unsetOuch3();
+        } else {
+          setOuch3((TableNotFoundException)value);
+        }
+        break;
+
       }
     }
 
@@ -38634,6 +38971,9 @@ import org.slf4j.LoggerFactory;
       case OUCH2:
         return getOuch2();
 
+      case OUCH3:
+        return getOuch3();
+
       }
       throw new IllegalStateException();
     }
@@ -38649,6 +38989,8 @@ import org.slf4j.LoggerFactory;
         return isSetOuch1();
       case OUCH2:
         return isSetOuch2();
+      case OUCH3:
+        return isSetOuch3();
       }
       throw new IllegalStateException();
     }
@@ -38684,6 +39026,15 @@ import org.slf4j.LoggerFactory;
           return false;
       }
 
+      boolean this_present_ouch3 = true && this.isSetOuch3();
+      boolean that_present_ouch3 = true && that.isSetOuch3();
+      if (this_present_ouch3 || that_present_ouch3) {
+        if (!(this_present_ouch3 && that_present_ouch3))
+          return false;
+        if (!this.ouch3.equals(that.ouch3))
+          return false;
+      }
+
       return true;
     }
 
@@ -38720,6 +39071,16 @@ import org.slf4j.LoggerFactory;
           return lastComparison;
         }
       }
+      lastComparison = Boolean.valueOf(isSetOuch3()).compareTo(typedOther.isSetOuch3());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetOuch3()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ouch3, typedOther.ouch3);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
       return 0;
     }
 
@@ -38753,6 +39114,14 @@ import org.slf4j.LoggerFactory;
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
             }
             break;
+          case 3: // OUCH3
+            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
+              this.ouch3 = new TableNotFoundException();
+              this.ouch3.read(iprot);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
           default:
             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
         }
@@ -38775,6 +39144,10 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(OUCH2_FIELD_DESC);
         this.ouch2.write(oprot);
         oprot.writeFieldEnd();
+      } else if (this.isSetOuch3()) {
+        oprot.writeFieldBegin(OUCH3_FIELD_DESC);
+        this.ouch3.write(oprot);
+        oprot.writeFieldEnd();
       }
       oprot.writeFieldStop();
       oprot.writeStructEnd();
@@ -38800,6 +39173,14 @@ import org.slf4j.LoggerFactory;
         sb.append(this.ouch2);
       }
       first = false;
+      if (!first) sb.append(", ");
+      sb.append("ouch3:");
+      if (this.ouch3 == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.ouch3);
+      }
+      first = false;
       sb.append(")");
       return sb.toString();
     }
@@ -56066,16 +56447,19 @@ import org.slf4j.LoggerFactory;
     private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
     private static final org.apache.thrift.protocol.TField OUCH1_FIELD_DESC = new org.apache.thrift.protocol.TField("ouch1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
     private static final org.apache.thrift.protocol.TField OUCH2_FIELD_DESC = new org.apache.thrift.protocol.TField("ouch2", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+    private static final org.apache.thrift.protocol.TField OUCH3_FIELD_DESC = new org.apache.thrift.protocol.TField("ouch3", org.apache.thrift.protocol.TType.STRUCT, (short)3);
 
     public boolean success;
     public AccumuloException ouch1;
     public AccumuloSecurityException ouch2;
+    public TableNotFoundException ouch3;
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
     @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
       SUCCESS((short)0, "success"),
       OUCH1((short)1, "ouch1"),
-      OUCH2((short)2, "ouch2");
+      OUCH2((short)2, "ouch2"),
+      OUCH3((short)3, "ouch3");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -56096,6 +56480,8 @@ import org.slf4j.LoggerFactory;
             return OUCH1;
           case 2: // OUCH2
             return OUCH2;
+          case 3: // OUCH3
+            return OUCH3;
           default:
             return null;
         }
@@ -56148,6 +56534,8 @@ import org.slf4j.LoggerFactory;
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
       tmpMap.put(_Fields.OUCH2, new org.apache.thrift.meta_data.FieldMetaData("ouch2", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+      tmpMap.put(_Fields.OUCH3, new org.apache.thrift.meta_data.FieldMetaData("ouch3", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
       metaDataMap = Collections.unmodifiableMap(tmpMap);
       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(hasTablePermission_result.class, metaDataMap);
     }
@@ -56158,13 +56546,15 @@ import org.slf4j.LoggerFactory;
     public hasTablePermission_result(
       boolean success,
       AccumuloException ouch1,
-      AccumuloSecurityException ouch2)
+      AccumuloSecurityException ouch2,
+      TableNotFoundException ouch3)
     {
       this();
       this.success = success;
       setSuccessIsSet(true);
       this.ouch1 = ouch1;
       this.ouch2 = ouch2;
+      this.ouch3 = ouch3;
     }
 
     /**
@@ -56180,6 +56570,9 @@ import org.slf4j.LoggerFactory;
       if (other.isSetOuch2()) {
         this.ouch2 = new AccumuloSecurityException(other.ouch2);
       }
+      if (other.isSetOuch3()) {
+        this.ouch3 = new TableNotFoundException(other.ouch3);
+      }
     }
 
     public hasTablePermission_result deepCopy() {
@@ -56192,6 +56585,7 @@ import org.slf4j.LoggerFactory;
       this.success = false;
       this.ouch1 = null;
       this.ouch2 = null;
+      this.ouch3 = null;
     }
 
     public boolean isSuccess() {
@@ -56265,6 +56659,30 @@ import org.slf4j.LoggerFactory;
       }
     }
 
+    public TableNotFoundException getOuch3() {
+      return this.ouch3;
+    }
+
+    public hasTablePermission_result setOuch3(TableNotFoundException ouch3) {
+      this.ouch3 = ouch3;
+      return this;
+    }
+
+    public void unsetOuch3() {
+      this.ouch3 = null;
+    }
+
+    /** Returns true if field ouch3 is set (has been assigned a value) and false otherwise */
+    public boolean isSetOuch3() {
+      return this.ouch3 != null;
+    }
+
+    public void setOuch3IsSet(boolean value) {
+      if (!value) {
+        this.ouch3 = null;
+      }
+    }
+
     public void setFieldValue(_Fields field, Object value) {
       switch (field) {
       case SUCCESS:
@@ -56291,6 +56709,14 @@ import org.slf4j.LoggerFactory;
         }
         break;
 
+      case OUCH3:
+        if (value == null) {
+          unsetOuch3();
+        } else {
+          setOuch3((TableNotFoundException)value);
+        }
+        break;
+
       }
     }
 
@@ -56305,6 +56731,9 @@ import org.slf4j.LoggerFactory;
       case OUCH2:
         return getOuch2();
 
+      case OUCH3:
+        return getOuch3();
+
       }
       throw new IllegalStateException();
     }
@@ -56322,6 +56751,8 @@ import org.slf4j.LoggerFactory;
         return isSetOuch1();
       case OUCH2:
         return isSetOuch2();
+      case OUCH3:
+        return isSetOuch3();
       }
       throw new IllegalStateException();
     }
@@ -56366,6 +56797,15 @@ import org.slf4j.LoggerFactory;
           return false;
       }
 
+      boolean this_present_ouch3 = true && this.isSetOuch3();
+      boolean that_present_ouch3 = true && that.isSetOuch3();
+      if (this_present_ouch3 || that_present_ouch3) {
+        if (!(this_present_ouch3 && that_present_ouch3))
+          return false;
+        if (!this.ouch3.equals(that.ouch3))
+          return false;
+      }
+
       return true;
     }
 
@@ -56412,6 +56852,16 @@ import org.slf4j.LoggerFactory;
           return lastComparison;
         }
       }
+      lastComparison = Boolean.valueOf(isSetOuch3()).compareTo(typedOther.isSetOuch3());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetOuch3()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ouch3, typedOther.ouch3);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
       return 0;
     }
 
@@ -56453,6 +56903,14 @@ import org.slf4j.LoggerFactory;
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
             }
             break;
+          case 3: // OUCH3
+            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
+              this.ouch3 = new TableNotFoundException();
+              this.ouch3.read(iprot);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
           default:
             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
         }
@@ -56479,6 +56937,10 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(OUCH2_FIELD_DESC);
         this.ouch2.write(oprot);
         oprot.writeFieldEnd();
+      } else if (this.isSetOuch3()) {
+        oprot.writeFieldBegin(OUCH3_FIELD_DESC);
+        this.ouch3.write(oprot);
+        oprot.writeFieldEnd();
       }
       oprot.writeFieldStop();
       oprot.writeStructEnd();
@@ -56508,6 +56970,14 @@ import org.slf4j.LoggerFactory;
         sb.append(this.ouch2);
       }
       first = false;
+      if (!first) sb.append(", ");
+      sb.append("ouch3:");
+      if (this.ouch3 == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.ouch3);
+      }
+      first = false;
       sb.append(")");
       return sb.toString();
     }

Modified: accumulo/branches/1.4/src/proxy/src/main/thrift/proxy.thrift
URL: http://svn.apache.org/viewvc/accumulo/branches/1.4/src/proxy/src/main/thrift/proxy.thrift?rev=1470954&r1=1470953&r2=1470954&view=diff
==============================================================================
--- accumulo/branches/1.4/src/proxy/src/main/thrift/proxy.thrift (original)
+++ accumulo/branches/1.4/src/proxy/src/main/thrift/proxy.thrift Tue Apr 23 13:45:21 2013
@@ -227,7 +227,7 @@ service AccumuloProxy
   void deleteRows (1:binary login, 2:string tableName, 3:binary startRow, 4:binary endRow)             throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2, 3:TableNotFoundException ouch3);
   void flushTable (1:binary login, 2:string tableName, 3:binary startRow, 4:binary endRow,
                    5:bool wait)
-                                                                                                       throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2);
+                                                                                                       throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2, 3:TableNotFoundException ouch3);
   map<string,set<string>> getLocalityGroups (1:binary login, 2:string tableName)                       throws (1:AccumuloException ouch1, 2:TableNotFoundException ouch2);
   IteratorSetting getIteratorSetting (1:binary login, 2:string tableName, 
                                       3:string iteratorName, 4:IteratorScope scope) 
@@ -246,14 +246,14 @@ service AccumuloProxy
   void mergeTablets (1:binary login, 2:string tableName, 3:binary startRow, 4:binary endRow)           throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2, 3:TableNotFoundException ouch3);
   void offlineTable (1:binary login, 2:string tableName)                                               throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2, 3:TableNotFoundException ouch3);
   void onlineTable (1:binary login, 2:string tableName)                                                throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2, 3:TableNotFoundException ouch3);
-  void removeConstraint (1:binary login, 2:string tableName, 3:i32 constraint)                         throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2);
+  void removeConstraint (1:binary login, 2:string tableName, 3:i32 constraint)                         throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2, 3:TableNotFoundException ouch3);
   void removeIterator (1:binary login, 2:string tableName, 3:string iterName, 
                        4:set<IteratorScope> scopes)
                                                                                                        throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2, 3:TableNotFoundException ouch3);
-  void removeTableProperty (1:binary login, 2:string tableName, 3:string property)                     throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2);
+  void removeTableProperty (1:binary login, 2:string tableName, 3:string property)                     throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2, 3:TableNotFoundException ouch3);
   void renameTable (1:binary login, 2:string oldTableName, 3:string newTableName)                      throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2, 3:TableNotFoundException ouch3, 4:TableExistsException ouch4);
   void setLocalityGroups (1:binary login, 2:string tableName, 3:map<string,set<string>> groups)        throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2, 3:TableNotFoundException ouch3);
-  void setTableProperty (1:binary login, 2:string tableName, 3:string property, 4:string value)        throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2);
+  void setTableProperty (1:binary login, 2:string tableName, 3:string property, 4:string value)        throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2, 3:TableNotFoundException ouch3);
   set<Range> splitRangeByTablets (1:binary login, 2:string tableName, 3:Range range, 4:i32 maxSplits)  throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2, 3:TableNotFoundException ouch3);
   bool tableExists (1:binary login, 2:string tableName);
   map<string,string> tableIdMap (1:binary login);
@@ -277,7 +277,7 @@ service AccumuloProxy
   void grantSystemPermission (1:binary login, 2:string user, 3:SystemPermission perm)                throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2);
   void grantTablePermission (1:binary login, 2:string user, 3:string table, 4:TablePermission perm)  throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2, 3:TableNotFoundException ouch3);
   bool hasSystemPermission (1:binary login, 2:string user, 3:SystemPermission perm)                  throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2);
-  bool hasTablePermission (1:binary login, 2:string user, 3:string table, 4:TablePermission perm)    throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2);
+  bool hasTablePermission (1:binary login, 2:string user, 3:string table, 4:TablePermission perm)    throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2, 3:TableNotFoundException ouch3);
   set<string> listLocalUsers (1:binary login)                                                        throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2, 3:TableNotFoundException ouch3);
   void revokeSystemPermission (1:binary login, 2:string user, 3:SystemPermission perm)               throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2);
   void revokeTablePermission (1:binary login, 2:string user, 3:string table, 4:TablePermission perm) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2, 3:TableNotFoundException ouch3);

Modified: accumulo/branches/1.4/src/proxy/src/test/java/org/apache/accumulo/proxy/SimpleTest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.4/src/proxy/src/test/java/org/apache/accumulo/proxy/SimpleTest.java?rev=1470954&r1=1470953&r2=1470954&view=diff
==============================================================================
--- accumulo/branches/1.4/src/proxy/src/test/java/org/apache/accumulo/proxy/SimpleTest.java (original)
+++ accumulo/branches/1.4/src/proxy/src/test/java/org/apache/accumulo/proxy/SimpleTest.java Tue Apr 23 13:45:21 2013
@@ -16,32 +16,84 @@
  */
 package org.apache.accumulo.proxy;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.io.File;
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.EnumSet;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Random;
+import java.util.Set;
+import java.util.TreeMap;
+
 import org.apache.accumulo.core.Constants;
+import org.apache.accumulo.core.conf.DefaultConfiguration;
+import org.apache.accumulo.core.conf.Property;
+import org.apache.accumulo.core.data.Value;
+import org.apache.accumulo.core.file.FileOperations;
+import org.apache.accumulo.core.file.FileSKVWriter;
 import org.apache.accumulo.core.iterators.DevNull;
 import org.apache.accumulo.core.iterators.SortedKeyValueIterator;
 import org.apache.accumulo.core.iterators.user.SummingCombiner;
 import org.apache.accumulo.core.util.UtilWaitThread;
+import org.apache.accumulo.examples.simple.constraints.NumericValueConstraint;
+import org.apache.accumulo.proxy.thrift.AccumuloException;
 import org.apache.accumulo.proxy.thrift.AccumuloProxy.Client;
-import org.apache.accumulo.proxy.thrift.*;
+import org.apache.accumulo.proxy.thrift.AccumuloSecurityException;
+import org.apache.accumulo.proxy.thrift.ActiveScan;
+import org.apache.accumulo.proxy.thrift.BatchScanOptions;
+import org.apache.accumulo.proxy.thrift.ColumnUpdate;
+import org.apache.accumulo.proxy.thrift.IteratorScope;
+import org.apache.accumulo.proxy.thrift.IteratorSetting;
+import org.apache.accumulo.proxy.thrift.Key;
+import org.apache.accumulo.proxy.thrift.MutationsRejectedException;
+import org.apache.accumulo.proxy.thrift.PartialKey;
+import org.apache.accumulo.proxy.thrift.Range;
+import org.apache.accumulo.proxy.thrift.ScanColumn;
+import org.apache.accumulo.proxy.thrift.ScanOptions;
+import org.apache.accumulo.proxy.thrift.ScanResult;
+import org.apache.accumulo.proxy.thrift.ScanState;
+import org.apache.accumulo.proxy.thrift.ScanType;
+import org.apache.accumulo.proxy.thrift.SystemPermission;
+import org.apache.accumulo.proxy.thrift.TableNotFoundException;
+import org.apache.accumulo.proxy.thrift.TablePermission;
+import org.apache.accumulo.proxy.thrift.TimeType;
+import org.apache.accumulo.proxy.thrift.WriterOptions;
 import org.apache.accumulo.server.test.functional.SlowIterator;
+import org.apache.accumulo.test.MiniAccumuloCluster;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.io.Text;
 import org.apache.thrift.protocol.TProtocolFactory;
 import org.apache.thrift.server.TServer;
+import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
-
-import java.nio.ByteBuffer;
-import java.util.*;
-
-import static org.junit.Assert.*;
+import org.junit.rules.TemporaryFolder;
 
 /**
  * Call every method on the proxy and try to verify that it works.
  */
 public class SimpleTest {
   
+  public static TemporaryFolder folder = new TemporaryFolder();
+  
   public static final String TABLE_TEST = "test";
-
-  private static String secret = "";
+  
+  private static MiniAccumuloCluster accumulo;
+  private static String secret = "superSecret";
   private static Random random = new Random();
   private static TServer proxyServer;
   private static Thread thread;
@@ -49,28 +101,38 @@ public class SimpleTest {
   private static org.apache.accumulo.proxy.thrift.AccumuloProxy.Client client;
   private static String principal = "root";
   @SuppressWarnings("serial")
-  private static Map<String, String> properties = new TreeMap<String, String>() {{ put("password",secret);}}; 
+  private static Map<String,String> properties = new TreeMap<String,String>() {
+    {
+      put("password", secret);
+    }
+  };
   private static ByteBuffer creds = null;
-
+  
   private static Class<? extends TProtocolFactory> protocolClass;
-
+  
   static Class<? extends TProtocolFactory> getRandomProtocol() {
     List<Class<? extends TProtocolFactory>> protocolFactories = new ArrayList<Class<? extends TProtocolFactory>>();
+    protocolFactories.add(org.apache.thrift.protocol.TJSONProtocol.Factory.class);
+    // protocolFactories.add(org.apache.thrift.protocol.TBinaryProtocol.Factory.class); // This consistently fails for some reason
     protocolFactories.add(org.apache.thrift.protocol.TCompactProtocol.Factory.class);
     
     Random rand = new Random();
     return protocolFactories.get(rand.nextInt(protocolFactories.size()));
   }
-
+  
   @BeforeClass
   public static void setupMiniCluster() throws Exception {
-
+    folder.create();
+    accumulo = new MiniAccumuloCluster(folder.getRoot(), secret);
+    accumulo.start();
+    
     Properties props = new Properties();
-    props.put("org.apache.accumulo.proxy.ProxyServer.useMockInstance", "true");
-
+    props.put("org.apache.accumulo.proxy.ProxyServer.instancename", accumulo.getInstanceName());
+    props.put("org.apache.accumulo.proxy.ProxyServer.zookeepers", accumulo.getZooKeepers());
+    
     protocolClass = getRandomProtocol();
     System.out.println(protocolClass.getName());
-
+    
     proxyPort = 40000 + random.nextInt(20000);
     proxyServer = Proxy.createProxyServer(org.apache.accumulo.proxy.thrift.AccumuloProxy.class, org.apache.accumulo.proxy.ProxyServer.class, proxyPort,
         protocolClass, props);
@@ -86,12 +148,158 @@ public class SimpleTest {
     client = new TestProxyClient("localhost", proxyPort, protocolClass.newInstance()).proxy();
     creds = client.login(principal, properties);
   }
-
-  @Test
+  
+  @Test(timeout = 10000)
+  public void tableNotFound() throws Exception {
+    final String doesNotExist = "doesNotExists";
+    try {
+      client.addConstraint(creds, doesNotExist, NumericValueConstraint.class.getName());
+      fail("exception not thrown");
+    } catch (TableNotFoundException ex) {}
+    try {
+      client.addSplits(creds, doesNotExist, Collections.<ByteBuffer> emptySet());
+      fail("exception not thrown");
+    } catch (TableNotFoundException ex) {}
+    final IteratorSetting setting = new IteratorSetting(100, "slow", SlowIterator.class.getName(), Collections.singletonMap("sleepTime", "200"));
+    try {
+      client.attachIterator(creds, doesNotExist, setting, EnumSet.allOf(IteratorScope.class));
+      fail("exception not thrown");
+    } catch (TableNotFoundException ex) {}
+    try {
+      client.checkIteratorConflicts(creds, doesNotExist, setting, EnumSet.allOf(IteratorScope.class));
+      fail("exception not thrown");
+    } catch (TableNotFoundException ex) {}
+    try {
+      client.clearLocatorCache(creds, doesNotExist);
+      fail("exception not thrown");
+    } catch (TableNotFoundException ex) {}
+    try {
+      client.cloneTable(creds, doesNotExist, TABLE_TEST, false, null, null);
+      fail("exception not thrown");
+    } catch (TableNotFoundException ex) {}
+    try {
+      client.compactTable(creds, doesNotExist, null, null, null, true, false);
+      fail("exception not thrown");
+    } catch (TableNotFoundException ex) {}
+    try {
+      client.createBatchScanner(creds, doesNotExist, new BatchScanOptions());
+      fail("exception not thrown");
+    } catch (TableNotFoundException ex) {}
+    try {
+      client.createScanner(creds, doesNotExist, new ScanOptions());
+      fail("exception not thrown");
+    } catch (TableNotFoundException ex) {}
+    try {
+      client.createWriter(creds, doesNotExist, new WriterOptions());
+      fail("exception not thrown");
+    } catch (TableNotFoundException ex) {}
+    try {
+      client.deleteRows(creds, doesNotExist, null, null);
+      fail("exception not thrown");
+    } catch (TableNotFoundException ex) {}
+    try {
+      client.deleteTable(creds, doesNotExist);
+      fail("exception not thrown");
+    } catch (TableNotFoundException ex) {}
+    try {
+      client.flushTable(creds, doesNotExist, null, null, false);
+      fail("exception not thrown");
+    } catch (TableNotFoundException ex) {}
+    try {
+      client.getIteratorSetting(creds, doesNotExist, "foo", IteratorScope.SCAN);
+      fail("exception not thrown");
+    } catch (TableNotFoundException ex) {}
+    try {
+      client.getLocalityGroups(creds, doesNotExist);
+      fail("exception not thrown");
+    } catch (TableNotFoundException ex) {}
+    try {
+      client.getMaxRow(creds, doesNotExist, Collections.<ByteBuffer> emptySet(), null, false, null, false);
+      fail("exception not thrown");
+    } catch (TableNotFoundException ex) {}
+    try {
+      client.getTableProperties(creds, doesNotExist);
+      fail("exception not thrown");
+    } catch (TableNotFoundException ex) {}
+    try {
+      client.grantTablePermission(creds, "root", doesNotExist, TablePermission.WRITE);
+      fail("exception not thrown");
+    } catch (TableNotFoundException ex) {}
+    try {
+      client.hasTablePermission(creds, "root", doesNotExist, TablePermission.WRITE);
+      fail("exception not thrown");
+    } catch (TableNotFoundException ex) {}
+    try {
+      File newFolder = folder.newFolder();
+      client.importDirectory(creds, doesNotExist, "/tmp", newFolder.getAbsolutePath(), true);
+      fail("exception not thrown");
+    } catch (TableNotFoundException ex) {}
+    try {
+      client.listConstraints(creds, doesNotExist);
+      fail("exception not thrown");
+    } catch (TableNotFoundException ex) {}
+    try {
+      client.listSplits(creds, doesNotExist, 10000);
+      fail("exception not thrown");
+    } catch (TableNotFoundException ex) {}
+    try {
+      client.mergeTablets(creds, doesNotExist, null, null);
+      fail("exception not thrown");
+    } catch (TableNotFoundException ex) {}
+    try {
+      client.offlineTable(creds, doesNotExist);
+      fail("exception not thrown");
+    } catch (TableNotFoundException ex) {}
+    try {
+      client.onlineTable(creds, doesNotExist);
+      fail("exception not thrown");
+    } catch (TableNotFoundException ex) {}
+    try {
+      client.removeConstraint(creds, doesNotExist, 0);
+      fail("exception not thrown");
+    } catch (TableNotFoundException ex) {}
+    try {
+      client.removeIterator(creds, doesNotExist, "name", EnumSet.allOf(IteratorScope.class));
+      fail("exception not thrown");
+    } catch (TableNotFoundException ex) {}
+    try {
+      client.removeTableProperty(creds, doesNotExist, Property.TABLE_FILE_MAX.getKey());
+      fail("exception not thrown");
+    } catch (TableNotFoundException ex) {}
+    try {
+      client.renameTable(creds, doesNotExist, "someTableName");
+      fail("exception not thrown");
+    } catch (TableNotFoundException ex) {}
+    try {
+      client.revokeTablePermission(creds, "root", doesNotExist, TablePermission.ALTER_TABLE);
+      fail("exception not thrown");
+    } catch (TableNotFoundException ex) {}
+    try {
+      client.setTableProperty(creds, doesNotExist, Property.TABLE_FILE_MAX.getKey(), "0");
+      fail("exception not thrown");
+    } catch (TableNotFoundException ex) {}
+    try {
+      client.splitRangeByTablets(creds, doesNotExist, client.getRowRange(ByteBuffer.wrap("row".getBytes())), 10);
+      fail("exception not thrown");
+    } catch (TableNotFoundException ex) {}
+    try {
+      client.updateAndFlush(creds, doesNotExist, new HashMap<ByteBuffer,List<ColumnUpdate>>());
+      fail("exception not thrown");
+    } catch (TableNotFoundException ex) {}
+  }
+  
+  @Test(timeout = 10000)
   public void testInstanceOperations() throws Exception {
+    int tservers = 0;
+    for (String tserver : client.getTabletServers(creds)) {
+      tservers++;
+    }
+    assertTrue(tservers > 0);
+    
     // get something we know is in the site config
     Map<String,String> cfg = client.getSiteConfiguration(creds);
-
+    assertTrue(cfg.get("instance.dfs.dir").startsWith(folder.getRoot().toString()));
+    
     // set a property in zookeeper
     client.setProperty(creds, "table.split.threshold", "500M");
     
@@ -99,25 +307,25 @@ public class SimpleTest {
     for (int i = 0; i < 5; i++) {
       cfg = client.getSystemConfiguration(creds);
       if ("500M".equals(cfg.get("table.split.threshold")))
-          break;
-      Thread.sleep(200);
+        break;
+      UtilWaitThread.sleep(200);
     }
     assertEquals("500M", cfg.get("table.split.threshold"));
-
+    
     // unset the setting, check that it's not what it was
     client.removeProperty(creds, "table.split.threshold");
     for (int i = 0; i < 5; i++) {
       cfg = client.getSystemConfiguration(creds);
       if (!"500M".equals(cfg.get("table.split.threshold")))
-          break;
-      Thread.sleep(200);
+        break;
+      UtilWaitThread.sleep(200);
     }
-    assertTrue("500M" != cfg.get("table.split.threshold"));
-
+    assertNotEquals("500M", cfg.get("table.split.threshold"));
+    
     // try to load some classes via the proxy
     assertTrue(client.testClassLoad(creds, DevNull.class.getName(), SortedKeyValueIterator.class.getName()));
     assertFalse(client.testClassLoad(creds, "foo.bar", SortedKeyValueIterator.class.getName()));
-
+    
     // create a table that's very slow, so we can look for scans/compactions
     client.createTable(creds, "slow", true, TimeType.MILLIS);
     IteratorSetting setting = new IteratorSetting(100, "slow", SlowIterator.class.getName(), Collections.singletonMap("sleepTime", "200"));
@@ -143,20 +351,55 @@ public class SimpleTest {
       }
     };
     t.start();
+    // look for the scan
+    List<ActiveScan> scans = Collections.emptyList();
+    loop: for (int i = 0; i < 100; i++) {
+      for (String tserver : client.getTabletServers(creds)) {
+        scans = client.getActiveScans(creds, tserver);
+        if (!scans.isEmpty())
+          break loop;
+        UtilWaitThread.sleep(10);
+      }
+    }
+    t.join();
+    assertFalse(scans.isEmpty());
+    ActiveScan scan = scans.get(0);
+    assertEquals("root", scan.getUser());
+    assertTrue(ScanState.RUNNING.equals(scan.getState()) || ScanState.QUEUED.equals(scan.getState()));
+    assertEquals(ScanType.SINGLE, scan.getType());
+    assertEquals("slow", scan.getTable());
+    Map<String,String> map = client.tableIdMap(creds);
+    assertEquals(map.get("slow"), scan.getExtent().tableId);
+    assertTrue(scan.getExtent().endRow == null);
+    assertTrue(scan.getExtent().prevEndRow == null);
+    
+    // start a compaction
+    t = new Thread() {
+      @Override
+      public void run() {
+        try {
+          Client client2 = new TestProxyClient("localhost", proxyPort, protocolClass.newInstance()).proxy();
+          client2.compactTable(creds, "slow", null, null, null, true, true);
+        } catch (Exception e) {
+          throw new RuntimeException(e);
+        }
+      }
+    };
+    t.start();
   }
   
   @Test
   public void testSecurityOperations() throws Exception {
     // check password
     assertTrue(client.authenticateUser(creds, "root", s2pp(secret)));
-    assertFalse(client.authenticateUser(creds, "root", s2pp("fail")));
-
+    assertFalse(client.authenticateUser(creds, "root", s2pp("")));
+    
     // create a user
     client.createLocalUser(creds, "stooge", s2bb("password"));
     // change auths
     Set<String> users = client.listLocalUsers(creds);
     assertEquals(new HashSet<String>(Arrays.asList("root", "stooge")), users);
-    HashSet<ByteBuffer> auths = new HashSet<ByteBuffer>(Arrays.asList(s2bb("A"),s2bb("B")));
+    HashSet<ByteBuffer> auths = new HashSet<ByteBuffer>(Arrays.asList(s2bb("A"), s2bb("B")));
     client.changeUserAuthorizations(creds, "stooge", auths);
     List<ByteBuffer> update = client.getUserAuthorizations(creds, "stooge");
     assertEquals(auths, new HashSet<ByteBuffer>(update));
@@ -167,8 +410,18 @@ public class SimpleTest {
     
     // check permission failure
     @SuppressWarnings("serial")
-    ByteBuffer stooge = client.login("stooge", new TreeMap<String,String>() {{put("password",""); }});
+    ByteBuffer stooge = client.login("stooge", new TreeMap<String,String>() {
+      {
+        put("password", "");
+      }
+    });
     
+    try {
+      client.createTable(stooge, "fail", true, TimeType.MILLIS);
+      fail("should not create the table");
+    } catch (AccumuloSecurityException ex) {
+      assertFalse(client.listTables(creds).contains("fail"));
+    }
     // grant permissions and test
     assertFalse(client.hasSystemPermission(creds, "stooge", SystemPermission.CREATE_TABLE));
     client.grantSystemPermission(creds, "stooge", SystemPermission.CREATE_TABLE);
@@ -179,10 +432,20 @@ public class SimpleTest {
     // revoke permissions
     client.revokeSystemPermission(creds, "stooge", SystemPermission.CREATE_TABLE);
     assertFalse(client.hasSystemPermission(creds, "stooge", SystemPermission.CREATE_TABLE));
-
+    try {
+      client.createTable(stooge, "fail", true, TimeType.MILLIS);
+      fail("should not create the table");
+    } catch (AccumuloSecurityException ex) {
+      assertFalse(client.listTables(creds).contains("fail"));
+    }
     // create a table to test table permissions
     client.createTable(creds, TABLE_TEST, true, TimeType.MILLIS);
-
+    // denied!
+    try {
+      String scanner = client.createScanner(stooge, TABLE_TEST, null);
+      client.nextK(scanner, 100);
+      fail("stooge should not read table test");
+    } catch (AccumuloSecurityException ex) {}
     // grant
     assertFalse(client.hasTablePermission(creds, "stooge", TABLE_TEST, TablePermission.READ));
     client.grantTablePermission(creds, "stooge", TABLE_TEST, TablePermission.READ);
@@ -190,41 +453,68 @@ public class SimpleTest {
     String scanner = client.createScanner(stooge, TABLE_TEST, null);
     client.nextK(scanner, 10);
     client.closeScanner(scanner);
-
+    // revoke
+    client.revokeTablePermission(creds, "stooge", TABLE_TEST, TablePermission.READ);
+    assertFalse(client.hasTablePermission(creds, "stooge", TABLE_TEST, TablePermission.READ));
+    try {
+      scanner = client.createScanner(stooge, TABLE_TEST, null);
+      client.nextK(scanner, 100);
+      fail("stooge should not read table test");
+    } catch (AccumuloSecurityException ex) {}
+    
     // delete user
     client.dropLocalUser(creds, "stooge");
     users = client.listLocalUsers(creds);
     assertEquals(1, users.size());
     
   }
-
+  
   @Test
   public void testBatchWriter() throws Exception {
-      if (client.tableExists(creds, TABLE_TEST))
-          client.deleteTable(creds, TABLE_TEST);
-
-      client.createTable(creds, TABLE_TEST, true, TimeType.MILLIS);
-
-      client.removeConstraint(creds, TABLE_TEST, 1);
-
-      WriterOptions writerOptions = new WriterOptions();
-      writerOptions.setLatencyMs(10000);
-      writerOptions.setMaxMemory(3000);
-      writerOptions.setThreads(1);
-      writerOptions.setTimeoutMs(100000);
-
-      String batchWriter = client.createWriter(creds, TABLE_TEST, writerOptions);
-
-      client.update(batchWriter, mutation("row1", "cf", "cq", "x"));
+    if (client.tableExists(creds, TABLE_TEST))
+      client.deleteTable(creds, TABLE_TEST);
+    
+    client.createTable(creds, TABLE_TEST, true, TimeType.MILLIS);
+    client.addConstraint(creds, TABLE_TEST, NumericValueConstraint.class.getName());
+    
+    WriterOptions writerOptions = new WriterOptions();
+    writerOptions.setLatencyMs(10000);
+    writerOptions.setMaxMemory(2);
+    writerOptions.setThreads(1);
+    writerOptions.setTimeoutMs(100000);
+    
+    String batchWriter = client.createWriter(creds, TABLE_TEST, writerOptions);
+    client.update(batchWriter, mutation("row1", "cf", "cq", "x"));
+    client.update(batchWriter, mutation("row1", "cf", "cq", "x"));
+    try {
       client.flush(batchWriter);
+      fail("constraint did not fire");
+    } catch (MutationsRejectedException ex) {}
+    try {
       client.closeWriter(batchWriter);
-
-      String scanner = client.createScanner(creds, TABLE_TEST, null);
-      ScanResult more = client.nextK(scanner, 2);
-      assertEquals(1, more.getResults().size());
-      client.closeScanner(scanner);
-
-      client.deleteTable(creds, TABLE_TEST);
+      fail("constraint did not fire");
+    } catch (MutationsRejectedException e) {}
+    
+    client.removeConstraint(creds, TABLE_TEST, 1);
+    
+    writerOptions = new WriterOptions();
+    writerOptions.setLatencyMs(10000);
+    writerOptions.setMaxMemory(3000);
+    writerOptions.setThreads(1);
+    writerOptions.setTimeoutMs(100000);
+    
+    batchWriter = client.createWriter(creds, TABLE_TEST, writerOptions);
+    
+    client.update(batchWriter, mutation("row1", "cf", "cq", "x"));
+    client.flush(batchWriter);
+    client.closeWriter(batchWriter);
+    
+    String scanner = client.createScanner(creds, TABLE_TEST, null);
+    ScanResult more = client.nextK(scanner, 2);
+    assertEquals(1, more.getResults().size());
+    client.closeScanner(scanner);
+    
+    client.deleteTable(creds, TABLE_TEST);
   }
   
   @Test
@@ -232,7 +522,16 @@ public class SimpleTest {
     if (client.tableExists(creds, TABLE_TEST))
       client.deleteTable(creds, TABLE_TEST);
     client.createTable(creds, TABLE_TEST, true, TimeType.MILLIS);
-
+    // constraints
+    client.addConstraint(creds, TABLE_TEST, NumericValueConstraint.class.getName());
+    client.updateAndFlush(creds, TABLE_TEST, mutation("row1", "cf", "cq", "123"));
+    
+    try {
+      client.updateAndFlush(creds, TABLE_TEST, mutation("row1", "cf", "cq", "x"));
+      fail("constraint did not fire");
+    } catch (MutationsRejectedException ex) {}
+    
+    client.removeConstraint(creds, TABLE_TEST, 1);
     client.updateAndFlush(creds, TABLE_TEST, mutation("row1", "cf", "cq", "x"));
     String scanner = client.createScanner(creds, TABLE_TEST, null);
     ScanResult more = client.nextK(scanner, 2);
@@ -240,10 +539,21 @@ public class SimpleTest {
     assertFalse(more.isMore());
     assertEquals(1, more.getResults().size());
     assertEquals(s2bb("x"), more.getResults().get(0).value);
+    // splits, merge
+    client.addSplits(creds, TABLE_TEST, new HashSet<ByteBuffer>(Arrays.asList(s2bb("a"), s2bb("m"), s2bb("z"))));
+    List<ByteBuffer> splits = client.listSplits(creds, TABLE_TEST, 1);
+    assertEquals(Arrays.asList(s2bb("m")), splits);
+    client.mergeTablets(creds, TABLE_TEST, null, s2bb("m"));
+    splits = client.listSplits(creds, TABLE_TEST, 10);
+    assertEquals(Arrays.asList(s2bb("m"), s2bb("z")), splits);
+    client.mergeTablets(creds, TABLE_TEST, null, null);
+    splits = client.listSplits(creds, TABLE_TEST, 10);
+    List<ByteBuffer> empty = Collections.emptyList();
+    assertEquals(empty, splits);
     // iterators
     client.deleteTable(creds, TABLE_TEST);
     client.createTable(creds, TABLE_TEST, true, TimeType.MILLIS);
-    HashMap<String, String> options = new HashMap<String, String>();
+    HashMap<String,String> options = new HashMap<String,String>();
     options.put("type", "STRING");
     options.put("columns", "cf");
     IteratorSetting setting = new IteratorSetting(10, TABLE_TEST, SummingCombiner.class.getName(), options);
@@ -258,17 +568,78 @@ public class SimpleTest {
     try {
       client.checkIteratorConflicts(creds, TABLE_TEST, setting, EnumSet.allOf(IteratorScope.class));
       fail("checkIteratorConflicts did not throw and exception");
-    } catch (Exception ex) {
-    }
+    } catch (AccumuloException ex) {}
+    client.deleteRows(creds, TABLE_TEST, null, null);
     client.removeIterator(creds, TABLE_TEST, "test", EnumSet.allOf(IteratorScope.class));
     for (int i = 0; i < 10; i++) {
-      client.updateAndFlush(creds, TABLE_TEST, mutation("row"+i, "cf", "cq", ""+i));
+      client.updateAndFlush(creds, TABLE_TEST, mutation("row" + i, "cf", "cq", "" + i));
+      client.flushTable(creds, TABLE_TEST, null, null, true);
     }
     scanner = client.createScanner(creds, TABLE_TEST, null);
     more = client.nextK(scanner, 100);
     client.closeScanner(scanner);
     assertEquals(10, more.getResults().size());
-
+    // clone
+    client.cloneTable(creds, TABLE_TEST, "test2", true, null, null);
+    scanner = client.createScanner(creds, "test2", null);
+    more = client.nextK(scanner, 100);
+    client.closeScanner(scanner);
+    assertEquals(10, more.getResults().size());
+    client.deleteTable(creds, "test2");
+    
+    // don't know how to test this, call it just for fun
+    client.clearLocatorCache(creds, TABLE_TEST);
+    
+    // compact
+    client.compactTable(creds, TABLE_TEST, null, null, null, true, true);
+    assertEquals(1, countFiles(TABLE_TEST));
+    
+    String dir = folder.getRoot() + "/test";
+    FileSystem fs = FileSystem.get(new Configuration());
+    client.deleteTable(creds, TABLE_TEST);
+    
+    // Locality groups
+    client.createTable(creds, "test", true, TimeType.MILLIS);
+    Map<String,Set<String>> groups = new HashMap<String,Set<String>>();
+    groups.put("group1", Collections.singleton("cf1"));
+    groups.put("group2", Collections.singleton("cf2"));
+    client.setLocalityGroups(creds, "test", groups);
+    assertEquals(groups, client.getLocalityGroups(creds, "test"));
+    // table properties
+    Map<String,String> orig = client.getTableProperties(creds, "test");
+    client.setTableProperty(creds, "test", "table.split.threshold", "500M");
+    Map<String,String> update = client.getTableProperties(creds, "test");
+    for (int i = 0; i < 5; i++) {
+      if (update.get("table.split.threshold").equals("500M"))
+        break;
+      UtilWaitThread.sleep(200);
+    }
+    assertEquals(update.get("table.split.threshold"), "500M");
+    client.removeTableProperty(creds, "test", "table.split.threshold");
+    update = client.getTableProperties(creds, "test");
+    assertEquals(orig, update);
+    // rename table
+    Map<String,String> tables = client.tableIdMap(creds);
+    client.renameTable(creds, "test", "bar");
+    Map<String,String> tables2 = client.tableIdMap(creds);
+    assertEquals(tables.get("test"), tables2.get("bar"));
+    // table exists
+    assertTrue(client.tableExists(creds, "bar"));
+    assertFalse(client.tableExists(creds, "test"));
+    // bulk import
+    String filename = dir + "/bulk/import/rfile.rf";
+    FileSKVWriter writer = FileOperations.getInstance().openWriter(filename, fs, fs.getConf(), DefaultConfiguration.getInstance());
+    writer.startDefaultLocalityGroup();
+    writer.append(new org.apache.accumulo.core.data.Key(new Text("a"), new Text("b"), new Text("c")), new Value("value".getBytes()));
+    writer.close();
+    fs.mkdirs(new Path(dir + "/bulk/fail"));
+    client.importDirectory(creds, "bar", dir + "/bulk/import", dir + "/bulk/fail", true);
+    scanner = client.createScanner(creds, "bar", null);
+    more = client.nextK(scanner, 100);
+    client.closeScanner(scanner);
+    assertEquals(1, more.results.size());
+    ByteBuffer maxRow = client.getMaxRow(creds, "bar", null, null, false, null, false);
+    assertEquals(s2bb("a"), maxRow);
   }
   
   // scan !METADATA table for file entries for the given table
@@ -293,20 +664,26 @@ public class SimpleTest {
     }
     return result;
   }
-
+  
   private Map<ByteBuffer,List<ColumnUpdate>> mutation(String row, String cf, String cq, String value) {
     ColumnUpdate upd = new ColumnUpdate(s2bb(cf), s2bb(cq));
     upd.setValue(value.getBytes());
     return Collections.singletonMap(s2bb(row), Collections.singletonList(upd));
   }
-
+  
   private ByteBuffer s2bb(String cf) {
     return ByteBuffer.wrap(cf.getBytes());
   }
-
-  private Map<String, String> s2pp(String cf) {
-    Map<String, String> toRet = new TreeMap<String, String>();
+  
+  private Map<String,String> s2pp(String cf) {
+    Map<String,String> toRet = new TreeMap<String,String>();
     toRet.put("password", cf);
     return toRet;
   }
+  
+  @AfterClass
+  public static void tearDownMiniCluster() throws Exception {
+    accumulo.stop();
+    folder.delete();
+  }
 }



Mime
View raw message