accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1439403 [3/3] - in /accumulo/trunk/proxy/src: main/java/org/apache/accumulo/proxy/ main/java/org/apache/accumulo/proxy/thrift/ main/thrift/ test/java/org/apache/accumulo/proxy/
Date Mon, 28 Jan 2013 13:55:35 GMT
Modified: accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ActiveCompaction.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ActiveCompaction.java?rev=1439403&r1=1439402&r2=1439403&view=diff
==============================================================================
--- accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ActiveCompaction.java
(original)
+++ accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ActiveCompaction.java
Mon Jan 28 13:55:34 2013
@@ -1112,13 +1112,13 @@ import org.slf4j.LoggerFactory;
           case 3: // INPUT_FILES
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list90 = iprot.readListBegin();
-                struct.inputFiles = new ArrayList<String>(_list90.size);
-                for (int _i91 = 0; _i91 < _list90.size; ++_i91)
+                org.apache.thrift.protocol.TList _list98 = iprot.readListBegin();
+                struct.inputFiles = new ArrayList<String>(_list98.size);
+                for (int _i99 = 0; _i99 < _list98.size; ++_i99)
                 {
-                  String _elem92; // required
-                  _elem92 = iprot.readString();
-                  struct.inputFiles.add(_elem92);
+                  String _elem100; // required
+                  _elem100 = iprot.readString();
+                  struct.inputFiles.add(_elem100);
                 }
                 iprot.readListEnd();
               }
@@ -1178,14 +1178,14 @@ import org.slf4j.LoggerFactory;
           case 10: // ITERATORS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list93 = iprot.readListBegin();
-                struct.iterators = new ArrayList<IteratorSetting>(_list93.size);
-                for (int _i94 = 0; _i94 < _list93.size; ++_i94)
+                org.apache.thrift.protocol.TList _list101 = iprot.readListBegin();
+                struct.iterators = new ArrayList<IteratorSetting>(_list101.size);
+                for (int _i102 = 0; _i102 < _list101.size; ++_i102)
                 {
-                  IteratorSetting _elem95; // required
-                  _elem95 = new IteratorSetting();
-                  _elem95.read(iprot);
-                  struct.iterators.add(_elem95);
+                  IteratorSetting _elem103; // required
+                  _elem103 = new IteratorSetting();
+                  _elem103.read(iprot);
+                  struct.iterators.add(_elem103);
                 }
                 iprot.readListEnd();
               }
@@ -1221,9 +1221,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(INPUT_FILES_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING,
struct.inputFiles.size()));
-          for (String _iter96 : struct.inputFiles)
+          for (String _iter104 : struct.inputFiles)
           {
-            oprot.writeString(_iter96);
+            oprot.writeString(_iter104);
           }
           oprot.writeListEnd();
         }
@@ -1259,9 +1259,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(ITERATORS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT,
struct.iterators.size()));
-          for (IteratorSetting _iter97 : struct.iterators)
+          for (IteratorSetting _iter105 : struct.iterators)
           {
-            _iter97.write(oprot);
+            _iter105.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -1325,9 +1325,9 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetInputFiles()) {
         {
           oprot.writeI32(struct.inputFiles.size());
-          for (String _iter98 : struct.inputFiles)
+          for (String _iter106 : struct.inputFiles)
           {
-            oprot.writeString(_iter98);
+            oprot.writeString(_iter106);
           }
         }
       }
@@ -1352,9 +1352,9 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetIterators()) {
         {
           oprot.writeI32(struct.iterators.size());
-          for (IteratorSetting _iter99 : struct.iterators)
+          for (IteratorSetting _iter107 : struct.iterators)
           {
-            _iter99.write(oprot);
+            _iter107.write(oprot);
           }
         }
       }
@@ -1375,13 +1375,13 @@ import org.slf4j.LoggerFactory;
       }
       if (incoming.get(2)) {
         {
-          org.apache.thrift.protocol.TList _list100 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING,
iprot.readI32());
-          struct.inputFiles = new ArrayList<String>(_list100.size);
-          for (int _i101 = 0; _i101 < _list100.size; ++_i101)
+          org.apache.thrift.protocol.TList _list108 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING,
iprot.readI32());
+          struct.inputFiles = new ArrayList<String>(_list108.size);
+          for (int _i109 = 0; _i109 < _list108.size; ++_i109)
           {
-            String _elem102; // required
-            _elem102 = iprot.readString();
-            struct.inputFiles.add(_elem102);
+            String _elem110; // required
+            _elem110 = iprot.readString();
+            struct.inputFiles.add(_elem110);
           }
         }
         struct.setInputFilesIsSet(true);
@@ -1412,14 +1412,14 @@ import org.slf4j.LoggerFactory;
       }
       if (incoming.get(9)) {
         {
-          org.apache.thrift.protocol.TList _list103 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT,
iprot.readI32());
-          struct.iterators = new ArrayList<IteratorSetting>(_list103.size);
-          for (int _i104 = 0; _i104 < _list103.size; ++_i104)
+          org.apache.thrift.protocol.TList _list111 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT,
iprot.readI32());
+          struct.iterators = new ArrayList<IteratorSetting>(_list111.size);
+          for (int _i112 = 0; _i112 < _list111.size; ++_i112)
           {
-            IteratorSetting _elem105; // required
-            _elem105 = new IteratorSetting();
-            _elem105.read(iprot);
-            struct.iterators.add(_elem105);
+            IteratorSetting _elem113; // required
+            _elem113 = new IteratorSetting();
+            _elem113.read(iprot);
+            struct.iterators.add(_elem113);
           }
         }
         struct.setIteratorsIsSet(true);

Modified: accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ActiveScan.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ActiveScan.java?rev=1439403&r1=1439402&r2=1439403&view=diff
==============================================================================
--- accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ActiveScan.java (original)
+++ accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ActiveScan.java Mon
Jan 28 13:55:34 2013
@@ -1263,14 +1263,14 @@ import org.slf4j.LoggerFactory;
           case 9: // COLUMNS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list66 = iprot.readListBegin();
-                struct.columns = new ArrayList<Column>(_list66.size);
-                for (int _i67 = 0; _i67 < _list66.size; ++_i67)
+                org.apache.thrift.protocol.TList _list74 = iprot.readListBegin();
+                struct.columns = new ArrayList<Column>(_list74.size);
+                for (int _i75 = 0; _i75 < _list74.size; ++_i75)
                 {
-                  Column _elem68; // required
-                  _elem68 = new Column();
-                  _elem68.read(iprot);
-                  struct.columns.add(_elem68);
+                  Column _elem76; // required
+                  _elem76 = new Column();
+                  _elem76.read(iprot);
+                  struct.columns.add(_elem76);
                 }
                 iprot.readListEnd();
               }
@@ -1282,14 +1282,14 @@ import org.slf4j.LoggerFactory;
           case 10: // ITERATORS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list69 = iprot.readListBegin();
-                struct.iterators = new ArrayList<IteratorSetting>(_list69.size);
-                for (int _i70 = 0; _i70 < _list69.size; ++_i70)
+                org.apache.thrift.protocol.TList _list77 = iprot.readListBegin();
+                struct.iterators = new ArrayList<IteratorSetting>(_list77.size);
+                for (int _i78 = 0; _i78 < _list77.size; ++_i78)
                 {
-                  IteratorSetting _elem71; // required
-                  _elem71 = new IteratorSetting();
-                  _elem71.read(iprot);
-                  struct.iterators.add(_elem71);
+                  IteratorSetting _elem79; // required
+                  _elem79 = new IteratorSetting();
+                  _elem79.read(iprot);
+                  struct.iterators.add(_elem79);
                 }
                 iprot.readListEnd();
               }
@@ -1301,13 +1301,13 @@ import org.slf4j.LoggerFactory;
           case 11: // AUTHORIZATIONS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list72 = iprot.readListBegin();
-                struct.authorizations = new ArrayList<ByteBuffer>(_list72.size);
-                for (int _i73 = 0; _i73 < _list72.size; ++_i73)
+                org.apache.thrift.protocol.TList _list80 = iprot.readListBegin();
+                struct.authorizations = new ArrayList<ByteBuffer>(_list80.size);
+                for (int _i81 = 0; _i81 < _list80.size; ++_i81)
                 {
-                  ByteBuffer _elem74; // required
-                  _elem74 = iprot.readBinary();
-                  struct.authorizations.add(_elem74);
+                  ByteBuffer _elem82; // required
+                  _elem82 = iprot.readBinary();
+                  struct.authorizations.add(_elem82);
                 }
                 iprot.readListEnd();
               }
@@ -1371,9 +1371,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT,
struct.columns.size()));
-          for (Column _iter75 : struct.columns)
+          for (Column _iter83 : struct.columns)
           {
-            _iter75.write(oprot);
+            _iter83.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -1383,9 +1383,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(ITERATORS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT,
struct.iterators.size()));
-          for (IteratorSetting _iter76 : struct.iterators)
+          for (IteratorSetting _iter84 : struct.iterators)
           {
-            _iter76.write(oprot);
+            _iter84.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -1395,9 +1395,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(AUTHORIZATIONS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING,
struct.authorizations.size()));
-          for (ByteBuffer _iter77 : struct.authorizations)
+          for (ByteBuffer _iter85 : struct.authorizations)
           {
-            oprot.writeBinary(_iter77);
+            oprot.writeBinary(_iter85);
           }
           oprot.writeListEnd();
         }
@@ -1482,27 +1482,27 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetColumns()) {
         {
           oprot.writeI32(struct.columns.size());
-          for (Column _iter78 : struct.columns)
+          for (Column _iter86 : struct.columns)
           {
-            _iter78.write(oprot);
+            _iter86.write(oprot);
           }
         }
       }
       if (struct.isSetIterators()) {
         {
           oprot.writeI32(struct.iterators.size());
-          for (IteratorSetting _iter79 : struct.iterators)
+          for (IteratorSetting _iter87 : struct.iterators)
           {
-            _iter79.write(oprot);
+            _iter87.write(oprot);
           }
         }
       }
       if (struct.isSetAuthorizations()) {
         {
           oprot.writeI32(struct.authorizations.size());
-          for (ByteBuffer _iter80 : struct.authorizations)
+          for (ByteBuffer _iter88 : struct.authorizations)
           {
-            oprot.writeBinary(_iter80);
+            oprot.writeBinary(_iter88);
           }
         }
       }
@@ -1547,41 +1547,41 @@ import org.slf4j.LoggerFactory;
       }
       if (incoming.get(8)) {
         {
-          org.apache.thrift.protocol.TList _list81 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT,
iprot.readI32());
-          struct.columns = new ArrayList<Column>(_list81.size);
-          for (int _i82 = 0; _i82 < _list81.size; ++_i82)
+          org.apache.thrift.protocol.TList _list89 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT,
iprot.readI32());
+          struct.columns = new ArrayList<Column>(_list89.size);
+          for (int _i90 = 0; _i90 < _list89.size; ++_i90)
           {
-            Column _elem83; // required
-            _elem83 = new Column();
-            _elem83.read(iprot);
-            struct.columns.add(_elem83);
+            Column _elem91; // required
+            _elem91 = new Column();
+            _elem91.read(iprot);
+            struct.columns.add(_elem91);
           }
         }
         struct.setColumnsIsSet(true);
       }
       if (incoming.get(9)) {
         {
-          org.apache.thrift.protocol.TList _list84 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT,
iprot.readI32());
-          struct.iterators = new ArrayList<IteratorSetting>(_list84.size);
-          for (int _i85 = 0; _i85 < _list84.size; ++_i85)
+          org.apache.thrift.protocol.TList _list92 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT,
iprot.readI32());
+          struct.iterators = new ArrayList<IteratorSetting>(_list92.size);
+          for (int _i93 = 0; _i93 < _list92.size; ++_i93)
           {
-            IteratorSetting _elem86; // required
-            _elem86 = new IteratorSetting();
-            _elem86.read(iprot);
-            struct.iterators.add(_elem86);
+            IteratorSetting _elem94; // required
+            _elem94 = new IteratorSetting();
+            _elem94.read(iprot);
+            struct.iterators.add(_elem94);
           }
         }
         struct.setIteratorsIsSet(true);
       }
       if (incoming.get(10)) {
         {
-          org.apache.thrift.protocol.TList _list87 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING,
iprot.readI32());
-          struct.authorizations = new ArrayList<ByteBuffer>(_list87.size);
-          for (int _i88 = 0; _i88 < _list87.size; ++_i88)
+          org.apache.thrift.protocol.TList _list95 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING,
iprot.readI32());
+          struct.authorizations = new ArrayList<ByteBuffer>(_list95.size);
+          for (int _i96 = 0; _i96 < _list95.size; ++_i96)
           {
-            ByteBuffer _elem89; // required
-            _elem89 = iprot.readBinary();
-            struct.authorizations.add(_elem89);
+            ByteBuffer _elem97; // required
+            _elem97 = iprot.readBinary();
+            struct.authorizations.add(_elem97);
           }
         }
         struct.setAuthorizationsIsSet(true);

Modified: accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/BatchScanOptions.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/BatchScanOptions.java?rev=1439403&r1=1439402&r2=1439403&view=diff
==============================================================================
--- accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/BatchScanOptions.java
(original)
+++ accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/BatchScanOptions.java
Mon Jan 28 13:55:34 2013
@@ -50,9 +50,10 @@ import org.slf4j.LoggerFactory;
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("BatchScanOptions");
 
   private static final org.apache.thrift.protocol.TField AUTHORIZATIONS_FIELD_DESC = new
org.apache.thrift.protocol.TField("authorizations", org.apache.thrift.protocol.TType.SET,
(short)1);
-  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)2);
-  private static final org.apache.thrift.protocol.TField ITERATORS_FIELD_DESC = new org.apache.thrift.protocol.TField("iterators",
org.apache.thrift.protocol.TType.LIST, (short)3);
-  private static final org.apache.thrift.protocol.TField THREADS_FIELD_DESC = new org.apache.thrift.protocol.TField("threads",
org.apache.thrift.protocol.TType.I32, (short)4);
+  private static final org.apache.thrift.protocol.TField RANGES_FIELD_DESC = new org.apache.thrift.protocol.TField("ranges",
org.apache.thrift.protocol.TType.LIST, (short)2);
+  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)3);
+  private static final org.apache.thrift.protocol.TField ITERATORS_FIELD_DESC = new org.apache.thrift.protocol.TField("iterators",
org.apache.thrift.protocol.TType.LIST, (short)4);
+  private static final org.apache.thrift.protocol.TField THREADS_FIELD_DESC = new org.apache.thrift.protocol.TField("threads",
org.apache.thrift.protocol.TType.I32, (short)5);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
@@ -61,6 +62,7 @@ import org.slf4j.LoggerFactory;
   }
 
   public Set<ByteBuffer> authorizations; // optional
+  public List<Range> ranges; // optional
   public List<ScanColumn> columns; // optional
   public List<IteratorSetting> iterators; // optional
   public int threads; // optional
@@ -68,9 +70,10 @@ import org.slf4j.LoggerFactory;
   /** The set of fields this struct contains, along with convenience methods for finding
and manipulating them. */
   @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum
{
     AUTHORIZATIONS((short)1, "authorizations"),
-    COLUMNS((short)2, "columns"),
-    ITERATORS((short)3, "iterators"),
-    THREADS((short)4, "threads");
+    RANGES((short)2, "ranges"),
+    COLUMNS((short)3, "columns"),
+    ITERATORS((short)4, "iterators"),
+    THREADS((short)5, "threads");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -87,11 +90,13 @@ import org.slf4j.LoggerFactory;
       switch(fieldId) {
         case 1: // AUTHORIZATIONS
           return AUTHORIZATIONS;
-        case 2: // COLUMNS
+        case 2: // RANGES
+          return RANGES;
+        case 3: // COLUMNS
           return COLUMNS;
-        case 3: // ITERATORS
+        case 4: // ITERATORS
           return ITERATORS;
-        case 4: // THREADS
+        case 5: // THREADS
           return THREADS;
         default:
           return null;
@@ -135,13 +140,16 @@ import org.slf4j.LoggerFactory;
   // isset id assignments
   private static final int __THREADS_ISSET_ID = 0;
   private byte __isset_bitfield = 0;
-  private _Fields optionals[] = {_Fields.AUTHORIZATIONS,_Fields.COLUMNS,_Fields.ITERATORS,_Fields.THREADS};
+  private _Fields optionals[] = {_Fields.AUTHORIZATIONS,_Fields.RANGES,_Fields.COLUMNS,_Fields.ITERATORS,_Fields.THREADS};
   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);
     tmpMap.put(_Fields.AUTHORIZATIONS, new org.apache.thrift.meta_data.FieldMetaData("authorizations",
org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET,

             new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING
           , true))));
+    tmpMap.put(_Fields.RANGES, new org.apache.thrift.meta_data.FieldMetaData("ranges", org.apache.thrift.TFieldRequirementType.OPTIONAL,

+        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,

+            new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT,
Range.class))));
     tmpMap.put(_Fields.COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("columns",
org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,

             new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT,
ScanColumn.class))));
@@ -171,6 +179,13 @@ import org.slf4j.LoggerFactory;
       }
       this.authorizations = __this__authorizations;
     }
+    if (other.isSetRanges()) {
+      List<Range> __this__ranges = new ArrayList<Range>();
+      for (Range other_element : other.ranges) {
+        __this__ranges.add(new Range(other_element));
+      }
+      this.ranges = __this__ranges;
+    }
     if (other.isSetColumns()) {
       List<ScanColumn> __this__columns = new ArrayList<ScanColumn>();
       for (ScanColumn other_element : other.columns) {
@@ -195,6 +210,7 @@ import org.slf4j.LoggerFactory;
   @Override
   public void clear() {
     this.authorizations = null;
+    this.ranges = null;
     this.columns = null;
     this.iterators = null;
     setThreadsIsSet(false);
@@ -240,6 +256,45 @@ import org.slf4j.LoggerFactory;
     }
   }
 
+  public int getRangesSize() {
+    return (this.ranges == null) ? 0 : this.ranges.size();
+  }
+
+  public java.util.Iterator<Range> getRangesIterator() {
+    return (this.ranges == null) ? null : this.ranges.iterator();
+  }
+
+  public void addToRanges(Range elem) {
+    if (this.ranges == null) {
+      this.ranges = new ArrayList<Range>();
+    }
+    this.ranges.add(elem);
+  }
+
+  public List<Range> getRanges() {
+    return this.ranges;
+  }
+
+  public BatchScanOptions setRanges(List<Range> ranges) {
+    this.ranges = ranges;
+    return this;
+  }
+
+  public void unsetRanges() {
+    this.ranges = null;
+  }
+
+  /** Returns true if field ranges is set (has been assigned a value) and false otherwise
*/
+  public boolean isSetRanges() {
+    return this.ranges != null;
+  }
+
+  public void setRangesIsSet(boolean value) {
+    if (!value) {
+      this.ranges = null;
+    }
+  }
+
   public int getColumnsSize() {
     return (this.columns == null) ? 0 : this.columns.size();
   }
@@ -351,6 +406,14 @@ import org.slf4j.LoggerFactory;
       }
       break;
 
+    case RANGES:
+      if (value == null) {
+        unsetRanges();
+      } else {
+        setRanges((List<Range>)value);
+      }
+      break;
+
     case COLUMNS:
       if (value == null) {
         unsetColumns();
@@ -383,6 +446,9 @@ import org.slf4j.LoggerFactory;
     case AUTHORIZATIONS:
       return getAuthorizations();
 
+    case RANGES:
+      return getRanges();
+
     case COLUMNS:
       return getColumns();
 
@@ -405,6 +471,8 @@ import org.slf4j.LoggerFactory;
     switch (field) {
     case AUTHORIZATIONS:
       return isSetAuthorizations();
+    case RANGES:
+      return isSetRanges();
     case COLUMNS:
       return isSetColumns();
     case ITERATORS:
@@ -437,6 +505,15 @@ import org.slf4j.LoggerFactory;
         return false;
     }
 
+    boolean this_present_ranges = true && this.isSetRanges();
+    boolean that_present_ranges = true && that.isSetRanges();
+    if (this_present_ranges || that_present_ranges) {
+      if (!(this_present_ranges && that_present_ranges))
+        return false;
+      if (!this.ranges.equals(that.ranges))
+        return false;
+    }
+
     boolean this_present_columns = true && this.isSetColumns();
     boolean that_present_columns = true && that.isSetColumns();
     if (this_present_columns || that_present_columns) {
@@ -490,6 +567,16 @@ import org.slf4j.LoggerFactory;
         return lastComparison;
       }
     }
+    lastComparison = Boolean.valueOf(isSetRanges()).compareTo(typedOther.isSetRanges());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetRanges()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ranges, typedOther.ranges);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
     lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns());
     if (lastComparison != 0) {
       return lastComparison;
@@ -549,6 +636,16 @@ import org.slf4j.LoggerFactory;
       }
       first = false;
     }
+    if (isSetRanges()) {
+      if (!first) sb.append(", ");
+      sb.append("ranges:");
+      if (this.ranges == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.ranges);
+      }
+      first = false;
+    }
     if (isSetColumns()) {
       if (!first) sb.append(", ");
       sb.append("columns:");
@@ -638,36 +735,55 @@ import org.slf4j.LoggerFactory;
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 2: // COLUMNS
+          case 2: // RANGES
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
                 org.apache.thrift.protocol.TList _list45 = iprot.readListBegin();
-                struct.columns = new ArrayList<ScanColumn>(_list45.size);
+                struct.ranges = new ArrayList<Range>(_list45.size);
                 for (int _i46 = 0; _i46 < _list45.size; ++_i46)
                 {
-                  ScanColumn _elem47; // required
-                  _elem47 = new ScanColumn();
+                  Range _elem47; // required
+                  _elem47 = new Range();
                   _elem47.read(iprot);
-                  struct.columns.add(_elem47);
+                  struct.ranges.add(_elem47);
                 }
                 iprot.readListEnd();
               }
-              struct.setColumnsIsSet(true);
+              struct.setRangesIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 3: // ITERATORS
+          case 3: // COLUMNS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
                 org.apache.thrift.protocol.TList _list48 = iprot.readListBegin();
-                struct.iterators = new ArrayList<IteratorSetting>(_list48.size);
+                struct.columns = new ArrayList<ScanColumn>(_list48.size);
                 for (int _i49 = 0; _i49 < _list48.size; ++_i49)
                 {
-                  IteratorSetting _elem50; // required
-                  _elem50 = new IteratorSetting();
+                  ScanColumn _elem50; // required
+                  _elem50 = new ScanColumn();
                   _elem50.read(iprot);
-                  struct.iterators.add(_elem50);
+                  struct.columns.add(_elem50);
+                }
+                iprot.readListEnd();
+              }
+              struct.setColumnsIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 4: // ITERATORS
+            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+              {
+                org.apache.thrift.protocol.TList _list51 = iprot.readListBegin();
+                struct.iterators = new ArrayList<IteratorSetting>(_list51.size);
+                for (int _i52 = 0; _i52 < _list51.size; ++_i52)
+                {
+                  IteratorSetting _elem53; // required
+                  _elem53 = new IteratorSetting();
+                  _elem53.read(iprot);
+                  struct.iterators.add(_elem53);
                 }
                 iprot.readListEnd();
               }
@@ -676,7 +792,7 @@ import org.slf4j.LoggerFactory;
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 4: // THREADS
+          case 5: // THREADS
             if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
               struct.threads = iprot.readI32();
               struct.setThreadsIsSet(true);
@@ -704,23 +820,37 @@ import org.slf4j.LoggerFactory;
           oprot.writeFieldBegin(AUTHORIZATIONS_FIELD_DESC);
           {
             oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING,
struct.authorizations.size()));
-            for (ByteBuffer _iter51 : struct.authorizations)
+            for (ByteBuffer _iter54 : struct.authorizations)
             {
-              oprot.writeBinary(_iter51);
+              oprot.writeBinary(_iter54);
             }
             oprot.writeSetEnd();
           }
           oprot.writeFieldEnd();
         }
       }
+      if (struct.ranges != null) {
+        if (struct.isSetRanges()) {
+          oprot.writeFieldBegin(RANGES_FIELD_DESC);
+          {
+            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT,
struct.ranges.size()));
+            for (Range _iter55 : struct.ranges)
+            {
+              _iter55.write(oprot);
+            }
+            oprot.writeListEnd();
+          }
+          oprot.writeFieldEnd();
+        }
+      }
       if (struct.columns != null) {
         if (struct.isSetColumns()) {
           oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
           {
             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT,
struct.columns.size()));
-            for (ScanColumn _iter52 : struct.columns)
+            for (ScanColumn _iter56 : struct.columns)
             {
-              _iter52.write(oprot);
+              _iter56.write(oprot);
             }
             oprot.writeListEnd();
           }
@@ -732,9 +862,9 @@ import org.slf4j.LoggerFactory;
           oprot.writeFieldBegin(ITERATORS_FIELD_DESC);
           {
             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT,
struct.iterators.size()));
-            for (IteratorSetting _iter53 : struct.iterators)
+            for (IteratorSetting _iter57 : struct.iterators)
             {
-              _iter53.write(oprot);
+              _iter57.write(oprot);
             }
             oprot.writeListEnd();
           }
@@ -767,40 +897,52 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetAuthorizations()) {
         optionals.set(0);
       }
-      if (struct.isSetColumns()) {
+      if (struct.isSetRanges()) {
         optionals.set(1);
       }
-      if (struct.isSetIterators()) {
+      if (struct.isSetColumns()) {
         optionals.set(2);
       }
-      if (struct.isSetThreads()) {
+      if (struct.isSetIterators()) {
         optionals.set(3);
       }
-      oprot.writeBitSet(optionals, 4);
+      if (struct.isSetThreads()) {
+        optionals.set(4);
+      }
+      oprot.writeBitSet(optionals, 5);
       if (struct.isSetAuthorizations()) {
         {
           oprot.writeI32(struct.authorizations.size());
-          for (ByteBuffer _iter54 : struct.authorizations)
+          for (ByteBuffer _iter58 : struct.authorizations)
           {
-            oprot.writeBinary(_iter54);
+            oprot.writeBinary(_iter58);
+          }
+        }
+      }
+      if (struct.isSetRanges()) {
+        {
+          oprot.writeI32(struct.ranges.size());
+          for (Range _iter59 : struct.ranges)
+          {
+            _iter59.write(oprot);
           }
         }
       }
       if (struct.isSetColumns()) {
         {
           oprot.writeI32(struct.columns.size());
-          for (ScanColumn _iter55 : struct.columns)
+          for (ScanColumn _iter60 : struct.columns)
           {
-            _iter55.write(oprot);
+            _iter60.write(oprot);
           }
         }
       }
       if (struct.isSetIterators()) {
         {
           oprot.writeI32(struct.iterators.size());
-          for (IteratorSetting _iter56 : struct.iterators)
+          for (IteratorSetting _iter61 : struct.iterators)
           {
-            _iter56.write(oprot);
+            _iter61.write(oprot);
           }
         }
       }
@@ -812,49 +954,63 @@ import org.slf4j.LoggerFactory;
     @Override
     public void read(org.apache.thrift.protocol.TProtocol prot, BatchScanOptions struct)
throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
-      BitSet incoming = iprot.readBitSet(4);
+      BitSet incoming = iprot.readBitSet(5);
       if (incoming.get(0)) {
         {
-          org.apache.thrift.protocol.TSet _set57 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING,
iprot.readI32());
-          struct.authorizations = new HashSet<ByteBuffer>(2*_set57.size);
-          for (int _i58 = 0; _i58 < _set57.size; ++_i58)
-          {
-            ByteBuffer _elem59; // required
-            _elem59 = iprot.readBinary();
-            struct.authorizations.add(_elem59);
+          org.apache.thrift.protocol.TSet _set62 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING,
iprot.readI32());
+          struct.authorizations = new HashSet<ByteBuffer>(2*_set62.size);
+          for (int _i63 = 0; _i63 < _set62.size; ++_i63)
+          {
+            ByteBuffer _elem64; // required
+            _elem64 = iprot.readBinary();
+            struct.authorizations.add(_elem64);
           }
         }
         struct.setAuthorizationsIsSet(true);
       }
       if (incoming.get(1)) {
         {
-          org.apache.thrift.protocol.TList _list60 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT,
iprot.readI32());
-          struct.columns = new ArrayList<ScanColumn>(_list60.size);
-          for (int _i61 = 0; _i61 < _list60.size; ++_i61)
-          {
-            ScanColumn _elem62; // required
-            _elem62 = new ScanColumn();
-            _elem62.read(iprot);
-            struct.columns.add(_elem62);
+          org.apache.thrift.protocol.TList _list65 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT,
iprot.readI32());
+          struct.ranges = new ArrayList<Range>(_list65.size);
+          for (int _i66 = 0; _i66 < _list65.size; ++_i66)
+          {
+            Range _elem67; // required
+            _elem67 = new Range();
+            _elem67.read(iprot);
+            struct.ranges.add(_elem67);
           }
         }
-        struct.setColumnsIsSet(true);
+        struct.setRangesIsSet(true);
       }
       if (incoming.get(2)) {
         {
-          org.apache.thrift.protocol.TList _list63 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT,
iprot.readI32());
-          struct.iterators = new ArrayList<IteratorSetting>(_list63.size);
-          for (int _i64 = 0; _i64 < _list63.size; ++_i64)
-          {
-            IteratorSetting _elem65; // required
-            _elem65 = new IteratorSetting();
-            _elem65.read(iprot);
-            struct.iterators.add(_elem65);
+          org.apache.thrift.protocol.TList _list68 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT,
iprot.readI32());
+          struct.columns = new ArrayList<ScanColumn>(_list68.size);
+          for (int _i69 = 0; _i69 < _list68.size; ++_i69)
+          {
+            ScanColumn _elem70; // required
+            _elem70 = new ScanColumn();
+            _elem70.read(iprot);
+            struct.columns.add(_elem70);
           }
         }
-        struct.setIteratorsIsSet(true);
+        struct.setColumnsIsSet(true);
       }
       if (incoming.get(3)) {
+        {
+          org.apache.thrift.protocol.TList _list71 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT,
iprot.readI32());
+          struct.iterators = new ArrayList<IteratorSetting>(_list71.size);
+          for (int _i72 = 0; _i72 < _list71.size; ++_i72)
+          {
+            IteratorSetting _elem73; // required
+            _elem73 = new IteratorSetting();
+            _elem73.read(iprot);
+            struct.iterators.add(_elem73);
+          }
+        }
+        struct.setIteratorsIsSet(true);
+      }
+      if (incoming.get(4)) {
         struct.threads = iprot.readI32();
         struct.setThreadsIsSet(true);
       }

Modified: accumulo/trunk/proxy/src/main/thrift/proxy.thrift
URL: http://svn.apache.org/viewvc/accumulo/trunk/proxy/src/main/thrift/proxy.thrift?rev=1439403&r1=1439402&r2=1439403&view=diff
==============================================================================
--- accumulo/trunk/proxy/src/main/thrift/proxy.thrift (original)
+++ accumulo/trunk/proxy/src/main/thrift/proxy.thrift Mon Jan 28 13:55:34 2013
@@ -86,9 +86,10 @@ struct ScanOptions {
 
 struct BatchScanOptions {
   1:optional set<binary> authorizations;
-  2:optional list<ScanColumn> columns;
-  3:optional list<IteratorSetting> iterators;
-  4:optional i32 threads;
+  2:optional list<Range> ranges;
+  3:optional list<ScanColumn> columns;
+  4:optional list<IteratorSetting> iterators;
+  5:optional i32 threads;
 } 
 
 struct KeyValueAndPeek {
@@ -314,7 +315,7 @@ service AccumuloProxy
 
 
   // scanning
-  string createBatchScanner(1:UserPass userpass, 2:string tableName, 3:list<Range>
ranges, 4:BatchScanOptions options)          throws (1:AccumuloException ouch1, 2:AccumuloSecurityException
ouch2);
+  string createBatchScanner(1:UserPass userpass, 2:string tableName, 3:BatchScanOptions options)
         throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2);
   string createScanner(1:UserPass userpass, 2:string tableName, 3:ScanOptions options)  
                                       throws (1:AccumuloException ouch1, 2:AccumuloSecurityException
ouch2);
 
   // use the scanner

Modified: accumulo/trunk/proxy/src/test/java/org/apache/accumulo/proxy/TestProxyReadWrite.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/proxy/src/test/java/org/apache/accumulo/proxy/TestProxyReadWrite.java?rev=1439403&r1=1439402&r2=1439403&view=diff
==============================================================================
--- accumulo/trunk/proxy/src/test/java/org/apache/accumulo/proxy/TestProxyReadWrite.java (original)
+++ accumulo/trunk/proxy/src/test/java/org/apache/accumulo/proxy/TestProxyReadWrite.java Mon
Jan 28 13:55:34 2013
@@ -125,8 +125,8 @@ public class TestProxyReadWrite {
     Key stop = new Key();
     stop.setRow("5".getBytes());
     BatchScanOptions options = new BatchScanOptions();
-    List<Range> ranges = Collections.singletonList(new Range(null, false, stop, false));
-    String cookie = tpc.proxy().createBatchScanner(userpass, testtable, ranges, options);
+    options.ranges = Collections.singletonList(new Range(null, false, stop, false));
+    String cookie = tpc.proxy().createBatchScanner(userpass, testtable, options);
     
     int i = 0;
     boolean hasNext = true;



Mime
View raw message