hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mbau...@apache.org
Subject svn commit: r1369277 - in /hbase/branches/0.89-fb/src/main: java/org/apache/hadoop/hbase/thrift/ java/org/apache/hadoop/hbase/thrift/generated/ resources/org/apache/hadoop/hbase/thrift/
Date Sat, 04 Aug 2012 08:06:00 GMT
Author: mbautin
Date: Sat Aug  4 08:06:00 2012
New Revision: 1369277

URL: http://svn.apache.org/viewvc?rev=1369277&view=rev
Log:
[master] Adding enable/disable cacheBlocks to ThriftServerRunner and HBase.thrift

Author: jeremyfein

Summary:
Added boolean to TScan struct to enable/disable cacheBlocks. Altered the
"scannerOpenWithScan" function to make the HBase API call if this boolean
is set.

Test Plan: Need to deploy to test on a cluster.

Reviewers: nzhang, chaoyc, mbautin, aaiyer

Reviewed By: mbautin

CC: davejwatson

Differential Revision: https://phabricator.fb.com/D531846

Task ID: 1232218

Modified:
    hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServerRunner.java
    hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java
    hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRowResult.java
    hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/TScan.java
    hbase/branches/0.89-fb/src/main/resources/org/apache/hadoop/hbase/thrift/Hbase.thrift

Modified: hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServerRunner.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServerRunner.java?rev=1369277&r1=1369276&r2=1369277&view=diff
==============================================================================
--- hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServerRunner.java
(original)
+++ hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServerRunner.java
Sat Aug  4 08:06:00 2012
@@ -1301,7 +1301,10 @@ public class ThriftServerRunner implemen
         }
         if (tScan.isSetCaching()) {
           scan.setCaching(tScan.getCaching());
-          }
+        }
+        if (tScan.isSetCachingBlocksEnabled()) {
+          scan.setCacheBlocks(tscan.isCachingBlocksEnabled())
+        }
         if(tScan.isSetColumns() && tScan.getColumns().size() != 0) {
           for(ByteBuffer column : tScan.getColumns()) {
             byte [][] famQf = KeyValue.parseColumn(getBytes(column));

Modified: hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java?rev=1369277&r1=1369276&r2=1369277&view=diff
==============================================================================
--- hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java
(original)
+++ hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java
Sat Aug  4 08:06:00 2012
@@ -7179,8 +7179,6 @@ public class Hbase {
 
     private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException
{
       try {
-        // it doesn't seem like you should have to do this, but java serialization is wacky,
and doesn't call the default constructor.
-        __isset_bit_vector = new BitSet(1);
         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
       } catch (org.apache.thrift.TException te) {
         throw new java.io.IOException(te);
@@ -10254,7 +10252,7 @@ public class Hbase {
                   for (int _i35 = 0; _i35 < _map34.size; ++_i35)
                   {
                     ByteBuffer _key36; // required
-                    ColumnDescriptor _val37; // optional
+                    ColumnDescriptor _val37; // required
                     _key36 = iprot.readBinary();
                     _val37 = new ColumnDescriptor();
                     _val37.read(iprot);
@@ -10360,7 +10358,7 @@ public class Hbase {
             for (int _i41 = 0; _i41 < _map40.size; ++_i41)
             {
               ByteBuffer _key42; // required
-              ColumnDescriptor _val43; // optional
+              ColumnDescriptor _val43; // required
               _key42 = iprot.readBinary();
               _val43 = new ColumnDescriptor();
               _val43.read(iprot);
@@ -16114,6 +16112,8 @@ public class Hbase {
 
     private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException
{
       try {
+        // it doesn't seem like you should have to do this, but java serialization is wacky,
and doesn't call the default constructor.
+        __isset_bit_vector = new BitSet(1);
         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
       } catch (org.apache.thrift.TException te) {
         throw new java.io.IOException(te);
@@ -34093,8 +34093,6 @@ public class Hbase {
 
     private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException
{
       try {
-        // it doesn't seem like you should have to do this, but java serialization is wacky,
and doesn't call the default constructor.
-        __isset_bit_vector = new BitSet(1);
         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
       } catch (org.apache.thrift.TException te) {
         throw new java.io.IOException(te);
@@ -34988,6 +34986,8 @@ public class Hbase {
 
     private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException
{
       try {
+        // it doesn't seem like you should have to do this, but java serialization is wacky,
and doesn't call the default constructor.
+        __isset_bit_vector = new BitSet(1);
         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
       } catch (org.apache.thrift.TException te) {
         throw new java.io.IOException(te);
@@ -35641,8 +35641,6 @@ public class Hbase {
 
     private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException
{
       try {
-        // it doesn't seem like you should have to do this, but java serialization is wacky,
and doesn't call the default constructor.
-        __isset_bit_vector = new BitSet(1);
         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
       } catch (org.apache.thrift.TException te) {
         throw new java.io.IOException(te);
@@ -36927,8 +36925,6 @@ public class Hbase {
 
     private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException
{
       try {
-        // it doesn't seem like you should have to do this, but java serialization is wacky,
and doesn't call the default constructor.
-        __isset_bit_vector = new BitSet(1);
         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
       } catch (org.apache.thrift.TException te) {
         throw new java.io.IOException(te);
@@ -38612,6 +38608,8 @@ public class Hbase {
 
     private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException
{
       try {
+        // it doesn't seem like you should have to do this, but java serialization is wacky,
and doesn't call the default constructor.
+        __isset_bit_vector = new BitSet(1);
         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
       } catch (org.apache.thrift.TException te) {
         throw new java.io.IOException(te);
@@ -40448,6 +40446,8 @@ public class Hbase {
 
     private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException
{
       try {
+        // it doesn't seem like you should have to do this, but java serialization is wacky,
and doesn't call the default constructor.
+        __isset_bit_vector = new BitSet(1);
         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
       } catch (org.apache.thrift.TException te) {
         throw new java.io.IOException(te);
@@ -41949,8 +41949,6 @@ public class Hbase {
 
     private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException
{
       try {
-        // it doesn't seem like you should have to do this, but java serialization is wacky,
and doesn't call the default constructor.
-        __isset_bit_vector = new BitSet(1);
         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
       } catch (org.apache.thrift.TException te) {
         throw new java.io.IOException(te);
@@ -42892,8 +42890,6 @@ public class Hbase {
 
     private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException
{
       try {
-        // it doesn't seem like you should have to do this, but java serialization is wacky,
and doesn't call the default constructor.
-        __isset_bit_vector = new BitSet(1);
         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
       } catch (org.apache.thrift.TException te) {
         throw new java.io.IOException(te);
@@ -44145,8 +44141,6 @@ public class Hbase {
 
     private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException
{
       try {
-        // it doesn't seem like you should have to do this, but java serialization is wacky,
and doesn't call the default constructor.
-        __isset_bit_vector = new BitSet(1);
         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
       } catch (org.apache.thrift.TException te) {
         throw new java.io.IOException(te);
@@ -45260,8 +45254,6 @@ public class Hbase {
 
     private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException
{
       try {
-        // it doesn't seem like you should have to do this, but java serialization is wacky,
and doesn't call the default constructor.
-        __isset_bit_vector = new BitSet(1);
         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
       } catch (org.apache.thrift.TException te) {
         throw new java.io.IOException(te);
@@ -46496,8 +46488,6 @@ public class Hbase {
 
     private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException
{
       try {
-        // it doesn't seem like you should have to do this, but java serialization is wacky,
and doesn't call the default constructor.
-        __isset_bit_vector = new BitSet(1);
         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
       } catch (org.apache.thrift.TException te) {
         throw new java.io.IOException(te);
@@ -47307,8 +47297,6 @@ public class Hbase {
 
     private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException
{
       try {
-        // it doesn't seem like you should have to do this, but java serialization is wacky,
and doesn't call the default constructor.
-        __isset_bit_vector = new BitSet(1);
         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
       } catch (org.apache.thrift.TException te) {
         throw new java.io.IOException(te);
@@ -47860,8 +47848,6 @@ public class Hbase {
 
     private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException
{
       try {
-        // it doesn't seem like you should have to do this, but java serialization is wacky,
and doesn't call the default constructor.
-        __isset_bit_vector = new BitSet(1);
         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
       } catch (org.apache.thrift.TException te) {
         throw new java.io.IOException(te);
@@ -48811,8 +48797,6 @@ public class Hbase {
 
     private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException
{
       try {
-        // it doesn't seem like you should have to do this, but java serialization is wacky,
and doesn't call the default constructor.
-        __isset_bit_vector = new BitSet(1);
         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
       } catch (org.apache.thrift.TException te) {
         throw new java.io.IOException(te);
@@ -49398,8 +49382,6 @@ public class Hbase {
 
     private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException
{
       try {
-        // it doesn't seem like you should have to do this, but java serialization is wacky,
and doesn't call the default constructor.
-        __isset_bit_vector = new BitSet(1);
         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
       } catch (org.apache.thrift.TException te) {
         throw new java.io.IOException(te);
@@ -49873,8 +49855,6 @@ public class Hbase {
 
     private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException
{
       try {
-        // it doesn't seem like you should have to do this, but java serialization is wacky,
and doesn't call the default constructor.
-        __isset_bit_vector = new BitSet(1);
         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
       } catch (org.apache.thrift.TException te) {
         throw new java.io.IOException(te);
@@ -51080,8 +51060,6 @@ public class Hbase {
 
     private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException
{
       try {
-        // it doesn't seem like you should have to do this, but java serialization is wacky,
and doesn't call the default constructor.
-        __isset_bit_vector = new BitSet(1);
         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
       } catch (org.apache.thrift.TException te) {
         throw new java.io.IOException(te);
@@ -51877,6 +51855,8 @@ public class Hbase {
 
     private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException
{
       try {
+        // it doesn't seem like you should have to do this, but java serialization is wacky,
and doesn't call the default constructor.
+        __isset_bit_vector = new BitSet(1);
         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
       } catch (org.apache.thrift.TException te) {
         throw new java.io.IOException(te);
@@ -52396,8 +52376,6 @@ public class Hbase {
 
     private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException
{
       try {
-        // it doesn't seem like you should have to do this, but java serialization is wacky,
and doesn't call the default constructor.
-        __isset_bit_vector = new BitSet(1);
         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
       } catch (org.apache.thrift.TException te) {
         throw new java.io.IOException(te);
@@ -52785,8 +52763,6 @@ public class Hbase {
 
     private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException
{
       try {
-        // it doesn't seem like you should have to do this, but java serialization is wacky,
and doesn't call the default constructor.
-        __isset_bit_vector = new BitSet(1);
         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
       } catch (org.apache.thrift.TException te) {
         throw new java.io.IOException(te);

Modified: hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRowResult.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRowResult.java?rev=1369277&r1=1369276&r2=1369277&view=diff
==============================================================================
--- hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRowResult.java
(original)
+++ hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRowResult.java
Sat Aug  4 08:06:00 2012
@@ -443,7 +443,7 @@ public class TRowResult implements org.a
                 for (int _i9 = 0; _i9 < _map8.size; ++_i9)
                 {
                   ByteBuffer _key10; // required
-                  TCell _val11; // optional
+                  TCell _val11; // required
                   _key10 = iprot.readBinary();
                   _val11 = new TCell();
                   _val11.read(iprot);
@@ -544,7 +544,7 @@ public class TRowResult implements org.a
           for (int _i15 = 0; _i15 < _map14.size; ++_i15)
           {
             ByteBuffer _key16; // required
-            TCell _val17; // optional
+            TCell _val17; // required
             _key16 = iprot.readBinary();
             _val17 = new TCell();
             _val17.read(iprot);

Modified: hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/TScan.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/TScan.java?rev=1369277&r1=1369276&r2=1369277&view=diff
==============================================================================
--- hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/TScan.java
(original)
+++ hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/TScan.java
Sat Aug  4 08:06:00 2012
@@ -39,6 +39,7 @@ public class TScan implements org.apache
   private static final org.apache.thrift.protocol.TField COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("columns",
org.apache.thrift.protocol.TType.LIST, (short)4);
   private static final org.apache.thrift.protocol.TField CACHING_FIELD_DESC = new org.apache.thrift.protocol.TField("caching",
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 CACHING_BLOCKS_ENABLED_FIELD_DESC
= new org.apache.thrift.protocol.TField("cachingBlocksEnabled", org.apache.thrift.protocol.TType.BOOL,
(short)7);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
@@ -52,6 +53,7 @@ public class TScan implements org.apache
   public List<ByteBuffer> columns; // optional
   public int caching; // optional
   public ByteBuffer filterString; // optional
+  public boolean cachingBlocksEnabled; // 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 {
@@ -60,7 +62,8 @@ public class TScan implements org.apache
     TIMESTAMP((short)3, "timestamp"),
     COLUMNS((short)4, "columns"),
     CACHING((short)5, "caching"),
-    FILTER_STRING((short)6, "filterString");
+    FILTER_STRING((short)6, "filterString"),
+    CACHING_BLOCKS_ENABLED((short)7, "cachingBlocksEnabled");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -87,6 +90,8 @@ public class TScan implements org.apache
           return CACHING;
         case 6: // FILTER_STRING
           return FILTER_STRING;
+        case 7: // CACHING_BLOCKS_ENABLED
+          return CACHING_BLOCKS_ENABLED;
         default:
           return null;
       }
@@ -129,8 +134,9 @@ public class TScan implements org.apache
   // isset id assignments
   private static final int __TIMESTAMP_ISSET_ID = 0;
   private static final int __CACHING_ISSET_ID = 1;
-  private BitSet __isset_bit_vector = new BitSet(2);
-  private _Fields optionals[] = {_Fields.START_ROW,_Fields.STOP_ROW,_Fields.TIMESTAMP,_Fields.COLUMNS,_Fields.CACHING,_Fields.FILTER_STRING};
+  private static final int __CACHINGBLOCKSENABLED_ISSET_ID = 2;
+  private BitSet __isset_bit_vector = new BitSet(3);
+  private _Fields optionals[] = {_Fields.START_ROW,_Fields.STOP_ROW,_Fields.TIMESTAMP,_Fields.COLUMNS,_Fields.CACHING,_Fields.FILTER_STRING,_Fields.CACHING_BLOCKS_ENABLED};
   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);
@@ -147,6 +153,8 @@ public class TScan 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
       , "Text")));
+    tmpMap.put(_Fields.CACHING_BLOCKS_ENABLED, new org.apache.thrift.meta_data.FieldMetaData("cachingBlocksEnabled",
org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TScan.class, metaDataMap);
   }
@@ -178,6 +186,7 @@ public class TScan implements org.apache
     if (other.isSetFilterString()) {
       this.filterString = other.filterString;
     }
+    this.cachingBlocksEnabled = other.cachingBlocksEnabled;
   }
 
   public TScan deepCopy() {
@@ -194,6 +203,8 @@ public class TScan implements org.apache
     setCachingIsSet(false);
     this.caching = 0;
     this.filterString = null;
+    setCachingBlocksEnabledIsSet(false);
+    this.cachingBlocksEnabled = false;
   }
 
   public byte[] getStartRow() {
@@ -383,6 +394,29 @@ public class TScan implements org.apache
     }
   }
 
+  public boolean isCachingBlocksEnabled() {
+    return this.cachingBlocksEnabled;
+  }
+
+  public TScan setCachingBlocksEnabled(boolean cachingBlocksEnabled) {
+    this.cachingBlocksEnabled = cachingBlocksEnabled;
+    setCachingBlocksEnabledIsSet(true);
+    return this;
+  }
+
+  public void unsetCachingBlocksEnabled() {
+    __isset_bit_vector.clear(__CACHINGBLOCKSENABLED_ISSET_ID);
+  }
+
+  /** Returns true if field cachingBlocksEnabled is set (has been assigned a value) and false
otherwise */
+  public boolean isSetCachingBlocksEnabled() {
+    return __isset_bit_vector.get(__CACHINGBLOCKSENABLED_ISSET_ID);
+  }
+
+  public void setCachingBlocksEnabledIsSet(boolean value) {
+    __isset_bit_vector.set(__CACHINGBLOCKSENABLED_ISSET_ID, value);
+  }
+
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
     case START_ROW:
@@ -433,6 +467,14 @@ public class TScan implements org.apache
       }
       break;
 
+    case CACHING_BLOCKS_ENABLED:
+      if (value == null) {
+        unsetCachingBlocksEnabled();
+      } else {
+        setCachingBlocksEnabled((Boolean)value);
+      }
+      break;
+
     }
   }
 
@@ -456,6 +498,9 @@ public class TScan implements org.apache
     case FILTER_STRING:
       return getFilterString();
 
+    case CACHING_BLOCKS_ENABLED:
+      return Boolean.valueOf(isCachingBlocksEnabled());
+
     }
     throw new IllegalStateException();
   }
@@ -479,6 +524,8 @@ public class TScan implements org.apache
       return isSetCaching();
     case FILTER_STRING:
       return isSetFilterString();
+    case CACHING_BLOCKS_ENABLED:
+      return isSetCachingBlocksEnabled();
     }
     throw new IllegalStateException();
   }
@@ -550,6 +597,15 @@ public class TScan implements org.apache
         return false;
     }
 
+    boolean this_present_cachingBlocksEnabled = true && this.isSetCachingBlocksEnabled();
+    boolean that_present_cachingBlocksEnabled = true && that.isSetCachingBlocksEnabled();
+    if (this_present_cachingBlocksEnabled || that_present_cachingBlocksEnabled) {
+      if (!(this_present_cachingBlocksEnabled && that_present_cachingBlocksEnabled))
+        return false;
+      if (this.cachingBlocksEnabled != that.cachingBlocksEnabled)
+        return false;
+    }
+
     return true;
   }
 
@@ -626,6 +682,16 @@ public class TScan implements org.apache
         return lastComparison;
       }
     }
+    lastComparison = Boolean.valueOf(isSetCachingBlocksEnabled()).compareTo(typedOther.isSetCachingBlocksEnabled());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetCachingBlocksEnabled()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cachingBlocksEnabled,
typedOther.cachingBlocksEnabled);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
     return 0;
   }
 
@@ -697,6 +763,12 @@ public class TScan implements org.apache
       }
       first = false;
     }
+    if (isSetCachingBlocksEnabled()) {
+      if (!first) sb.append(", ");
+      sb.append("cachingBlocksEnabled:");
+      sb.append(this.cachingBlocksEnabled);
+      first = false;
+    }
     sb.append(")");
     return sb.toString();
   }
@@ -799,6 +871,14 @@ public class TScan implements org.apache
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
+          case 7: // CACHING_BLOCKS_ENABLED
+            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+              struct.cachingBlocksEnabled = iprot.readBool();
+              struct.setCachingBlocksEnabledIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
           default:
             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
@@ -859,6 +939,11 @@ public class TScan implements org.apache
           oprot.writeFieldEnd();
         }
       }
+      if (struct.isSetCachingBlocksEnabled()) {
+        oprot.writeFieldBegin(CACHING_BLOCKS_ENABLED_FIELD_DESC);
+        oprot.writeBool(struct.cachingBlocksEnabled);
+        oprot.writeFieldEnd();
+      }
       oprot.writeFieldStop();
       oprot.writeStructEnd();
     }
@@ -895,7 +980,10 @@ public class TScan implements org.apache
       if (struct.isSetFilterString()) {
         optionals.set(5);
       }
-      oprot.writeBitSet(optionals, 6);
+      if (struct.isSetCachingBlocksEnabled()) {
+        optionals.set(6);
+      }
+      oprot.writeBitSet(optionals, 7);
       if (struct.isSetStartRow()) {
         oprot.writeBinary(struct.startRow);
       }
@@ -920,12 +1008,15 @@ public class TScan implements org.apache
       if (struct.isSetFilterString()) {
         oprot.writeBinary(struct.filterString);
       }
+      if (struct.isSetCachingBlocksEnabled()) {
+        oprot.writeBool(struct.cachingBlocksEnabled);
+      }
     }
 
     @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(6);
+      BitSet incoming = iprot.readBitSet(7);
       if (incoming.get(0)) {
         struct.startRow = iprot.readBinary();
         struct.setStartRowIsSet(true);
@@ -959,6 +1050,10 @@ public class TScan implements org.apache
         struct.filterString = iprot.readBinary();
         struct.setFilterStringIsSet(true);
       }
+      if (incoming.get(6)) {
+        struct.cachingBlocksEnabled = iprot.readBool();
+        struct.setCachingBlocksEnabledIsSet(true);
+      }
     }
   }
 

Modified: hbase/branches/0.89-fb/src/main/resources/org/apache/hadoop/hbase/thrift/Hbase.thrift
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/main/resources/org/apache/hadoop/hbase/thrift/Hbase.thrift?rev=1369277&r1=1369276&r2=1369277&view=diff
==============================================================================
--- hbase/branches/0.89-fb/src/main/resources/org/apache/hadoop/hbase/thrift/Hbase.thrift
(original)
+++ hbase/branches/0.89-fb/src/main/resources/org/apache/hadoop/hbase/thrift/Hbase.thrift
Sat Aug  4 08:06:00 2012
@@ -129,7 +129,8 @@ struct TScan {
   3:optional i64 timestamp,
   4:optional list<Text> columns,
   5:optional i32 caching,
-  6:optional Text filterString
+  6:optional Text filterString,
+  7:optional bool cachingBlocksEnabled
 }
 
 //



Mime
View raw message