accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vi...@apache.org
Subject svn commit: r1361382 [3/16] - in /accumulo/branches/ACCUMULO-259: ./ bin/ conf/examples/1GB/native-standalone/ conf/examples/1GB/standalone/ conf/examples/2GB/native-standalone/ conf/examples/2GB/standalone/ conf/examples/3GB/native-standalone/ conf/ex...
Date Fri, 13 Jul 2012 20:34:49 GMT
Modified: accumulo/branches/ACCUMULO-259/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ConfigurationType.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ConfigurationType.java?rev=1361382&r1=1361381&r2=1361382&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ConfigurationType.java (original)
+++ accumulo/branches/ACCUMULO-259/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ConfigurationType.java Fri Jul 13 20:34:44 2012
@@ -1,7 +1,8 @@
 /**
- * Autogenerated by Thrift
+ * Autogenerated by Thrift Compiler (0.8.0)
  *
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
  */
 package org.apache.accumulo.core.client.impl.thrift;
 

Modified: accumulo/branches/ACCUMULO-259/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/TableOperation.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/TableOperation.java?rev=1361382&r1=1361381&r2=1361382&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/TableOperation.java (original)
+++ accumulo/branches/ACCUMULO-259/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/TableOperation.java Fri Jul 13 20:34:44 2012
@@ -1,7 +1,8 @@
 /**
- * Autogenerated by Thrift
+ * Autogenerated by Thrift Compiler (0.8.0)
  *
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
  */
 package org.apache.accumulo.core.client.impl.thrift;
 

Modified: accumulo/branches/ACCUMULO-259/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/TableOperationExceptionType.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/TableOperationExceptionType.java?rev=1361382&r1=1361381&r2=1361382&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/TableOperationExceptionType.java (original)
+++ accumulo/branches/ACCUMULO-259/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/TableOperationExceptionType.java Fri Jul 13 20:34:44 2012
@@ -1,7 +1,8 @@
 /**
- * Autogenerated by Thrift
+ * Autogenerated by Thrift Compiler (0.8.0)
  *
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
  */
 package org.apache.accumulo.core.client.impl.thrift;
 

Modified: accumulo/branches/ACCUMULO-259/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ThriftTableOperationException.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ThriftTableOperationException.java?rev=1361382&r1=1361381&r2=1361382&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ThriftTableOperationException.java (original)
+++ accumulo/branches/ACCUMULO-259/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ThriftTableOperationException.java Fri Jul 13 20:34:44 2012
@@ -1,10 +1,17 @@
 /**
- * Autogenerated by Thrift
+ * Autogenerated by Thrift Compiler (0.8.0)
  *
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
  */
 package org.apache.accumulo.core.client.impl.thrift;
 
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
 import java.util.List;
 import java.util.ArrayList;
 import java.util.Map;
@@ -29,19 +36,25 @@ import org.slf4j.LoggerFactory;
   private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)4);
   private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)5);
 
-  public String tableId;
-  public String tableName;
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new ThriftTableOperationExceptionStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new ThriftTableOperationExceptionTupleSchemeFactory());
+  }
+
+  public String tableId; // required
+  public String tableName; // required
   /**
    * 
    * @see TableOperation
    */
-  public TableOperation op;
+  public TableOperation op; // required
   /**
    * 
    * @see TableOperationExceptionType
    */
-  public TableOperationExceptionType type;
-  public String description;
+  public TableOperationExceptionType type; // required
+  public String description; // required
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -122,7 +135,6 @@ import org.slf4j.LoggerFactory;
   }
 
   // isset id assignments
-
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -547,92 +559,11 @@ import org.slf4j.LoggerFactory;
   }
 
   public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-    org.apache.thrift.protocol.TField field;
-    iprot.readStructBegin();
-    while (true)
-    {
-      field = iprot.readFieldBegin();
-      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-        break;
-      }
-      switch (field.id) {
-        case 1: // TABLE_ID
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.tableId = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 2: // TABLE_NAME
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.tableName = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 3: // OP
-          if (field.type == org.apache.thrift.protocol.TType.I32) {
-            this.op = TableOperation.findByValue(iprot.readI32());
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 4: // TYPE
-          if (field.type == org.apache.thrift.protocol.TType.I32) {
-            this.type = TableOperationExceptionType.findByValue(iprot.readI32());
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 5: // DESCRIPTION
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.description = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        default:
-          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-      }
-      iprot.readFieldEnd();
-    }
-    iprot.readStructEnd();
-
-    // check for required fields of primitive type, which can't be checked in the validate method
-    validate();
+    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
   }
 
   public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-    validate();
-
-    oprot.writeStructBegin(STRUCT_DESC);
-    if (this.tableId != null) {
-      oprot.writeFieldBegin(TABLE_ID_FIELD_DESC);
-      oprot.writeString(this.tableId);
-      oprot.writeFieldEnd();
-    }
-    if (this.tableName != null) {
-      oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
-      oprot.writeString(this.tableName);
-      oprot.writeFieldEnd();
-    }
-    if (this.op != null) {
-      oprot.writeFieldBegin(OP_FIELD_DESC);
-      oprot.writeI32(this.op.getValue());
-      oprot.writeFieldEnd();
-    }
-    if (this.type != null) {
-      oprot.writeFieldBegin(TYPE_FIELD_DESC);
-      oprot.writeI32(this.type.getValue());
-      oprot.writeFieldEnd();
-    }
-    if (this.description != null) {
-      oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
-      oprot.writeString(this.description);
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -703,5 +634,181 @@ import org.slf4j.LoggerFactory;
     }
   }
 
+  private static class ThriftTableOperationExceptionStandardSchemeFactory implements SchemeFactory {
+    public ThriftTableOperationExceptionStandardScheme getScheme() {
+      return new ThriftTableOperationExceptionStandardScheme();
+    }
+  }
+
+  private static class ThriftTableOperationExceptionStandardScheme extends StandardScheme<ThriftTableOperationException> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, ThriftTableOperationException struct) throws org.apache.thrift.TException {
+      org.apache.thrift.protocol.TField schemeField;
+      iprot.readStructBegin();
+      while (true)
+      {
+        schemeField = iprot.readFieldBegin();
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+          break;
+        }
+        switch (schemeField.id) {
+          case 1: // TABLE_ID
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.tableId = iprot.readString();
+              struct.setTableIdIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // TABLE_NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.tableName = iprot.readString();
+              struct.setTableNameIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // OP
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.op = TableOperation.findByValue(iprot.readI32());
+              struct.setOpIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 4: // TYPE
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.type = TableOperationExceptionType.findByValue(iprot.readI32());
+              struct.setTypeIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 5: // DESCRIPTION
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.description = iprot.readString();
+              struct.setDescriptionIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          default:
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+
+      // check for required fields of primitive type, which can't be checked in the validate method
+      struct.validate();
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot, ThriftTableOperationException struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.tableId != null) {
+        oprot.writeFieldBegin(TABLE_ID_FIELD_DESC);
+        oprot.writeString(struct.tableId);
+        oprot.writeFieldEnd();
+      }
+      if (struct.tableName != null) {
+        oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
+        oprot.writeString(struct.tableName);
+        oprot.writeFieldEnd();
+      }
+      if (struct.op != null) {
+        oprot.writeFieldBegin(OP_FIELD_DESC);
+        oprot.writeI32(struct.op.getValue());
+        oprot.writeFieldEnd();
+      }
+      if (struct.type != null) {
+        oprot.writeFieldBegin(TYPE_FIELD_DESC);
+        oprot.writeI32(struct.type.getValue());
+        oprot.writeFieldEnd();
+      }
+      if (struct.description != null) {
+        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
+        oprot.writeString(struct.description);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class ThriftTableOperationExceptionTupleSchemeFactory implements SchemeFactory {
+    public ThriftTableOperationExceptionTupleScheme getScheme() {
+      return new ThriftTableOperationExceptionTupleScheme();
+    }
+  }
+
+  private static class ThriftTableOperationExceptionTupleScheme extends TupleScheme<ThriftTableOperationException> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, ThriftTableOperationException struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetTableId()) {
+        optionals.set(0);
+      }
+      if (struct.isSetTableName()) {
+        optionals.set(1);
+      }
+      if (struct.isSetOp()) {
+        optionals.set(2);
+      }
+      if (struct.isSetType()) {
+        optionals.set(3);
+      }
+      if (struct.isSetDescription()) {
+        optionals.set(4);
+      }
+      oprot.writeBitSet(optionals, 5);
+      if (struct.isSetTableId()) {
+        oprot.writeString(struct.tableId);
+      }
+      if (struct.isSetTableName()) {
+        oprot.writeString(struct.tableName);
+      }
+      if (struct.isSetOp()) {
+        oprot.writeI32(struct.op.getValue());
+      }
+      if (struct.isSetType()) {
+        oprot.writeI32(struct.type.getValue());
+      }
+      if (struct.isSetDescription()) {
+        oprot.writeString(struct.description);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, ThriftTableOperationException struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(5);
+      if (incoming.get(0)) {
+        struct.tableId = iprot.readString();
+        struct.setTableIdIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.tableName = iprot.readString();
+        struct.setTableNameIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.op = TableOperation.findByValue(iprot.readI32());
+        struct.setOpIsSet(true);
+      }
+      if (incoming.get(3)) {
+        struct.type = TableOperationExceptionType.findByValue(iprot.readI32());
+        struct.setTypeIsSet(true);
+      }
+      if (incoming.get(4)) {
+        struct.description = iprot.readString();
+        struct.setDescriptionIsSet(true);
+      }
+    }
+  }
+
 }
 

Modified: accumulo/branches/ACCUMULO-259/core/src/main/java/org/apache/accumulo/core/conf/DefaultConfiguration.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/core/src/main/java/org/apache/accumulo/core/conf/DefaultConfiguration.java?rev=1361382&r1=1361381&r2=1361382&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/core/src/main/java/org/apache/accumulo/core/conf/DefaultConfiguration.java (original)
+++ accumulo/branches/ACCUMULO-259/core/src/main/java/org/apache/accumulo/core/conf/DefaultConfiguration.java Fri Jul 13 20:34:44 2012
@@ -24,8 +24,11 @@ import java.util.Iterator;
 import java.util.Map.Entry;
 import java.util.TreeMap;
 
+import org.apache.log4j.Logger;
+
 public class DefaultConfiguration extends AccumuloConfiguration {
   private static DefaultConfiguration instance = null;
+  private static Logger log = Logger.getLogger(DefaultConfiguration.class);
   
   public static DefaultConfiguration getInstance() {
     if (instance == null) {
@@ -62,6 +65,12 @@ public class DefaultConfiguration extend
       } catch (IOException e) {
         e.printStackTrace();
         return;
+      } finally {
+    	  try { 
+    		  data.close();
+    	  } catch (IOException ex) {
+    		  log .error(ex, ex);
+    	  }
       }
     }
     doc.println();

Modified: accumulo/branches/ACCUMULO-259/core/src/main/java/org/apache/accumulo/core/conf/Property.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/core/src/main/java/org/apache/accumulo/core/conf/Property.java?rev=1361382&r1=1361381&r2=1361382&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/core/src/main/java/org/apache/accumulo/core/conf/Property.java (original)
+++ accumulo/branches/ACCUMULO-259/core/src/main/java/org/apache/accumulo/core/conf/Property.java Fri Jul 13 20:34:44 2012
@@ -38,10 +38,12 @@ public enum Property {
       "A secret unique to a given instance that all servers must know in order to communicate with one another."
           + " Change it before initialization. To change it later use ./bin/accumulo accumulo.server.util.ChangeSecret [oldpasswd] [newpasswd], "
           + " and then update conf/accumulo-site.xml everywhere."),
-  INSTANCE_SECURITY_AUTHENTICATOR("instance.security.authenticator", "org.apache.accumulo.server.security.ZKAuthenticator", PropertyType.CLASSNAME,
+  INSTANCE_SECURITY_AUTHENTICATOR("instance.security.authenticator", "org.apache.accumulo.server.security.handler.ZKAuthenticator", PropertyType.CLASSNAME,
       "The authenticator class that accumulo will use to determine if a user has privilege to perform an action"),
-  INSTANCE_SECURITY_AUTHORIZOR("instance.security.authorizor", "org.apache.accumulo.server.security.ZKAuthorizor", PropertyType.CLASSNAME,
-      "The authorizor class that accumulo will use to determine if a user has privilege to perform an action"),
+  INSTANCE_SECURITY_AUTHORIZOR("instance.security.authorizor", "org.apache.accumulo.server.security.handler.ZKAuthorizor", PropertyType.CLASSNAME,
+      "The authorizor class that accumulo will use to determine what labels a user has privilege to see"),
+  INSTANCE_SECURITY_PERMISSION_HANDLER("instance.security.permissionHandler", "org.apache.accumulo.server.security.handler.ZKPermHandler",
+      PropertyType.CLASSNAME, "The permission handler class that accumulo will use to determine if a user has privilege to perform an action"),
   
   // general properties
   GENERAL_PREFIX("general.", null, PropertyType.PREFIX,
@@ -123,12 +125,12 @@ public enum Property {
       "tserver.monitor.fs",
       "true",
       PropertyType.BOOLEAN,
-      "When enabled the tserver will monitor file systems and kill itself when one switches from rw to ro.  This is usually and indication that Linux has detected a bad disk."),
-  TSERV_MEMDUMP_DIR(
-      "tserver.dir.memdump",
-      "/tmp",
-      PropertyType.PATH,
-      "A long running scan could possibly hold memory that has been minor compacted.  To prevent this, the in memory map is dumped to a local file and the scan is switched to that local file.  We can not switch to the minor compacted file because it may have been modified by iterators.  The file dumped to the local dir is an exact copy of what was in memory."),
+      "When enabled the tserver will monitor file systems and kill itself when one switches from rw to ro.  This is usually and indication that Linux has"
+          + " detected a bad disk."),
+  TSERV_MEMDUMP_DIR("tserver.dir.memdump", "/tmp", PropertyType.PATH,
+      "A long running scan could possibly hold memory that has been minor compacted.  To prevent this, the in memory map is dumped to a local file and the "
+          + "scan is switched to that local file.  We can not switch to the minor compacted file because it may have been modified by iterators.  The file "
+          + "dumped to the local dir is an exact copy of what was in memory."),
   TSERV_LOCK_MEMORY("tserver.memory.lock", "false", PropertyType.BOOLEAN,
       "The tablet server must communicate with zookeeper frequently to maintain its locks.  If the tablet server's memory is swapped out"
           + " the java garbage collector can stop all processing for long periods.  Change this property to true and the tablet server will "
@@ -155,7 +157,9 @@ public enum Property {
   TSERV_RECOVERY_MAX_CONCURRENT("tserver.recovery.concurrent.max", "2", PropertyType.COUNT, "The maximum number of threads to use to sort logs during recovery"),
   TSERV_SORT_BUFFER_SIZE("tserver.sort.buffer.size", "200M", PropertyType.MEMORY, "The amount of memory to use when sorting logs during recovery."),
   TSERV_ARCHIVE_WALOGS("tserver.archive.walogs", "false", PropertyType.BOOLEAN, "Keep copies of the WALOGs for debugging purposes"),
-  
+  TSERV_WORKQ_THREADS("tserver.workq.threads", "2", PropertyType.COUNT,
+      "The number of threads for the distributed workq.  These threads are used for copying failed bulk files."),
+
   // properties that are specific to logger server behavior
   LOGGER_PREFIX("logger.", null, PropertyType.PREFIX, "Properties in this category affect the behavior of the write-ahead logger servers"),
   LOGGER_DIR("logger.dir.walog", "walogs", PropertyType.PATH,
@@ -196,11 +200,9 @@ public enum Property {
       + "in zookeeper. Restarting accumulo tablet servers after setting these properties in the site file "
       + "will cause the global setting to take effect. However, you must use the API or the shell to change "
       + "properties in zookeeper that are set on a table."),
-  TABLE_MAJC_RATIO(
-      "table.compaction.major.ratio",
-      "3",
-      PropertyType.FRACTION,
-      "minimum ratio of total input size to maximum input file size for running a major compaction.   When adjusting this property you may want to also adjust table.file.max.  Want to avoid the situation where only merging minor compactions occur."),
+  TABLE_MAJC_RATIO("table.compaction.major.ratio", "3", PropertyType.FRACTION,
+      "minimum ratio of total input size to maximum input file size for running a major compaction.   When adjusting this property you may want to also "
+          + "adjust table.file.max.  Want to avoid the situation where only merging minor compactions occur."),
   TABLE_MAJC_COMPACTALL_IDLETIME("table.compaction.major.everything.idle", "1h", PropertyType.TIMEDURATION,
       "After a tablet has been idle (no mutations) for this time period it may have all "
           + "of its map file compacted into one.  There is no guarantee an idle tablet will be compacted. "
@@ -220,12 +222,12 @@ public enum Property {
       "This property can be set to allow the LoadBalanceByTable load balancer to change the called Load Balancer for this table"),
   TABLE_FILE_COMPRESSION_TYPE("table.file.compress.type", "gz", PropertyType.STRING, "One of gz,lzo,none"),
   TABLE_FILE_COMPRESSED_BLOCK_SIZE("table.file.compress.blocksize", "100K", PropertyType.MEMORY,
-      "Overrides the hadoop io.seqfile.compress.blocksize setting so that map files have better query performance. " + "The maximum value for this is "
+      "Overrides the hadoop io.seqfile.compress.blocksize setting so that map files have better query performance. The maximum value for this is "
           + Integer.MAX_VALUE),
   TABLE_FILE_COMPRESSED_BLOCK_SIZE_INDEX("table.file.compress.blocksize.index", "128K", PropertyType.MEMORY,
       "Determines how large index blocks can be in files that support multilevel indexes. The maximum value for this is " + Integer.MAX_VALUE),
   TABLE_FILE_BLOCK_SIZE("table.file.blocksize", "0B", PropertyType.MEMORY,
-      "Overrides the hadoop dfs.block.size setting so that map files have better query performance. " + "The maximum value for this is " + Integer.MAX_VALUE),
+      "Overrides the hadoop dfs.block.size setting so that map files have better query performance. The maximum value for this is " + Integer.MAX_VALUE),
   TABLE_FILE_REPLICATION("table.file.replication", "0", PropertyType.COUNT, "Determines how many replicas to keep of a tables map files in HDFS. "
       + "When this value is LTE 0, HDFS defaults are used."),
   TABLE_FILE_MAX(
@@ -246,29 +248,25 @@ public enum Property {
       PropertyType.CLASSNAME,
       "A function that can transform the key prior to insertion and check of bloom filter.  org.apache.accumulo.core.file.keyfunctor.RowFunctor,"
           + ",org.apache.accumulo.core.file.keyfunctor.ColumnFamilyFunctor, and org.apache.accumulo.core.file.keyfunctor.ColumnQualifierFunctor are allowable values."
-          + " One can extend any of the above mentioned classes to perform specialized parsing of the key. "),
-  TABLE_BLOOM_HASHTYPE("table.bloom.hash.type", "murmur", PropertyType.STRING, "The bloom filter hash type"),
-  TABLE_FAILURES_IGNORE("table.failures.ignore", "false", PropertyType.BOOLEAN,
+          + " One can extend any of the above mentioned classes to perform specialized parsing of the key. "), TABLE_BLOOM_HASHTYPE("table.bloom.hash.type",
+      "murmur", PropertyType.STRING, "The bloom filter hash type"), TABLE_FAILURES_IGNORE("table.failures.ignore", "false", PropertyType.BOOLEAN,
       "If you want queries for your table to hang or fail when data is missing from the system, "
           + "then set this to false. When this set to true missing data will be reported but queries "
-          + "will still run possibly returning a subset of the data."),
-  TABLE_DEFAULT_SCANTIME_VISIBILITY("table.security.scan.visibility.default", "", PropertyType.STRING,
-      "The security label that will be assumed at scan time if an entry does not have a visibility set.<br />"
+          + "will still run possibly returning a subset of the data."), TABLE_DEFAULT_SCANTIME_VISIBILITY("table.security.scan.visibility.default", "",
+      PropertyType.STRING, "The security label that will be assumed at scan time if an entry does not have a visibility set.<br />"
           + "Note: An empty security label is displayed as []. The scan results will show an empty visibility even if "
           + "the visibility from this setting is applied to the entry.<br />"
           + "CAUTION: If a particular key has an empty security label AND its table's default visibility is also empty, "
           + "access will ALWAYS be granted for users with permission to that table. Additionally, if this field is changed, "
-          + "all existing data with an empty visibility label will be interpreted with the new label on the next scan."),
-  TABLE_LOCALITY_GROUPS("table.groups.enabled", "", PropertyType.STRING, "A comma separated list of locality group names to enable for this table."),
-  TABLE_CONSTRAINT_PREFIX("table.constraint.", null, PropertyType.PREFIX,
-      "Properties in this category are per-table properties that add constraints to a table. "
+          + "all existing data with an empty visibility label will be interpreted with the new label on the next scan."), TABLE_LOCALITY_GROUPS(
+      "table.groups.enabled", "", PropertyType.STRING, "A comma separated list of locality group names to enable for this table."), TABLE_CONSTRAINT_PREFIX(
+      "table.constraint.", null, PropertyType.PREFIX, "Properties in this category are per-table properties that add constraints to a table. "
           + "These properties start with the category prefix, followed by a number, and their values "
           + "correspond to a fully qualified Java class that implements the Constraint interface.<br />"
           + "For example, table.constraint.1 = org.apache.accumulo.core.constraints.MyCustomConstraint "
-          + "and table.constraint.2 = my.package.constraints.MySecondConstraint"),
-  TABLE_INDEXCACHE_ENABLED("table.cache.index.enable", "true", PropertyType.BOOLEAN, "Determines whether index cache is enabled."),
-  TABLE_BLOCKCACHE_ENABLED("table.cache.block.enable", "false", PropertyType.BOOLEAN, "Determines whether file block cache is enabled."),
-  TABLE_ITERATOR_PREFIX("table.iterator.", null, PropertyType.PREFIX,
+          + "and table.constraint.2 = my.package.constraints.MySecondConstraint"), TABLE_INDEXCACHE_ENABLED("table.cache.index.enable", "true",
+      PropertyType.BOOLEAN, "Determines whether index cache is enabled."), TABLE_BLOCKCACHE_ENABLED("table.cache.block.enable", "false", PropertyType.BOOLEAN,
+      "Determines whether file block cache is enabled."), TABLE_ITERATOR_PREFIX("table.iterator.", null, PropertyType.PREFIX,
       "Properties in this category specify iterators that are applied at various stages (scopes) of interaction "
           + "with a table. These properties start with the category prefix, followed by a scope (minc, majc, scan, etc.), "
           + "followed by a period, followed by a name, as in table.iterator.scan.vers, or table.iterator.scan.custom. "
@@ -276,8 +274,7 @@ public enum Property {
           + "such as table.iterator.scan.vers = 10,org.apache.accumulo.core.iterators.VersioningIterator<br /> "
           + "These iterators can take options if additional properties are set that look like this property, "
           + "but are suffixed with a period, followed by 'opt' followed by another period, and a property name.<br />"
-          + "For example, table.iterator.minc.vers.opt.maxVersions = 3"),
-  TABLE_LOCALITY_GROUP_PREFIX("table.group.", null, PropertyType.PREFIX,
+          + "For example, table.iterator.minc.vers.opt.maxVersions = 3"), TABLE_LOCALITY_GROUP_PREFIX("table.group.", null, PropertyType.PREFIX,
       "Properties in this category are per-table properties that define locality groups in a table. These properties start "
           + "with the category prefix, followed by a name, followed by a period, and followed by a property for that group.<br />"
           + "For example table.group.group1=x,y,z sets the column families for a group called group1. Once configured, "

Modified: accumulo/branches/ACCUMULO-259/core/src/main/java/org/apache/accumulo/core/data/thrift/InitialMultiScan.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/core/src/main/java/org/apache/accumulo/core/data/thrift/InitialMultiScan.java?rev=1361382&r1=1361381&r2=1361382&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/core/src/main/java/org/apache/accumulo/core/data/thrift/InitialMultiScan.java (original)
+++ accumulo/branches/ACCUMULO-259/core/src/main/java/org/apache/accumulo/core/data/thrift/InitialMultiScan.java Fri Jul 13 20:34:44 2012
@@ -1,10 +1,17 @@
 /**
- * Autogenerated by Thrift
+ * Autogenerated by Thrift Compiler (0.8.0)
  *
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
  */
 package org.apache.accumulo.core.data.thrift;
 
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
 import java.util.List;
 import java.util.ArrayList;
 import java.util.Map;
@@ -26,8 +33,14 @@ import org.slf4j.LoggerFactory;
   private static final org.apache.thrift.protocol.TField SCAN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("scanID", org.apache.thrift.protocol.TType.I64, (short)1);
   private static final org.apache.thrift.protocol.TField RESULT_FIELD_DESC = new org.apache.thrift.protocol.TField("result", org.apache.thrift.protocol.TType.STRUCT, (short)2);
 
-  public long scanID;
-  public MultiScanResult result;
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new InitialMultiScanStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new InitialMultiScanTupleSchemeFactory());
+  }
+
+  public long scanID; // required
+  public MultiScanResult result; // required
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -93,7 +106,6 @@ import org.slf4j.LoggerFactory;
   // isset id assignments
   private static final int __SCANID_ISSET_ID = 0;
   private BitSet __isset_bit_vector = new BitSet(1);
-
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -212,7 +224,7 @@ import org.slf4j.LoggerFactory;
   public Object getFieldValue(_Fields field) {
     switch (field) {
     case SCAN_ID:
-      return new Long(getScanID());
+      return Long.valueOf(getScanID());
 
     case RESULT:
       return getResult();
@@ -311,56 +323,11 @@ import org.slf4j.LoggerFactory;
   }
 
   public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-    org.apache.thrift.protocol.TField field;
-    iprot.readStructBegin();
-    while (true)
-    {
-      field = iprot.readFieldBegin();
-      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-        break;
-      }
-      switch (field.id) {
-        case 1: // SCAN_ID
-          if (field.type == org.apache.thrift.protocol.TType.I64) {
-            this.scanID = iprot.readI64();
-            setScanIDIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 2: // RESULT
-          if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-            this.result = new MultiScanResult();
-            this.result.read(iprot);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        default:
-          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-      }
-      iprot.readFieldEnd();
-    }
-    iprot.readStructEnd();
-
-    // check for required fields of primitive type, which can't be checked in the validate method
-    validate();
+    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
   }
 
   public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-    validate();
-
-    oprot.writeStructBegin(STRUCT_DESC);
-    oprot.writeFieldBegin(SCAN_ID_FIELD_DESC);
-    oprot.writeI64(this.scanID);
-    oprot.writeFieldEnd();
-    if (this.result != null) {
-      oprot.writeFieldBegin(RESULT_FIELD_DESC);
-      this.result.write(oprot);
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -405,5 +372,112 @@ import org.slf4j.LoggerFactory;
     }
   }
 
+  private static class InitialMultiScanStandardSchemeFactory implements SchemeFactory {
+    public InitialMultiScanStandardScheme getScheme() {
+      return new InitialMultiScanStandardScheme();
+    }
+  }
+
+  private static class InitialMultiScanStandardScheme extends StandardScheme<InitialMultiScan> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, InitialMultiScan struct) throws org.apache.thrift.TException {
+      org.apache.thrift.protocol.TField schemeField;
+      iprot.readStructBegin();
+      while (true)
+      {
+        schemeField = iprot.readFieldBegin();
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+          break;
+        }
+        switch (schemeField.id) {
+          case 1: // SCAN_ID
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.scanID = iprot.readI64();
+              struct.setScanIDIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // RESULT
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+              struct.result = new MultiScanResult();
+              struct.result.read(iprot);
+              struct.setResultIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          default:
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+
+      // check for required fields of primitive type, which can't be checked in the validate method
+      struct.validate();
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot, InitialMultiScan struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      oprot.writeFieldBegin(SCAN_ID_FIELD_DESC);
+      oprot.writeI64(struct.scanID);
+      oprot.writeFieldEnd();
+      if (struct.result != null) {
+        oprot.writeFieldBegin(RESULT_FIELD_DESC);
+        struct.result.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class InitialMultiScanTupleSchemeFactory implements SchemeFactory {
+    public InitialMultiScanTupleScheme getScheme() {
+      return new InitialMultiScanTupleScheme();
+    }
+  }
+
+  private static class InitialMultiScanTupleScheme extends TupleScheme<InitialMultiScan> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, InitialMultiScan struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetScanID()) {
+        optionals.set(0);
+      }
+      if (struct.isSetResult()) {
+        optionals.set(1);
+      }
+      oprot.writeBitSet(optionals, 2);
+      if (struct.isSetScanID()) {
+        oprot.writeI64(struct.scanID);
+      }
+      if (struct.isSetResult()) {
+        struct.result.write(oprot);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, InitialMultiScan struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(2);
+      if (incoming.get(0)) {
+        struct.scanID = iprot.readI64();
+        struct.setScanIDIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.result = new MultiScanResult();
+        struct.result.read(iprot);
+        struct.setResultIsSet(true);
+      }
+    }
+  }
+
 }
 

Modified: accumulo/branches/ACCUMULO-259/core/src/main/java/org/apache/accumulo/core/data/thrift/InitialScan.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/core/src/main/java/org/apache/accumulo/core/data/thrift/InitialScan.java?rev=1361382&r1=1361381&r2=1361382&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/core/src/main/java/org/apache/accumulo/core/data/thrift/InitialScan.java (original)
+++ accumulo/branches/ACCUMULO-259/core/src/main/java/org/apache/accumulo/core/data/thrift/InitialScan.java Fri Jul 13 20:34:44 2012
@@ -1,10 +1,17 @@
 /**
- * Autogenerated by Thrift
+ * Autogenerated by Thrift Compiler (0.8.0)
  *
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
  */
 package org.apache.accumulo.core.data.thrift;
 
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
 import java.util.List;
 import java.util.ArrayList;
 import java.util.Map;
@@ -26,8 +33,14 @@ import org.slf4j.LoggerFactory;
   private static final org.apache.thrift.protocol.TField SCAN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("scanID", org.apache.thrift.protocol.TType.I64, (short)1);
   private static final org.apache.thrift.protocol.TField RESULT_FIELD_DESC = new org.apache.thrift.protocol.TField("result", org.apache.thrift.protocol.TType.STRUCT, (short)2);
 
-  public long scanID;
-  public ScanResult result;
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new InitialScanStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new InitialScanTupleSchemeFactory());
+  }
+
+  public long scanID; // required
+  public ScanResult result; // required
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -93,7 +106,6 @@ import org.slf4j.LoggerFactory;
   // isset id assignments
   private static final int __SCANID_ISSET_ID = 0;
   private BitSet __isset_bit_vector = new BitSet(1);
-
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -212,7 +224,7 @@ import org.slf4j.LoggerFactory;
   public Object getFieldValue(_Fields field) {
     switch (field) {
     case SCAN_ID:
-      return new Long(getScanID());
+      return Long.valueOf(getScanID());
 
     case RESULT:
       return getResult();
@@ -311,56 +323,11 @@ import org.slf4j.LoggerFactory;
   }
 
   public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-    org.apache.thrift.protocol.TField field;
-    iprot.readStructBegin();
-    while (true)
-    {
-      field = iprot.readFieldBegin();
-      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-        break;
-      }
-      switch (field.id) {
-        case 1: // SCAN_ID
-          if (field.type == org.apache.thrift.protocol.TType.I64) {
-            this.scanID = iprot.readI64();
-            setScanIDIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 2: // RESULT
-          if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-            this.result = new ScanResult();
-            this.result.read(iprot);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        default:
-          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-      }
-      iprot.readFieldEnd();
-    }
-    iprot.readStructEnd();
-
-    // check for required fields of primitive type, which can't be checked in the validate method
-    validate();
+    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
   }
 
   public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-    validate();
-
-    oprot.writeStructBegin(STRUCT_DESC);
-    oprot.writeFieldBegin(SCAN_ID_FIELD_DESC);
-    oprot.writeI64(this.scanID);
-    oprot.writeFieldEnd();
-    if (this.result != null) {
-      oprot.writeFieldBegin(RESULT_FIELD_DESC);
-      this.result.write(oprot);
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -405,5 +372,112 @@ import org.slf4j.LoggerFactory;
     }
   }
 
+  private static class InitialScanStandardSchemeFactory implements SchemeFactory {
+    public InitialScanStandardScheme getScheme() {
+      return new InitialScanStandardScheme();
+    }
+  }
+
+  private static class InitialScanStandardScheme extends StandardScheme<InitialScan> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, InitialScan struct) throws org.apache.thrift.TException {
+      org.apache.thrift.protocol.TField schemeField;
+      iprot.readStructBegin();
+      while (true)
+      {
+        schemeField = iprot.readFieldBegin();
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+          break;
+        }
+        switch (schemeField.id) {
+          case 1: // SCAN_ID
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.scanID = iprot.readI64();
+              struct.setScanIDIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // RESULT
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+              struct.result = new ScanResult();
+              struct.result.read(iprot);
+              struct.setResultIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          default:
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+
+      // check for required fields of primitive type, which can't be checked in the validate method
+      struct.validate();
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot, InitialScan struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      oprot.writeFieldBegin(SCAN_ID_FIELD_DESC);
+      oprot.writeI64(struct.scanID);
+      oprot.writeFieldEnd();
+      if (struct.result != null) {
+        oprot.writeFieldBegin(RESULT_FIELD_DESC);
+        struct.result.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class InitialScanTupleSchemeFactory implements SchemeFactory {
+    public InitialScanTupleScheme getScheme() {
+      return new InitialScanTupleScheme();
+    }
+  }
+
+  private static class InitialScanTupleScheme extends TupleScheme<InitialScan> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, InitialScan struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetScanID()) {
+        optionals.set(0);
+      }
+      if (struct.isSetResult()) {
+        optionals.set(1);
+      }
+      oprot.writeBitSet(optionals, 2);
+      if (struct.isSetScanID()) {
+        oprot.writeI64(struct.scanID);
+      }
+      if (struct.isSetResult()) {
+        struct.result.write(oprot);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, InitialScan struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(2);
+      if (incoming.get(0)) {
+        struct.scanID = iprot.readI64();
+        struct.setScanIDIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.result = new ScanResult();
+        struct.result.read(iprot);
+        struct.setResultIsSet(true);
+      }
+    }
+  }
+
 }
 

Modified: accumulo/branches/ACCUMULO-259/core/src/main/java/org/apache/accumulo/core/data/thrift/IterInfo.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/core/src/main/java/org/apache/accumulo/core/data/thrift/IterInfo.java?rev=1361382&r1=1361381&r2=1361382&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/core/src/main/java/org/apache/accumulo/core/data/thrift/IterInfo.java (original)
+++ accumulo/branches/ACCUMULO-259/core/src/main/java/org/apache/accumulo/core/data/thrift/IterInfo.java Fri Jul 13 20:34:44 2012
@@ -1,10 +1,17 @@
 /**
- * Autogenerated by Thrift
+ * Autogenerated by Thrift Compiler (0.8.0)
  *
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
  */
 package org.apache.accumulo.core.data.thrift;
 
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
 import java.util.List;
 import java.util.ArrayList;
 import java.util.Map;
@@ -27,9 +34,15 @@ import org.slf4j.LoggerFactory;
   private static final org.apache.thrift.protocol.TField CLASS_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("className", org.apache.thrift.protocol.TType.STRING, (short)2);
   private static final org.apache.thrift.protocol.TField ITER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("iterName", org.apache.thrift.protocol.TType.STRING, (short)3);
 
-  public int priority;
-  public String className;
-  public String iterName;
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new IterInfoStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new IterInfoTupleSchemeFactory());
+  }
+
+  public int priority; // required
+  public String className; // required
+  public String iterName; // required
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -98,7 +111,6 @@ import org.slf4j.LoggerFactory;
   // isset id assignments
   private static final int __PRIORITY_ISSET_ID = 0;
   private BitSet __isset_bit_vector = new BitSet(1);
-
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -257,7 +269,7 @@ import org.slf4j.LoggerFactory;
   public Object getFieldValue(_Fields field) {
     switch (field) {
     case PRIORITY:
-      return new Integer(getPriority());
+      return Integer.valueOf(getPriority());
 
     case CLASS_NAME:
       return getClassName();
@@ -380,67 +392,11 @@ import org.slf4j.LoggerFactory;
   }
 
   public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-    org.apache.thrift.protocol.TField field;
-    iprot.readStructBegin();
-    while (true)
-    {
-      field = iprot.readFieldBegin();
-      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-        break;
-      }
-      switch (field.id) {
-        case 1: // PRIORITY
-          if (field.type == org.apache.thrift.protocol.TType.I32) {
-            this.priority = iprot.readI32();
-            setPriorityIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 2: // CLASS_NAME
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.className = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 3: // ITER_NAME
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.iterName = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        default:
-          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-      }
-      iprot.readFieldEnd();
-    }
-    iprot.readStructEnd();
-
-    // check for required fields of primitive type, which can't be checked in the validate method
-    validate();
+    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
   }
 
   public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-    validate();
-
-    oprot.writeStructBegin(STRUCT_DESC);
-    oprot.writeFieldBegin(PRIORITY_FIELD_DESC);
-    oprot.writeI32(this.priority);
-    oprot.writeFieldEnd();
-    if (this.className != null) {
-      oprot.writeFieldBegin(CLASS_NAME_FIELD_DESC);
-      oprot.writeString(this.className);
-      oprot.writeFieldEnd();
-    }
-    if (this.iterName != null) {
-      oprot.writeFieldBegin(ITER_NAME_FIELD_DESC);
-      oprot.writeString(this.iterName);
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -493,5 +449,133 @@ import org.slf4j.LoggerFactory;
     }
   }
 
+  private static class IterInfoStandardSchemeFactory implements SchemeFactory {
+    public IterInfoStandardScheme getScheme() {
+      return new IterInfoStandardScheme();
+    }
+  }
+
+  private static class IterInfoStandardScheme extends StandardScheme<IterInfo> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, IterInfo struct) throws org.apache.thrift.TException {
+      org.apache.thrift.protocol.TField schemeField;
+      iprot.readStructBegin();
+      while (true)
+      {
+        schemeField = iprot.readFieldBegin();
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+          break;
+        }
+        switch (schemeField.id) {
+          case 1: // PRIORITY
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.priority = iprot.readI32();
+              struct.setPriorityIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // CLASS_NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.className = iprot.readString();
+              struct.setClassNameIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // ITER_NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.iterName = iprot.readString();
+              struct.setIterNameIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          default:
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+
+      // check for required fields of primitive type, which can't be checked in the validate method
+      struct.validate();
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot, IterInfo struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      oprot.writeFieldBegin(PRIORITY_FIELD_DESC);
+      oprot.writeI32(struct.priority);
+      oprot.writeFieldEnd();
+      if (struct.className != null) {
+        oprot.writeFieldBegin(CLASS_NAME_FIELD_DESC);
+        oprot.writeString(struct.className);
+        oprot.writeFieldEnd();
+      }
+      if (struct.iterName != null) {
+        oprot.writeFieldBegin(ITER_NAME_FIELD_DESC);
+        oprot.writeString(struct.iterName);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class IterInfoTupleSchemeFactory implements SchemeFactory {
+    public IterInfoTupleScheme getScheme() {
+      return new IterInfoTupleScheme();
+    }
+  }
+
+  private static class IterInfoTupleScheme extends TupleScheme<IterInfo> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, IterInfo struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetPriority()) {
+        optionals.set(0);
+      }
+      if (struct.isSetClassName()) {
+        optionals.set(1);
+      }
+      if (struct.isSetIterName()) {
+        optionals.set(2);
+      }
+      oprot.writeBitSet(optionals, 3);
+      if (struct.isSetPriority()) {
+        oprot.writeI32(struct.priority);
+      }
+      if (struct.isSetClassName()) {
+        oprot.writeString(struct.className);
+      }
+      if (struct.isSetIterName()) {
+        oprot.writeString(struct.iterName);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, IterInfo struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(3);
+      if (incoming.get(0)) {
+        struct.priority = iprot.readI32();
+        struct.setPriorityIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.className = iprot.readString();
+        struct.setClassNameIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.iterName = iprot.readString();
+        struct.setIterNameIsSet(true);
+      }
+    }
+  }
+
 }
 

Modified: accumulo/branches/ACCUMULO-259/core/src/main/java/org/apache/accumulo/core/data/thrift/MapFileInfo.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-259/core/src/main/java/org/apache/accumulo/core/data/thrift/MapFileInfo.java?rev=1361382&r1=1361381&r2=1361382&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-259/core/src/main/java/org/apache/accumulo/core/data/thrift/MapFileInfo.java (original)
+++ accumulo/branches/ACCUMULO-259/core/src/main/java/org/apache/accumulo/core/data/thrift/MapFileInfo.java Fri Jul 13 20:34:44 2012
@@ -1,10 +1,17 @@
 /**
- * Autogenerated by Thrift
+ * Autogenerated by Thrift Compiler (0.8.0)
  *
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
  */
 package org.apache.accumulo.core.data.thrift;
 
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
 import java.util.List;
 import java.util.ArrayList;
 import java.util.Map;
@@ -25,7 +32,13 @@ import org.slf4j.LoggerFactory;
 
   private static final org.apache.thrift.protocol.TField ESTIMATED_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("estimatedSize", org.apache.thrift.protocol.TType.I64, (short)1);
 
-  public long estimatedSize;
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new MapFileInfoStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new MapFileInfoTupleSchemeFactory());
+  }
+
+  public long estimatedSize; // required
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -88,7 +101,6 @@ import org.slf4j.LoggerFactory;
   // isset id assignments
   private static final int __ESTIMATEDSIZE_ISSET_ID = 0;
   private BitSet __isset_bit_vector = new BitSet(1);
-
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -167,7 +179,7 @@ import org.slf4j.LoggerFactory;
   public Object getFieldValue(_Fields field) {
     switch (field) {
     case ESTIMATED_SIZE:
-      return new Long(getEstimatedSize());
+      return Long.valueOf(getEstimatedSize());
 
     }
     throw new IllegalStateException();
@@ -242,43 +254,11 @@ import org.slf4j.LoggerFactory;
   }
 
   public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-    org.apache.thrift.protocol.TField field;
-    iprot.readStructBegin();
-    while (true)
-    {
-      field = iprot.readFieldBegin();
-      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-        break;
-      }
-      switch (field.id) {
-        case 1: // ESTIMATED_SIZE
-          if (field.type == org.apache.thrift.protocol.TType.I64) {
-            this.estimatedSize = iprot.readI64();
-            setEstimatedSizeIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        default:
-          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-      }
-      iprot.readFieldEnd();
-    }
-    iprot.readStructEnd();
-
-    // check for required fields of primitive type, which can't be checked in the validate method
-    validate();
+    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
   }
 
   public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-    validate();
-
-    oprot.writeStructBegin(STRUCT_DESC);
-    oprot.writeFieldBegin(ESTIMATED_SIZE_FIELD_DESC);
-    oprot.writeI64(this.estimatedSize);
-    oprot.writeFieldEnd();
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -315,5 +295,87 @@ import org.slf4j.LoggerFactory;
     }
   }
 
+  private static class MapFileInfoStandardSchemeFactory implements SchemeFactory {
+    public MapFileInfoStandardScheme getScheme() {
+      return new MapFileInfoStandardScheme();
+    }
+  }
+
+  private static class MapFileInfoStandardScheme extends StandardScheme<MapFileInfo> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, MapFileInfo struct) throws org.apache.thrift.TException {
+      org.apache.thrift.protocol.TField schemeField;
+      iprot.readStructBegin();
+      while (true)
+      {
+        schemeField = iprot.readFieldBegin();
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+          break;
+        }
+        switch (schemeField.id) {
+          case 1: // ESTIMATED_SIZE
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.estimatedSize = iprot.readI64();
+              struct.setEstimatedSizeIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          default:
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+
+      // check for required fields of primitive type, which can't be checked in the validate method
+      struct.validate();
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot, MapFileInfo struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      oprot.writeFieldBegin(ESTIMATED_SIZE_FIELD_DESC);
+      oprot.writeI64(struct.estimatedSize);
+      oprot.writeFieldEnd();
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class MapFileInfoTupleSchemeFactory implements SchemeFactory {
+    public MapFileInfoTupleScheme getScheme() {
+      return new MapFileInfoTupleScheme();
+    }
+  }
+
+  private static class MapFileInfoTupleScheme extends TupleScheme<MapFileInfo> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, MapFileInfo struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetEstimatedSize()) {
+        optionals.set(0);
+      }
+      oprot.writeBitSet(optionals, 1);
+      if (struct.isSetEstimatedSize()) {
+        oprot.writeI64(struct.estimatedSize);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, MapFileInfo struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(1);
+      if (incoming.get(0)) {
+        struct.estimatedSize = iprot.readI64();
+        struct.setEstimatedSizeIsSet(true);
+      }
+    }
+  }
+
 }
 



Mime
View raw message