accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1399806 [6/6] - in /accumulo/trunk: ./ core/src/main/java/org/apache/accumulo/core/client/impl/ core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ core/src/main/java/org/apache/accumulo/core/data/thrift/ core/src/main/java/org...
Date Thu, 18 Oct 2012 19:27:48 GMT
Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/DeleteSomeDocs.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/DeleteSomeDocs.java?rev=1399806&r1=1399805&r2=1399806&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/DeleteSomeDocs.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/DeleteSomeDocs.java
Thu Oct 18 19:27:45 2012
@@ -23,6 +23,7 @@ import java.util.Random;
 
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.BatchDeleter;
+import org.apache.accumulo.core.client.BatchWriterConfig;
 import org.apache.accumulo.core.client.IteratorSetting;
 import org.apache.accumulo.core.data.Range;
 import org.apache.accumulo.core.iterators.user.RegExFilter;
@@ -48,8 +49,8 @@ public class DeleteSomeDocs extends Test
         patterns.add(props.getProperty((String) key));
     
     String pattern = patterns.get(rand.nextInt(patterns.size()));
-    
-    BatchDeleter ibd = state.getConnector().createBatchDeleter(indexTableName, Constants.NO_AUTHS,
8, 100000000, 60000, 3);
+    BatchWriterConfig bwc = new BatchWriterConfig();
+    BatchDeleter ibd = state.getConnector().createBatchDeleter(indexTableName, Constants.NO_AUTHS,
8, bwc);
     ibd.setRanges(Collections.singletonList(new Range()));
     
     IteratorSetting iterSettings = new IteratorSetting(100, RegExFilter.class);
@@ -61,7 +62,7 @@ public class DeleteSomeDocs extends Test
     
     ibd.close();
     
-    BatchDeleter dbd = state.getConnector().createBatchDeleter(dataTableName, Constants.NO_AUTHS,
8, 100000000, 60000, 3);
+    BatchDeleter dbd = state.getConnector().createBatchDeleter(dataTableName, Constants.NO_AUTHS,
8, bwc);
     dbd.setRanges(Collections.singletonList(new Range()));
     
     iterSettings = new IteratorSetting(100, RegExFilter.class);

Modified: accumulo/trunk/server/src/test/java/org/apache/accumulo/server/master/TestMergeState.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/test/java/org/apache/accumulo/server/master/TestMergeState.java?rev=1399806&r1=1399805&r2=1399806&view=diff
==============================================================================
--- accumulo/trunk/server/src/test/java/org/apache/accumulo/server/master/TestMergeState.java
(original)
+++ accumulo/trunk/server/src/test/java/org/apache/accumulo/server/master/TestMergeState.java
Thu Oct 18 19:27:45 2012
@@ -136,7 +136,7 @@ public class TestMergeState {
     Assert.assertEquals(MergeState.WAITING_FOR_OFFLINE, newState);
     
     // unassign the tablets
-    BatchDeleter deleter = connector.createBatchDeleter("!METADATA", Constants.NO_AUTHS,
1000, 1000l, 1000l, 1);
+    BatchDeleter deleter = connector.createBatchDeleter("!METADATA", Constants.NO_AUTHS,
1000, new BatchWriterConfig());
     deleter.fetchColumnFamily(Constants.METADATA_CURRENT_LOCATION_COLUMN_FAMILY);
     deleter.setRanges(Collections.singletonList(new Range()));
     deleter.delete();

Modified: accumulo/trunk/trace/src/main/java/org/apache/accumulo/cloudtrace/thrift/RemoteSpan.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/trace/src/main/java/org/apache/accumulo/cloudtrace/thrift/RemoteSpan.java?rev=1399806&r1=1399805&r2=1399806&view=diff
==============================================================================
--- accumulo/trunk/trace/src/main/java/org/apache/accumulo/cloudtrace/thrift/RemoteSpan.java
(original)
+++ accumulo/trunk/trace/src/main/java/org/apache/accumulo/cloudtrace/thrift/RemoteSpan.java
Thu Oct 18 19:27:45 2012
@@ -1,5 +1,5 @@
 /**
- * Autogenerated by Thrift Compiler (0.8.0)
+ * Autogenerated by Thrift Compiler (0.9.0)
  *
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  *  @generated
@@ -12,6 +12,9 @@ import org.apache.thrift.scheme.Standard
 
 import org.apache.thrift.scheme.TupleScheme;
 import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
 import java.util.List;
 import java.util.ArrayList;
 import java.util.Map;
@@ -57,7 +60,7 @@ import org.slf4j.LoggerFactory;
   public Map<String,String> data; // 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 {
+  @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum
{
     SENDER((short)1, "sender"),
     SVC((short)2, "svc"),
     TRACE_ID((short)3, "traceId"),
@@ -144,7 +147,7 @@ import org.slf4j.LoggerFactory;
   private static final int __PARENTID_ISSET_ID = 2;
   private static final int __START_ISSET_ID = 3;
   private static final int __STOP_ISSET_ID = 4;
-  private BitSet __isset_bit_vector = new BitSet(5);
+  private byte __isset_bitfield = 0;
   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);
@@ -207,8 +210,7 @@ import org.slf4j.LoggerFactory;
    * Performs a deep copy on <i>other</i>.
    */
   public RemoteSpan(RemoteSpan other) {
-    __isset_bit_vector.clear();
-    __isset_bit_vector.or(other.__isset_bit_vector);
+    __isset_bitfield = other.__isset_bitfield;
     if (other.isSetSender()) {
       this.sender = other.sender;
     }
@@ -321,16 +323,16 @@ import org.slf4j.LoggerFactory;
   }
 
   public void unsetTraceId() {
-    __isset_bit_vector.clear(__TRACEID_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TRACEID_ISSET_ID);
   }
 
   /** Returns true if field traceId is set (has been assigned a value) and false otherwise
*/
   public boolean isSetTraceId() {
-    return __isset_bit_vector.get(__TRACEID_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __TRACEID_ISSET_ID);
   }
 
   public void setTraceIdIsSet(boolean value) {
-    __isset_bit_vector.set(__TRACEID_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TRACEID_ISSET_ID, value);
   }
 
   public long getSpanId() {
@@ -344,16 +346,16 @@ import org.slf4j.LoggerFactory;
   }
 
   public void unsetSpanId() {
-    __isset_bit_vector.clear(__SPANID_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SPANID_ISSET_ID);
   }
 
   /** Returns true if field spanId is set (has been assigned a value) and false otherwise
*/
   public boolean isSetSpanId() {
-    return __isset_bit_vector.get(__SPANID_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __SPANID_ISSET_ID);
   }
 
   public void setSpanIdIsSet(boolean value) {
-    __isset_bit_vector.set(__SPANID_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SPANID_ISSET_ID, value);
   }
 
   public long getParentId() {
@@ -367,16 +369,16 @@ import org.slf4j.LoggerFactory;
   }
 
   public void unsetParentId() {
-    __isset_bit_vector.clear(__PARENTID_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PARENTID_ISSET_ID);
   }
 
   /** Returns true if field parentId is set (has been assigned a value) and false otherwise
*/
   public boolean isSetParentId() {
-    return __isset_bit_vector.get(__PARENTID_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __PARENTID_ISSET_ID);
   }
 
   public void setParentIdIsSet(boolean value) {
-    __isset_bit_vector.set(__PARENTID_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PARENTID_ISSET_ID, value);
   }
 
   public long getStart() {
@@ -390,16 +392,16 @@ import org.slf4j.LoggerFactory;
   }
 
   public void unsetStart() {
-    __isset_bit_vector.clear(__START_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __START_ISSET_ID);
   }
 
   /** Returns true if field start is set (has been assigned a value) and false otherwise
*/
   public boolean isSetStart() {
-    return __isset_bit_vector.get(__START_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __START_ISSET_ID);
   }
 
   public void setStartIsSet(boolean value) {
-    __isset_bit_vector.set(__START_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __START_ISSET_ID, value);
   }
 
   public long getStop() {
@@ -413,16 +415,16 @@ import org.slf4j.LoggerFactory;
   }
 
   public void unsetStop() {
-    __isset_bit_vector.clear(__STOP_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STOP_ISSET_ID);
   }
 
   /** Returns true if field stop is set (has been assigned a value) and false otherwise */
   public boolean isSetStop() {
-    return __isset_bit_vector.get(__STOP_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __STOP_ISSET_ID);
   }
 
   public void setStopIsSet(boolean value) {
-    __isset_bit_vector.set(__STOP_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STOP_ISSET_ID, value);
   }
 
   public String getDescription() {
@@ -900,6 +902,7 @@ import org.slf4j.LoggerFactory;
 
   public void validate() throws org.apache.thrift.TException {
     // check for required fields
+    // check for sub-struct validity
   }
 
   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -913,7 +916,7 @@ import org.slf4j.LoggerFactory;
   private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException
{
     try {
       // it doesn't seem like you should have to do this, but java serialization is wacky,
and doesn't call the default constructor.
-      __isset_bit_vector = new BitSet(1);
+      __isset_bitfield = 0;
       read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
     } catch (org.apache.thrift.TException te) {
       throw new java.io.IOException(te);

Modified: accumulo/trunk/trace/src/main/java/org/apache/accumulo/cloudtrace/thrift/SpanReceiver.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/trace/src/main/java/org/apache/accumulo/cloudtrace/thrift/SpanReceiver.java?rev=1399806&r1=1399805&r2=1399806&view=diff
==============================================================================
--- accumulo/trunk/trace/src/main/java/org/apache/accumulo/cloudtrace/thrift/SpanReceiver.java
(original)
+++ accumulo/trunk/trace/src/main/java/org/apache/accumulo/cloudtrace/thrift/SpanReceiver.java
Thu Oct 18 19:27:45 2012
@@ -1,5 +1,5 @@
 /**
- * Autogenerated by Thrift Compiler (0.8.0)
+ * Autogenerated by Thrift Compiler (0.9.0)
  *
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  *  @generated
@@ -12,6 +12,9 @@ import org.apache.thrift.scheme.Standard
 
 import org.apache.thrift.scheme.TupleScheme;
 import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
 import java.util.List;
 import java.util.ArrayList;
 import java.util.Map;
@@ -139,16 +142,20 @@ import org.slf4j.LoggerFactory;
       return processMap;
     }
 
-    private static class span<I extends Iface> extends org.apache.thrift.ProcessFunction<I,
span_args> {
+    public static class span<I extends Iface> extends org.apache.thrift.ProcessFunction<I,
span_args> {
       public span() {
         super("span");
       }
 
-      protected span_args getEmptyArgsInstance() {
+      public span_args getEmptyArgsInstance() {
         return new span_args();
       }
 
-      protected org.apache.thrift.TBase getResult(I iface, span_args args) throws org.apache.thrift.TException
{
+      protected boolean isOneway() {
+        return true;
+      }
+
+      public org.apache.thrift.TBase getResult(I iface, span_args args) throws org.apache.thrift.TException
{
         iface.span(args.span);
         return null;
       }
@@ -170,7 +177,7 @@ import org.slf4j.LoggerFactory;
     public RemoteSpan span; // 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 {
+    @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum
{
       SPAN((short)1, "span");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -405,6 +412,10 @@ import org.slf4j.LoggerFactory;
 
     public void validate() throws org.apache.thrift.TException {
       // check for required fields
+      // check for sub-struct validity
+      if (span != null) {
+        span.validate();
+      }
     }
 
     private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {

Modified: accumulo/trunk/trace/src/main/java/org/apache/accumulo/cloudtrace/thrift/TInfo.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/trace/src/main/java/org/apache/accumulo/cloudtrace/thrift/TInfo.java?rev=1399806&r1=1399805&r2=1399806&view=diff
==============================================================================
--- accumulo/trunk/trace/src/main/java/org/apache/accumulo/cloudtrace/thrift/TInfo.java (original)
+++ accumulo/trunk/trace/src/main/java/org/apache/accumulo/cloudtrace/thrift/TInfo.java Thu
Oct 18 19:27:45 2012
@@ -1,5 +1,5 @@
 /**
- * Autogenerated by Thrift Compiler (0.8.0)
+ * Autogenerated by Thrift Compiler (0.9.0)
  *
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  *  @generated
@@ -12,6 +12,9 @@ import org.apache.thrift.scheme.Standard
 
 import org.apache.thrift.scheme.TupleScheme;
 import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
 import java.util.List;
 import java.util.ArrayList;
 import java.util.Map;
@@ -43,7 +46,7 @@ import org.slf4j.LoggerFactory;
   public long parentId; // 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 {
+  @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum
{
     TRACE_ID((short)1, "traceId"),
     PARENT_ID((short)2, "parentId");
 
@@ -106,7 +109,7 @@ import org.slf4j.LoggerFactory;
   // isset id assignments
   private static final int __TRACEID_ISSET_ID = 0;
   private static final int __PARENTID_ISSET_ID = 1;
-  private BitSet __isset_bit_vector = new BitSet(2);
+  private byte __isset_bitfield = 0;
   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);
@@ -136,8 +139,7 @@ import org.slf4j.LoggerFactory;
    * Performs a deep copy on <i>other</i>.
    */
   public TInfo(TInfo other) {
-    __isset_bit_vector.clear();
-    __isset_bit_vector.or(other.__isset_bit_vector);
+    __isset_bitfield = other.__isset_bitfield;
     this.traceId = other.traceId;
     this.parentId = other.parentId;
   }
@@ -165,16 +167,16 @@ import org.slf4j.LoggerFactory;
   }
 
   public void unsetTraceId() {
-    __isset_bit_vector.clear(__TRACEID_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TRACEID_ISSET_ID);
   }
 
   /** Returns true if field traceId is set (has been assigned a value) and false otherwise
*/
   public boolean isSetTraceId() {
-    return __isset_bit_vector.get(__TRACEID_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __TRACEID_ISSET_ID);
   }
 
   public void setTraceIdIsSet(boolean value) {
-    __isset_bit_vector.set(__TRACEID_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TRACEID_ISSET_ID, value);
   }
 
   public long getParentId() {
@@ -188,16 +190,16 @@ import org.slf4j.LoggerFactory;
   }
 
   public void unsetParentId() {
-    __isset_bit_vector.clear(__PARENTID_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PARENTID_ISSET_ID);
   }
 
   /** Returns true if field parentId is set (has been assigned a value) and false otherwise
*/
   public boolean isSetParentId() {
-    return __isset_bit_vector.get(__PARENTID_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __PARENTID_ISSET_ID);
   }
 
   public void setParentIdIsSet(boolean value) {
-    __isset_bit_vector.set(__PARENTID_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PARENTID_ISSET_ID, value);
   }
 
   public void setFieldValue(_Fields field, Object value) {
@@ -348,6 +350,7 @@ import org.slf4j.LoggerFactory;
 
   public void validate() throws org.apache.thrift.TException {
     // check for required fields
+    // check for sub-struct validity
   }
 
   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -361,7 +364,7 @@ import org.slf4j.LoggerFactory;
   private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException
{
     try {
       // it doesn't seem like you should have to do this, but java serialization is wacky,
and doesn't call the default constructor.
-      __isset_bit_vector = new BitSet(1);
+      __isset_bitfield = 0;
       read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
     } catch (org.apache.thrift.TException te) {
       throw new java.io.IOException(te);

Modified: accumulo/trunk/trace/src/main/java/org/apache/accumulo/cloudtrace/thrift/TestService.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/trace/src/main/java/org/apache/accumulo/cloudtrace/thrift/TestService.java?rev=1399806&r1=1399805&r2=1399806&view=diff
==============================================================================
--- accumulo/trunk/trace/src/main/java/org/apache/accumulo/cloudtrace/thrift/TestService.java
(original)
+++ accumulo/trunk/trace/src/main/java/org/apache/accumulo/cloudtrace/thrift/TestService.java
Thu Oct 18 19:27:45 2012
@@ -1,5 +1,5 @@
 /**
- * Autogenerated by Thrift Compiler (0.8.0)
+ * Autogenerated by Thrift Compiler (0.9.0)
  *
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  *  @generated
@@ -12,6 +12,9 @@ import org.apache.thrift.scheme.Standard
 
 import org.apache.thrift.scheme.TupleScheme;
 import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
 import java.util.List;
 import java.util.ArrayList;
 import java.util.Map;
@@ -155,16 +158,20 @@ import org.slf4j.LoggerFactory;
       return processMap;
     }
 
-    private static class checkTrace<I extends Iface> extends org.apache.thrift.ProcessFunction<I,
checkTrace_args> {
+    public static class checkTrace<I extends Iface> extends org.apache.thrift.ProcessFunction<I,
checkTrace_args> {
       public checkTrace() {
         super("checkTrace");
       }
 
-      protected checkTrace_args getEmptyArgsInstance() {
+      public checkTrace_args getEmptyArgsInstance() {
         return new checkTrace_args();
       }
 
-      protected checkTrace_result getResult(I iface, checkTrace_args args) throws org.apache.thrift.TException
{
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public checkTrace_result getResult(I iface, checkTrace_args args) throws org.apache.thrift.TException
{
         checkTrace_result result = new checkTrace_result();
         result.success = iface.checkTrace(args.tinfo, args.message);
         result.setSuccessIsSet(true);
@@ -190,7 +197,7 @@ import org.slf4j.LoggerFactory;
     public String message; // 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 {
+    @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum
{
       TINFO((short)1, "tinfo"),
       MESSAGE((short)2, "message");
 
@@ -500,6 +507,10 @@ import org.slf4j.LoggerFactory;
 
     public void validate() throws org.apache.thrift.TException {
       // check for required fields
+      // check for sub-struct validity
+      if (tinfo != null) {
+        tinfo.validate();
+      }
     }
 
     private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -643,7 +654,7 @@ import org.slf4j.LoggerFactory;
     public boolean success; // 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 {
+    @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum
{
       SUCCESS((short)0, "success");
 
       private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -702,7 +713,7 @@ import org.slf4j.LoggerFactory;
 
     // isset id assignments
     private static final int __SUCCESS_ISSET_ID = 0;
-    private BitSet __isset_bit_vector = new BitSet(1);
+    private byte __isset_bitfield = 0;
     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);
@@ -727,8 +738,7 @@ import org.slf4j.LoggerFactory;
      * Performs a deep copy on <i>other</i>.
      */
     public checkTrace_result(checkTrace_result other) {
-      __isset_bit_vector.clear();
-      __isset_bit_vector.or(other.__isset_bit_vector);
+      __isset_bitfield = other.__isset_bitfield;
       this.success = other.success;
     }
 
@@ -753,16 +763,16 @@ import org.slf4j.LoggerFactory;
     }
 
     public void unsetSuccess() {
-      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
+      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
     }
 
     /** Returns true if field success is set (has been assigned a value) and false otherwise
*/
     public boolean isSetSuccess() {
-      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
+      return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
     }
 
     public void setSuccessIsSet(boolean value) {
-      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
+      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
     }
 
     public void setFieldValue(_Fields field, Object value) {
@@ -877,6 +887,7 @@ import org.slf4j.LoggerFactory;
 
     public void validate() throws org.apache.thrift.TException {
       // check for required fields
+      // check for sub-struct validity
     }
 
     private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -889,6 +900,8 @@ import org.slf4j.LoggerFactory;
 
     private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException
{
       try {
+        // it doesn't seem like you should have to do this, but java serialization is wacky,
and doesn't call the default constructor.
+        __isset_bitfield = 0;
         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
       } catch (org.apache.thrift.TException te) {
         throw new java.io.IOException(te);
@@ -936,9 +949,11 @@ import org.slf4j.LoggerFactory;
         struct.validate();
 
         oprot.writeStructBegin(STRUCT_DESC);
-        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-        oprot.writeBool(struct.success);
-        oprot.writeFieldEnd();
+        if (struct.isSetSuccess()) {
+          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+          oprot.writeBool(struct.success);
+          oprot.writeFieldEnd();
+        }
         oprot.writeFieldStop();
         oprot.writeStructEnd();
       }



Mime
View raw message