hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject svn commit: r1234445 [4/6] - in /hbase/trunk/src/main/java/org/apache/hadoop/hbase: thrift/generated/ thrift2/generated/
Date Sun, 22 Jan 2012 01:52:51 GMT
Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnIncrement.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnIncrement.java?rev=1234445&r1=1234444&r2=1234445&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnIncrement.java
(original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnIncrement.java
Sun Jan 22 01:52:49 2012
@@ -1,10 +1,17 @@
 /**
- * Autogenerated by Thrift Compiler (0.7.0)
+ * 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.hadoop.hbase.thrift2.generated;
 
+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,9 +37,15 @@ public class TColumnIncrement implements
   private static final org.apache.thrift.protocol.TField QUALIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("qualifier",
org.apache.thrift.protocol.TType.STRING, (short)2);
   private static final org.apache.thrift.protocol.TField AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("amount",
org.apache.thrift.protocol.TType.I64, (short)3);
 
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new TColumnIncrementStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new TColumnIncrementTupleSchemeFactory());
+  }
+
   public ByteBuffer family; // required
   public ByteBuffer qualifier; // required
-  public long amount; // required
+  public long amount; // optional
 
   /** 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,7 @@ public class TColumnIncrement implements
   // isset id assignments
   private static final int __AMOUNT_ISSET_ID = 0;
   private BitSet __isset_bit_vector = new BitSet(1);
-
+  private _Fields optionals[] = {_Fields.AMOUNT};
   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);
@@ -404,69 +417,11 @@ public class TColumnIncrement implements
   }
 
   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: // FAMILY
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.family = iprot.readBinary();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 2: // QUALIFIER
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.qualifier = iprot.readBinary();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 3: // AMOUNT
-          if (field.type == org.apache.thrift.protocol.TType.I64) {
-            this.amount = iprot.readI64();
-            setAmountIsSet(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);
-    if (this.family != null) {
-      oprot.writeFieldBegin(FAMILY_FIELD_DESC);
-      oprot.writeBinary(this.family);
-      oprot.writeFieldEnd();
-    }
-    if (this.qualifier != null) {
-      oprot.writeFieldBegin(QUALIFIER_FIELD_DESC);
-      oprot.writeBinary(this.qualifier);
-      oprot.writeFieldEnd();
-    }
-    if (isSetAmount()) {
-      oprot.writeFieldBegin(AMOUNT_FIELD_DESC);
-      oprot.writeI64(this.amount);
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -527,5 +482,121 @@ public class TColumnIncrement implements
     }
   }
 
+  private static class TColumnIncrementStandardSchemeFactory implements SchemeFactory {
+    public TColumnIncrementStandardScheme getScheme() {
+      return new TColumnIncrementStandardScheme();
+    }
+  }
+
+  private static class TColumnIncrementStandardScheme extends StandardScheme<TColumnIncrement>
{
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, TColumnIncrement 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: // FAMILY
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.family = iprot.readBinary();
+              struct.setFamilyIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // QUALIFIER
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.qualifier = iprot.readBinary();
+              struct.setQualifierIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // AMOUNT
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.amount = iprot.readI64();
+              struct.setAmountIsSet(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, TColumnIncrement struct)
throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.family != null) {
+        oprot.writeFieldBegin(FAMILY_FIELD_DESC);
+        oprot.writeBinary(struct.family);
+        oprot.writeFieldEnd();
+      }
+      if (struct.qualifier != null) {
+        oprot.writeFieldBegin(QUALIFIER_FIELD_DESC);
+        oprot.writeBinary(struct.qualifier);
+        oprot.writeFieldEnd();
+      }
+      if (struct.isSetAmount()) {
+        oprot.writeFieldBegin(AMOUNT_FIELD_DESC);
+        oprot.writeI64(struct.amount);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class TColumnIncrementTupleSchemeFactory implements SchemeFactory {
+    public TColumnIncrementTupleScheme getScheme() {
+      return new TColumnIncrementTupleScheme();
+    }
+  }
+
+  private static class TColumnIncrementTupleScheme extends TupleScheme<TColumnIncrement>
{
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, TColumnIncrement struct)
throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      oprot.writeBinary(struct.family);
+      oprot.writeBinary(struct.qualifier);
+      BitSet optionals = new BitSet();
+      if (struct.isSetAmount()) {
+        optionals.set(0);
+      }
+      oprot.writeBitSet(optionals, 1);
+      if (struct.isSetAmount()) {
+        oprot.writeI64(struct.amount);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, TColumnIncrement struct)
throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      struct.family = iprot.readBinary();
+      struct.setFamilyIsSet(true);
+      struct.qualifier = iprot.readBinary();
+      struct.setQualifierIsSet(true);
+      BitSet incoming = iprot.readBitSet(1);
+      if (incoming.get(0)) {
+        struct.amount = iprot.readI64();
+        struct.setAmountIsSet(true);
+      }
+    }
+  }
+
 }
 

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnValue.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnValue.java?rev=1234445&r1=1234444&r2=1234445&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnValue.java
(original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnValue.java
Sun Jan 22 01:52:49 2012
@@ -1,10 +1,17 @@
 /**
- * Autogenerated by Thrift Compiler (0.7.0)
+ * 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.hadoop.hbase.thrift2.generated;
 
+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;
@@ -31,10 +38,16 @@ public class TColumnValue implements org
   private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value",
org.apache.thrift.protocol.TType.STRING, (short)3);
   private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp",
org.apache.thrift.protocol.TType.I64, (short)4);
 
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new TColumnValueStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new TColumnValueTupleSchemeFactory());
+  }
+
   public ByteBuffer family; // required
   public ByteBuffer qualifier; // required
   public ByteBuffer value; // required
-  public long timestamp; // required
+  public long timestamp; // optional
 
   /** The set of fields this struct contains, along with convenience methods for finding
and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -106,7 +119,7 @@ public class TColumnValue implements org
   // isset id assignments
   private static final int __TIMESTAMP_ISSET_ID = 0;
   private BitSet __isset_bit_vector = new BitSet(1);
-
+  private _Fields optionals[] = {_Fields.TIMESTAMP};
   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);
@@ -482,81 +495,11 @@ public class TColumnValue implements org
   }
 
   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: // FAMILY
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.family = iprot.readBinary();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 2: // QUALIFIER
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.qualifier = iprot.readBinary();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 3: // VALUE
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.value = iprot.readBinary();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 4: // TIMESTAMP
-          if (field.type == org.apache.thrift.protocol.TType.I64) {
-            this.timestamp = iprot.readI64();
-            setTimestampIsSet(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);
-    if (this.family != null) {
-      oprot.writeFieldBegin(FAMILY_FIELD_DESC);
-      oprot.writeBinary(this.family);
-      oprot.writeFieldEnd();
-    }
-    if (this.qualifier != null) {
-      oprot.writeFieldBegin(QUALIFIER_FIELD_DESC);
-      oprot.writeBinary(this.qualifier);
-      oprot.writeFieldEnd();
-    }
-    if (this.value != null) {
-      oprot.writeFieldBegin(VALUE_FIELD_DESC);
-      oprot.writeBinary(this.value);
-      oprot.writeFieldEnd();
-    }
-    if (isSetTimestamp()) {
-      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
-      oprot.writeI64(this.timestamp);
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -628,5 +571,137 @@ public class TColumnValue implements org
     }
   }
 
+  private static class TColumnValueStandardSchemeFactory implements SchemeFactory {
+    public TColumnValueStandardScheme getScheme() {
+      return new TColumnValueStandardScheme();
+    }
+  }
+
+  private static class TColumnValueStandardScheme extends StandardScheme<TColumnValue>
{
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, TColumnValue 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: // FAMILY
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.family = iprot.readBinary();
+              struct.setFamilyIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // QUALIFIER
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.qualifier = iprot.readBinary();
+              struct.setQualifierIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // VALUE
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.value = iprot.readBinary();
+              struct.setValueIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 4: // TIMESTAMP
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.timestamp = iprot.readI64();
+              struct.setTimestampIsSet(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, TColumnValue struct) throws
org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.family != null) {
+        oprot.writeFieldBegin(FAMILY_FIELD_DESC);
+        oprot.writeBinary(struct.family);
+        oprot.writeFieldEnd();
+      }
+      if (struct.qualifier != null) {
+        oprot.writeFieldBegin(QUALIFIER_FIELD_DESC);
+        oprot.writeBinary(struct.qualifier);
+        oprot.writeFieldEnd();
+      }
+      if (struct.value != null) {
+        oprot.writeFieldBegin(VALUE_FIELD_DESC);
+        oprot.writeBinary(struct.value);
+        oprot.writeFieldEnd();
+      }
+      if (struct.isSetTimestamp()) {
+        oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
+        oprot.writeI64(struct.timestamp);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class TColumnValueTupleSchemeFactory implements SchemeFactory {
+    public TColumnValueTupleScheme getScheme() {
+      return new TColumnValueTupleScheme();
+    }
+  }
+
+  private static class TColumnValueTupleScheme extends TupleScheme<TColumnValue> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, TColumnValue struct) throws
org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      oprot.writeBinary(struct.family);
+      oprot.writeBinary(struct.qualifier);
+      oprot.writeBinary(struct.value);
+      BitSet optionals = new BitSet();
+      if (struct.isSetTimestamp()) {
+        optionals.set(0);
+      }
+      oprot.writeBitSet(optionals, 1);
+      if (struct.isSetTimestamp()) {
+        oprot.writeI64(struct.timestamp);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, TColumnValue struct) throws
org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      struct.family = iprot.readBinary();
+      struct.setFamilyIsSet(true);
+      struct.qualifier = iprot.readBinary();
+      struct.setQualifierIsSet(true);
+      struct.value = iprot.readBinary();
+      struct.setValueIsSet(true);
+      BitSet incoming = iprot.readBitSet(1);
+      if (incoming.get(0)) {
+        struct.timestamp = iprot.readI64();
+        struct.setTimestampIsSet(true);
+      }
+    }
+  }
+
 }
 

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDelete.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDelete.java?rev=1234445&r1=1234444&r2=1234445&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDelete.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDelete.java Sun Jan
22 01:52:49 2012
@@ -1,10 +1,17 @@
 /**
- * Autogenerated by Thrift Compiler (0.7.0)
+ * 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.hadoop.hbase.thrift2.generated;
 
+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;
@@ -51,14 +58,20 @@ public class TDelete implements org.apac
   private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp",
org.apache.thrift.protocol.TType.I64, (short)3);
   private static final org.apache.thrift.protocol.TField DELETE_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("deleteType",
org.apache.thrift.protocol.TType.I32, (short)4);
 
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new TDeleteStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new TDeleteTupleSchemeFactory());
+  }
+
   public ByteBuffer row; // required
-  public List<TColumn> columns; // required
-  public long timestamp; // required
+  public List<TColumn> columns; // optional
+  public long timestamp; // optional
   /**
    * 
    * @see TDeleteType
    */
-  public TDeleteType deleteType; // required
+  public TDeleteType deleteType; // optional
 
   /** The set of fields this struct contains, along with convenience methods for finding
and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -134,7 +147,7 @@ public class TDelete implements org.apac
   // isset id assignments
   private static final int __TIMESTAMP_ISSET_ID = 0;
   private BitSet __isset_bit_vector = new BitSet(1);
-
+  private _Fields optionals[] = {_Fields.COLUMNS,_Fields.TIMESTAMP,_Fields.DELETE_TYPE};
   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);
@@ -515,103 +528,11 @@ public class TDelete implements org.apac
   }
 
   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: // ROW
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.row = iprot.readBinary();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 2: // COLUMNS
-          if (field.type == org.apache.thrift.protocol.TType.LIST) {
-            {
-              org.apache.thrift.protocol.TList _list12 = iprot.readListBegin();
-              this.columns = new ArrayList<TColumn>(_list12.size);
-              for (int _i13 = 0; _i13 < _list12.size; ++_i13)
-              {
-                TColumn _elem14; // required
-                _elem14 = new TColumn();
-                _elem14.read(iprot);
-                this.columns.add(_elem14);
-              }
-              iprot.readListEnd();
-            }
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 3: // TIMESTAMP
-          if (field.type == org.apache.thrift.protocol.TType.I64) {
-            this.timestamp = iprot.readI64();
-            setTimestampIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 4: // DELETE_TYPE
-          if (field.type == org.apache.thrift.protocol.TType.I32) {
-            this.deleteType = TDeleteType.findByValue(iprot.readI32());
-          } 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.row != null) {
-      oprot.writeFieldBegin(ROW_FIELD_DESC);
-      oprot.writeBinary(this.row);
-      oprot.writeFieldEnd();
-    }
-    if (this.columns != null) {
-      if (isSetColumns()) {
-        oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
-        {
-          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT,
this.columns.size()));
-          for (TColumn _iter15 : this.columns)
-          {
-            _iter15.write(oprot);
-          }
-          oprot.writeListEnd();
-        }
-        oprot.writeFieldEnd();
-      }
-    }
-    if (isSetTimestamp()) {
-      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
-      oprot.writeI64(this.timestamp);
-      oprot.writeFieldEnd();
-    }
-    if (this.deleteType != null) {
-      if (isSetDeleteType()) {
-        oprot.writeFieldBegin(DELETE_TYPE_FIELD_DESC);
-        oprot.writeI32(this.deleteType.getValue());
-        oprot.writeFieldEnd();
-      }
-    }
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -681,5 +602,189 @@ public class TDelete implements org.apac
     }
   }
 
+  private static class TDeleteStandardSchemeFactory implements SchemeFactory {
+    public TDeleteStandardScheme getScheme() {
+      return new TDeleteStandardScheme();
+    }
+  }
+
+  private static class TDeleteStandardScheme extends StandardScheme<TDelete> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, TDelete 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: // ROW
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.row = iprot.readBinary();
+              struct.setRowIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // COLUMNS
+            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+              {
+                org.apache.thrift.protocol.TList _list24 = iprot.readListBegin();
+                struct.columns = new ArrayList<TColumn>(_list24.size);
+                for (int _i25 = 0; _i25 < _list24.size; ++_i25)
+                {
+                  TColumn _elem26; // required
+                  _elem26 = new TColumn();
+                  _elem26.read(iprot);
+                  struct.columns.add(_elem26);
+                }
+                iprot.readListEnd();
+              }
+              struct.setColumnsIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // TIMESTAMP
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.timestamp = iprot.readI64();
+              struct.setTimestampIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 4: // DELETE_TYPE
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.deleteType = TDeleteType.findByValue(iprot.readI32());
+              struct.setDeleteTypeIsSet(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, TDelete struct) throws
org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.row != null) {
+        oprot.writeFieldBegin(ROW_FIELD_DESC);
+        oprot.writeBinary(struct.row);
+        oprot.writeFieldEnd();
+      }
+      if (struct.columns != null) {
+        if (struct.isSetColumns()) {
+          oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
+          {
+            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT,
struct.columns.size()));
+            for (TColumn _iter27 : struct.columns)
+            {
+              _iter27.write(oprot);
+            }
+            oprot.writeListEnd();
+          }
+          oprot.writeFieldEnd();
+        }
+      }
+      if (struct.isSetTimestamp()) {
+        oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
+        oprot.writeI64(struct.timestamp);
+        oprot.writeFieldEnd();
+      }
+      if (struct.deleteType != null) {
+        if (struct.isSetDeleteType()) {
+          oprot.writeFieldBegin(DELETE_TYPE_FIELD_DESC);
+          oprot.writeI32(struct.deleteType.getValue());
+          oprot.writeFieldEnd();
+        }
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class TDeleteTupleSchemeFactory implements SchemeFactory {
+    public TDeleteTupleScheme getScheme() {
+      return new TDeleteTupleScheme();
+    }
+  }
+
+  private static class TDeleteTupleScheme extends TupleScheme<TDelete> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, TDelete struct) throws org.apache.thrift.TException
{
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      oprot.writeBinary(struct.row);
+      BitSet optionals = new BitSet();
+      if (struct.isSetColumns()) {
+        optionals.set(0);
+      }
+      if (struct.isSetTimestamp()) {
+        optionals.set(1);
+      }
+      if (struct.isSetDeleteType()) {
+        optionals.set(2);
+      }
+      oprot.writeBitSet(optionals, 3);
+      if (struct.isSetColumns()) {
+        {
+          oprot.writeI32(struct.columns.size());
+          for (TColumn _iter28 : struct.columns)
+          {
+            _iter28.write(oprot);
+          }
+        }
+      }
+      if (struct.isSetTimestamp()) {
+        oprot.writeI64(struct.timestamp);
+      }
+      if (struct.isSetDeleteType()) {
+        oprot.writeI32(struct.deleteType.getValue());
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, TDelete struct) throws org.apache.thrift.TException
{
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      struct.row = iprot.readBinary();
+      struct.setRowIsSet(true);
+      BitSet incoming = iprot.readBitSet(3);
+      if (incoming.get(0)) {
+        {
+          org.apache.thrift.protocol.TList _list29 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT,
iprot.readI32());
+          struct.columns = new ArrayList<TColumn>(_list29.size);
+          for (int _i30 = 0; _i30 < _list29.size; ++_i30)
+          {
+            TColumn _elem31; // required
+            _elem31 = new TColumn();
+            _elem31.read(iprot);
+            struct.columns.add(_elem31);
+          }
+        }
+        struct.setColumnsIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.timestamp = iprot.readI64();
+        struct.setTimestampIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.deleteType = TDeleteType.findByValue(iprot.readI32());
+        struct.setDeleteTypeIsSet(true);
+      }
+    }
+  }
+
 }
 

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDeleteType.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDeleteType.java?rev=1234445&r1=1234444&r2=1234445&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDeleteType.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDeleteType.java Sun
Jan 22 01:52:49 2012
@@ -1,7 +1,8 @@
 /**
- * Autogenerated by Thrift Compiler (0.7.0)
+ * 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.hadoop.hbase.thrift2.generated;
 

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TGet.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TGet.java?rev=1234445&r1=1234444&r2=1234445&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TGet.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TGet.java Sun Jan
22 01:52:49 2012
@@ -1,10 +1,17 @@
 /**
- * Autogenerated by Thrift Compiler (0.7.0)
+ * 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.hadoop.hbase.thrift2.generated;
 
+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;
@@ -44,11 +51,17 @@ public class TGet implements org.apache.
   private static final org.apache.thrift.protocol.TField TIME_RANGE_FIELD_DESC = new org.apache.thrift.protocol.TField("timeRange",
org.apache.thrift.protocol.TType.STRUCT, (short)4);
   private static final org.apache.thrift.protocol.TField MAX_VERSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("maxVersions",
org.apache.thrift.protocol.TType.I32, (short)5);
 
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new TGetStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new TGetTupleSchemeFactory());
+  }
+
   public ByteBuffer row; // required
-  public List<TColumn> columns; // required
-  public long timestamp; // required
-  public TTimeRange timeRange; // required
-  public int maxVersions; // required
+  public List<TColumn> columns; // optional
+  public long timestamp; // optional
+  public TTimeRange timeRange; // optional
+  public int maxVersions; // optional
 
   /** The set of fields this struct contains, along with convenience methods for finding
and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -124,7 +137,7 @@ public class TGet implements org.apache.
   private static final int __TIMESTAMP_ISSET_ID = 0;
   private static final int __MAXVERSIONS_ISSET_ID = 1;
   private BitSet __isset_bit_vector = new BitSet(2);
-
+  private _Fields optionals[] = {_Fields.COLUMNS,_Fields.TIMESTAMP,_Fields.TIME_RANGE,_Fields.MAX_VERSIONS};
   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);
@@ -554,117 +567,11 @@ public class TGet implements org.apache.
   }
 
   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: // ROW
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.row = iprot.readBinary();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 2: // COLUMNS
-          if (field.type == org.apache.thrift.protocol.TType.LIST) {
-            {
-              org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();
-              this.columns = new ArrayList<TColumn>(_list4.size);
-              for (int _i5 = 0; _i5 < _list4.size; ++_i5)
-              {
-                TColumn _elem6; // required
-                _elem6 = new TColumn();
-                _elem6.read(iprot);
-                this.columns.add(_elem6);
-              }
-              iprot.readListEnd();
-            }
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 3: // TIMESTAMP
-          if (field.type == org.apache.thrift.protocol.TType.I64) {
-            this.timestamp = iprot.readI64();
-            setTimestampIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 4: // TIME_RANGE
-          if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-            this.timeRange = new TTimeRange();
-            this.timeRange.read(iprot);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 5: // MAX_VERSIONS
-          if (field.type == org.apache.thrift.protocol.TType.I32) {
-            this.maxVersions = iprot.readI32();
-            setMaxVersionsIsSet(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);
-    if (this.row != null) {
-      oprot.writeFieldBegin(ROW_FIELD_DESC);
-      oprot.writeBinary(this.row);
-      oprot.writeFieldEnd();
-    }
-    if (this.columns != null) {
-      if (isSetColumns()) {
-        oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
-        {
-          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT,
this.columns.size()));
-          for (TColumn _iter7 : this.columns)
-          {
-            _iter7.write(oprot);
-          }
-          oprot.writeListEnd();
-        }
-        oprot.writeFieldEnd();
-      }
-    }
-    if (isSetTimestamp()) {
-      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
-      oprot.writeI64(this.timestamp);
-      oprot.writeFieldEnd();
-    }
-    if (this.timeRange != null) {
-      if (isSetTimeRange()) {
-        oprot.writeFieldBegin(TIME_RANGE_FIELD_DESC);
-        this.timeRange.write(oprot);
-        oprot.writeFieldEnd();
-      }
-    }
-    if (isSetMaxVersions()) {
-      oprot.writeFieldBegin(MAX_VERSIONS_FIELD_DESC);
-      oprot.writeI32(this.maxVersions);
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -740,5 +647,214 @@ public class TGet implements org.apache.
     }
   }
 
+  private static class TGetStandardSchemeFactory implements SchemeFactory {
+    public TGetStandardScheme getScheme() {
+      return new TGetStandardScheme();
+    }
+  }
+
+  private static class TGetStandardScheme extends StandardScheme<TGet> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, TGet 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: // ROW
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.row = iprot.readBinary();
+              struct.setRowIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // COLUMNS
+            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+              {
+                org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
+                struct.columns = new ArrayList<TColumn>(_list8.size);
+                for (int _i9 = 0; _i9 < _list8.size; ++_i9)
+                {
+                  TColumn _elem10; // required
+                  _elem10 = new TColumn();
+                  _elem10.read(iprot);
+                  struct.columns.add(_elem10);
+                }
+                iprot.readListEnd();
+              }
+              struct.setColumnsIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // TIMESTAMP
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.timestamp = iprot.readI64();
+              struct.setTimestampIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 4: // TIME_RANGE
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+              struct.timeRange = new TTimeRange();
+              struct.timeRange.read(iprot);
+              struct.setTimeRangeIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 5: // MAX_VERSIONS
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.maxVersions = iprot.readI32();
+              struct.setMaxVersionsIsSet(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, TGet struct) throws org.apache.thrift.TException
{
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.row != null) {
+        oprot.writeFieldBegin(ROW_FIELD_DESC);
+        oprot.writeBinary(struct.row);
+        oprot.writeFieldEnd();
+      }
+      if (struct.columns != null) {
+        if (struct.isSetColumns()) {
+          oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
+          {
+            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT,
struct.columns.size()));
+            for (TColumn _iter11 : struct.columns)
+            {
+              _iter11.write(oprot);
+            }
+            oprot.writeListEnd();
+          }
+          oprot.writeFieldEnd();
+        }
+      }
+      if (struct.isSetTimestamp()) {
+        oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
+        oprot.writeI64(struct.timestamp);
+        oprot.writeFieldEnd();
+      }
+      if (struct.timeRange != null) {
+        if (struct.isSetTimeRange()) {
+          oprot.writeFieldBegin(TIME_RANGE_FIELD_DESC);
+          struct.timeRange.write(oprot);
+          oprot.writeFieldEnd();
+        }
+      }
+      if (struct.isSetMaxVersions()) {
+        oprot.writeFieldBegin(MAX_VERSIONS_FIELD_DESC);
+        oprot.writeI32(struct.maxVersions);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class TGetTupleSchemeFactory implements SchemeFactory {
+    public TGetTupleScheme getScheme() {
+      return new TGetTupleScheme();
+    }
+  }
+
+  private static class TGetTupleScheme extends TupleScheme<TGet> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, TGet struct) throws org.apache.thrift.TException
{
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      oprot.writeBinary(struct.row);
+      BitSet optionals = new BitSet();
+      if (struct.isSetColumns()) {
+        optionals.set(0);
+      }
+      if (struct.isSetTimestamp()) {
+        optionals.set(1);
+      }
+      if (struct.isSetTimeRange()) {
+        optionals.set(2);
+      }
+      if (struct.isSetMaxVersions()) {
+        optionals.set(3);
+      }
+      oprot.writeBitSet(optionals, 4);
+      if (struct.isSetColumns()) {
+        {
+          oprot.writeI32(struct.columns.size());
+          for (TColumn _iter12 : struct.columns)
+          {
+            _iter12.write(oprot);
+          }
+        }
+      }
+      if (struct.isSetTimestamp()) {
+        oprot.writeI64(struct.timestamp);
+      }
+      if (struct.isSetTimeRange()) {
+        struct.timeRange.write(oprot);
+      }
+      if (struct.isSetMaxVersions()) {
+        oprot.writeI32(struct.maxVersions);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, TGet struct) throws org.apache.thrift.TException
{
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      struct.row = iprot.readBinary();
+      struct.setRowIsSet(true);
+      BitSet incoming = iprot.readBitSet(4);
+      if (incoming.get(0)) {
+        {
+          org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT,
iprot.readI32());
+          struct.columns = new ArrayList<TColumn>(_list13.size);
+          for (int _i14 = 0; _i14 < _list13.size; ++_i14)
+          {
+            TColumn _elem15; // required
+            _elem15 = new TColumn();
+            _elem15.read(iprot);
+            struct.columns.add(_elem15);
+          }
+        }
+        struct.setColumnsIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.timestamp = iprot.readI64();
+        struct.setTimestampIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.timeRange = new TTimeRange();
+        struct.timeRange.read(iprot);
+        struct.setTimeRangeIsSet(true);
+      }
+      if (incoming.get(3)) {
+        struct.maxVersions = iprot.readI32();
+        struct.setMaxVersionsIsSet(true);
+      }
+    }
+  }
+
 }
 



Mime
View raw message