You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by la...@apache.org on 2013/07/12 08:04:40 UTC

svn commit: r1502433 [1/2] - in /hbase/branches/0.94/src: main/java/org/apache/hadoop/hbase/thrift2/ main/java/org/apache/hadoop/hbase/thrift2/generated/ main/resources/org/apache/hadoop/hbase/thrift2/ test/java/org/apache/hadoop/hbase/thrift2/

Author: larsgeorge
Date: Fri Jul 12 06:04:40 2013
New Revision: 1502433

URL: http://svn.apache.org/r1502433
Log:
HBASE-8832 Ensure HBASE-4658 is supported by Thrift 2 (Hamed Madani)

Modified:
    hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftUtilities.java
    hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDelete.java
    hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TGet.java
    hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THBaseService.java
    hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TPut.java
    hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TScan.java
    hbase/branches/0.94/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift
    hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/thrift2/TestThriftHBaseServiceHandler.java

Modified: hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftUtilities.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftUtilities.java?rev=1502433&r1=1502432&r2=1502433&view=diff
==============================================================================
--- hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftUtilities.java (original)
+++ hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftUtilities.java Fri Jul 12 06:04:40 2013
@@ -24,11 +24,14 @@ import org.apache.hadoop.hbase.KeyValue;
 import org.apache.hadoop.hbase.client.*;
 import org.apache.hadoop.hbase.filter.ParseFilter;
 import org.apache.hadoop.hbase.thrift2.generated.*;
+import org.apache.hadoop.hbase.util.Bytes;
 
 import java.io.IOException;
 import java.nio.ByteBuffer;
 import java.util.*;
 
+import static org.apache.hadoop.hbase.util.Bytes.getBytes;
+
 public class ThriftUtilities {
 
   private ThriftUtilities() {
@@ -60,6 +63,15 @@ public class ThriftUtilities {
       out.setMaxVersions(in.getMaxVersions());
     }
 
+    if (in.isSetFilterString()) {
+      ParseFilter parseFilter = new ParseFilter();
+      out.setFilter(parseFilter.parseFilterString(in.getFilterString()));
+    }
+
+    if (in.isSetAttributes()) {
+      addAttributes(out,in.getAttributes());
+    }
+
     if (!in.isSetColumns()) {
       return out;
     }
@@ -72,11 +84,6 @@ public class ThriftUtilities {
       }
     }
 
-    if (in.isSetFilterString()) {
-      ParseFilter parseFilter = new ParseFilter();
-      out.setFilter(parseFilter.parseFilterString(in.getFilterString()));
-    }
-
     return out;
   }
 
@@ -169,6 +176,10 @@ public class ThriftUtilities {
       }
     }
 
+    if (in.isSetAttributes()) {
+      addAttributes(out,in.getAttributes());
+    }
+
     return out;
   }
 
@@ -232,6 +243,11 @@ public class ThriftUtilities {
         out = new Delete(in.getRow());
       }
     }
+
+    if (in.isSetAttributes()) {
+      addAttributes(out,in.getAttributes());
+    }
+
     out.setWriteToWAL(in.isWriteToWal());
     return out;
   }
@@ -337,6 +353,10 @@ public class ThriftUtilities {
       out.setFilter(parseFilter.parseFilterString(in.getFilterString()));
     }
 
+    if (in.isSetAttributes()) {
+      addAttributes(out,in.getAttributes());
+    }
+
     return out;
   }
 
@@ -345,7 +365,23 @@ public class ThriftUtilities {
     for (TColumnIncrement column : in.getColumns()) {
       out.addColumn(column.getFamily(), column.getQualifier(), column.getAmount());
     }
+
     out.setWriteToWAL(in.isWriteToWal());
     return out;
   }
+
+  /**
+   * Adds all the attributes into the Operation object
+   */
+  private static void addAttributes(OperationWithAttributes op,
+                                    Map<ByteBuffer, ByteBuffer> attributes) {
+    if (attributes == null || attributes.size() == 0) {
+      return;
+    }
+    for (Map.Entry<ByteBuffer, ByteBuffer> entry : attributes.entrySet()) {
+      String name = Bytes.toStringBinary(getBytes(entry.getKey()));
+      byte[] value =  getBytes(entry.getValue());
+      op.setAttribute(name, value);
+    }
+  }
 }

Modified: hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDelete.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDelete.java?rev=1502433&r1=1502432&r2=1502433&view=diff
==============================================================================
--- hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDelete.java (original)
+++ hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDelete.java Fri Jul 12 06:04:40 2013
@@ -58,6 +58,7 @@ 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 org.apache.thrift.protocol.TField WRITE_TO_WAL_FIELD_DESC = new org.apache.thrift.protocol.TField("writeToWal", org.apache.thrift.protocol.TType.BOOL, (short)5);
+  private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.MAP, (short)6);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
@@ -74,6 +75,7 @@ public class TDelete implements org.apac
    */
   public TDeleteType deleteType; // optional
   public boolean writeToWal; // optional
+  public Map<ByteBuffer,ByteBuffer> attributes; // 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 {
@@ -85,7 +87,8 @@ public class TDelete implements org.apac
      * @see TDeleteType
      */
     DELETE_TYPE((short)4, "deleteType"),
-    WRITE_TO_WAL((short)5, "writeToWal");
+    WRITE_TO_WAL((short)5, "writeToWal"),
+    ATTRIBUTES((short)6, "attributes");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -110,6 +113,8 @@ public class TDelete implements org.apac
           return DELETE_TYPE;
         case 5: // WRITE_TO_WAL
           return WRITE_TO_WAL;
+        case 6: // ATTRIBUTES
+          return ATTRIBUTES;
         default:
           return null;
       }
@@ -153,7 +158,7 @@ public class TDelete implements org.apac
   private static final int __TIMESTAMP_ISSET_ID = 0;
   private static final int __WRITETOWAL_ISSET_ID = 1;
   private BitSet __isset_bit_vector = new BitSet(2);
-  private _Fields optionals[] = {_Fields.COLUMNS,_Fields.TIMESTAMP,_Fields.DELETE_TYPE,_Fields.WRITE_TO_WAL};
+  private _Fields optionals[] = {_Fields.COLUMNS,_Fields.TIMESTAMP,_Fields.DELETE_TYPE,_Fields.WRITE_TO_WAL,_Fields.ATTRIBUTES};
   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);
@@ -168,6 +173,10 @@ public class TDelete implements org.apac
         new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TDeleteType.class)));
     tmpMap.put(_Fields.WRITE_TO_WAL, new org.apache.thrift.meta_data.FieldMetaData("writeToWal", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+    tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
+            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING            , true), 
+            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING            , true))));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TDelete.class, metaDataMap);
   }
@@ -208,6 +217,23 @@ public class TDelete implements org.apac
       this.deleteType = other.deleteType;
     }
     this.writeToWal = other.writeToWal;
+    if (other.isSetAttributes()) {
+      Map<ByteBuffer,ByteBuffer> __this__attributes = new HashMap<ByteBuffer,ByteBuffer>();
+      for (Map.Entry<ByteBuffer, ByteBuffer> other_element : other.attributes.entrySet()) {
+
+        ByteBuffer other_element_key = other_element.getKey();
+        ByteBuffer other_element_value = other_element.getValue();
+
+        ByteBuffer __this__attributes_copy_key = org.apache.thrift.TBaseHelper.copyBinary(other_element_key);
+;
+
+        ByteBuffer __this__attributes_copy_value = org.apache.thrift.TBaseHelper.copyBinary(other_element_value);
+;
+
+        __this__attributes.put(__this__attributes_copy_key, __this__attributes_copy_value);
+      }
+      this.attributes = __this__attributes;
+    }
   }
 
   public TDelete deepCopy() {
@@ -224,6 +250,7 @@ public class TDelete implements org.apac
 
     this.writeToWal = true;
 
+    this.attributes = null;
   }
 
   public byte[] getRow() {
@@ -377,6 +404,41 @@ public class TDelete implements org.apac
     __isset_bit_vector.set(__WRITETOWAL_ISSET_ID, value);
   }
 
+  public int getAttributesSize() {
+    return (this.attributes == null) ? 0 : this.attributes.size();
+  }
+
+  public void putToAttributes(ByteBuffer key, ByteBuffer val) {
+    if (this.attributes == null) {
+      this.attributes = new HashMap<ByteBuffer,ByteBuffer>();
+    }
+    this.attributes.put(key, val);
+  }
+
+  public Map<ByteBuffer,ByteBuffer> getAttributes() {
+    return this.attributes;
+  }
+
+  public TDelete setAttributes(Map<ByteBuffer,ByteBuffer> attributes) {
+    this.attributes = attributes;
+    return this;
+  }
+
+  public void unsetAttributes() {
+    this.attributes = null;
+  }
+
+  /** Returns true if field attributes is set (has been assigned a value) and false otherwise */
+  public boolean isSetAttributes() {
+    return this.attributes != null;
+  }
+
+  public void setAttributesIsSet(boolean value) {
+    if (!value) {
+      this.attributes = null;
+    }
+  }
+
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
     case ROW:
@@ -419,6 +481,14 @@ public class TDelete implements org.apac
       }
       break;
 
+    case ATTRIBUTES:
+      if (value == null) {
+        unsetAttributes();
+      } else {
+        setAttributes((Map<ByteBuffer,ByteBuffer>)value);
+      }
+      break;
+
     }
   }
 
@@ -439,6 +509,9 @@ public class TDelete implements org.apac
     case WRITE_TO_WAL:
       return Boolean.valueOf(isWriteToWal());
 
+    case ATTRIBUTES:
+      return getAttributes();
+
     }
     throw new IllegalStateException();
   }
@@ -460,6 +533,8 @@ public class TDelete implements org.apac
       return isSetDeleteType();
     case WRITE_TO_WAL:
       return isSetWriteToWal();
+    case ATTRIBUTES:
+      return isSetAttributes();
     }
     throw new IllegalStateException();
   }
@@ -522,6 +597,15 @@ public class TDelete implements org.apac
         return false;
     }
 
+    boolean this_present_attributes = true && this.isSetAttributes();
+    boolean that_present_attributes = true && that.isSetAttributes();
+    if (this_present_attributes || that_present_attributes) {
+      if (!(this_present_attributes && that_present_attributes))
+        return false;
+      if (!this.attributes.equals(that.attributes))
+        return false;
+    }
+
     return true;
   }
 
@@ -588,6 +672,16 @@ public class TDelete implements org.apac
         return lastComparison;
       }
     }
+    lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetAttributes()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
     return 0;
   }
 
@@ -647,6 +741,16 @@ public class TDelete implements org.apac
       sb.append(this.writeToWal);
       first = false;
     }
+    if (isSetAttributes()) {
+      if (!first) sb.append(", ");
+      sb.append("attributes:");
+      if (this.attributes == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.attributes);
+      }
+      first = false;
+    }
     sb.append(")");
     return sb.toString();
   }
@@ -705,14 +809,14 @@ public class TDelete implements org.apac
           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)
+                org.apache.thrift.protocol.TList _list44 = iprot.readListBegin();
+                struct.columns = new ArrayList<TColumn>(_list44.size);
+                for (int _i45 = 0; _i45 < _list44.size; ++_i45)
                 {
-                  TColumn _elem26; // required
-                  _elem26 = new TColumn();
-                  _elem26.read(iprot);
-                  struct.columns.add(_elem26);
+                  TColumn _elem46; // required
+                  _elem46 = new TColumn();
+                  _elem46.read(iprot);
+                  struct.columns.add(_elem46);
                 }
                 iprot.readListEnd();
               }
@@ -745,6 +849,26 @@ public class TDelete implements org.apac
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
+          case 6: // ATTRIBUTES
+            if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
+              {
+                org.apache.thrift.protocol.TMap _map47 = iprot.readMapBegin();
+                struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map47.size);
+                for (int _i48 = 0; _i48 < _map47.size; ++_i48)
+                {
+                  ByteBuffer _key49; // required
+                  ByteBuffer _val50; // optional
+                  _key49 = iprot.readBinary();
+                  _val50 = iprot.readBinary();
+                  struct.attributes.put(_key49, _val50);
+                }
+                iprot.readMapEnd();
+              }
+              struct.setAttributesIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
           default:
             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
@@ -770,9 +894,9 @@ public class TDelete implements org.apac
           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)
+            for (TColumn _iter51 : struct.columns)
             {
-              _iter27.write(oprot);
+              _iter51.write(oprot);
             }
             oprot.writeListEnd();
           }
@@ -796,6 +920,21 @@ public class TDelete implements org.apac
         oprot.writeBool(struct.writeToWal);
         oprot.writeFieldEnd();
       }
+      if (struct.attributes != null) {
+        if (struct.isSetAttributes()) {
+          oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC);
+          {
+            oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size()));
+            for (Map.Entry<ByteBuffer, ByteBuffer> _iter52 : struct.attributes.entrySet())
+            {
+              oprot.writeBinary(_iter52.getKey());
+              oprot.writeBinary(_iter52.getValue());
+            }
+            oprot.writeMapEnd();
+          }
+          oprot.writeFieldEnd();
+        }
+      }
       oprot.writeFieldStop();
       oprot.writeStructEnd();
     }
@@ -827,13 +966,16 @@ public class TDelete implements org.apac
       if (struct.isSetWriteToWal()) {
         optionals.set(3);
       }
-      oprot.writeBitSet(optionals, 4);
+      if (struct.isSetAttributes()) {
+        optionals.set(4);
+      }
+      oprot.writeBitSet(optionals, 5);
       if (struct.isSetColumns()) {
         {
           oprot.writeI32(struct.columns.size());
-          for (TColumn _iter28 : struct.columns)
+          for (TColumn _iter53 : struct.columns)
           {
-            _iter28.write(oprot);
+            _iter53.write(oprot);
           }
         }
       }
@@ -846,6 +988,16 @@ public class TDelete implements org.apac
       if (struct.isSetWriteToWal()) {
         oprot.writeBool(struct.writeToWal);
       }
+      if (struct.isSetAttributes()) {
+        {
+          oprot.writeI32(struct.attributes.size());
+          for (Map.Entry<ByteBuffer, ByteBuffer> _iter54 : struct.attributes.entrySet())
+          {
+            oprot.writeBinary(_iter54.getKey());
+            oprot.writeBinary(_iter54.getValue());
+          }
+        }
+      }
     }
 
     @Override
@@ -853,17 +1005,17 @@ public class TDelete implements org.apac
       TTupleProtocol iprot = (TTupleProtocol) prot;
       struct.row = iprot.readBinary();
       struct.setRowIsSet(true);
-      BitSet incoming = iprot.readBitSet(4);
+      BitSet incoming = iprot.readBitSet(5);
       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)
+          org.apache.thrift.protocol.TList _list55 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.columns = new ArrayList<TColumn>(_list55.size);
+          for (int _i56 = 0; _i56 < _list55.size; ++_i56)
           {
-            TColumn _elem31; // required
-            _elem31 = new TColumn();
-            _elem31.read(iprot);
-            struct.columns.add(_elem31);
+            TColumn _elem57; // required
+            _elem57 = new TColumn();
+            _elem57.read(iprot);
+            struct.columns.add(_elem57);
           }
         }
         struct.setColumnsIsSet(true);
@@ -880,6 +1032,21 @@ public class TDelete implements org.apac
         struct.writeToWal = iprot.readBool();
         struct.setWriteToWalIsSet(true);
       }
+      if (incoming.get(4)) {
+        {
+          org.apache.thrift.protocol.TMap _map58 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map58.size);
+          for (int _i59 = 0; _i59 < _map58.size; ++_i59)
+          {
+            ByteBuffer _key60; // required
+            ByteBuffer _val61; // optional
+            _key60 = iprot.readBinary();
+            _val61 = iprot.readBinary();
+            struct.attributes.put(_key60, _val61);
+          }
+        }
+        struct.setAttributesIsSet(true);
+      }
     }
   }
 

Modified: hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TGet.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TGet.java?rev=1502433&r1=1502432&r2=1502433&view=diff
==============================================================================
--- hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TGet.java (original)
+++ hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TGet.java Fri Jul 12 06:04:40 2013
@@ -49,6 +49,7 @@ 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 org.apache.thrift.protocol.TField FILTER_STRING_FIELD_DESC = new org.apache.thrift.protocol.TField("filterString", org.apache.thrift.protocol.TType.STRING, (short)6);
+  private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.MAP, (short)7);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
@@ -62,6 +63,7 @@ public class TGet implements org.apache.
   public TTimeRange timeRange; // optional
   public int maxVersions; // optional
   public ByteBuffer filterString; // optional
+  public Map<ByteBuffer,ByteBuffer> attributes; // 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 {
@@ -70,7 +72,8 @@ public class TGet implements org.apache.
     TIMESTAMP((short)3, "timestamp"),
     TIME_RANGE((short)4, "timeRange"),
     MAX_VERSIONS((short)5, "maxVersions"),
-    FILTER_STRING((short)6, "filterString");
+    FILTER_STRING((short)6, "filterString"),
+    ATTRIBUTES((short)7, "attributes");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -97,6 +100,8 @@ public class TGet implements org.apache.
           return MAX_VERSIONS;
         case 6: // FILTER_STRING
           return FILTER_STRING;
+        case 7: // ATTRIBUTES
+          return ATTRIBUTES;
         default:
           return null;
       }
@@ -140,7 +145,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,_Fields.FILTER_STRING};
+  private _Fields optionals[] = {_Fields.COLUMNS,_Fields.TIMESTAMP,_Fields.TIME_RANGE,_Fields.MAX_VERSIONS,_Fields.FILTER_STRING,_Fields.ATTRIBUTES};
   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);
@@ -157,6 +162,10 @@ public class TGet implements org.apache.
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
     tmpMap.put(_Fields.FILTER_STRING, new org.apache.thrift.meta_data.FieldMetaData("filterString", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , true)));
+    tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
+            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING            , true), 
+            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING            , true))));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TGet.class, metaDataMap);
   }
@@ -197,6 +206,23 @@ public class TGet implements org.apache.
       this.filterString = org.apache.thrift.TBaseHelper.copyBinary(other.filterString);
 ;
     }
+    if (other.isSetAttributes()) {
+      Map<ByteBuffer,ByteBuffer> __this__attributes = new HashMap<ByteBuffer,ByteBuffer>();
+      for (Map.Entry<ByteBuffer, ByteBuffer> other_element : other.attributes.entrySet()) {
+
+        ByteBuffer other_element_key = other_element.getKey();
+        ByteBuffer other_element_value = other_element.getValue();
+
+        ByteBuffer __this__attributes_copy_key = org.apache.thrift.TBaseHelper.copyBinary(other_element_key);
+;
+
+        ByteBuffer __this__attributes_copy_value = org.apache.thrift.TBaseHelper.copyBinary(other_element_value);
+;
+
+        __this__attributes.put(__this__attributes_copy_key, __this__attributes_copy_value);
+      }
+      this.attributes = __this__attributes;
+    }
   }
 
   public TGet deepCopy() {
@@ -213,6 +239,7 @@ public class TGet implements org.apache.
     setMaxVersionsIsSet(false);
     this.maxVersions = 0;
     this.filterString = null;
+    this.attributes = null;
   }
 
   public byte[] getRow() {
@@ -392,6 +419,41 @@ public class TGet implements org.apache.
     }
   }
 
+  public int getAttributesSize() {
+    return (this.attributes == null) ? 0 : this.attributes.size();
+  }
+
+  public void putToAttributes(ByteBuffer key, ByteBuffer val) {
+    if (this.attributes == null) {
+      this.attributes = new HashMap<ByteBuffer,ByteBuffer>();
+    }
+    this.attributes.put(key, val);
+  }
+
+  public Map<ByteBuffer,ByteBuffer> getAttributes() {
+    return this.attributes;
+  }
+
+  public TGet setAttributes(Map<ByteBuffer,ByteBuffer> attributes) {
+    this.attributes = attributes;
+    return this;
+  }
+
+  public void unsetAttributes() {
+    this.attributes = null;
+  }
+
+  /** Returns true if field attributes is set (has been assigned a value) and false otherwise */
+  public boolean isSetAttributes() {
+    return this.attributes != null;
+  }
+
+  public void setAttributesIsSet(boolean value) {
+    if (!value) {
+      this.attributes = null;
+    }
+  }
+
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
     case ROW:
@@ -442,6 +504,14 @@ public class TGet implements org.apache.
       }
       break;
 
+    case ATTRIBUTES:
+      if (value == null) {
+        unsetAttributes();
+      } else {
+        setAttributes((Map<ByteBuffer,ByteBuffer>)value);
+      }
+      break;
+
     }
   }
 
@@ -465,6 +535,9 @@ public class TGet implements org.apache.
     case FILTER_STRING:
       return getFilterString();
 
+    case ATTRIBUTES:
+      return getAttributes();
+
     }
     throw new IllegalStateException();
   }
@@ -488,6 +561,8 @@ public class TGet implements org.apache.
       return isSetMaxVersions();
     case FILTER_STRING:
       return isSetFilterString();
+    case ATTRIBUTES:
+      return isSetAttributes();
     }
     throw new IllegalStateException();
   }
@@ -559,6 +634,15 @@ public class TGet implements org.apache.
         return false;
     }
 
+    boolean this_present_attributes = true && this.isSetAttributes();
+    boolean that_present_attributes = true && that.isSetAttributes();
+    if (this_present_attributes || that_present_attributes) {
+      if (!(this_present_attributes && that_present_attributes))
+        return false;
+      if (!this.attributes.equals(that.attributes))
+        return false;
+    }
+
     return true;
   }
 
@@ -635,6 +719,16 @@ public class TGet implements org.apache.
         return lastComparison;
       }
     }
+    lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetAttributes()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
     return 0;
   }
 
@@ -704,6 +798,16 @@ public class TGet implements org.apache.
       }
       first = false;
     }
+    if (isSetAttributes()) {
+      if (!first) sb.append(", ");
+      sb.append("attributes:");
+      if (this.attributes == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.attributes);
+      }
+      first = false;
+    }
     sb.append(")");
     return sb.toString();
   }
@@ -811,6 +915,26 @@ public class TGet implements org.apache.
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
+          case 7: // ATTRIBUTES
+            if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
+              {
+                org.apache.thrift.protocol.TMap _map11 = iprot.readMapBegin();
+                struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map11.size);
+                for (int _i12 = 0; _i12 < _map11.size; ++_i12)
+                {
+                  ByteBuffer _key13; // required
+                  ByteBuffer _val14; // optional
+                  _key13 = iprot.readBinary();
+                  _val14 = iprot.readBinary();
+                  struct.attributes.put(_key13, _val14);
+                }
+                iprot.readMapEnd();
+              }
+              struct.setAttributesIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
           default:
             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
@@ -836,9 +960,9 @@ public class TGet implements org.apache.
           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)
+            for (TColumn _iter15 : struct.columns)
             {
-              _iter11.write(oprot);
+              _iter15.write(oprot);
             }
             oprot.writeListEnd();
           }
@@ -869,6 +993,21 @@ public class TGet implements org.apache.
           oprot.writeFieldEnd();
         }
       }
+      if (struct.attributes != null) {
+        if (struct.isSetAttributes()) {
+          oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC);
+          {
+            oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size()));
+            for (Map.Entry<ByteBuffer, ByteBuffer> _iter16 : struct.attributes.entrySet())
+            {
+              oprot.writeBinary(_iter16.getKey());
+              oprot.writeBinary(_iter16.getValue());
+            }
+            oprot.writeMapEnd();
+          }
+          oprot.writeFieldEnd();
+        }
+      }
       oprot.writeFieldStop();
       oprot.writeStructEnd();
     }
@@ -903,13 +1042,16 @@ public class TGet implements org.apache.
       if (struct.isSetFilterString()) {
         optionals.set(4);
       }
-      oprot.writeBitSet(optionals, 5);
+      if (struct.isSetAttributes()) {
+        optionals.set(5);
+      }
+      oprot.writeBitSet(optionals, 6);
       if (struct.isSetColumns()) {
         {
           oprot.writeI32(struct.columns.size());
-          for (TColumn _iter12 : struct.columns)
+          for (TColumn _iter17 : struct.columns)
           {
-            _iter12.write(oprot);
+            _iter17.write(oprot);
           }
         }
       }
@@ -925,6 +1067,16 @@ public class TGet implements org.apache.
       if (struct.isSetFilterString()) {
         oprot.writeBinary(struct.filterString);
       }
+      if (struct.isSetAttributes()) {
+        {
+          oprot.writeI32(struct.attributes.size());
+          for (Map.Entry<ByteBuffer, ByteBuffer> _iter18 : struct.attributes.entrySet())
+          {
+            oprot.writeBinary(_iter18.getKey());
+            oprot.writeBinary(_iter18.getValue());
+          }
+        }
+      }
     }
 
     @Override
@@ -932,17 +1084,17 @@ public class TGet implements org.apache.
       TTupleProtocol iprot = (TTupleProtocol) prot;
       struct.row = iprot.readBinary();
       struct.setRowIsSet(true);
-      BitSet incoming = iprot.readBitSet(5);
+      BitSet incoming = iprot.readBitSet(6);
       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)
+          org.apache.thrift.protocol.TList _list19 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.columns = new ArrayList<TColumn>(_list19.size);
+          for (int _i20 = 0; _i20 < _list19.size; ++_i20)
           {
-            TColumn _elem15; // required
-            _elem15 = new TColumn();
-            _elem15.read(iprot);
-            struct.columns.add(_elem15);
+            TColumn _elem21; // required
+            _elem21 = new TColumn();
+            _elem21.read(iprot);
+            struct.columns.add(_elem21);
           }
         }
         struct.setColumnsIsSet(true);
@@ -964,6 +1116,21 @@ public class TGet implements org.apache.
         struct.filterString = iprot.readBinary();
         struct.setFilterStringIsSet(true);
       }
+      if (incoming.get(5)) {
+        {
+          org.apache.thrift.protocol.TMap _map22 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map22.size);
+          for (int _i23 = 0; _i23 < _map22.size; ++_i23)
+          {
+            ByteBuffer _key24; // required
+            ByteBuffer _val25; // optional
+            _key24 = iprot.readBinary();
+            _val25 = iprot.readBinary();
+            struct.attributes.put(_key24, _val25);
+          }
+        }
+        struct.setAttributesIsSet(true);
+      }
     }
   }
 

Modified: hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THBaseService.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THBaseService.java?rev=1502433&r1=1502432&r2=1502433&view=diff
==============================================================================
--- hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THBaseService.java (original)
+++ hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THBaseService.java Fri Jul 12 06:04:40 2013
@@ -3702,14 +3702,14 @@ public class THBaseService {
             case 2: // GETS
               if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                 {
-                  org.apache.thrift.protocol.TList _list48 = iprot.readListBegin();
-                  struct.gets = new ArrayList<TGet>(_list48.size);
-                  for (int _i49 = 0; _i49 < _list48.size; ++_i49)
+                  org.apache.thrift.protocol.TList _list88 = iprot.readListBegin();
+                  struct.gets = new ArrayList<TGet>(_list88.size);
+                  for (int _i89 = 0; _i89 < _list88.size; ++_i89)
                   {
-                    TGet _elem50; // required
-                    _elem50 = new TGet();
-                    _elem50.read(iprot);
-                    struct.gets.add(_elem50);
+                    TGet _elem90; // required
+                    _elem90 = new TGet();
+                    _elem90.read(iprot);
+                    struct.gets.add(_elem90);
                   }
                   iprot.readListEnd();
                 }
@@ -3742,9 +3742,9 @@ public class THBaseService {
           oprot.writeFieldBegin(GETS_FIELD_DESC);
           {
             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.gets.size()));
-            for (TGet _iter51 : struct.gets)
+            for (TGet _iter91 : struct.gets)
             {
-              _iter51.write(oprot);
+              _iter91.write(oprot);
             }
             oprot.writeListEnd();
           }
@@ -3770,9 +3770,9 @@ public class THBaseService {
         oprot.writeBinary(struct.table);
         {
           oprot.writeI32(struct.gets.size());
-          for (TGet _iter52 : struct.gets)
+          for (TGet _iter92 : struct.gets)
           {
-            _iter52.write(oprot);
+            _iter92.write(oprot);
           }
         }
       }
@@ -3783,14 +3783,14 @@ public class THBaseService {
         struct.table = iprot.readBinary();
         struct.setTableIsSet(true);
         {
-          org.apache.thrift.protocol.TList _list53 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-          struct.gets = new ArrayList<TGet>(_list53.size);
-          for (int _i54 = 0; _i54 < _list53.size; ++_i54)
+          org.apache.thrift.protocol.TList _list93 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.gets = new ArrayList<TGet>(_list93.size);
+          for (int _i94 = 0; _i94 < _list93.size; ++_i94)
           {
-            TGet _elem55; // required
-            _elem55 = new TGet();
-            _elem55.read(iprot);
-            struct.gets.add(_elem55);
+            TGet _elem95; // required
+            _elem95 = new TGet();
+            _elem95.read(iprot);
+            struct.gets.add(_elem95);
           }
         }
         struct.setGetsIsSet(true);
@@ -4184,14 +4184,14 @@ public class THBaseService {
             case 0: // SUCCESS
               if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                 {
-                  org.apache.thrift.protocol.TList _list56 = iprot.readListBegin();
-                  struct.success = new ArrayList<TResult>(_list56.size);
-                  for (int _i57 = 0; _i57 < _list56.size; ++_i57)
+                  org.apache.thrift.protocol.TList _list96 = iprot.readListBegin();
+                  struct.success = new ArrayList<TResult>(_list96.size);
+                  for (int _i97 = 0; _i97 < _list96.size; ++_i97)
                   {
-                    TResult _elem58; // required
-                    _elem58 = new TResult();
-                    _elem58.read(iprot);
-                    struct.success.add(_elem58);
+                    TResult _elem98; // required
+                    _elem98 = new TResult();
+                    _elem98.read(iprot);
+                    struct.success.add(_elem98);
                   }
                   iprot.readListEnd();
                 }
@@ -4228,9 +4228,9 @@ public class THBaseService {
           oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
           {
             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
-            for (TResult _iter59 : struct.success)
+            for (TResult _iter99 : struct.success)
             {
-              _iter59.write(oprot);
+              _iter99.write(oprot);
             }
             oprot.writeListEnd();
           }
@@ -4269,9 +4269,9 @@ public class THBaseService {
         if (struct.isSetSuccess()) {
           {
             oprot.writeI32(struct.success.size());
-            for (TResult _iter60 : struct.success)
+            for (TResult _iter100 : struct.success)
             {
-              _iter60.write(oprot);
+              _iter100.write(oprot);
             }
           }
         }
@@ -4286,14 +4286,14 @@ public class THBaseService {
         BitSet incoming = iprot.readBitSet(2);
         if (incoming.get(0)) {
           {
-            org.apache.thrift.protocol.TList _list61 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-            struct.success = new ArrayList<TResult>(_list61.size);
-            for (int _i62 = 0; _i62 < _list61.size; ++_i62)
+            org.apache.thrift.protocol.TList _list101 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+            struct.success = new ArrayList<TResult>(_list101.size);
+            for (int _i102 = 0; _i102 < _list101.size; ++_i102)
             {
-              TResult _elem63; // required
-              _elem63 = new TResult();
-              _elem63.read(iprot);
-              struct.success.add(_elem63);
+              TResult _elem103; // required
+              _elem103 = new TResult();
+              _elem103.read(iprot);
+              struct.success.add(_elem103);
             }
           }
           struct.setSuccessIsSet(true);
@@ -7000,14 +7000,14 @@ public class THBaseService {
             case 2: // PUTS
               if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                 {
-                  org.apache.thrift.protocol.TList _list64 = iprot.readListBegin();
-                  struct.puts = new ArrayList<TPut>(_list64.size);
-                  for (int _i65 = 0; _i65 < _list64.size; ++_i65)
+                  org.apache.thrift.protocol.TList _list104 = iprot.readListBegin();
+                  struct.puts = new ArrayList<TPut>(_list104.size);
+                  for (int _i105 = 0; _i105 < _list104.size; ++_i105)
                   {
-                    TPut _elem66; // required
-                    _elem66 = new TPut();
-                    _elem66.read(iprot);
-                    struct.puts.add(_elem66);
+                    TPut _elem106; // required
+                    _elem106 = new TPut();
+                    _elem106.read(iprot);
+                    struct.puts.add(_elem106);
                   }
                   iprot.readListEnd();
                 }
@@ -7040,9 +7040,9 @@ public class THBaseService {
           oprot.writeFieldBegin(PUTS_FIELD_DESC);
           {
             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.puts.size()));
-            for (TPut _iter67 : struct.puts)
+            for (TPut _iter107 : struct.puts)
             {
-              _iter67.write(oprot);
+              _iter107.write(oprot);
             }
             oprot.writeListEnd();
           }
@@ -7068,9 +7068,9 @@ public class THBaseService {
         oprot.writeBinary(struct.table);
         {
           oprot.writeI32(struct.puts.size());
-          for (TPut _iter68 : struct.puts)
+          for (TPut _iter108 : struct.puts)
           {
-            _iter68.write(oprot);
+            _iter108.write(oprot);
           }
         }
       }
@@ -7081,14 +7081,14 @@ public class THBaseService {
         struct.table = iprot.readBinary();
         struct.setTableIsSet(true);
         {
-          org.apache.thrift.protocol.TList _list69 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-          struct.puts = new ArrayList<TPut>(_list69.size);
-          for (int _i70 = 0; _i70 < _list69.size; ++_i70)
+          org.apache.thrift.protocol.TList _list109 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.puts = new ArrayList<TPut>(_list109.size);
+          for (int _i110 = 0; _i110 < _list109.size; ++_i110)
           {
-            TPut _elem71; // required
-            _elem71 = new TPut();
-            _elem71.read(iprot);
-            struct.puts.add(_elem71);
+            TPut _elem111; // required
+            _elem111 = new TPut();
+            _elem111.read(iprot);
+            struct.puts.add(_elem111);
           }
         }
         struct.setPutsIsSet(true);
@@ -8720,14 +8720,14 @@ public class THBaseService {
             case 2: // DELETES
               if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                 {
-                  org.apache.thrift.protocol.TList _list72 = iprot.readListBegin();
-                  struct.deletes = new ArrayList<TDelete>(_list72.size);
-                  for (int _i73 = 0; _i73 < _list72.size; ++_i73)
+                  org.apache.thrift.protocol.TList _list112 = iprot.readListBegin();
+                  struct.deletes = new ArrayList<TDelete>(_list112.size);
+                  for (int _i113 = 0; _i113 < _list112.size; ++_i113)
                   {
-                    TDelete _elem74; // required
-                    _elem74 = new TDelete();
-                    _elem74.read(iprot);
-                    struct.deletes.add(_elem74);
+                    TDelete _elem114; // required
+                    _elem114 = new TDelete();
+                    _elem114.read(iprot);
+                    struct.deletes.add(_elem114);
                   }
                   iprot.readListEnd();
                 }
@@ -8760,9 +8760,9 @@ public class THBaseService {
           oprot.writeFieldBegin(DELETES_FIELD_DESC);
           {
             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.deletes.size()));
-            for (TDelete _iter75 : struct.deletes)
+            for (TDelete _iter115 : struct.deletes)
             {
-              _iter75.write(oprot);
+              _iter115.write(oprot);
             }
             oprot.writeListEnd();
           }
@@ -8788,9 +8788,9 @@ public class THBaseService {
         oprot.writeBinary(struct.table);
         {
           oprot.writeI32(struct.deletes.size());
-          for (TDelete _iter76 : struct.deletes)
+          for (TDelete _iter116 : struct.deletes)
           {
-            _iter76.write(oprot);
+            _iter116.write(oprot);
           }
         }
       }
@@ -8801,14 +8801,14 @@ public class THBaseService {
         struct.table = iprot.readBinary();
         struct.setTableIsSet(true);
         {
-          org.apache.thrift.protocol.TList _list77 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-          struct.deletes = new ArrayList<TDelete>(_list77.size);
-          for (int _i78 = 0; _i78 < _list77.size; ++_i78)
+          org.apache.thrift.protocol.TList _list117 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.deletes = new ArrayList<TDelete>(_list117.size);
+          for (int _i118 = 0; _i118 < _list117.size; ++_i118)
           {
-            TDelete _elem79; // required
-            _elem79 = new TDelete();
-            _elem79.read(iprot);
-            struct.deletes.add(_elem79);
+            TDelete _elem119; // required
+            _elem119 = new TDelete();
+            _elem119.read(iprot);
+            struct.deletes.add(_elem119);
           }
         }
         struct.setDeletesIsSet(true);
@@ -9202,14 +9202,14 @@ public class THBaseService {
             case 0: // SUCCESS
               if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                 {
-                  org.apache.thrift.protocol.TList _list80 = iprot.readListBegin();
-                  struct.success = new ArrayList<TDelete>(_list80.size);
-                  for (int _i81 = 0; _i81 < _list80.size; ++_i81)
+                  org.apache.thrift.protocol.TList _list120 = iprot.readListBegin();
+                  struct.success = new ArrayList<TDelete>(_list120.size);
+                  for (int _i121 = 0; _i121 < _list120.size; ++_i121)
                   {
-                    TDelete _elem82; // required
-                    _elem82 = new TDelete();
-                    _elem82.read(iprot);
-                    struct.success.add(_elem82);
+                    TDelete _elem122; // required
+                    _elem122 = new TDelete();
+                    _elem122.read(iprot);
+                    struct.success.add(_elem122);
                   }
                   iprot.readListEnd();
                 }
@@ -9246,9 +9246,9 @@ public class THBaseService {
           oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
           {
             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
-            for (TDelete _iter83 : struct.success)
+            for (TDelete _iter123 : struct.success)
             {
-              _iter83.write(oprot);
+              _iter123.write(oprot);
             }
             oprot.writeListEnd();
           }
@@ -9287,9 +9287,9 @@ public class THBaseService {
         if (struct.isSetSuccess()) {
           {
             oprot.writeI32(struct.success.size());
-            for (TDelete _iter84 : struct.success)
+            for (TDelete _iter124 : struct.success)
             {
-              _iter84.write(oprot);
+              _iter124.write(oprot);
             }
           }
         }
@@ -9304,14 +9304,14 @@ public class THBaseService {
         BitSet incoming = iprot.readBitSet(2);
         if (incoming.get(0)) {
           {
-            org.apache.thrift.protocol.TList _list85 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-            struct.success = new ArrayList<TDelete>(_list85.size);
-            for (int _i86 = 0; _i86 < _list85.size; ++_i86)
+            org.apache.thrift.protocol.TList _list125 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+            struct.success = new ArrayList<TDelete>(_list125.size);
+            for (int _i126 = 0; _i126 < _list125.size; ++_i126)
             {
-              TDelete _elem87; // required
-              _elem87 = new TDelete();
-              _elem87.read(iprot);
-              struct.success.add(_elem87);
+              TDelete _elem127; // required
+              _elem127 = new TDelete();
+              _elem127.read(iprot);
+              struct.success.add(_elem127);
             }
           }
           struct.setSuccessIsSet(true);
@@ -13562,14 +13562,14 @@ public class THBaseService {
             case 0: // SUCCESS
               if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                 {
-                  org.apache.thrift.protocol.TList _list88 = iprot.readListBegin();
-                  struct.success = new ArrayList<TResult>(_list88.size);
-                  for (int _i89 = 0; _i89 < _list88.size; ++_i89)
+                  org.apache.thrift.protocol.TList _list128 = iprot.readListBegin();
+                  struct.success = new ArrayList<TResult>(_list128.size);
+                  for (int _i129 = 0; _i129 < _list128.size; ++_i129)
                   {
-                    TResult _elem90; // required
-                    _elem90 = new TResult();
-                    _elem90.read(iprot);
-                    struct.success.add(_elem90);
+                    TResult _elem130; // required
+                    _elem130 = new TResult();
+                    _elem130.read(iprot);
+                    struct.success.add(_elem130);
                   }
                   iprot.readListEnd();
                 }
@@ -13615,9 +13615,9 @@ public class THBaseService {
           oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
           {
             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
-            for (TResult _iter91 : struct.success)
+            for (TResult _iter131 : struct.success)
             {
-              _iter91.write(oprot);
+              _iter131.write(oprot);
             }
             oprot.writeListEnd();
           }
@@ -13664,9 +13664,9 @@ public class THBaseService {
         if (struct.isSetSuccess()) {
           {
             oprot.writeI32(struct.success.size());
-            for (TResult _iter92 : struct.success)
+            for (TResult _iter132 : struct.success)
             {
-              _iter92.write(oprot);
+              _iter132.write(oprot);
             }
           }
         }
@@ -13684,14 +13684,14 @@ public class THBaseService {
         BitSet incoming = iprot.readBitSet(3);
         if (incoming.get(0)) {
           {
-            org.apache.thrift.protocol.TList _list93 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-            struct.success = new ArrayList<TResult>(_list93.size);
-            for (int _i94 = 0; _i94 < _list93.size; ++_i94)
+            org.apache.thrift.protocol.TList _list133 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+            struct.success = new ArrayList<TResult>(_list133.size);
+            for (int _i134 = 0; _i134 < _list133.size; ++_i134)
             {
-              TResult _elem95; // required
-              _elem95 = new TResult();
-              _elem95.read(iprot);
-              struct.success.add(_elem95);
+              TResult _elem135; // required
+              _elem135 = new TResult();
+              _elem135.read(iprot);
+              struct.success.add(_elem135);
             }
           }
           struct.setSuccessIsSet(true);

Modified: hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TPut.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TPut.java?rev=1502433&r1=1502432&r2=1502433&view=diff
==============================================================================
--- hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TPut.java (original)
+++ hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TPut.java Fri Jul 12 06:04:40 2013
@@ -45,6 +45,7 @@ public class TPut implements org.apache.
   private static final org.apache.thrift.protocol.TField COLUMN_VALUES_FIELD_DESC = new org.apache.thrift.protocol.TField("columnValues", org.apache.thrift.protocol.TType.LIST, (short)2);
   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 WRITE_TO_WAL_FIELD_DESC = new org.apache.thrift.protocol.TField("writeToWal", org.apache.thrift.protocol.TType.BOOL, (short)4);
+  private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.MAP, (short)5);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
@@ -56,13 +57,15 @@ public class TPut implements org.apache.
   public List<TColumnValue> columnValues; // required
   public long timestamp; // optional
   public boolean writeToWal; // optional
+  public Map<ByteBuffer,ByteBuffer> attributes; // 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 {
     ROW((short)1, "row"),
     COLUMN_VALUES((short)2, "columnValues"),
     TIMESTAMP((short)3, "timestamp"),
-    WRITE_TO_WAL((short)4, "writeToWal");
+    WRITE_TO_WAL((short)4, "writeToWal"),
+    ATTRIBUTES((short)5, "attributes");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -85,6 +88,8 @@ public class TPut implements org.apache.
           return TIMESTAMP;
         case 4: // WRITE_TO_WAL
           return WRITE_TO_WAL;
+        case 5: // ATTRIBUTES
+          return ATTRIBUTES;
         default:
           return null;
       }
@@ -128,7 +133,7 @@ public class TPut implements org.apache.
   private static final int __TIMESTAMP_ISSET_ID = 0;
   private static final int __WRITETOWAL_ISSET_ID = 1;
   private BitSet __isset_bit_vector = new BitSet(2);
-  private _Fields optionals[] = {_Fields.TIMESTAMP,_Fields.WRITE_TO_WAL};
+  private _Fields optionals[] = {_Fields.TIMESTAMP,_Fields.WRITE_TO_WAL,_Fields.ATTRIBUTES};
   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);
@@ -141,6 +146,10 @@ public class TPut implements org.apache.
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
     tmpMap.put(_Fields.WRITE_TO_WAL, new org.apache.thrift.meta_data.FieldMetaData("writeToWal", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+    tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
+            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING            , true), 
+            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING            , true))));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TPut.class, metaDataMap);
   }
@@ -178,6 +187,23 @@ public class TPut implements org.apache.
     }
     this.timestamp = other.timestamp;
     this.writeToWal = other.writeToWal;
+    if (other.isSetAttributes()) {
+      Map<ByteBuffer,ByteBuffer> __this__attributes = new HashMap<ByteBuffer,ByteBuffer>();
+      for (Map.Entry<ByteBuffer, ByteBuffer> other_element : other.attributes.entrySet()) {
+
+        ByteBuffer other_element_key = other_element.getKey();
+        ByteBuffer other_element_value = other_element.getValue();
+
+        ByteBuffer __this__attributes_copy_key = org.apache.thrift.TBaseHelper.copyBinary(other_element_key);
+;
+
+        ByteBuffer __this__attributes_copy_value = org.apache.thrift.TBaseHelper.copyBinary(other_element_value);
+;
+
+        __this__attributes.put(__this__attributes_copy_key, __this__attributes_copy_value);
+      }
+      this.attributes = __this__attributes;
+    }
   }
 
   public TPut deepCopy() {
@@ -192,6 +218,7 @@ public class TPut implements org.apache.
     this.timestamp = 0;
     this.writeToWal = true;
 
+    this.attributes = null;
   }
 
   public byte[] getRow() {
@@ -313,6 +340,41 @@ public class TPut implements org.apache.
     __isset_bit_vector.set(__WRITETOWAL_ISSET_ID, value);
   }
 
+  public int getAttributesSize() {
+    return (this.attributes == null) ? 0 : this.attributes.size();
+  }
+
+  public void putToAttributes(ByteBuffer key, ByteBuffer val) {
+    if (this.attributes == null) {
+      this.attributes = new HashMap<ByteBuffer,ByteBuffer>();
+    }
+    this.attributes.put(key, val);
+  }
+
+  public Map<ByteBuffer,ByteBuffer> getAttributes() {
+    return this.attributes;
+  }
+
+  public TPut setAttributes(Map<ByteBuffer,ByteBuffer> attributes) {
+    this.attributes = attributes;
+    return this;
+  }
+
+  public void unsetAttributes() {
+    this.attributes = null;
+  }
+
+  /** Returns true if field attributes is set (has been assigned a value) and false otherwise */
+  public boolean isSetAttributes() {
+    return this.attributes != null;
+  }
+
+  public void setAttributesIsSet(boolean value) {
+    if (!value) {
+      this.attributes = null;
+    }
+  }
+
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
     case ROW:
@@ -347,6 +409,14 @@ public class TPut implements org.apache.
       }
       break;
 
+    case ATTRIBUTES:
+      if (value == null) {
+        unsetAttributes();
+      } else {
+        setAttributes((Map<ByteBuffer,ByteBuffer>)value);
+      }
+      break;
+
     }
   }
 
@@ -364,6 +434,9 @@ public class TPut implements org.apache.
     case WRITE_TO_WAL:
       return Boolean.valueOf(isWriteToWal());
 
+    case ATTRIBUTES:
+      return getAttributes();
+
     }
     throw new IllegalStateException();
   }
@@ -383,6 +456,8 @@ public class TPut implements org.apache.
       return isSetTimestamp();
     case WRITE_TO_WAL:
       return isSetWriteToWal();
+    case ATTRIBUTES:
+      return isSetAttributes();
     }
     throw new IllegalStateException();
   }
@@ -436,6 +511,15 @@ public class TPut implements org.apache.
         return false;
     }
 
+    boolean this_present_attributes = true && this.isSetAttributes();
+    boolean that_present_attributes = true && that.isSetAttributes();
+    if (this_present_attributes || that_present_attributes) {
+      if (!(this_present_attributes && that_present_attributes))
+        return false;
+      if (!this.attributes.equals(that.attributes))
+        return false;
+    }
+
     return true;
   }
 
@@ -492,6 +576,16 @@ public class TPut implements org.apache.
         return lastComparison;
       }
     }
+    lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetAttributes()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
     return 0;
   }
 
@@ -539,6 +633,16 @@ public class TPut implements org.apache.
       sb.append(this.writeToWal);
       first = false;
     }
+    if (isSetAttributes()) {
+      if (!first) sb.append(", ");
+      sb.append("attributes:");
+      if (this.attributes == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.attributes);
+      }
+      first = false;
+    }
     sb.append(")");
     return sb.toString();
   }
@@ -600,14 +704,14 @@ public class TPut implements org.apache.
           case 2: // COLUMN_VALUES
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
-                struct.columnValues = new ArrayList<TColumnValue>(_list16.size);
-                for (int _i17 = 0; _i17 < _list16.size; ++_i17)
+                org.apache.thrift.protocol.TList _list26 = iprot.readListBegin();
+                struct.columnValues = new ArrayList<TColumnValue>(_list26.size);
+                for (int _i27 = 0; _i27 < _list26.size; ++_i27)
                 {
-                  TColumnValue _elem18; // required
-                  _elem18 = new TColumnValue();
-                  _elem18.read(iprot);
-                  struct.columnValues.add(_elem18);
+                  TColumnValue _elem28; // required
+                  _elem28 = new TColumnValue();
+                  _elem28.read(iprot);
+                  struct.columnValues.add(_elem28);
                 }
                 iprot.readListEnd();
               }
@@ -632,6 +736,26 @@ public class TPut implements org.apache.
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
+          case 5: // ATTRIBUTES
+            if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
+              {
+                org.apache.thrift.protocol.TMap _map29 = iprot.readMapBegin();
+                struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map29.size);
+                for (int _i30 = 0; _i30 < _map29.size; ++_i30)
+                {
+                  ByteBuffer _key31; // required
+                  ByteBuffer _val32; // optional
+                  _key31 = iprot.readBinary();
+                  _val32 = iprot.readBinary();
+                  struct.attributes.put(_key31, _val32);
+                }
+                iprot.readMapEnd();
+              }
+              struct.setAttributesIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
           default:
             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
@@ -656,9 +780,9 @@ public class TPut implements org.apache.
         oprot.writeFieldBegin(COLUMN_VALUES_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.columnValues.size()));
-          for (TColumnValue _iter19 : struct.columnValues)
+          for (TColumnValue _iter33 : struct.columnValues)
           {
-            _iter19.write(oprot);
+            _iter33.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -674,6 +798,21 @@ public class TPut implements org.apache.
         oprot.writeBool(struct.writeToWal);
         oprot.writeFieldEnd();
       }
+      if (struct.attributes != null) {
+        if (struct.isSetAttributes()) {
+          oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC);
+          {
+            oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size()));
+            for (Map.Entry<ByteBuffer, ByteBuffer> _iter34 : struct.attributes.entrySet())
+            {
+              oprot.writeBinary(_iter34.getKey());
+              oprot.writeBinary(_iter34.getValue());
+            }
+            oprot.writeMapEnd();
+          }
+          oprot.writeFieldEnd();
+        }
+      }
       oprot.writeFieldStop();
       oprot.writeStructEnd();
     }
@@ -694,9 +833,9 @@ public class TPut implements org.apache.
       oprot.writeBinary(struct.row);
       {
         oprot.writeI32(struct.columnValues.size());
-        for (TColumnValue _iter20 : struct.columnValues)
+        for (TColumnValue _iter35 : struct.columnValues)
         {
-          _iter20.write(oprot);
+          _iter35.write(oprot);
         }
       }
       BitSet optionals = new BitSet();
@@ -706,13 +845,26 @@ public class TPut implements org.apache.
       if (struct.isSetWriteToWal()) {
         optionals.set(1);
       }
-      oprot.writeBitSet(optionals, 2);
+      if (struct.isSetAttributes()) {
+        optionals.set(2);
+      }
+      oprot.writeBitSet(optionals, 3);
       if (struct.isSetTimestamp()) {
         oprot.writeI64(struct.timestamp);
       }
       if (struct.isSetWriteToWal()) {
         oprot.writeBool(struct.writeToWal);
       }
+      if (struct.isSetAttributes()) {
+        {
+          oprot.writeI32(struct.attributes.size());
+          for (Map.Entry<ByteBuffer, ByteBuffer> _iter36 : struct.attributes.entrySet())
+          {
+            oprot.writeBinary(_iter36.getKey());
+            oprot.writeBinary(_iter36.getValue());
+          }
+        }
+      }
     }
 
     @Override
@@ -721,18 +873,18 @@ public class TPut implements org.apache.
       struct.row = iprot.readBinary();
       struct.setRowIsSet(true);
       {
-        org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-        struct.columnValues = new ArrayList<TColumnValue>(_list21.size);
-        for (int _i22 = 0; _i22 < _list21.size; ++_i22)
+        org.apache.thrift.protocol.TList _list37 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.columnValues = new ArrayList<TColumnValue>(_list37.size);
+        for (int _i38 = 0; _i38 < _list37.size; ++_i38)
         {
-          TColumnValue _elem23; // required
-          _elem23 = new TColumnValue();
-          _elem23.read(iprot);
-          struct.columnValues.add(_elem23);
+          TColumnValue _elem39; // required
+          _elem39 = new TColumnValue();
+          _elem39.read(iprot);
+          struct.columnValues.add(_elem39);
         }
       }
       struct.setColumnValuesIsSet(true);
-      BitSet incoming = iprot.readBitSet(2);
+      BitSet incoming = iprot.readBitSet(3);
       if (incoming.get(0)) {
         struct.timestamp = iprot.readI64();
         struct.setTimestampIsSet(true);
@@ -741,6 +893,21 @@ public class TPut implements org.apache.
         struct.writeToWal = iprot.readBool();
         struct.setWriteToWalIsSet(true);
       }
+      if (incoming.get(2)) {
+        {
+          org.apache.thrift.protocol.TMap _map40 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map40.size);
+          for (int _i41 = 0; _i41 < _map40.size; ++_i41)
+          {
+            ByteBuffer _key42; // required
+            ByteBuffer _val43; // optional
+            _key42 = iprot.readBinary();
+            _val43 = iprot.readBinary();
+            struct.attributes.put(_key42, _val43);
+          }
+        }
+        struct.setAttributesIsSet(true);
+      }
     }
   }
 

Modified: hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TScan.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TScan.java?rev=1502433&r1=1502432&r2=1502433&view=diff
==============================================================================
--- hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TScan.java (original)
+++ hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TScan.java Fri Jul 12 06:04:40 2013
@@ -42,6 +42,7 @@ public class TScan 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)6);
   private static final org.apache.thrift.protocol.TField FILTER_STRING_FIELD_DESC = new org.apache.thrift.protocol.TField("filterString", org.apache.thrift.protocol.TType.STRING, (short)7);
   private static final org.apache.thrift.protocol.TField BATCH_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("batchSize", org.apache.thrift.protocol.TType.I32, (short)8);
+  private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.MAP, (short)9);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
@@ -57,6 +58,7 @@ public class TScan implements org.apache
   public TTimeRange timeRange; // optional
   public ByteBuffer filterString; // optional
   public int batchSize; // optional
+  public Map<ByteBuffer,ByteBuffer> attributes; // 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 {
@@ -67,7 +69,8 @@ public class TScan implements org.apache
     MAX_VERSIONS((short)5, "maxVersions"),
     TIME_RANGE((short)6, "timeRange"),
     FILTER_STRING((short)7, "filterString"),
-    BATCH_SIZE((short)8, "batchSize");
+    BATCH_SIZE((short)8, "batchSize"),
+    ATTRIBUTES((short)9, "attributes");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -98,6 +101,8 @@ public class TScan implements org.apache
           return FILTER_STRING;
         case 8: // BATCH_SIZE
           return BATCH_SIZE;
+        case 9: // ATTRIBUTES
+          return ATTRIBUTES;
         default:
           return null;
       }
@@ -142,7 +147,7 @@ public class TScan implements org.apache
   private static final int __MAXVERSIONS_ISSET_ID = 1;
   private static final int __BATCHSIZE_ISSET_ID = 2;
   private BitSet __isset_bit_vector = new BitSet(3);
-  private _Fields optionals[] = {_Fields.START_ROW,_Fields.STOP_ROW,_Fields.COLUMNS,_Fields.CACHING,_Fields.MAX_VERSIONS,_Fields.TIME_RANGE,_Fields.FILTER_STRING,_Fields.BATCH_SIZE};
+  private _Fields optionals[] = {_Fields.START_ROW,_Fields.STOP_ROW,_Fields.COLUMNS,_Fields.CACHING,_Fields.MAX_VERSIONS,_Fields.TIME_RANGE,_Fields.FILTER_STRING,_Fields.BATCH_SIZE,_Fields.ATTRIBUTES};
   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);
@@ -163,6 +168,10 @@ public class TScan implements org.apache
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , true)));
     tmpMap.put(_Fields.BATCH_SIZE, new org.apache.thrift.meta_data.FieldMetaData("batchSize", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+    tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
+            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING            , true), 
+            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING            , true))));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TScan.class, metaDataMap);
   }
@@ -203,6 +212,23 @@ public class TScan implements org.apache
 ;
     }
     this.batchSize = other.batchSize;
+    if (other.isSetAttributes()) {
+      Map<ByteBuffer,ByteBuffer> __this__attributes = new HashMap<ByteBuffer,ByteBuffer>();
+      for (Map.Entry<ByteBuffer, ByteBuffer> other_element : other.attributes.entrySet()) {
+
+        ByteBuffer other_element_key = other_element.getKey();
+        ByteBuffer other_element_value = other_element.getValue();
+
+        ByteBuffer __this__attributes_copy_key = org.apache.thrift.TBaseHelper.copyBinary(other_element_key);
+;
+
+        ByteBuffer __this__attributes_copy_value = org.apache.thrift.TBaseHelper.copyBinary(other_element_value);
+;
+
+        __this__attributes.put(__this__attributes_copy_key, __this__attributes_copy_value);
+      }
+      this.attributes = __this__attributes;
+    }
   }
 
   public TScan deepCopy() {
@@ -222,6 +248,7 @@ public class TScan implements org.apache
     this.filterString = null;
     setBatchSizeIsSet(false);
     this.batchSize = 0;
+    this.attributes = null;
   }
 
   public byte[] getStartRow() {
@@ -458,6 +485,41 @@ public class TScan implements org.apache
     __isset_bit_vector.set(__BATCHSIZE_ISSET_ID, value);
   }
 
+  public int getAttributesSize() {
+    return (this.attributes == null) ? 0 : this.attributes.size();
+  }
+
+  public void putToAttributes(ByteBuffer key, ByteBuffer val) {
+    if (this.attributes == null) {
+      this.attributes = new HashMap<ByteBuffer,ByteBuffer>();
+    }
+    this.attributes.put(key, val);
+  }
+
+  public Map<ByteBuffer,ByteBuffer> getAttributes() {
+    return this.attributes;
+  }
+
+  public TScan setAttributes(Map<ByteBuffer,ByteBuffer> attributes) {
+    this.attributes = attributes;
+    return this;
+  }
+
+  public void unsetAttributes() {
+    this.attributes = null;
+  }
+
+  /** Returns true if field attributes is set (has been assigned a value) and false otherwise */
+  public boolean isSetAttributes() {
+    return this.attributes != null;
+  }
+
+  public void setAttributesIsSet(boolean value) {
+    if (!value) {
+      this.attributes = null;
+    }
+  }
+
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
     case START_ROW:
@@ -524,6 +586,14 @@ public class TScan implements org.apache
       }
       break;
 
+    case ATTRIBUTES:
+      if (value == null) {
+        unsetAttributes();
+      } else {
+        setAttributes((Map<ByteBuffer,ByteBuffer>)value);
+      }
+      break;
+
     }
   }
 
@@ -553,6 +623,9 @@ public class TScan implements org.apache
     case BATCH_SIZE:
       return Integer.valueOf(getBatchSize());
 
+    case ATTRIBUTES:
+      return getAttributes();
+
     }
     throw new IllegalStateException();
   }
@@ -580,6 +653,8 @@ public class TScan implements org.apache
       return isSetFilterString();
     case BATCH_SIZE:
       return isSetBatchSize();
+    case ATTRIBUTES:
+      return isSetAttributes();
     }
     throw new IllegalStateException();
   }
@@ -669,6 +744,15 @@ public class TScan implements org.apache
         return false;
     }
 
+    boolean this_present_attributes = true && this.isSetAttributes();
+    boolean that_present_attributes = true && that.isSetAttributes();
+    if (this_present_attributes || that_present_attributes) {
+      if (!(this_present_attributes && that_present_attributes))
+        return false;
+      if (!this.attributes.equals(that.attributes))
+        return false;
+    }
+
     return true;
   }
 
@@ -765,6 +849,16 @@ public class TScan implements org.apache
         return lastComparison;
       }
     }
+    lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetAttributes()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
     return 0;
   }
 
@@ -852,6 +946,16 @@ public class TScan implements org.apache
       sb.append(this.batchSize);
       first = false;
     }
+    if (isSetAttributes()) {
+      if (!first) sb.append(", ");
+      sb.append("attributes:");
+      if (this.attributes == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.attributes);
+      }
+      first = false;
+    }
     sb.append(")");
     return sb.toString();
   }
@@ -915,14 +1019,14 @@ public class TScan implements org.apache
           case 3: // COLUMNS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list40 = iprot.readListBegin();
-                struct.columns = new ArrayList<TColumn>(_list40.size);
-                for (int _i41 = 0; _i41 < _list40.size; ++_i41)
+                org.apache.thrift.protocol.TList _list70 = iprot.readListBegin();
+                struct.columns = new ArrayList<TColumn>(_list70.size);
+                for (int _i71 = 0; _i71 < _list70.size; ++_i71)
                 {
-                  TColumn _elem42; // required
-                  _elem42 = new TColumn();
-                  _elem42.read(iprot);
-                  struct.columns.add(_elem42);
+                  TColumn _elem72; // required
+                  _elem72 = new TColumn();
+                  _elem72.read(iprot);
+                  struct.columns.add(_elem72);
                 }
                 iprot.readListEnd();
               }
@@ -972,6 +1076,26 @@ public class TScan implements org.apache
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
+          case 9: // ATTRIBUTES
+            if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
+              {
+                org.apache.thrift.protocol.TMap _map73 = iprot.readMapBegin();
+                struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map73.size);
+                for (int _i74 = 0; _i74 < _map73.size; ++_i74)
+                {
+                  ByteBuffer _key75; // required
+                  ByteBuffer _val76; // optional
+                  _key75 = iprot.readBinary();
+                  _val76 = iprot.readBinary();
+                  struct.attributes.put(_key75, _val76);
+                }
+                iprot.readMapEnd();
+              }
+              struct.setAttributesIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
           default:
             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
@@ -1006,9 +1130,9 @@ public class TScan implements org.apache
           oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
           {
             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.columns.size()));
-            for (TColumn _iter43 : struct.columns)
+            for (TColumn _iter77 : struct.columns)
             {
-              _iter43.write(oprot);
+              _iter77.write(oprot);
             }
             oprot.writeListEnd();
           }
@@ -1044,6 +1168,21 @@ public class TScan implements org.apache
         oprot.writeI32(struct.batchSize);
         oprot.writeFieldEnd();
       }
+      if (struct.attributes != null) {
+        if (struct.isSetAttributes()) {
+          oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC);
+          {
+            oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size()));
+            for (Map.Entry<ByteBuffer, ByteBuffer> _iter78 : struct.attributes.entrySet())
+            {
+              oprot.writeBinary(_iter78.getKey());
+              oprot.writeBinary(_iter78.getValue());
+            }
+            oprot.writeMapEnd();
+          }
+          oprot.writeFieldEnd();
+        }
+      }
       oprot.writeFieldStop();
       oprot.writeStructEnd();
     }
@@ -1086,7 +1225,10 @@ public class TScan implements org.apache
       if (struct.isSetBatchSize()) {
         optionals.set(7);
       }
-      oprot.writeBitSet(optionals, 8);
+      if (struct.isSetAttributes()) {
+        optionals.set(8);
+      }
+      oprot.writeBitSet(optionals, 9);
       if (struct.isSetStartRow()) {
         oprot.writeBinary(struct.startRow);
       }
@@ -1096,9 +1238,9 @@ public class TScan implements org.apache
       if (struct.isSetColumns()) {
         {
           oprot.writeI32(struct.columns.size());
-          for (TColumn _iter44 : struct.columns)
+          for (TColumn _iter79 : struct.columns)
           {
-            _iter44.write(oprot);
+            _iter79.write(oprot);
           }
         }
       }
@@ -1117,12 +1259,22 @@ public class TScan implements org.apache
       if (struct.isSetBatchSize()) {
         oprot.writeI32(struct.batchSize);
       }
+      if (struct.isSetAttributes()) {
+        {
+          oprot.writeI32(struct.attributes.size());
+          for (Map.Entry<ByteBuffer, ByteBuffer> _iter80 : struct.attributes.entrySet())
+          {
+            oprot.writeBinary(_iter80.getKey());
+            oprot.writeBinary(_iter80.getValue());
+          }
+        }
+      }
     }
 
     @Override
     public void read(org.apache.thrift.protocol.TProtocol prot, TScan struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
-      BitSet incoming = iprot.readBitSet(8);
+      BitSet incoming = iprot.readBitSet(9);
       if (incoming.get(0)) {
         struct.startRow = iprot.readBinary();
         struct.setStartRowIsSet(true);
@@ -1133,14 +1285,14 @@ public class TScan implements org.apache
       }
       if (incoming.get(2)) {
         {
-          org.apache.thrift.protocol.TList _list45 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-          struct.columns = new ArrayList<TColumn>(_list45.size);
-          for (int _i46 = 0; _i46 < _list45.size; ++_i46)
+          org.apache.thrift.protocol.TList _list81 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.columns = new ArrayList<TColumn>(_list81.size);
+          for (int _i82 = 0; _i82 < _list81.size; ++_i82)
           {
-            TColumn _elem47; // required
-            _elem47 = new TColumn();
-            _elem47.read(iprot);
-            struct.columns.add(_elem47);
+            TColumn _elem83; // required
+            _elem83 = new TColumn();
+            _elem83.read(iprot);
+            struct.columns.add(_elem83);
           }
         }
         struct.setColumnsIsSet(true);
@@ -1166,6 +1318,21 @@ public class TScan implements org.apache
         struct.batchSize = iprot.readI32();
         struct.setBatchSizeIsSet(true);
       }
+      if (incoming.get(8)) {
+        {
+          org.apache.thrift.protocol.TMap _map84 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map84.size);
+          for (int _i85 = 0; _i85 < _map84.size; ++_i85)
+          {
+            ByteBuffer _key86; // required
+            ByteBuffer _val87; // optional
+            _key86 = iprot.readBinary();
+            _val87 = iprot.readBinary();
+            struct.attributes.put(_key86, _val87);
+          }
+        }
+        struct.setAttributesIsSet(true);
+      }
     }
   }
 

Modified: hbase/branches/0.94/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift?rev=1502433&r1=1502432&r2=1502433&view=diff
==============================================================================
--- hbase/branches/0.94/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift (original)
+++ hbase/branches/0.94/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift Fri Jul 12 06:04:40 2013
@@ -98,7 +98,8 @@ struct TGet {
   4: optional TTimeRange timeRange,
 
   5: optional i32 maxVersions,
-  6: optional binary filterString
+  6: optional binary filterString,
+  7: optional map<binary, binary> attributes
 }
 
 /**
@@ -116,7 +117,8 @@ struct TPut {
   1: required binary row,
   2: required list<TColumnValue> columnValues
   3: optional i64 timestamp,
-  4: optional bool writeToWal = 1
+  4: optional bool writeToWal = 1,
+  5: optional map<binary, binary> attributes
 }
 
 /**
@@ -147,7 +149,8 @@ struct TDelete {
   2: optional list<TColumn> columns,
   3: optional i64 timestamp,
   4: optional TDeleteType deleteType = 1,
-  5: optional bool writeToWal = 1
+  5: optional bool writeToWal = 1,
+  6: optional map<binary, binary> attributes
 }
 
 /**
@@ -174,7 +177,8 @@ struct TScan {
   5: optional i32 maxVersions=1,
   6: optional TTimeRange timeRange,
   7: optional binary filterString,
-  8: optional i32 batchSize
+  8: optional i32 batchSize,
+  9: optional map<binary, binary> attributes
 }
 
 //