accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1359639 [5/13] - in /accumulo/trunk: ./ core/ core/src/main/java/org/apache/accumulo/core/client/admin/ core/src/main/java/org/apache/accumulo/core/client/impl/ core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ core/src/main/...
Date Tue, 10 Jul 2012 12:39:55 GMT
Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/data/thrift/UpdateErrors.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/data/thrift/UpdateErrors.java?rev=1359639&r1=1359638&r2=1359639&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/data/thrift/UpdateErrors.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/data/thrift/UpdateErrors.java Tue Jul 10 12:39:52 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 VIOLATION_SUMMARIES_FIELD_DESC = new org.apache.thrift.protocol.TField("violationSummaries", org.apache.thrift.protocol.TType.LIST, (short)2);
   private static final org.apache.thrift.protocol.TField AUTHORIZATION_FAILURES_FIELD_DESC = new org.apache.thrift.protocol.TField("authorizationFailures", org.apache.thrift.protocol.TType.LIST, (short)3);
 
-  public Map<TKeyExtent,Long> failedExtents;
-  public List<TConstraintViolationSummary> violationSummaries;
-  public List<TKeyExtent> authorizationFailures;
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new UpdateErrorsStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new UpdateErrorsTupleSchemeFactory());
+  }
+
+  public Map<TKeyExtent,Long> failedExtents; // required
+  public List<TConstraintViolationSummary> violationSummaries; // required
+  public List<TKeyExtent> authorizationFailures; // 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 {
@@ -96,7 +109,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);
@@ -442,125 +454,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: // FAILED_EXTENTS
-          if (field.type == org.apache.thrift.protocol.TType.MAP) {
-            {
-              org.apache.thrift.protocol.TMap _map25 = iprot.readMapBegin();
-              this.failedExtents = new HashMap<TKeyExtent,Long>(2*_map25.size);
-              for (int _i26 = 0; _i26 < _map25.size; ++_i26)
-              {
-                TKeyExtent _key27;
-                long _val28;
-                _key27 = new TKeyExtent();
-                _key27.read(iprot);
-                _val28 = iprot.readI64();
-                this.failedExtents.put(_key27, _val28);
-              }
-              iprot.readMapEnd();
-            }
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 2: // VIOLATION_SUMMARIES
-          if (field.type == org.apache.thrift.protocol.TType.LIST) {
-            {
-              org.apache.thrift.protocol.TList _list29 = iprot.readListBegin();
-              this.violationSummaries = new ArrayList<TConstraintViolationSummary>(_list29.size);
-              for (int _i30 = 0; _i30 < _list29.size; ++_i30)
-              {
-                TConstraintViolationSummary _elem31;
-                _elem31 = new TConstraintViolationSummary();
-                _elem31.read(iprot);
-                this.violationSummaries.add(_elem31);
-              }
-              iprot.readListEnd();
-            }
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 3: // AUTHORIZATION_FAILURES
-          if (field.type == org.apache.thrift.protocol.TType.LIST) {
-            {
-              org.apache.thrift.protocol.TList _list32 = iprot.readListBegin();
-              this.authorizationFailures = new ArrayList<TKeyExtent>(_list32.size);
-              for (int _i33 = 0; _i33 < _list32.size; ++_i33)
-              {
-                TKeyExtent _elem34;
-                _elem34 = new TKeyExtent();
-                _elem34.read(iprot);
-                this.authorizationFailures.add(_elem34);
-              }
-              iprot.readListEnd();
-            }
-          } 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.failedExtents != null) {
-      oprot.writeFieldBegin(FAILED_EXTENTS_FIELD_DESC);
-      {
-        oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.I64, this.failedExtents.size()));
-        for (Map.Entry<TKeyExtent, Long> _iter35 : this.failedExtents.entrySet())
-        {
-          _iter35.getKey().write(oprot);
-          oprot.writeI64(_iter35.getValue());
-        }
-        oprot.writeMapEnd();
-      }
-      oprot.writeFieldEnd();
-    }
-    if (this.violationSummaries != null) {
-      oprot.writeFieldBegin(VIOLATION_SUMMARIES_FIELD_DESC);
-      {
-        oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.violationSummaries.size()));
-        for (TConstraintViolationSummary _iter36 : this.violationSummaries)
-        {
-          _iter36.write(oprot);
-        }
-        oprot.writeListEnd();
-      }
-      oprot.writeFieldEnd();
-    }
-    if (this.authorizationFailures != null) {
-      oprot.writeFieldBegin(AUTHORIZATION_FAILURES_FIELD_DESC);
-      {
-        oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.authorizationFailures.size()));
-        for (TKeyExtent _iter37 : this.authorizationFailures)
-        {
-          _iter37.write(oprot);
-        }
-        oprot.writeListEnd();
-      }
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -615,5 +513,243 @@ import org.slf4j.LoggerFactory;
     }
   }
 
+  private static class UpdateErrorsStandardSchemeFactory implements SchemeFactory {
+    public UpdateErrorsStandardScheme getScheme() {
+      return new UpdateErrorsStandardScheme();
+    }
+  }
+
+  private static class UpdateErrorsStandardScheme extends StandardScheme<UpdateErrors> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, UpdateErrors 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: // FAILED_EXTENTS
+            if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
+              {
+                org.apache.thrift.protocol.TMap _map50 = iprot.readMapBegin();
+                struct.failedExtents = new HashMap<TKeyExtent,Long>(2*_map50.size);
+                for (int _i51 = 0; _i51 < _map50.size; ++_i51)
+                {
+                  TKeyExtent _key52; // required
+                  long _val53; // required
+                  _key52 = new TKeyExtent();
+                  _key52.read(iprot);
+                  _val53 = iprot.readI64();
+                  struct.failedExtents.put(_key52, _val53);
+                }
+                iprot.readMapEnd();
+              }
+              struct.setFailedExtentsIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // VIOLATION_SUMMARIES
+            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+              {
+                org.apache.thrift.protocol.TList _list54 = iprot.readListBegin();
+                struct.violationSummaries = new ArrayList<TConstraintViolationSummary>(_list54.size);
+                for (int _i55 = 0; _i55 < _list54.size; ++_i55)
+                {
+                  TConstraintViolationSummary _elem56; // required
+                  _elem56 = new TConstraintViolationSummary();
+                  _elem56.read(iprot);
+                  struct.violationSummaries.add(_elem56);
+                }
+                iprot.readListEnd();
+              }
+              struct.setViolationSummariesIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // AUTHORIZATION_FAILURES
+            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+              {
+                org.apache.thrift.protocol.TList _list57 = iprot.readListBegin();
+                struct.authorizationFailures = new ArrayList<TKeyExtent>(_list57.size);
+                for (int _i58 = 0; _i58 < _list57.size; ++_i58)
+                {
+                  TKeyExtent _elem59; // required
+                  _elem59 = new TKeyExtent();
+                  _elem59.read(iprot);
+                  struct.authorizationFailures.add(_elem59);
+                }
+                iprot.readListEnd();
+              }
+              struct.setAuthorizationFailuresIsSet(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, UpdateErrors struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.failedExtents != null) {
+        oprot.writeFieldBegin(FAILED_EXTENTS_FIELD_DESC);
+        {
+          oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.I64, struct.failedExtents.size()));
+          for (Map.Entry<TKeyExtent, Long> _iter60 : struct.failedExtents.entrySet())
+          {
+            _iter60.getKey().write(oprot);
+            oprot.writeI64(_iter60.getValue());
+          }
+          oprot.writeMapEnd();
+        }
+        oprot.writeFieldEnd();
+      }
+      if (struct.violationSummaries != null) {
+        oprot.writeFieldBegin(VIOLATION_SUMMARIES_FIELD_DESC);
+        {
+          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.violationSummaries.size()));
+          for (TConstraintViolationSummary _iter61 : struct.violationSummaries)
+          {
+            _iter61.write(oprot);
+          }
+          oprot.writeListEnd();
+        }
+        oprot.writeFieldEnd();
+      }
+      if (struct.authorizationFailures != null) {
+        oprot.writeFieldBegin(AUTHORIZATION_FAILURES_FIELD_DESC);
+        {
+          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.authorizationFailures.size()));
+          for (TKeyExtent _iter62 : struct.authorizationFailures)
+          {
+            _iter62.write(oprot);
+          }
+          oprot.writeListEnd();
+        }
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class UpdateErrorsTupleSchemeFactory implements SchemeFactory {
+    public UpdateErrorsTupleScheme getScheme() {
+      return new UpdateErrorsTupleScheme();
+    }
+  }
+
+  private static class UpdateErrorsTupleScheme extends TupleScheme<UpdateErrors> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, UpdateErrors struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetFailedExtents()) {
+        optionals.set(0);
+      }
+      if (struct.isSetViolationSummaries()) {
+        optionals.set(1);
+      }
+      if (struct.isSetAuthorizationFailures()) {
+        optionals.set(2);
+      }
+      oprot.writeBitSet(optionals, 3);
+      if (struct.isSetFailedExtents()) {
+        {
+          oprot.writeI32(struct.failedExtents.size());
+          for (Map.Entry<TKeyExtent, Long> _iter63 : struct.failedExtents.entrySet())
+          {
+            _iter63.getKey().write(oprot);
+            oprot.writeI64(_iter63.getValue());
+          }
+        }
+      }
+      if (struct.isSetViolationSummaries()) {
+        {
+          oprot.writeI32(struct.violationSummaries.size());
+          for (TConstraintViolationSummary _iter64 : struct.violationSummaries)
+          {
+            _iter64.write(oprot);
+          }
+        }
+      }
+      if (struct.isSetAuthorizationFailures()) {
+        {
+          oprot.writeI32(struct.authorizationFailures.size());
+          for (TKeyExtent _iter65 : struct.authorizationFailures)
+          {
+            _iter65.write(oprot);
+          }
+        }
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, UpdateErrors struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(3);
+      if (incoming.get(0)) {
+        {
+          org.apache.thrift.protocol.TMap _map66 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.I64, iprot.readI32());
+          struct.failedExtents = new HashMap<TKeyExtent,Long>(2*_map66.size);
+          for (int _i67 = 0; _i67 < _map66.size; ++_i67)
+          {
+            TKeyExtent _key68; // required
+            long _val69; // required
+            _key68 = new TKeyExtent();
+            _key68.read(iprot);
+            _val69 = iprot.readI64();
+            struct.failedExtents.put(_key68, _val69);
+          }
+        }
+        struct.setFailedExtentsIsSet(true);
+      }
+      if (incoming.get(1)) {
+        {
+          org.apache.thrift.protocol.TList _list70 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.violationSummaries = new ArrayList<TConstraintViolationSummary>(_list70.size);
+          for (int _i71 = 0; _i71 < _list70.size; ++_i71)
+          {
+            TConstraintViolationSummary _elem72; // required
+            _elem72 = new TConstraintViolationSummary();
+            _elem72.read(iprot);
+            struct.violationSummaries.add(_elem72);
+          }
+        }
+        struct.setViolationSummariesIsSet(true);
+      }
+      if (incoming.get(2)) {
+        {
+          org.apache.thrift.protocol.TList _list73 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.authorizationFailures = new ArrayList<TKeyExtent>(_list73.size);
+          for (int _i74 = 0; _i74 < _list73.size; ++_i74)
+          {
+            TKeyExtent _elem75; // required
+            _elem75 = new TKeyExtent();
+            _elem75.read(iprot);
+            struct.authorizationFailures.add(_elem75);
+          }
+        }
+        struct.setAuthorizationFailuresIsSet(true);
+      }
+    }
+  }
+
 }
 

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/gc/thrift/GCMonitorService.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/gc/thrift/GCMonitorService.java?rev=1359639&r1=1359638&r2=1359639&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/gc/thrift/GCMonitorService.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/gc/thrift/GCMonitorService.java Tue Jul 10 12:39:52 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.gc.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;
@@ -34,7 +41,7 @@ import org.slf4j.LoggerFactory;
 
   }
 
-  public static class Client implements org.apache.thrift.TServiceClient, Iface {
+  public static class Client extends org.apache.thrift.TServiceClient implements Iface {
     public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
       public Factory() {}
       public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
@@ -47,28 +54,11 @@ import org.slf4j.LoggerFactory;
 
     public Client(org.apache.thrift.protocol.TProtocol prot)
     {
-      this(prot, prot);
-    }
-
-    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot)
-    {
-      iprot_ = iprot;
-      oprot_ = oprot;
+      super(prot, prot);
     }
 
-    protected org.apache.thrift.protocol.TProtocol iprot_;
-    protected org.apache.thrift.protocol.TProtocol oprot_;
-
-    protected int seqid_;
-
-    public org.apache.thrift.protocol.TProtocol getInputProtocol()
-    {
-      return this.iprot_;
-    }
-
-    public org.apache.thrift.protocol.TProtocol getOutputProtocol()
-    {
-      return this.oprot_;
+    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
+      super(iprot, oprot);
     }
 
     public GCStatus getStatus(org.apache.accumulo.cloudtrace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.AuthInfo credentials) throws org.apache.accumulo.core.security.thrift.ThriftSecurityException, org.apache.thrift.TException
@@ -79,29 +69,16 @@ import org.slf4j.LoggerFactory;
 
     public void send_getStatus(org.apache.accumulo.cloudtrace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.AuthInfo credentials) throws org.apache.thrift.TException
     {
-      oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getStatus", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_));
       getStatus_args args = new getStatus_args();
       args.setTinfo(tinfo);
       args.setCredentials(credentials);
-      args.write(oprot_);
-      oprot_.writeMessageEnd();
-      oprot_.getTransport().flush();
+      sendBase("getStatus", args);
     }
 
     public GCStatus recv_getStatus() throws org.apache.accumulo.core.security.thrift.ThriftSecurityException, org.apache.thrift.TException
     {
-      org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin();
-      if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) {
-        org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_);
-        iprot_.readMessageEnd();
-        throw x;
-      }
-      if (msg.seqid != seqid_) {
-        throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "getStatus failed: out of sequence response");
-      }
       getStatus_result result = new getStatus_result();
-      result.read(iprot_);
-      iprot_.readMessageEnd();
+      receiveBase(result, "getStatus");
       if (result.isSetSuccess()) {
         return result.success;
       }
@@ -131,9 +108,9 @@ import org.slf4j.LoggerFactory;
 
     public void getStatus(org.apache.accumulo.cloudtrace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.AuthInfo credentials, org.apache.thrift.async.AsyncMethodCallback<getStatus_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      getStatus_call method_call = new getStatus_call(tinfo, credentials, resultHandler, this, protocolFactory, transport);
-      this.currentMethod = method_call;
-      manager.call(method_call);
+      getStatus_call method_call = new getStatus_call(tinfo, credentials, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
     }
 
     public static class getStatus_call extends org.apache.thrift.async.TAsyncMethodCall {
@@ -166,75 +143,39 @@ import org.slf4j.LoggerFactory;
 
   }
 
-  public static class Processor implements org.apache.thrift.TProcessor {
+  public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
     private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
-    public Processor(Iface iface)
-    {
-      iface_ = iface;
-      processMap_.put("getStatus", new getStatus());
+    public Processor(I iface) {
+      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
     }
 
-    protected static interface ProcessFunction {
-      public void process(int seqid, org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException;
+    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
+      super(iface, getProcessMap(processMap));
     }
 
-    private Iface iface_;
-    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
+    private static <I extends Iface> Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> getProcessMap(Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
+      processMap.put("getStatus", new getStatus());
+      return processMap;
+    }
 
-    public boolean process(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException
-    {
-      org.apache.thrift.protocol.TMessage msg = iprot.readMessageBegin();
-      ProcessFunction fn = processMap_.get(msg.name);
-      if (fn == null) {
-        org.apache.thrift.protocol.TProtocolUtil.skip(iprot, org.apache.thrift.protocol.TType.STRUCT);
-        iprot.readMessageEnd();
-        org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
-        oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage(msg.name, org.apache.thrift.protocol.TMessageType.EXCEPTION, msg.seqid));
-        x.write(oprot);
-        oprot.writeMessageEnd();
-        oprot.getTransport().flush();
-        return true;
+    private static class getStatus<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getStatus_args> {
+      public getStatus() {
+        super("getStatus");
       }
-      fn.process(msg.seqid, iprot, oprot);
-      return true;
-    }
 
-    private class getStatus implements ProcessFunction {
-      public void process(int seqid, org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException
-      {
-        getStatus_args args = new getStatus_args();
-        try {
-          args.read(iprot);
-        } catch (org.apache.thrift.protocol.TProtocolException e) {
-          iprot.readMessageEnd();
-          org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.PROTOCOL_ERROR, e.getMessage());
-          oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getStatus", org.apache.thrift.protocol.TMessageType.EXCEPTION, seqid));
-          x.write(oprot);
-          oprot.writeMessageEnd();
-          oprot.getTransport().flush();
-          return;
-        }
-        iprot.readMessageEnd();
+      protected getStatus_args getEmptyArgsInstance() {
+        return new getStatus_args();
+      }
+
+      protected getStatus_result getResult(I iface, getStatus_args args) throws org.apache.thrift.TException {
         getStatus_result result = new getStatus_result();
         try {
-          result.success = iface_.getStatus(args.tinfo, args.credentials);
+          result.success = iface.getStatus(args.tinfo, args.credentials);
         } catch (org.apache.accumulo.core.security.thrift.ThriftSecurityException sec) {
           result.sec = sec;
-        } catch (Throwable th) {
-          LOGGER.error("Internal error processing getStatus", th);
-          org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, "Internal error processing getStatus");
-          oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getStatus", org.apache.thrift.protocol.TMessageType.EXCEPTION, seqid));
-          x.write(oprot);
-          oprot.writeMessageEnd();
-          oprot.getTransport().flush();
-          return;
-        }
-        oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getStatus", org.apache.thrift.protocol.TMessageType.REPLY, seqid));
-        result.write(oprot);
-        oprot.writeMessageEnd();
-        oprot.getTransport().flush();
+        }
+        return result;
       }
-
     }
 
   }
@@ -245,8 +186,14 @@ import org.slf4j.LoggerFactory;
     private static final org.apache.thrift.protocol.TField TINFO_FIELD_DESC = new org.apache.thrift.protocol.TField("tinfo", org.apache.thrift.protocol.TType.STRUCT, (short)2);
     private static final org.apache.thrift.protocol.TField CREDENTIALS_FIELD_DESC = new org.apache.thrift.protocol.TField("credentials", org.apache.thrift.protocol.TType.STRUCT, (short)1);
 
-    public org.apache.accumulo.cloudtrace.thrift.TInfo tinfo;
-    public org.apache.accumulo.core.security.thrift.AuthInfo credentials;
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new getStatus_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new getStatus_argsTupleSchemeFactory());
+    }
+
+    public org.apache.accumulo.cloudtrace.thrift.TInfo tinfo; // required
+    public org.apache.accumulo.core.security.thrift.AuthInfo credentials; // 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 {
@@ -310,7 +257,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);
@@ -527,58 +473,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 2: // TINFO
-            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-              this.tinfo = new org.apache.accumulo.cloudtrace.thrift.TInfo();
-              this.tinfo.read(iprot);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-            }
-            break;
-          case 1: // CREDENTIALS
-            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-              this.credentials = new org.apache.accumulo.core.security.thrift.AuthInfo();
-              this.credentials.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);
-      if (this.credentials != null) {
-        oprot.writeFieldBegin(CREDENTIALS_FIELD_DESC);
-        this.credentials.write(oprot);
-        oprot.writeFieldEnd();
-      }
-      if (this.tinfo != null) {
-        oprot.writeFieldBegin(TINFO_FIELD_DESC);
-        this.tinfo.write(oprot);
-        oprot.writeFieldEnd();
-      }
-      oprot.writeFieldStop();
-      oprot.writeStructEnd();
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
     }
 
     @Override
@@ -625,6 +524,117 @@ import org.slf4j.LoggerFactory;
       }
     }
 
+    private static class getStatus_argsStandardSchemeFactory implements SchemeFactory {
+      public getStatus_argsStandardScheme getScheme() {
+        return new getStatus_argsStandardScheme();
+      }
+    }
+
+    private static class getStatus_argsStandardScheme extends StandardScheme<getStatus_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, getStatus_args 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 2: // TINFO
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+                struct.tinfo = new org.apache.accumulo.cloudtrace.thrift.TInfo();
+                struct.tinfo.read(iprot);
+                struct.setTinfoIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 1: // CREDENTIALS
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+                struct.credentials = new org.apache.accumulo.core.security.thrift.AuthInfo();
+                struct.credentials.read(iprot);
+                struct.setCredentialsIsSet(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, getStatus_args struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.credentials != null) {
+          oprot.writeFieldBegin(CREDENTIALS_FIELD_DESC);
+          struct.credentials.write(oprot);
+          oprot.writeFieldEnd();
+        }
+        if (struct.tinfo != null) {
+          oprot.writeFieldBegin(TINFO_FIELD_DESC);
+          struct.tinfo.write(oprot);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class getStatus_argsTupleSchemeFactory implements SchemeFactory {
+      public getStatus_argsTupleScheme getScheme() {
+        return new getStatus_argsTupleScheme();
+      }
+    }
+
+    private static class getStatus_argsTupleScheme extends TupleScheme<getStatus_args> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, getStatus_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetTinfo()) {
+          optionals.set(0);
+        }
+        if (struct.isSetCredentials()) {
+          optionals.set(1);
+        }
+        oprot.writeBitSet(optionals, 2);
+        if (struct.isSetTinfo()) {
+          struct.tinfo.write(oprot);
+        }
+        if (struct.isSetCredentials()) {
+          struct.credentials.write(oprot);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, getStatus_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(2);
+        if (incoming.get(0)) {
+          struct.tinfo = new org.apache.accumulo.cloudtrace.thrift.TInfo();
+          struct.tinfo.read(iprot);
+          struct.setTinfoIsSet(true);
+        }
+        if (incoming.get(1)) {
+          struct.credentials = new org.apache.accumulo.core.security.thrift.AuthInfo();
+          struct.credentials.read(iprot);
+          struct.setCredentialsIsSet(true);
+        }
+      }
+    }
+
   }
 
   public static class getStatus_result implements org.apache.thrift.TBase<getStatus_result, getStatus_result._Fields>, java.io.Serializable, Cloneable   {
@@ -633,8 +643,14 @@ 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.STRUCT, (short)0);
     private static final org.apache.thrift.protocol.TField SEC_FIELD_DESC = new org.apache.thrift.protocol.TField("sec", org.apache.thrift.protocol.TType.STRUCT, (short)1);
 
-    public GCStatus success;
-    public org.apache.accumulo.core.security.thrift.ThriftSecurityException sec;
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new getStatus_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new getStatus_resultTupleSchemeFactory());
+    }
+
+    public GCStatus success; // required
+    public org.apache.accumulo.core.security.thrift.ThriftSecurityException sec; // 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 {
@@ -698,7 +714,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);
@@ -915,57 +930,12 @@ 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 0: // SUCCESS
-            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-              this.success = new GCStatus();
-              this.success.read(iprot);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-            }
-            break;
-          case 1: // SEC
-            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-              this.sec = new org.apache.accumulo.core.security.thrift.ThriftSecurityException();
-              this.sec.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 {
-      oprot.writeStructBegin(STRUCT_DESC);
-
-      if (this.isSetSuccess()) {
-        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-        this.success.write(oprot);
-        oprot.writeFieldEnd();
-      } else if (this.isSetSec()) {
-        oprot.writeFieldBegin(SEC_FIELD_DESC);
-        this.sec.write(oprot);
-        oprot.writeFieldEnd();
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
       }
-      oprot.writeFieldStop();
-      oprot.writeStructEnd();
-    }
 
     @Override
     public String toString() {
@@ -1011,6 +981,117 @@ import org.slf4j.LoggerFactory;
       }
     }
 
+    private static class getStatus_resultStandardSchemeFactory implements SchemeFactory {
+      public getStatus_resultStandardScheme getScheme() {
+        return new getStatus_resultStandardScheme();
+      }
+    }
+
+    private static class getStatus_resultStandardScheme extends StandardScheme<getStatus_result> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, getStatus_result 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 0: // SUCCESS
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+                struct.success = new GCStatus();
+                struct.success.read(iprot);
+                struct.setSuccessIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 1: // SEC
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+                struct.sec = new org.apache.accumulo.core.security.thrift.ThriftSecurityException();
+                struct.sec.read(iprot);
+                struct.setSecIsSet(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, getStatus_result struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.success != null) {
+          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+          struct.success.write(oprot);
+          oprot.writeFieldEnd();
+        }
+        if (struct.sec != null) {
+          oprot.writeFieldBegin(SEC_FIELD_DESC);
+          struct.sec.write(oprot);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class getStatus_resultTupleSchemeFactory implements SchemeFactory {
+      public getStatus_resultTupleScheme getScheme() {
+        return new getStatus_resultTupleScheme();
+      }
+    }
+
+    private static class getStatus_resultTupleScheme extends TupleScheme<getStatus_result> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, getStatus_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetSuccess()) {
+          optionals.set(0);
+        }
+        if (struct.isSetSec()) {
+          optionals.set(1);
+        }
+        oprot.writeBitSet(optionals, 2);
+        if (struct.isSetSuccess()) {
+          struct.success.write(oprot);
+        }
+        if (struct.isSetSec()) {
+          struct.sec.write(oprot);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, getStatus_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(2);
+        if (incoming.get(0)) {
+          struct.success = new GCStatus();
+          struct.success.read(iprot);
+          struct.setSuccessIsSet(true);
+        }
+        if (incoming.get(1)) {
+          struct.sec = new org.apache.accumulo.core.security.thrift.ThriftSecurityException();
+          struct.sec.read(iprot);
+          struct.setSecIsSet(true);
+        }
+      }
+    }
+
   }
 
 }

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/gc/thrift/GCStatus.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/gc/thrift/GCStatus.java?rev=1359639&r1=1359638&r2=1359639&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/gc/thrift/GCStatus.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/gc/thrift/GCStatus.java Tue Jul 10 12:39:52 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.gc.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;
@@ -28,10 +35,16 @@ import org.slf4j.LoggerFactory;
   private static final org.apache.thrift.protocol.TField CURRENT_FIELD_DESC = new org.apache.thrift.protocol.TField("current", org.apache.thrift.protocol.TType.STRUCT, (short)3);
   private static final org.apache.thrift.protocol.TField CURRENT_LOG_FIELD_DESC = new org.apache.thrift.protocol.TField("currentLog", org.apache.thrift.protocol.TType.STRUCT, (short)4);
 
-  public GcCycleStats last;
-  public GcCycleStats lastLog;
-  public GcCycleStats current;
-  public GcCycleStats currentLog;
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new GCStatusStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new GCStatusTupleSchemeFactory());
+  }
+
+  public GcCycleStats last; // required
+  public GcCycleStats lastLog; // required
+  public GcCycleStats current; // required
+  public GcCycleStats currentLog; // 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 {
@@ -101,7 +114,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);
@@ -446,84 +458,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: // LAST
-          if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-            this.last = new GcCycleStats();
-            this.last.read(iprot);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 2: // LAST_LOG
-          if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-            this.lastLog = new GcCycleStats();
-            this.lastLog.read(iprot);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 3: // CURRENT
-          if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-            this.current = new GcCycleStats();
-            this.current.read(iprot);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 4: // CURRENT_LOG
-          if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-            this.currentLog = new GcCycleStats();
-            this.currentLog.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);
-    if (this.last != null) {
-      oprot.writeFieldBegin(LAST_FIELD_DESC);
-      this.last.write(oprot);
-      oprot.writeFieldEnd();
-    }
-    if (this.lastLog != null) {
-      oprot.writeFieldBegin(LAST_LOG_FIELD_DESC);
-      this.lastLog.write(oprot);
-      oprot.writeFieldEnd();
-    }
-    if (this.current != null) {
-      oprot.writeFieldBegin(CURRENT_FIELD_DESC);
-      this.current.write(oprot);
-      oprot.writeFieldEnd();
-    }
-    if (this.currentLog != null) {
-      oprot.writeFieldBegin(CURRENT_LOG_FIELD_DESC);
-      this.currentLog.write(oprot);
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -586,5 +525,166 @@ import org.slf4j.LoggerFactory;
     }
   }
 
+  private static class GCStatusStandardSchemeFactory implements SchemeFactory {
+    public GCStatusStandardScheme getScheme() {
+      return new GCStatusStandardScheme();
+    }
+  }
+
+  private static class GCStatusStandardScheme extends StandardScheme<GCStatus> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, GCStatus 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: // LAST
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+              struct.last = new GcCycleStats();
+              struct.last.read(iprot);
+              struct.setLastIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // LAST_LOG
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+              struct.lastLog = new GcCycleStats();
+              struct.lastLog.read(iprot);
+              struct.setLastLogIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // CURRENT
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+              struct.current = new GcCycleStats();
+              struct.current.read(iprot);
+              struct.setCurrentIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 4: // CURRENT_LOG
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+              struct.currentLog = new GcCycleStats();
+              struct.currentLog.read(iprot);
+              struct.setCurrentLogIsSet(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, GCStatus struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.last != null) {
+        oprot.writeFieldBegin(LAST_FIELD_DESC);
+        struct.last.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      if (struct.lastLog != null) {
+        oprot.writeFieldBegin(LAST_LOG_FIELD_DESC);
+        struct.lastLog.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      if (struct.current != null) {
+        oprot.writeFieldBegin(CURRENT_FIELD_DESC);
+        struct.current.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      if (struct.currentLog != null) {
+        oprot.writeFieldBegin(CURRENT_LOG_FIELD_DESC);
+        struct.currentLog.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class GCStatusTupleSchemeFactory implements SchemeFactory {
+    public GCStatusTupleScheme getScheme() {
+      return new GCStatusTupleScheme();
+    }
+  }
+
+  private static class GCStatusTupleScheme extends TupleScheme<GCStatus> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, GCStatus struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetLast()) {
+        optionals.set(0);
+      }
+      if (struct.isSetLastLog()) {
+        optionals.set(1);
+      }
+      if (struct.isSetCurrent()) {
+        optionals.set(2);
+      }
+      if (struct.isSetCurrentLog()) {
+        optionals.set(3);
+      }
+      oprot.writeBitSet(optionals, 4);
+      if (struct.isSetLast()) {
+        struct.last.write(oprot);
+      }
+      if (struct.isSetLastLog()) {
+        struct.lastLog.write(oprot);
+      }
+      if (struct.isSetCurrent()) {
+        struct.current.write(oprot);
+      }
+      if (struct.isSetCurrentLog()) {
+        struct.currentLog.write(oprot);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, GCStatus struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(4);
+      if (incoming.get(0)) {
+        struct.last = new GcCycleStats();
+        struct.last.read(iprot);
+        struct.setLastIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.lastLog = new GcCycleStats();
+        struct.lastLog.read(iprot);
+        struct.setLastLogIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.current = new GcCycleStats();
+        struct.current.read(iprot);
+        struct.setCurrentIsSet(true);
+      }
+      if (incoming.get(3)) {
+        struct.currentLog = new GcCycleStats();
+        struct.currentLog.read(iprot);
+        struct.setCurrentLogIsSet(true);
+      }
+    }
+  }
+
 }
 

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/gc/thrift/GcCycleStats.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/gc/thrift/GcCycleStats.java?rev=1359639&r1=1359638&r2=1359639&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/gc/thrift/GcCycleStats.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/gc/thrift/GcCycleStats.java Tue Jul 10 12:39:52 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.gc.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;
@@ -30,12 +37,18 @@ import org.slf4j.LoggerFactory;
   private static final org.apache.thrift.protocol.TField DELETED_FIELD_DESC = new org.apache.thrift.protocol.TField("deleted", org.apache.thrift.protocol.TType.I64, (short)5);
   private static final org.apache.thrift.protocol.TField ERRORS_FIELD_DESC = new org.apache.thrift.protocol.TField("errors", org.apache.thrift.protocol.TType.I64, (short)6);
 
-  public long started;
-  public long finished;
-  public long candidates;
-  public long inUse;
-  public long deleted;
-  public long errors;
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new GcCycleStatsStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new GcCycleStatsTupleSchemeFactory());
+  }
+
+  public long started; // required
+  public long finished; // required
+  public long candidates; // required
+  public long inUse; // required
+  public long deleted; // required
+  public long errors; // 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 {
@@ -118,7 +131,6 @@ import org.slf4j.LoggerFactory;
   private static final int __DELETED_ISSET_ID = 4;
   private static final int __ERRORS_ISSET_ID = 5;
   private BitSet __isset_bit_vector = new BitSet(6);
-
   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);
@@ -392,22 +404,22 @@ import org.slf4j.LoggerFactory;
   public Object getFieldValue(_Fields field) {
     switch (field) {
     case STARTED:
-      return new Long(getStarted());
+      return Long.valueOf(getStarted());
 
     case FINISHED:
-      return new Long(getFinished());
+      return Long.valueOf(getFinished());
 
     case CANDIDATES:
-      return new Long(getCandidates());
+      return Long.valueOf(getCandidates());
 
     case IN_USE:
-      return new Long(getInUse());
+      return Long.valueOf(getInUse());
 
     case DELETED:
-      return new Long(getDeleted());
+      return Long.valueOf(getDeleted());
 
     case ERRORS:
-      return new Long(getErrors());
+      return Long.valueOf(getErrors());
 
     }
     throw new IllegalStateException();
@@ -587,98 +599,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: // STARTED
-          if (field.type == org.apache.thrift.protocol.TType.I64) {
-            this.started = iprot.readI64();
-            setStartedIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 2: // FINISHED
-          if (field.type == org.apache.thrift.protocol.TType.I64) {
-            this.finished = iprot.readI64();
-            setFinishedIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 3: // CANDIDATES
-          if (field.type == org.apache.thrift.protocol.TType.I64) {
-            this.candidates = iprot.readI64();
-            setCandidatesIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 4: // IN_USE
-          if (field.type == org.apache.thrift.protocol.TType.I64) {
-            this.inUse = iprot.readI64();
-            setInUseIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 5: // DELETED
-          if (field.type == org.apache.thrift.protocol.TType.I64) {
-            this.deleted = iprot.readI64();
-            setDeletedIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 6: // ERRORS
-          if (field.type == org.apache.thrift.protocol.TType.I64) {
-            this.errors = iprot.readI64();
-            setErrorsIsSet(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(STARTED_FIELD_DESC);
-    oprot.writeI64(this.started);
-    oprot.writeFieldEnd();
-    oprot.writeFieldBegin(FINISHED_FIELD_DESC);
-    oprot.writeI64(this.finished);
-    oprot.writeFieldEnd();
-    oprot.writeFieldBegin(CANDIDATES_FIELD_DESC);
-    oprot.writeI64(this.candidates);
-    oprot.writeFieldEnd();
-    oprot.writeFieldBegin(IN_USE_FIELD_DESC);
-    oprot.writeI64(this.inUse);
-    oprot.writeFieldEnd();
-    oprot.writeFieldBegin(DELETED_FIELD_DESC);
-    oprot.writeI64(this.deleted);
-    oprot.writeFieldEnd();
-    oprot.writeFieldBegin(ERRORS_FIELD_DESC);
-    oprot.writeI64(this.errors);
-    oprot.writeFieldEnd();
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -735,5 +660,192 @@ import org.slf4j.LoggerFactory;
     }
   }
 
+  private static class GcCycleStatsStandardSchemeFactory implements SchemeFactory {
+    public GcCycleStatsStandardScheme getScheme() {
+      return new GcCycleStatsStandardScheme();
+    }
+  }
+
+  private static class GcCycleStatsStandardScheme extends StandardScheme<GcCycleStats> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, GcCycleStats 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: // STARTED
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.started = iprot.readI64();
+              struct.setStartedIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // FINISHED
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.finished = iprot.readI64();
+              struct.setFinishedIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // CANDIDATES
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.candidates = iprot.readI64();
+              struct.setCandidatesIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 4: // IN_USE
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.inUse = iprot.readI64();
+              struct.setInUseIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 5: // DELETED
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.deleted = iprot.readI64();
+              struct.setDeletedIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 6: // ERRORS
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.errors = iprot.readI64();
+              struct.setErrorsIsSet(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, GcCycleStats struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      oprot.writeFieldBegin(STARTED_FIELD_DESC);
+      oprot.writeI64(struct.started);
+      oprot.writeFieldEnd();
+      oprot.writeFieldBegin(FINISHED_FIELD_DESC);
+      oprot.writeI64(struct.finished);
+      oprot.writeFieldEnd();
+      oprot.writeFieldBegin(CANDIDATES_FIELD_DESC);
+      oprot.writeI64(struct.candidates);
+      oprot.writeFieldEnd();
+      oprot.writeFieldBegin(IN_USE_FIELD_DESC);
+      oprot.writeI64(struct.inUse);
+      oprot.writeFieldEnd();
+      oprot.writeFieldBegin(DELETED_FIELD_DESC);
+      oprot.writeI64(struct.deleted);
+      oprot.writeFieldEnd();
+      oprot.writeFieldBegin(ERRORS_FIELD_DESC);
+      oprot.writeI64(struct.errors);
+      oprot.writeFieldEnd();
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class GcCycleStatsTupleSchemeFactory implements SchemeFactory {
+    public GcCycleStatsTupleScheme getScheme() {
+      return new GcCycleStatsTupleScheme();
+    }
+  }
+
+  private static class GcCycleStatsTupleScheme extends TupleScheme<GcCycleStats> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, GcCycleStats struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetStarted()) {
+        optionals.set(0);
+      }
+      if (struct.isSetFinished()) {
+        optionals.set(1);
+      }
+      if (struct.isSetCandidates()) {
+        optionals.set(2);
+      }
+      if (struct.isSetInUse()) {
+        optionals.set(3);
+      }
+      if (struct.isSetDeleted()) {
+        optionals.set(4);
+      }
+      if (struct.isSetErrors()) {
+        optionals.set(5);
+      }
+      oprot.writeBitSet(optionals, 6);
+      if (struct.isSetStarted()) {
+        oprot.writeI64(struct.started);
+      }
+      if (struct.isSetFinished()) {
+        oprot.writeI64(struct.finished);
+      }
+      if (struct.isSetCandidates()) {
+        oprot.writeI64(struct.candidates);
+      }
+      if (struct.isSetInUse()) {
+        oprot.writeI64(struct.inUse);
+      }
+      if (struct.isSetDeleted()) {
+        oprot.writeI64(struct.deleted);
+      }
+      if (struct.isSetErrors()) {
+        oprot.writeI64(struct.errors);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, GcCycleStats struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(6);
+      if (incoming.get(0)) {
+        struct.started = iprot.readI64();
+        struct.setStartedIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.finished = iprot.readI64();
+        struct.setFinishedIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.candidates = iprot.readI64();
+        struct.setCandidatesIsSet(true);
+      }
+      if (incoming.get(3)) {
+        struct.inUse = iprot.readI64();
+        struct.setInUseIsSet(true);
+      }
+      if (incoming.get(4)) {
+        struct.deleted = iprot.readI64();
+        struct.setDeletedIsSet(true);
+      }
+      if (incoming.get(5)) {
+        struct.errors = iprot.readI64();
+        struct.setErrorsIsSet(true);
+      }
+    }
+  }
+
 }
 

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/master/thrift/Compacting.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/master/thrift/Compacting.java?rev=1359639&r1=1359638&r2=1359639&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/master/thrift/Compacting.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/master/thrift/Compacting.java Tue Jul 10 12:39:52 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.master.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 RUNNING_FIELD_DESC = new org.apache.thrift.protocol.TField("running", org.apache.thrift.protocol.TType.I32, (short)1);
   private static final org.apache.thrift.protocol.TField QUEUED_FIELD_DESC = new org.apache.thrift.protocol.TField("queued", org.apache.thrift.protocol.TType.I32, (short)2);
 
-  public int running;
-  public int queued;
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new CompactingStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new CompactingTupleSchemeFactory());
+  }
+
+  public int running; // required
+  public int queued; // 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 {
@@ -94,7 +107,6 @@ import org.slf4j.LoggerFactory;
   private static final int __RUNNING_ISSET_ID = 0;
   private static final int __QUEUED_ISSET_ID = 1;
   private BitSet __isset_bit_vector = new BitSet(2);
-
   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,10 +224,10 @@ import org.slf4j.LoggerFactory;
   public Object getFieldValue(_Fields field) {
     switch (field) {
     case RUNNING:
-      return new Integer(getRunning());
+      return Integer.valueOf(getRunning());
 
     case QUEUED:
-      return new Integer(getQueued());
+      return Integer.valueOf(getQueued());
 
     }
     throw new IllegalStateException();
@@ -311,54 +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: // RUNNING
-          if (field.type == org.apache.thrift.protocol.TType.I32) {
-            this.running = iprot.readI32();
-            setRunningIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 2: // QUEUED
-          if (field.type == org.apache.thrift.protocol.TType.I32) {
-            this.queued = iprot.readI32();
-            setQueuedIsSet(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(RUNNING_FIELD_DESC);
-    oprot.writeI32(this.running);
-    oprot.writeFieldEnd();
-    oprot.writeFieldBegin(QUEUED_FIELD_DESC);
-    oprot.writeI32(this.queued);
-    oprot.writeFieldEnd();
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -399,5 +368,108 @@ import org.slf4j.LoggerFactory;
     }
   }
 
+  private static class CompactingStandardSchemeFactory implements SchemeFactory {
+    public CompactingStandardScheme getScheme() {
+      return new CompactingStandardScheme();
+    }
+  }
+
+  private static class CompactingStandardScheme extends StandardScheme<Compacting> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, Compacting 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: // RUNNING
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.running = iprot.readI32();
+              struct.setRunningIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // QUEUED
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.queued = iprot.readI32();
+              struct.setQueuedIsSet(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, Compacting struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      oprot.writeFieldBegin(RUNNING_FIELD_DESC);
+      oprot.writeI32(struct.running);
+      oprot.writeFieldEnd();
+      oprot.writeFieldBegin(QUEUED_FIELD_DESC);
+      oprot.writeI32(struct.queued);
+      oprot.writeFieldEnd();
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class CompactingTupleSchemeFactory implements SchemeFactory {
+    public CompactingTupleScheme getScheme() {
+      return new CompactingTupleScheme();
+    }
+  }
+
+  private static class CompactingTupleScheme extends TupleScheme<Compacting> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, Compacting struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetRunning()) {
+        optionals.set(0);
+      }
+      if (struct.isSetQueued()) {
+        optionals.set(1);
+      }
+      oprot.writeBitSet(optionals, 2);
+      if (struct.isSetRunning()) {
+        oprot.writeI32(struct.running);
+      }
+      if (struct.isSetQueued()) {
+        oprot.writeI32(struct.queued);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, Compacting struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(2);
+      if (incoming.get(0)) {
+        struct.running = iprot.readI32();
+        struct.setRunningIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.queued = iprot.readI32();
+        struct.setQueuedIsSet(true);
+      }
+    }
+  }
+
 }
 

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/master/thrift/DeadServer.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/master/thrift/DeadServer.java?rev=1359639&r1=1359638&r2=1359639&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/master/thrift/DeadServer.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/master/thrift/DeadServer.java Tue Jul 10 12:39:52 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.master.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 LAST_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("lastStatus", org.apache.thrift.protocol.TType.I64, (short)2);
   private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRING, (short)3);
 
-  public String server;
-  public long lastStatus;
-  public String status;
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new DeadServerStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new DeadServerTupleSchemeFactory());
+  }
+
+  public String server; // required
+  public long lastStatus; // required
+  public String status; // 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 __LASTSTATUS_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);
@@ -260,7 +272,7 @@ import org.slf4j.LoggerFactory;
       return getServer();
 
     case LAST_STATUS:
-      return new Long(getLastStatus());
+      return Long.valueOf(getLastStatus());
 
     case STATUS:
       return getStatus();
@@ -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: // SERVER
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.server = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 2: // LAST_STATUS
-          if (field.type == org.apache.thrift.protocol.TType.I64) {
-            this.lastStatus = iprot.readI64();
-            setLastStatusIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 3: // STATUS
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.status = 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.server != null) {
-      oprot.writeFieldBegin(SERVER_FIELD_DESC);
-      oprot.writeString(this.server);
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldBegin(LAST_STATUS_FIELD_DESC);
-    oprot.writeI64(this.lastStatus);
-    oprot.writeFieldEnd();
-    if (this.status != null) {
-      oprot.writeFieldBegin(STATUS_FIELD_DESC);
-      oprot.writeString(this.status);
-      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 DeadServerStandardSchemeFactory implements SchemeFactory {
+    public DeadServerStandardScheme getScheme() {
+      return new DeadServerStandardScheme();
+    }
+  }
+
+  private static class DeadServerStandardScheme extends StandardScheme<DeadServer> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, DeadServer 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: // SERVER
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.server = iprot.readString();
+              struct.setServerIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // LAST_STATUS
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.lastStatus = iprot.readI64();
+              struct.setLastStatusIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // STATUS
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.status = iprot.readString();
+              struct.setStatusIsSet(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, DeadServer struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.server != null) {
+        oprot.writeFieldBegin(SERVER_FIELD_DESC);
+        oprot.writeString(struct.server);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldBegin(LAST_STATUS_FIELD_DESC);
+      oprot.writeI64(struct.lastStatus);
+      oprot.writeFieldEnd();
+      if (struct.status != null) {
+        oprot.writeFieldBegin(STATUS_FIELD_DESC);
+        oprot.writeString(struct.status);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class DeadServerTupleSchemeFactory implements SchemeFactory {
+    public DeadServerTupleScheme getScheme() {
+      return new DeadServerTupleScheme();
+    }
+  }
+
+  private static class DeadServerTupleScheme extends TupleScheme<DeadServer> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, DeadServer struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetServer()) {
+        optionals.set(0);
+      }
+      if (struct.isSetLastStatus()) {
+        optionals.set(1);
+      }
+      if (struct.isSetStatus()) {
+        optionals.set(2);
+      }
+      oprot.writeBitSet(optionals, 3);
+      if (struct.isSetServer()) {
+        oprot.writeString(struct.server);
+      }
+      if (struct.isSetLastStatus()) {
+        oprot.writeI64(struct.lastStatus);
+      }
+      if (struct.isSetStatus()) {
+        oprot.writeString(struct.status);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, DeadServer struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(3);
+      if (incoming.get(0)) {
+        struct.server = iprot.readString();
+        struct.setServerIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.lastStatus = iprot.readI64();
+        struct.setLastStatusIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.status = iprot.readString();
+        struct.setStatusIsSet(true);
+      }
+    }
+  }
+
 }
 



Mime
View raw message