accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [32/61] [abbrv] [partial] accumulo git commit: ACCUMULO-722 put trunk in my sandbox
Date Thu, 03 Mar 2016 21:59:57 GMT
http://git-wip-us.apache.org/repos/asf/accumulo/blob/7bdbfccb/1.5/core/src/main/java/org/apache/accumulo/core/data/Range.java
----------------------------------------------------------------------
diff --git a/1.5/core/src/main/java/org/apache/accumulo/core/data/Range.java b/1.5/core/src/main/java/org/apache/accumulo/core/data/Range.java
new file mode 100644
index 0000000..7085734
--- /dev/null
+++ b/1.5/core/src/main/java/org/apache/accumulo/core/data/Range.java
@@ -0,0 +1,854 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.accumulo.core.data;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.accumulo.core.data.thrift.TRange;
+import org.apache.hadoop.io.Text;
+import org.apache.hadoop.io.WritableComparable;
+
+/**
+ * This class is used to specify a range of Accumulo Keys.
+ * 
+ */
+
+public class Range implements WritableComparable<Range> {
+  
+  private Key start;
+  private Key stop;
+  private boolean startKeyInclusive;
+  private boolean stopKeyInclusive;
+  private boolean infiniteStartKey;
+  private boolean infiniteStopKey;
+  
+  /**
+   * Creates a range that goes from negative to positive infinity
+   */
+  
+  public Range() {
+    this((Key) null, true, (Key) null, true);
+  }
+  
+  /**
+   * Creates a range from startKey inclusive to endKey inclusive
+   * 
+   * @param startKey
+   *          set this to null when negative infinity is needed
+   * @param endKey
+   *          set this to null when positive infinity is needed
+   */
+  public Range(Key startKey, Key endKey) {
+    this(startKey, true, endKey, true);
+  }
+  
+  /**
+   * Creates a range that covers an entire row
+   * 
+   * @param row
+   *          set this to null to cover all rows
+   */
+  public Range(CharSequence row) {
+    this(row, true, row, true);
+  }
+  
+  /**
+   * Creates a range that covers an entire row
+   * 
+   * @param row
+   *          set this to null to cover all rows
+   */
+  public Range(Text row) {
+    this(row, true, row, true);
+  }
+  
+  /**
+   * Creates a range from startRow inclusive to endRow inclusive
+   * 
+   * @param startRow
+   *          set this to null when negative infinity is needed
+   * @param endRow
+   *          set this to null when positive infinity is needed
+   */
+  public Range(Text startRow, Text endRow) {
+    this(startRow, true, endRow, true);
+  }
+  
+  /**
+   * Creates a range from startRow inclusive to endRow inclusive
+   * 
+   * @param startRow
+   *          set this to null when negative infinity is needed
+   * @param endRow
+   *          set this to null when positive infinity is needed
+   */
+  public Range(CharSequence startRow, CharSequence endRow) {
+    this(startRow, true, endRow, true);
+  }
+  
+  /**
+   * Creates a range from startRow to endRow
+   * 
+   * @param startRow
+   *          set this to null when negative infinity is needed
+   * @param startRowInclusive
+   *          determines if the start row is skipped
+   * @param endRow
+   *          set this to null when positive infinity is needed
+   * @param endRowInclusive
+   *          determines if the endRow is included
+   */
+  
+  public Range(Text startRow, boolean startRowInclusive, Text endRow, boolean endRowInclusive) {
+    this((startRow == null ? null : (startRowInclusive ? new Key(startRow) : new Key(startRow).followingKey(PartialKey.ROW))), true, (endRow == null ? null
+        : (endRowInclusive ? new Key(endRow).followingKey(PartialKey.ROW) : new Key(endRow))), false);
+  }
+  
+  /**
+   * Creates a range from startRow to endRow
+   * 
+   * @param startRow
+   *          set this to null when negative infinity is needed
+   * @param startRowInclusive
+   *          determines if the start row is skipped
+   * @param endRow
+   *          set this to null when positive infinity is needed
+   * @param endRowInclusive
+   *          determines if the endRow is included
+   */
+  
+  public Range(CharSequence startRow, boolean startRowInclusive, CharSequence endRow, boolean endRowInclusive) {
+    this(startRow == null ? null : new Text(startRow.toString()), startRowInclusive, endRow == null ? null : new Text(endRow.toString()), endRowInclusive);
+  }
+  
+  /**
+   * Creates a range from startKey to endKey
+   * 
+   * @param startKey
+   *          set this to null when negative infinity is needed
+   * @param startKeyInclusive
+   *          determines if the ranges includes the start key
+   * @param endKey
+   *          set this to null when infinity is needed
+   * @param endKeyInclusive
+   *          determines if the range includes the end key
+   */
+  public Range(Key startKey, boolean startKeyInclusive, Key endKey, boolean endKeyInclusive) {
+    this.start = startKey;
+    this.startKeyInclusive = startKeyInclusive;
+    this.infiniteStartKey = startKey == null;
+    this.stop = endKey;
+    this.stopKeyInclusive = endKeyInclusive;
+    this.infiniteStopKey = stop == null;
+    
+    if (!infiniteStartKey && !infiniteStopKey && beforeStartKey(endKey)) {
+      throw new IllegalArgumentException("Start key must be less than end key in range (" + startKey + ", " + endKey + ")");
+    }
+  }
+  
+  /**
+   * Copies a range
+   */
+  public Range(Range range) {
+    this(range.start, range.stop, range.startKeyInclusive, range.stopKeyInclusive, range.infiniteStartKey, range.infiniteStopKey);
+  }
+  
+  public Range(Key start, Key stop, boolean startKeyInclusive, boolean stopKeyInclusive, boolean infiniteStartKey, boolean infiniteStopKey) {
+    if (infiniteStartKey && start != null)
+      throw new IllegalArgumentException();
+    
+    if (infiniteStopKey && stop != null)
+      throw new IllegalArgumentException();
+    
+    this.start = start;
+    this.stop = stop;
+    this.startKeyInclusive = startKeyInclusive;
+    this.stopKeyInclusive = stopKeyInclusive;
+    this.infiniteStartKey = infiniteStartKey;
+    this.infiniteStopKey = infiniteStopKey;
+  }
+  
+  public Range(TRange trange) {
+    this(trange.start == null ? null : new Key(trange.start), trange.stop == null ? null : new Key(trange.stop), trange.startKeyInclusive,
+        trange.stopKeyInclusive, trange.infiniteStartKey, trange.infiniteStopKey);
+  }
+  
+  /**
+   * @return the first key in the range, null if the key is infinite
+   */
+  public Key getStartKey() {
+    if (infiniteStartKey) {
+      return null;
+    }
+    return start;
+  }
+  
+  /**
+   * 
+   * @param key
+   * @return true if the given key is before the range, otherwise false
+   */
+  public boolean beforeStartKey(Key key) {
+    if (infiniteStartKey) {
+      return false;
+    }
+    
+    if (startKeyInclusive)
+      return key.compareTo(start) < 0;
+    return key.compareTo(start) <= 0;
+  }
+  
+  /**
+   * @return the last key in the range, null if the end key is infinite
+   */
+  
+  public Key getEndKey() {
+    if (infiniteStopKey) {
+      return null;
+    }
+    return stop;
+  }
+  
+  /**
+   * @param key
+   * @return true if the given key is after the range, otherwise false
+   */
+  
+  public boolean afterEndKey(Key key) {
+    if (infiniteStopKey)
+      return false;
+    
+    if (stopKeyInclusive)
+      return stop.compareTo(key) < 0;
+    return stop.compareTo(key) <= 0;
+  }
+  
+  @Override
+  public int hashCode() {
+    int startHash = infiniteStartKey ? 0 : start.hashCode() + (startKeyInclusive ? 1 : 0);
+    int stopHash = infiniteStopKey ? 0 : stop.hashCode() + (stopKeyInclusive ? 1 : 0);
+    
+    return startHash + stopHash;
+  }
+  
+  @Override
+  public boolean equals(Object o) {
+    if (o instanceof Range)
+      return equals((Range) o);
+    return false;
+  }
+  
+  public boolean equals(Range otherRange) {
+    
+    return compareTo(otherRange) == 0;
+  }
+  
+  /**
+   * Compares this range to another range. Compares in the order start key, inclusiveness of start key, end key, inclusiveness of end key. Infinite keys sort
+   * first, and non-infinite keys are compared with {@link Key#compareTo(Key)}. Inclusive sorts before non-inclusive.
+   */
+  public int compareTo(Range o) {
+    int comp;
+    
+    if (infiniteStartKey)
+      if (o.infiniteStartKey)
+        comp = 0;
+      else
+        comp = -1;
+    else if (o.infiniteStartKey)
+      comp = 1;
+    else {
+      comp = start.compareTo(o.start);
+      if (comp == 0)
+        if (startKeyInclusive && !o.startKeyInclusive)
+          comp = -1;
+        else if (!startKeyInclusive && o.startKeyInclusive)
+          comp = 1;
+      
+    }
+    
+    if (comp == 0)
+      if (infiniteStopKey)
+        if (o.infiniteStopKey)
+          comp = 0;
+        else
+          comp = 1;
+      else if (o.infiniteStopKey)
+        comp = -1;
+      else {
+        comp = stop.compareTo(o.stop);
+        if (comp == 0)
+          if (stopKeyInclusive && !o.stopKeyInclusive)
+            comp = 1;
+          else if (!stopKeyInclusive && o.stopKeyInclusive)
+            comp = -1;
+      }
+    
+    return comp;
+  }
+  
+  /**
+   * 
+   * @param key
+   * @return true if the given key falls within the range
+   */
+  public boolean contains(Key key) {
+    return !beforeStartKey(key) && !afterEndKey(key);
+  }
+  
+  /**
+   * Takes a collection on range and merges overlapping and adjacent ranges. For example given the following input
+   * 
+   * <pre>
+   * [a,c], (c, d], (g,m), (j,t]
+   * </pre>
+   * 
+   * the following ranges would be returned
+   * 
+   * <pre>
+   * [a,d], (g,t]
+   * </pre>
+   * 
+   * @param ranges
+   * @return list of merged ranges
+   */
+  
+  public static List<Range> mergeOverlapping(Collection<Range> ranges) {
+    if (ranges.size() == 0)
+      return Collections.emptyList();
+    
+    List<Range> ral = new ArrayList<Range>(ranges);
+    Collections.sort(ral);
+    
+    ArrayList<Range> ret = new ArrayList<Range>(ranges.size());
+    
+    Range currentRange = ral.get(0);
+    boolean currentStartKeyInclusive = ral.get(0).startKeyInclusive;
+    
+    for (int i = 1; i < ral.size(); i++) {
+      // because of inclusive switch, equal keys may not be seen
+      
+      if (currentRange.infiniteStopKey) {
+        // this range has the minimal start key and
+        // an infinite end key so it will contain all
+        // other ranges
+        break;
+      }
+      
+      Range range = ral.get(i);
+      
+      boolean startKeysEqual;
+      if (range.infiniteStartKey) {
+        // previous start key must be infinite because it is sorted
+        assert (currentRange.infiniteStartKey);
+        startKeysEqual = true;
+      } else if (currentRange.infiniteStartKey) {
+        startKeysEqual = false;
+      } else if (currentRange.start.equals(range.start)) {
+        startKeysEqual = true;
+      } else {
+        startKeysEqual = false;
+      }
+      
+      if (startKeysEqual || currentRange.contains(range.start)
+          || (!currentRange.stopKeyInclusive && range.startKeyInclusive && range.start.equals(currentRange.stop))) {
+        int cmp;
+        
+        if (range.infiniteStopKey || (cmp = range.stop.compareTo(currentRange.stop)) > 0 || (cmp == 0 && range.stopKeyInclusive)) {
+          currentRange = new Range(currentRange.getStartKey(), currentStartKeyInclusive, range.getEndKey(), range.stopKeyInclusive);
+        }/* else currentRange contains ral.get(i) */
+      } else {
+        ret.add(currentRange);
+        currentRange = range;
+        currentStartKeyInclusive = range.startKeyInclusive;
+      }
+    }
+    
+    ret.add(currentRange);
+    
+    return ret;
+  }
+  
+  /**
+   * Creates a range which represents the intersection of this range and the passed in range. The following example will print true.
+   * 
+   * <pre>
+   * Range range1 = new Range(&quot;a&quot;, &quot;f&quot;);
+   * Range range2 = new Range(&quot;c&quot;, &quot;n&quot;);
+   * Range range3 = range1.clip(range2);
+   * System.out.println(range3.equals(new Range(&quot;c&quot;, &quot;f&quot;)));
+   * </pre>
+   * 
+   * @param range
+   * @return the intersection
+   * @throws IllegalArgumentException
+   *           if ranges does not overlap
+   */
+  
+  public Range clip(Range range) {
+    return clip(range, false);
+  }
+  
+  /**
+   * Same as other clip function except if gives the option to return null of the ranges do not overlap instead of throwing an exception.
+   * 
+   * @see Range#clip(Range)
+   * @param range
+   * @param returnNullIfDisjoint
+   *          If the ranges do not overlap and true is passed, then null is returned otherwise an exception is thrown.
+   * @return the intersection
+   */
+  
+  public Range clip(Range range, boolean returnNullIfDisjoint) {
+    
+    Key sk = range.getStartKey();
+    boolean ski = range.isStartKeyInclusive();
+    
+    Key ek = range.getEndKey();
+    boolean eki = range.isEndKeyInclusive();
+    
+    if (range.getStartKey() == null) {
+      if (getStartKey() != null) {
+        sk = getStartKey();
+        ski = isStartKeyInclusive();
+      }
+    } else if (afterEndKey(range.getStartKey())
+        || (getEndKey() != null && range.getStartKey().equals(getEndKey()) && !(range.isStartKeyInclusive() && isEndKeyInclusive()))) {
+      if (returnNullIfDisjoint)
+        return null;
+      throw new IllegalArgumentException("Range " + range + " does not overlap " + this);
+    } else if (beforeStartKey(range.getStartKey())) {
+      sk = getStartKey();
+      ski = isStartKeyInclusive();
+    }
+    
+    if (range.getEndKey() == null) {
+      if (getEndKey() != null) {
+        ek = getEndKey();
+        eki = isEndKeyInclusive();
+      }
+    } else if (beforeStartKey(range.getEndKey())
+        || (getStartKey() != null && range.getEndKey().equals(getStartKey()) && !(range.isEndKeyInclusive() && isStartKeyInclusive()))) {
+      if (returnNullIfDisjoint)
+        return null;
+      throw new IllegalArgumentException("Range " + range + " does not overlap " + this);
+    } else if (afterEndKey(range.getEndKey())) {
+      ek = getEndKey();
+      eki = isEndKeyInclusive();
+    }
+    
+    return new Range(sk, ski, ek, eki);
+  }
+  
+  /**
+   * Creates a new range that is bounded by the columns passed in. The stary key in the returned range will have a column >= to the minimum column. The end key
+   * in the returned range will have a column <= the max column.
+   * 
+   * 
+   * @param min
+   * @param max
+   * @return a column bounded range
+   * @throws IllegalArgumentException
+   *           if min > max
+   */
+  
+  public Range bound(Column min, Column max) {
+    
+    if (min.compareTo(max) > 0) {
+      throw new IllegalArgumentException("min column > max column " + min + " " + max);
+    }
+    
+    Key sk = getStartKey();
+    boolean ski = isStartKeyInclusive();
+    
+    if (sk != null) {
+      
+      ByteSequence cf = sk.getColumnFamilyData();
+      ByteSequence cq = sk.getColumnQualifierData();
+      
+      ByteSequence mincf = new ArrayByteSequence(min.columnFamily);
+      ByteSequence mincq;
+      
+      if (min.columnQualifier != null)
+        mincq = new ArrayByteSequence(min.columnQualifier);
+      else
+        mincq = new ArrayByteSequence(new byte[0]);
+      
+      int cmp = cf.compareTo(mincf);
+      
+      if (cmp < 0 || (cmp == 0 && cq.compareTo(mincq) < 0)) {
+        ski = true;
+        sk = new Key(sk.getRowData().toArray(), mincf.toArray(), mincq.toArray(), new byte[0], Long.MAX_VALUE, true);
+      }
+    }
+    
+    Key ek = getEndKey();
+    boolean eki = isEndKeyInclusive();
+    
+    if (ek != null) {
+      ByteSequence row = ek.getRowData();
+      ByteSequence cf = ek.getColumnFamilyData();
+      ByteSequence cq = ek.getColumnQualifierData();
+      ByteSequence cv = ek.getColumnVisibilityData();
+      
+      ByteSequence maxcf = new ArrayByteSequence(max.columnFamily);
+      ByteSequence maxcq = null;
+      if (max.columnQualifier != null)
+        maxcq = new ArrayByteSequence(max.columnQualifier);
+      
+      boolean set = false;
+      
+      int comp = cf.compareTo(maxcf);
+      
+      if (comp > 0) {
+        set = true;
+      } else if (comp == 0 && maxcq != null && cq.compareTo(maxcq) > 0) {
+        set = true;
+      } else if (!eki && row.length() > 0 && row.byteAt(row.length() - 1) == 0 && cf.length() == 0 && cq.length() == 0 && cv.length() == 0
+          && ek.getTimestamp() == Long.MAX_VALUE) {
+        row = row.subSequence(0, row.length() - 1);
+        set = true;
+      }
+      
+      if (set) {
+        eki = false;
+        if (maxcq == null)
+          ek = new Key(row.toArray(), maxcf.toArray(), new byte[0], new byte[0], 0, false).followingKey(PartialKey.ROW_COLFAM);
+        else
+          ek = new Key(row.toArray(), maxcf.toArray(), maxcq.toArray(), new byte[0], 0, false).followingKey(PartialKey.ROW_COLFAM_COLQUAL);
+      }
+    }
+    
+    return new Range(sk, ski, ek, eki);
+  }
+  
+  public String toString() {
+    return ((startKeyInclusive && start != null) ? "[" : "(") + (start == null ? "-inf" : start) + "," + (stop == null ? "+inf" : stop)
+        + ((stopKeyInclusive && stop != null) ? "]" : ")");
+  }
+  
+  public void readFields(DataInput in) throws IOException {
+    infiniteStartKey = in.readBoolean();
+    infiniteStopKey = in.readBoolean();
+    if (!infiniteStartKey) {
+      start = new Key();
+      start.readFields(in);
+    } else {
+      start = null;
+    }
+    
+    if (!infiniteStopKey) {
+      stop = new Key();
+      stop.readFields(in);
+    } else {
+      stop = null;
+    }
+    
+    startKeyInclusive = in.readBoolean();
+    stopKeyInclusive = in.readBoolean();
+  }
+  
+  public void write(DataOutput out) throws IOException {
+    out.writeBoolean(infiniteStartKey);
+    out.writeBoolean(infiniteStopKey);
+    if (!infiniteStartKey)
+      start.write(out);
+    if (!infiniteStopKey)
+      stop.write(out);
+    out.writeBoolean(startKeyInclusive);
+    out.writeBoolean(stopKeyInclusive);
+  }
+  
+  public boolean isStartKeyInclusive() {
+    return startKeyInclusive;
+  }
+  
+  public boolean isEndKeyInclusive() {
+    return stopKeyInclusive;
+  }
+  
+  public TRange toThrift() {
+    return new TRange(start == null ? null : start.toThrift(), stop == null ? null : stop.toThrift(), startKeyInclusive, stopKeyInclusive, infiniteStartKey,
+        infiniteStopKey);
+  }
+  
+  public boolean isInfiniteStartKey() {
+    return infiniteStartKey;
+  }
+  
+  public boolean isInfiniteStopKey() {
+    return infiniteStopKey;
+  }
+  
+  /**
+   * Creates a range that covers an exact row Returns the same Range as new Range(row)
+   * 
+   * @param row
+   *          all keys in the range will have this row
+   */
+  public static Range exact(Text row) {
+    return new Range(row);
+  }
+  
+  /**
+   * Creates a range that covers an exact row and column family
+   * 
+   * @param row
+   *          all keys in the range will have this row
+   * 
+   * @param cf
+   *          all keys in the range will have this column family
+   */
+  public static Range exact(Text row, Text cf) {
+    Key startKey = new Key(row, cf);
+    return new Range(startKey, true, startKey.followingKey(PartialKey.ROW_COLFAM), false);
+  }
+  
+  /**
+   * Creates a range that covers an exact row, column family, and column qualifier
+   * 
+   * @param row
+   *          all keys in the range will have this row
+   * 
+   * @param cf
+   *          all keys in the range will have this column family
+   * 
+   * @param cq
+   *          all keys in the range will have this column qualifier
+   */
+  public static Range exact(Text row, Text cf, Text cq) {
+    Key startKey = new Key(row, cf, cq);
+    return new Range(startKey, true, startKey.followingKey(PartialKey.ROW_COLFAM_COLQUAL), false);
+  }
+  
+  /**
+   * Creates a range that covers an exact row, column family, column qualifier, and visibility
+   * 
+   * @param row
+   *          all keys in the range will have this row
+   * 
+   * @param cf
+   *          all keys in the range will have this column family
+   * 
+   * @param cq
+   *          all keys in the range will have this column qualifier
+   * 
+   * @param cv
+   *          all keys in the range will have this column visibility
+   */
+  public static Range exact(Text row, Text cf, Text cq, Text cv) {
+    Key startKey = new Key(row, cf, cq, cv);
+    return new Range(startKey, true, startKey.followingKey(PartialKey.ROW_COLFAM_COLQUAL_COLVIS), false);
+  }
+  
+  /**
+   * Creates a range that covers an exact row, column family, column qualifier, visibility, and timestamp
+   * 
+   * @param row
+   *          all keys in the range will have this row
+   * 
+   * @param cf
+   *          all keys in the range will have this column family
+   * 
+   * @param cq
+   *          all keys in the range will have this column qualifier
+   * 
+   * @param cv
+   *          all keys in the range will have this column visibility
+   * 
+   * @param ts
+   *          all keys in the range will have this timestamp
+   */
+  public static Range exact(Text row, Text cf, Text cq, Text cv, long ts) {
+    Key startKey = new Key(row, cf, cq, cv, ts);
+    return new Range(startKey, true, startKey.followingKey(PartialKey.ROW_COLFAM_COLQUAL_COLVIS_TIME), false);
+  }
+  
+  /**
+   * Returns a Text that sorts just after all Texts beginning with a prefix
+   * 
+   * @param prefix
+   */
+  public static Text followingPrefix(Text prefix) {
+    byte[] prefixBytes = prefix.getBytes();
+    
+    // find the last byte in the array that is not 0xff
+    int changeIndex = prefix.getLength() - 1;
+    while (changeIndex >= 0 && prefixBytes[changeIndex] == (byte) 0xff)
+      changeIndex--;
+    if (changeIndex < 0)
+      return null;
+    
+    // copy prefix bytes into new array
+    byte[] newBytes = new byte[changeIndex + 1];
+    System.arraycopy(prefixBytes, 0, newBytes, 0, changeIndex + 1);
+    
+    // increment the selected byte
+    newBytes[changeIndex]++;
+    return new Text(newBytes);
+  }
+  
+  /**
+   * Returns a Range that covers all rows beginning with a prefix
+   * 
+   * @param rowPrefix
+   *          all keys in the range will have rows that begin with this prefix
+   */
+  public static Range prefix(Text rowPrefix) {
+    Text fp = followingPrefix(rowPrefix);
+    return new Range(new Key(rowPrefix), true, fp == null ? null : new Key(fp), false);
+  }
+  
+  /**
+   * Returns a Range that covers all column families beginning with a prefix within a given row
+   * 
+   * @param row
+   *          all keys in the range will have this row
+   * 
+   * @param cfPrefix
+   *          all keys in the range will have column families that begin with this prefix
+   */
+  public static Range prefix(Text row, Text cfPrefix) {
+    Text fp = followingPrefix(cfPrefix);
+    return new Range(new Key(row, cfPrefix), true, fp == null ? new Key(row).followingKey(PartialKey.ROW) : new Key(row, fp), false);
+  }
+  
+  /**
+   * Returns a Range that covers all column qualifiers beginning with a prefix within a given row and column family
+   * 
+   * @param row
+   *          all keys in the range will have this row
+   * 
+   * @param cf
+   *          all keys in the range will have this column family
+   * 
+   * @param cqPrefix
+   *          all keys in the range will have column qualifiers that begin with this prefix
+   */
+  public static Range prefix(Text row, Text cf, Text cqPrefix) {
+    Text fp = followingPrefix(cqPrefix);
+    return new Range(new Key(row, cf, cqPrefix), true, fp == null ? new Key(row, cf).followingKey(PartialKey.ROW_COLFAM) : new Key(row, cf, fp), false);
+  }
+  
+  /**
+   * Returns a Range that covers all column visibilities beginning with a prefix within a given row, column family, and column qualifier
+   * 
+   * @param row
+   *          all keys in the range will have this row
+   * 
+   * @param cf
+   *          all keys in the range will have this column family
+   * 
+   * @param cq
+   *          all keys in the range will have this column qualifier
+   * 
+   * @param cvPrefix
+   *          all keys in the range will have column visibilities that begin with this prefix
+   */
+  public static Range prefix(Text row, Text cf, Text cq, Text cvPrefix) {
+    Text fp = followingPrefix(cvPrefix);
+    return new Range(new Key(row, cf, cq, cvPrefix), true, fp == null ? new Key(row, cf, cq).followingKey(PartialKey.ROW_COLFAM_COLQUAL) : new Key(row, cf, cq,
+        fp), false);
+  }
+  
+  /**
+   * Creates a range that covers an exact row
+   * 
+   * @see Range#exact(Text)
+   */
+  public static Range exact(CharSequence row) {
+    return Range.exact(new Text(row.toString()));
+  }
+  
+  /**
+   * Creates a range that covers an exact row and column family
+   * 
+   * @see Range#exact(Text, Text)
+   */
+  public static Range exact(CharSequence row, CharSequence cf) {
+    return Range.exact(new Text(row.toString()), new Text(cf.toString()));
+  }
+  
+  /**
+   * Creates a range that covers an exact row, column family, and column qualifier
+   * 
+   * @see Range#exact(Text, Text, Text)
+   */
+  public static Range exact(CharSequence row, CharSequence cf, CharSequence cq) {
+    return Range.exact(new Text(row.toString()), new Text(cf.toString()), new Text(cq.toString()));
+  }
+  
+  /**
+   * Creates a range that covers an exact row, column family, column qualifier, and visibility
+   * 
+   * @see Range#exact(Text, Text, Text, Text)
+   */
+  public static Range exact(CharSequence row, CharSequence cf, CharSequence cq, CharSequence cv) {
+    return Range.exact(new Text(row.toString()), new Text(cf.toString()), new Text(cq.toString()), new Text(cv.toString()));
+  }
+  
+  /**
+   * Creates a range that covers an exact row, column family, column qualifier, visibility, and timestamp
+   * 
+   * @see Range#exact(Text, Text, Text, Text, long)
+   */
+  public static Range exact(CharSequence row, CharSequence cf, CharSequence cq, CharSequence cv, long ts) {
+    return Range.exact(new Text(row.toString()), new Text(cf.toString()), new Text(cq.toString()), new Text(cv.toString()), ts);
+  }
+  
+  /**
+   * Returns a Range that covers all rows beginning with a prefix
+   * 
+   * @see Range#prefix(Text)
+   */
+  public static Range prefix(CharSequence rowPrefix) {
+    return Range.prefix(new Text(rowPrefix.toString()));
+  }
+  
+  /**
+   * Returns a Range that covers all column families beginning with a prefix within a given row
+   * 
+   * @see Range#prefix(Text, Text)
+   */
+  public static Range prefix(CharSequence row, CharSequence cfPrefix) {
+    return Range.prefix(new Text(row.toString()), new Text(cfPrefix.toString()));
+  }
+  
+  /**
+   * Returns a Range that covers all column qualifiers beginning with a prefix within a given row and column family
+   * 
+   * @see Range#prefix(Text, Text, Text)
+   */
+  public static Range prefix(CharSequence row, CharSequence cf, CharSequence cqPrefix) {
+    return Range.prefix(new Text(row.toString()), new Text(cf.toString()), new Text(cqPrefix.toString()));
+  }
+  
+  /**
+   * Returns a Range that covers all column visibilities beginning with a prefix within a given row, column family, and column qualifier
+   * 
+   * @see Range#prefix(Text, Text, Text, Text)
+   */
+  public static Range prefix(CharSequence row, CharSequence cf, CharSequence cq, CharSequence cvPrefix) {
+    return Range.prefix(new Text(row.toString()), new Text(cf.toString()), new Text(cq.toString()), new Text(cvPrefix.toString()));
+  }
+}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7bdbfccb/1.5/core/src/main/java/org/apache/accumulo/core/data/Value.java
----------------------------------------------------------------------
diff --git a/1.5/core/src/main/java/org/apache/accumulo/core/data/Value.java b/1.5/core/src/main/java/org/apache/accumulo/core/data/Value.java
new file mode 100644
index 0000000..9d5d787
--- /dev/null
+++ b/1.5/core/src/main/java/org/apache/accumulo/core/data/Value.java
@@ -0,0 +1,243 @@
+package org.apache.accumulo.core.data;
+
+/**
+ * Copyright 2007 The Apache Software Foundation
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import static org.apache.accumulo.core.util.ByteBufferUtil.toBytes;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.nio.ByteBuffer;
+import java.util.List;
+
+import org.apache.accumulo.core.Constants;
+import org.apache.hadoop.io.BytesWritable;
+import org.apache.hadoop.io.WritableComparable;
+import org.apache.hadoop.io.WritableComparator;
+import org.apache.log4j.Logger;
+
+/**
+ * A byte sequence that is usable as a key or value. Based on {@link org.apache.hadoop.io.BytesWritable} only this class is NOT resizable and DOES NOT
+ * distinguish between the size of the sequence and the current capacity as {@link org.apache.hadoop.io.BytesWritable} does. Hence its comparatively
+ * 'immutable'.
+ */
+public class Value implements WritableComparable<Object> {
+  protected byte[] value;
+  private static final Logger log = Logger.getLogger(Value.class);
+  
+  /**
+   * Create a zero-size sequence.
+   */
+  public Value() {
+    super();
+  }
+  
+  /**
+   * Create a Value using the byte array as the initial value.
+   * 
+   * @param bytes
+   *          This array becomes the backing storage for the object.
+   */
+  
+  public Value(byte[] bytes) {
+    this(bytes, false);
+  }
+  
+  public Value(ByteBuffer bytes) {
+    this(toBytes(bytes), false);
+  }
+  
+  public Value(ByteBuffer bytes, boolean copy) {
+    this(toBytes(bytes), copy);
+  }
+  
+  public Value(byte[] bytes, boolean copy) {
+    if (!copy) {
+      this.value = bytes;
+    } else {
+      this.value = new byte[bytes.length];
+      System.arraycopy(bytes, 0, this.value, 0, bytes.length);
+    }
+    
+  }
+  
+  /**
+   * Set the new Value to a copy of the contents of the passed <code>ibw</code>.
+   * 
+   * @param ibw
+   *          the value to set this Value to.
+   */
+  public Value(final Value ibw) {
+    this(ibw.get(), 0, ibw.getSize());
+  }
+  
+  /**
+   * Set the value to a copy of the given byte range
+   * 
+   * @param newData
+   *          the new values to copy in
+   * @param offset
+   *          the offset in newData to start at
+   * @param length
+   *          the number of bytes to copy
+   */
+  public Value(final byte[] newData, final int offset, final int length) {
+    this.value = new byte[length];
+    System.arraycopy(newData, offset, this.value, 0, length);
+  }
+  
+  /**
+   * Get the data from the BytesWritable.
+   * 
+   * @return The data is only valid between 0 and getSize() - 1.
+   */
+  public byte[] get() {
+    if (this.value == null) {
+      throw new IllegalStateException("Uninitialized. Null constructor " + "called w/o accompanying readFields invocation");
+    }
+    return this.value;
+  }
+  
+  /**
+   * @param b
+   *          Use passed bytes as backing array for this instance.
+   */
+  public void set(final byte[] b) {
+    this.value = b;
+  }
+  
+  /**
+   * 
+   * @param b
+   *          copy bytes
+   */
+  public void copy(byte[] b) {
+    this.value = new byte[b.length];
+    System.arraycopy(b, 0, this.value, 0, b.length);
+  }
+  
+  /**
+   * @return the current size of the buffer.
+   */
+  public int getSize() {
+    if (this.value == null) {
+      throw new IllegalStateException("Uninitialized. Null constructor " + "called w/o accompanying readFields invocation");
+    }
+    return this.value.length;
+  }
+  
+  public void readFields(final DataInput in) throws IOException {
+    this.value = new byte[in.readInt()];
+    in.readFully(this.value, 0, this.value.length);
+  }
+  
+  /** {@inheritDoc} */
+  public void write(final DataOutput out) throws IOException {
+    out.writeInt(this.value.length);
+    out.write(this.value, 0, this.value.length);
+  }
+  
+  // Below methods copied from BytesWritable
+  
+  /** {@inheritDoc} */
+  @Override
+  public int hashCode() {
+    return WritableComparator.hashBytes(value, this.value.length);
+  }
+  
+  /**
+   * Define the sort order of the BytesWritable.
+   * 
+   * @param right_obj
+   *          The other bytes writable
+   * @return Positive if left is bigger than right, 0 if they are equal, and negative if left is smaller than right.
+   */
+  public int compareTo(Object right_obj) {
+    return compareTo(((Value) right_obj).get());
+  }
+  
+  /**
+   * Compares the bytes in this object to the specified byte array
+   * 
+   * @return Positive if left is bigger than right, 0 if they are equal, and negative if left is smaller than right.
+   */
+  public int compareTo(final byte[] that) {
+    int diff = this.value.length - that.length;
+    return (diff != 0) ? diff : WritableComparator.compareBytes(this.value, 0, this.value.length, that, 0, that.length);
+  }
+  
+  /** {@inheritDoc} */
+  @Override
+  public boolean equals(Object right_obj) {
+    if (right_obj instanceof byte[]) {
+      return compareTo((byte[]) right_obj) == 0;
+    }
+    if (right_obj instanceof Value) {
+      return compareTo(right_obj) == 0;
+    }
+    return false;
+  }
+  
+  @Override
+  public String toString() {
+    try {
+      return new String(get(), Constants.VALUE_ENCODING);
+    } catch (UnsupportedEncodingException e) {
+      log.error(e.toString());
+      return null;
+    }
+  }
+  
+  /**
+   * A Comparator optimized for Value.
+   */
+  public static class Comparator extends WritableComparator {
+    private BytesWritable.Comparator comparator = new BytesWritable.Comparator();
+    
+    /** constructor */
+    public Comparator() {
+      super(Value.class);
+    }
+    
+    /** {@inheritDoc} */
+    @Override
+    public int compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2) {
+      return comparator.compare(b1, s1, l1, b2, s2, l2);
+    }
+  }
+  
+  static { // register this comparator
+    WritableComparator.define(Value.class, new Comparator());
+  }
+  
+  /**
+	 */
+  public static byte[][] toArray(final List<byte[]> array) {
+    // List#toArray doesn't work on lists of byte [].
+    byte[][] results = new byte[array.size()][];
+    for (int i = 0; i < array.size(); i++) {
+      results[i] = array.get(i);
+    }
+    return results;
+  }
+  
+}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7bdbfccb/1.5/core/src/main/java/org/apache/accumulo/core/data/thrift/InitialMultiScan.java
----------------------------------------------------------------------
diff --git a/1.5/core/src/main/java/org/apache/accumulo/core/data/thrift/InitialMultiScan.java b/1.5/core/src/main/java/org/apache/accumulo/core/data/thrift/InitialMultiScan.java
new file mode 100644
index 0000000..e77deb7
--- /dev/null
+++ b/1.5/core/src/main/java/org/apache/accumulo/core/data/thrift/InitialMultiScan.java
@@ -0,0 +1,483 @@
+/**
+ * Autogenerated by Thrift Compiler (0.8.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.accumulo.core.data.thrift;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings("all") public class InitialMultiScan implements org.apache.thrift.TBase<InitialMultiScan, InitialMultiScan._Fields>, java.io.Serializable, Cloneable {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InitialMultiScan");
+
+  private static final org.apache.thrift.protocol.TField SCAN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("scanID", org.apache.thrift.protocol.TType.I64, (short)1);
+  private static final org.apache.thrift.protocol.TField RESULT_FIELD_DESC = new org.apache.thrift.protocol.TField("result", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new InitialMultiScanStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new InitialMultiScanTupleSchemeFactory());
+  }
+
+  public long scanID; // required
+  public MultiScanResult result; // required
+
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+    SCAN_ID((short)1, "scanID"),
+    RESULT((short)2, "result");
+
+    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+    static {
+      for (_Fields field : EnumSet.allOf(_Fields.class)) {
+        byName.put(field.getFieldName(), field);
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, or null if its not found.
+     */
+    public static _Fields findByThriftId(int fieldId) {
+      switch(fieldId) {
+        case 1: // SCAN_ID
+          return SCAN_ID;
+        case 2: // RESULT
+          return RESULT;
+        default:
+          return null;
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
+    public static _Fields findByThriftIdOrThrow(int fieldId) {
+      _Fields fields = findByThriftId(fieldId);
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      return fields;
+    }
+
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
+    public static _Fields findByName(String name) {
+      return byName.get(name);
+    }
+
+    private final short _thriftId;
+    private final String _fieldName;
+
+    _Fields(short thriftId, String fieldName) {
+      _thriftId = thriftId;
+      _fieldName = fieldName;
+    }
+
+    public short getThriftFieldId() {
+      return _thriftId;
+    }
+
+    public String getFieldName() {
+      return _fieldName;
+    }
+  }
+
+  // isset id assignments
+  private static final int __SCANID_ISSET_ID = 0;
+  private BitSet __isset_bit_vector = new BitSet(1);
+  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.SCAN_ID, new org.apache.thrift.meta_data.FieldMetaData("scanID", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64        , "ScanID")));
+    tmpMap.put(_Fields.RESULT, new org.apache.thrift.meta_data.FieldMetaData("result", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, MultiScanResult.class)));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(InitialMultiScan.class, metaDataMap);
+  }
+
+  public InitialMultiScan() {
+  }
+
+  public InitialMultiScan(
+    long scanID,
+    MultiScanResult result)
+  {
+    this();
+    this.scanID = scanID;
+    setScanIDIsSet(true);
+    this.result = result;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public InitialMultiScan(InitialMultiScan other) {
+    __isset_bit_vector.clear();
+    __isset_bit_vector.or(other.__isset_bit_vector);
+    this.scanID = other.scanID;
+    if (other.isSetResult()) {
+      this.result = new MultiScanResult(other.result);
+    }
+  }
+
+  public InitialMultiScan deepCopy() {
+    return new InitialMultiScan(this);
+  }
+
+  @Override
+  public void clear() {
+    setScanIDIsSet(false);
+    this.scanID = 0;
+    this.result = null;
+  }
+
+  public long getScanID() {
+    return this.scanID;
+  }
+
+  public InitialMultiScan setScanID(long scanID) {
+    this.scanID = scanID;
+    setScanIDIsSet(true);
+    return this;
+  }
+
+  public void unsetScanID() {
+    __isset_bit_vector.clear(__SCANID_ISSET_ID);
+  }
+
+  /** Returns true if field scanID is set (has been assigned a value) and false otherwise */
+  public boolean isSetScanID() {
+    return __isset_bit_vector.get(__SCANID_ISSET_ID);
+  }
+
+  public void setScanIDIsSet(boolean value) {
+    __isset_bit_vector.set(__SCANID_ISSET_ID, value);
+  }
+
+  public MultiScanResult getResult() {
+    return this.result;
+  }
+
+  public InitialMultiScan setResult(MultiScanResult result) {
+    this.result = result;
+    return this;
+  }
+
+  public void unsetResult() {
+    this.result = null;
+  }
+
+  /** Returns true if field result is set (has been assigned a value) and false otherwise */
+  public boolean isSetResult() {
+    return this.result != null;
+  }
+
+  public void setResultIsSet(boolean value) {
+    if (!value) {
+      this.result = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case SCAN_ID:
+      if (value == null) {
+        unsetScanID();
+      } else {
+        setScanID((Long)value);
+      }
+      break;
+
+    case RESULT:
+      if (value == null) {
+        unsetResult();
+      } else {
+        setResult((MultiScanResult)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case SCAN_ID:
+      return Long.valueOf(getScanID());
+
+    case RESULT:
+      return getResult();
+
+    }
+    throw new IllegalStateException();
+  }
+
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+  public boolean isSet(_Fields field) {
+    if (field == null) {
+      throw new IllegalArgumentException();
+    }
+
+    switch (field) {
+    case SCAN_ID:
+      return isSetScanID();
+    case RESULT:
+      return isSetResult();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof InitialMultiScan)
+      return this.equals((InitialMultiScan)that);
+    return false;
+  }
+
+  public boolean equals(InitialMultiScan that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_scanID = true;
+    boolean that_present_scanID = true;
+    if (this_present_scanID || that_present_scanID) {
+      if (!(this_present_scanID && that_present_scanID))
+        return false;
+      if (this.scanID != that.scanID)
+        return false;
+    }
+
+    boolean this_present_result = true && this.isSetResult();
+    boolean that_present_result = true && that.isSetResult();
+    if (this_present_result || that_present_result) {
+      if (!(this_present_result && that_present_result))
+        return false;
+      if (!this.result.equals(that.result))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    return 0;
+  }
+
+  public int compareTo(InitialMultiScan other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+    InitialMultiScan typedOther = (InitialMultiScan)other;
+
+    lastComparison = Boolean.valueOf(isSetScanID()).compareTo(typedOther.isSetScanID());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetScanID()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scanID, typedOther.scanID);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetResult()).compareTo(typedOther.isSetResult());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetResult()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.result, typedOther.result);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    return 0;
+  }
+
+  public _Fields fieldForId(int fieldId) {
+    return _Fields.findByThriftId(fieldId);
+  }
+
+  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+  }
+
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("InitialMultiScan(");
+    boolean first = true;
+
+    sb.append("scanID:");
+    sb.append(this.scanID);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("result:");
+    if (this.result == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.result);
+    }
+    first = false;
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws org.apache.thrift.TException {
+    // check for required fields
+  }
+
+  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+    try {
+      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+    } catch (org.apache.thrift.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+  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);
+    }
+  }
+
+  private static class InitialMultiScanStandardSchemeFactory implements SchemeFactory {
+    public InitialMultiScanStandardScheme getScheme() {
+      return new InitialMultiScanStandardScheme();
+    }
+  }
+
+  private static class InitialMultiScanStandardScheme extends StandardScheme<InitialMultiScan> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, InitialMultiScan struct) throws org.apache.thrift.TException {
+      org.apache.thrift.protocol.TField schemeField;
+      iprot.readStructBegin();
+      while (true)
+      {
+        schemeField = iprot.readFieldBegin();
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+          break;
+        }
+        switch (schemeField.id) {
+          case 1: // SCAN_ID
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.scanID = iprot.readI64();
+              struct.setScanIDIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // RESULT
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+              struct.result = new MultiScanResult();
+              struct.result.read(iprot);
+              struct.setResultIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          default:
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+
+      // check for required fields of primitive type, which can't be checked in the validate method
+      struct.validate();
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot, InitialMultiScan struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      oprot.writeFieldBegin(SCAN_ID_FIELD_DESC);
+      oprot.writeI64(struct.scanID);
+      oprot.writeFieldEnd();
+      if (struct.result != null) {
+        oprot.writeFieldBegin(RESULT_FIELD_DESC);
+        struct.result.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class InitialMultiScanTupleSchemeFactory implements SchemeFactory {
+    public InitialMultiScanTupleScheme getScheme() {
+      return new InitialMultiScanTupleScheme();
+    }
+  }
+
+  private static class InitialMultiScanTupleScheme extends TupleScheme<InitialMultiScan> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, InitialMultiScan struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetScanID()) {
+        optionals.set(0);
+      }
+      if (struct.isSetResult()) {
+        optionals.set(1);
+      }
+      oprot.writeBitSet(optionals, 2);
+      if (struct.isSetScanID()) {
+        oprot.writeI64(struct.scanID);
+      }
+      if (struct.isSetResult()) {
+        struct.result.write(oprot);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, InitialMultiScan struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(2);
+      if (incoming.get(0)) {
+        struct.scanID = iprot.readI64();
+        struct.setScanIDIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.result = new MultiScanResult();
+        struct.result.read(iprot);
+        struct.setResultIsSet(true);
+      }
+    }
+  }
+
+}
+

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7bdbfccb/1.5/core/src/main/java/org/apache/accumulo/core/data/thrift/InitialScan.java
----------------------------------------------------------------------
diff --git a/1.5/core/src/main/java/org/apache/accumulo/core/data/thrift/InitialScan.java b/1.5/core/src/main/java/org/apache/accumulo/core/data/thrift/InitialScan.java
new file mode 100644
index 0000000..ace821a
--- /dev/null
+++ b/1.5/core/src/main/java/org/apache/accumulo/core/data/thrift/InitialScan.java
@@ -0,0 +1,483 @@
+/**
+ * Autogenerated by Thrift Compiler (0.8.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.accumulo.core.data.thrift;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings("all") public class InitialScan implements org.apache.thrift.TBase<InitialScan, InitialScan._Fields>, java.io.Serializable, Cloneable {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InitialScan");
+
+  private static final org.apache.thrift.protocol.TField SCAN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("scanID", org.apache.thrift.protocol.TType.I64, (short)1);
+  private static final org.apache.thrift.protocol.TField RESULT_FIELD_DESC = new org.apache.thrift.protocol.TField("result", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new InitialScanStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new InitialScanTupleSchemeFactory());
+  }
+
+  public long scanID; // required
+  public ScanResult result; // required
+
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+    SCAN_ID((short)1, "scanID"),
+    RESULT((short)2, "result");
+
+    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+    static {
+      for (_Fields field : EnumSet.allOf(_Fields.class)) {
+        byName.put(field.getFieldName(), field);
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, or null if its not found.
+     */
+    public static _Fields findByThriftId(int fieldId) {
+      switch(fieldId) {
+        case 1: // SCAN_ID
+          return SCAN_ID;
+        case 2: // RESULT
+          return RESULT;
+        default:
+          return null;
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
+    public static _Fields findByThriftIdOrThrow(int fieldId) {
+      _Fields fields = findByThriftId(fieldId);
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      return fields;
+    }
+
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
+    public static _Fields findByName(String name) {
+      return byName.get(name);
+    }
+
+    private final short _thriftId;
+    private final String _fieldName;
+
+    _Fields(short thriftId, String fieldName) {
+      _thriftId = thriftId;
+      _fieldName = fieldName;
+    }
+
+    public short getThriftFieldId() {
+      return _thriftId;
+    }
+
+    public String getFieldName() {
+      return _fieldName;
+    }
+  }
+
+  // isset id assignments
+  private static final int __SCANID_ISSET_ID = 0;
+  private BitSet __isset_bit_vector = new BitSet(1);
+  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.SCAN_ID, new org.apache.thrift.meta_data.FieldMetaData("scanID", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64        , "ScanID")));
+    tmpMap.put(_Fields.RESULT, new org.apache.thrift.meta_data.FieldMetaData("result", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ScanResult.class)));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(InitialScan.class, metaDataMap);
+  }
+
+  public InitialScan() {
+  }
+
+  public InitialScan(
+    long scanID,
+    ScanResult result)
+  {
+    this();
+    this.scanID = scanID;
+    setScanIDIsSet(true);
+    this.result = result;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public InitialScan(InitialScan other) {
+    __isset_bit_vector.clear();
+    __isset_bit_vector.or(other.__isset_bit_vector);
+    this.scanID = other.scanID;
+    if (other.isSetResult()) {
+      this.result = new ScanResult(other.result);
+    }
+  }
+
+  public InitialScan deepCopy() {
+    return new InitialScan(this);
+  }
+
+  @Override
+  public void clear() {
+    setScanIDIsSet(false);
+    this.scanID = 0;
+    this.result = null;
+  }
+
+  public long getScanID() {
+    return this.scanID;
+  }
+
+  public InitialScan setScanID(long scanID) {
+    this.scanID = scanID;
+    setScanIDIsSet(true);
+    return this;
+  }
+
+  public void unsetScanID() {
+    __isset_bit_vector.clear(__SCANID_ISSET_ID);
+  }
+
+  /** Returns true if field scanID is set (has been assigned a value) and false otherwise */
+  public boolean isSetScanID() {
+    return __isset_bit_vector.get(__SCANID_ISSET_ID);
+  }
+
+  public void setScanIDIsSet(boolean value) {
+    __isset_bit_vector.set(__SCANID_ISSET_ID, value);
+  }
+
+  public ScanResult getResult() {
+    return this.result;
+  }
+
+  public InitialScan setResult(ScanResult result) {
+    this.result = result;
+    return this;
+  }
+
+  public void unsetResult() {
+    this.result = null;
+  }
+
+  /** Returns true if field result is set (has been assigned a value) and false otherwise */
+  public boolean isSetResult() {
+    return this.result != null;
+  }
+
+  public void setResultIsSet(boolean value) {
+    if (!value) {
+      this.result = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case SCAN_ID:
+      if (value == null) {
+        unsetScanID();
+      } else {
+        setScanID((Long)value);
+      }
+      break;
+
+    case RESULT:
+      if (value == null) {
+        unsetResult();
+      } else {
+        setResult((ScanResult)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case SCAN_ID:
+      return Long.valueOf(getScanID());
+
+    case RESULT:
+      return getResult();
+
+    }
+    throw new IllegalStateException();
+  }
+
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+  public boolean isSet(_Fields field) {
+    if (field == null) {
+      throw new IllegalArgumentException();
+    }
+
+    switch (field) {
+    case SCAN_ID:
+      return isSetScanID();
+    case RESULT:
+      return isSetResult();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof InitialScan)
+      return this.equals((InitialScan)that);
+    return false;
+  }
+
+  public boolean equals(InitialScan that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_scanID = true;
+    boolean that_present_scanID = true;
+    if (this_present_scanID || that_present_scanID) {
+      if (!(this_present_scanID && that_present_scanID))
+        return false;
+      if (this.scanID != that.scanID)
+        return false;
+    }
+
+    boolean this_present_result = true && this.isSetResult();
+    boolean that_present_result = true && that.isSetResult();
+    if (this_present_result || that_present_result) {
+      if (!(this_present_result && that_present_result))
+        return false;
+      if (!this.result.equals(that.result))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    return 0;
+  }
+
+  public int compareTo(InitialScan other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+    InitialScan typedOther = (InitialScan)other;
+
+    lastComparison = Boolean.valueOf(isSetScanID()).compareTo(typedOther.isSetScanID());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetScanID()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scanID, typedOther.scanID);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetResult()).compareTo(typedOther.isSetResult());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetResult()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.result, typedOther.result);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    return 0;
+  }
+
+  public _Fields fieldForId(int fieldId) {
+    return _Fields.findByThriftId(fieldId);
+  }
+
+  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+  }
+
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("InitialScan(");
+    boolean first = true;
+
+    sb.append("scanID:");
+    sb.append(this.scanID);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("result:");
+    if (this.result == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.result);
+    }
+    first = false;
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws org.apache.thrift.TException {
+    // check for required fields
+  }
+
+  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+    try {
+      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+    } catch (org.apache.thrift.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+  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);
+    }
+  }
+
+  private static class InitialScanStandardSchemeFactory implements SchemeFactory {
+    public InitialScanStandardScheme getScheme() {
+      return new InitialScanStandardScheme();
+    }
+  }
+
+  private static class InitialScanStandardScheme extends StandardScheme<InitialScan> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, InitialScan struct) throws org.apache.thrift.TException {
+      org.apache.thrift.protocol.TField schemeField;
+      iprot.readStructBegin();
+      while (true)
+      {
+        schemeField = iprot.readFieldBegin();
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+          break;
+        }
+        switch (schemeField.id) {
+          case 1: // SCAN_ID
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.scanID = iprot.readI64();
+              struct.setScanIDIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // RESULT
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+              struct.result = new ScanResult();
+              struct.result.read(iprot);
+              struct.setResultIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          default:
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+
+      // check for required fields of primitive type, which can't be checked in the validate method
+      struct.validate();
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot, InitialScan struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      oprot.writeFieldBegin(SCAN_ID_FIELD_DESC);
+      oprot.writeI64(struct.scanID);
+      oprot.writeFieldEnd();
+      if (struct.result != null) {
+        oprot.writeFieldBegin(RESULT_FIELD_DESC);
+        struct.result.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class InitialScanTupleSchemeFactory implements SchemeFactory {
+    public InitialScanTupleScheme getScheme() {
+      return new InitialScanTupleScheme();
+    }
+  }
+
+  private static class InitialScanTupleScheme extends TupleScheme<InitialScan> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, InitialScan struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetScanID()) {
+        optionals.set(0);
+      }
+      if (struct.isSetResult()) {
+        optionals.set(1);
+      }
+      oprot.writeBitSet(optionals, 2);
+      if (struct.isSetScanID()) {
+        oprot.writeI64(struct.scanID);
+      }
+      if (struct.isSetResult()) {
+        struct.result.write(oprot);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, InitialScan struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(2);
+      if (incoming.get(0)) {
+        struct.scanID = iprot.readI64();
+        struct.setScanIDIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.result = new ScanResult();
+        struct.result.read(iprot);
+        struct.setResultIsSet(true);
+      }
+    }
+  }
+
+}
+

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7bdbfccb/1.5/core/src/main/java/org/apache/accumulo/core/data/thrift/IterInfo.java
----------------------------------------------------------------------
diff --git a/1.5/core/src/main/java/org/apache/accumulo/core/data/thrift/IterInfo.java b/1.5/core/src/main/java/org/apache/accumulo/core/data/thrift/IterInfo.java
new file mode 100644
index 0000000..fb13ba8
--- /dev/null
+++ b/1.5/core/src/main/java/org/apache/accumulo/core/data/thrift/IterInfo.java
@@ -0,0 +1,581 @@
+/**
+ * Autogenerated by Thrift Compiler (0.8.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.accumulo.core.data.thrift;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings("all") public class IterInfo implements org.apache.thrift.TBase<IterInfo, IterInfo._Fields>, java.io.Serializable, Cloneable {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("IterInfo");
+
+  private static final org.apache.thrift.protocol.TField PRIORITY_FIELD_DESC = new org.apache.thrift.protocol.TField("priority", org.apache.thrift.protocol.TType.I32, (short)1);
+  private static final org.apache.thrift.protocol.TField CLASS_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("className", org.apache.thrift.protocol.TType.STRING, (short)2);
+  private static final org.apache.thrift.protocol.TField ITER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("iterName", org.apache.thrift.protocol.TType.STRING, (short)3);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new IterInfoStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new IterInfoTupleSchemeFactory());
+  }
+
+  public int priority; // required
+  public String className; // required
+  public String iterName; // required
+
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+    PRIORITY((short)1, "priority"),
+    CLASS_NAME((short)2, "className"),
+    ITER_NAME((short)3, "iterName");
+
+    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+    static {
+      for (_Fields field : EnumSet.allOf(_Fields.class)) {
+        byName.put(field.getFieldName(), field);
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, or null if its not found.
+     */
+    public static _Fields findByThriftId(int fieldId) {
+      switch(fieldId) {
+        case 1: // PRIORITY
+          return PRIORITY;
+        case 2: // CLASS_NAME
+          return CLASS_NAME;
+        case 3: // ITER_NAME
+          return ITER_NAME;
+        default:
+          return null;
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
+    public static _Fields findByThriftIdOrThrow(int fieldId) {
+      _Fields fields = findByThriftId(fieldId);
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      return fields;
+    }
+
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
+    public static _Fields findByName(String name) {
+      return byName.get(name);
+    }
+
+    private final short _thriftId;
+    private final String _fieldName;
+
+    _Fields(short thriftId, String fieldName) {
+      _thriftId = thriftId;
+      _fieldName = fieldName;
+    }
+
+    public short getThriftFieldId() {
+      return _thriftId;
+    }
+
+    public String getFieldName() {
+      return _fieldName;
+    }
+  }
+
+  // isset id assignments
+  private static final int __PRIORITY_ISSET_ID = 0;
+  private BitSet __isset_bit_vector = new BitSet(1);
+  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.PRIORITY, new org.apache.thrift.meta_data.FieldMetaData("priority", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+    tmpMap.put(_Fields.CLASS_NAME, new org.apache.thrift.meta_data.FieldMetaData("className", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.ITER_NAME, new org.apache.thrift.meta_data.FieldMetaData("iterName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(IterInfo.class, metaDataMap);
+  }
+
+  public IterInfo() {
+  }
+
+  public IterInfo(
+    int priority,
+    String className,
+    String iterName)
+  {
+    this();
+    this.priority = priority;
+    setPriorityIsSet(true);
+    this.className = className;
+    this.iterName = iterName;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public IterInfo(IterInfo other) {
+    __isset_bit_vector.clear();
+    __isset_bit_vector.or(other.__isset_bit_vector);
+    this.priority = other.priority;
+    if (other.isSetClassName()) {
+      this.className = other.className;
+    }
+    if (other.isSetIterName()) {
+      this.iterName = other.iterName;
+    }
+  }
+
+  public IterInfo deepCopy() {
+    return new IterInfo(this);
+  }
+
+  @Override
+  public void clear() {
+    setPriorityIsSet(false);
+    this.priority = 0;
+    this.className = null;
+    this.iterName = null;
+  }
+
+  public int getPriority() {
+    return this.priority;
+  }
+
+  public IterInfo setPriority(int priority) {
+    this.priority = priority;
+    setPriorityIsSet(true);
+    return this;
+  }
+
+  public void unsetPriority() {
+    __isset_bit_vector.clear(__PRIORITY_ISSET_ID);
+  }
+
+  /** Returns true if field priority is set (has been assigned a value) and false otherwise */
+  public boolean isSetPriority() {
+    return __isset_bit_vector.get(__PRIORITY_ISSET_ID);
+  }
+
+  public void setPriorityIsSet(boolean value) {
+    __isset_bit_vector.set(__PRIORITY_ISSET_ID, value);
+  }
+
+  public String getClassName() {
+    return this.className;
+  }
+
+  public IterInfo setClassName(String className) {
+    this.className = className;
+    return this;
+  }
+
+  public void unsetClassName() {
+    this.className = null;
+  }
+
+  /** Returns true if field className is set (has been assigned a value) and false otherwise */
+  public boolean isSetClassName() {
+    return this.className != null;
+  }
+
+  public void setClassNameIsSet(boolean value) {
+    if (!value) {
+      this.className = null;
+    }
+  }
+
+  public String getIterName() {
+    return this.iterName;
+  }
+
+  public IterInfo setIterName(String iterName) {
+    this.iterName = iterName;
+    return this;
+  }
+
+  public void unsetIterName() {
+    this.iterName = null;
+  }
+
+  /** Returns true if field iterName is set (has been assigned a value) and false otherwise */
+  public boolean isSetIterName() {
+    return this.iterName != null;
+  }
+
+  public void setIterNameIsSet(boolean value) {
+    if (!value) {
+      this.iterName = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case PRIORITY:
+      if (value == null) {
+        unsetPriority();
+      } else {
+        setPriority((Integer)value);
+      }
+      break;
+
+    case CLASS_NAME:
+      if (value == null) {
+        unsetClassName();
+      } else {
+        setClassName((String)value);
+      }
+      break;
+
+    case ITER_NAME:
+      if (value == null) {
+        unsetIterName();
+      } else {
+        setIterName((String)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case PRIORITY:
+      return Integer.valueOf(getPriority());
+
+    case CLASS_NAME:
+      return getClassName();
+
+    case ITER_NAME:
+      return getIterName();
+
+    }
+    throw new IllegalStateException();
+  }
+
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+  public boolean isSet(_Fields field) {
+    if (field == null) {
+      throw new IllegalArgumentException();
+    }
+
+    switch (field) {
+    case PRIORITY:
+      return isSetPriority();
+    case CLASS_NAME:
+      return isSetClassName();
+    case ITER_NAME:
+      return isSetIterName();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof IterInfo)
+      return this.equals((IterInfo)that);
+    return false;
+  }
+
+  public boolean equals(IterInfo that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_priority = true;
+    boolean that_present_priority = true;
+    if (this_present_priority || that_present_priority) {
+      if (!(this_present_priority && that_present_priority))
+        return false;
+      if (this.priority != that.priority)
+        return false;
+    }
+
+    boolean this_present_className = true && this.isSetClassName();
+    boolean that_present_className = true && that.isSetClassName();
+    if (this_present_className || that_present_className) {
+      if (!(this_present_className && that_present_className))
+        return false;
+      if (!this.className.equals(that.className))
+        return false;
+    }
+
+    boolean this_present_iterName = true && this.isSetIterName();
+    boolean that_present_iterName = true && that.isSetIterName();
+    if (this_present_iterName || that_present_iterName) {
+      if (!(this_present_iterName && that_present_iterName))
+        return false;
+      if (!this.iterName.equals(that.iterName))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    return 0;
+  }
+
+  public int compareTo(IterInfo other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+    IterInfo typedOther = (IterInfo)other;
+
+    lastComparison = Boolean.valueOf(isSetPriority()).compareTo(typedOther.isSetPriority());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetPriority()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.priority, typedOther.priority);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetClassName()).compareTo(typedOther.isSetClassName());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetClassName()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.className, typedOther.className);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetIterName()).compareTo(typedOther.isSetIterName());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetIterName()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.iterName, typedOther.iterName);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    return 0;
+  }
+
+  public _Fields fieldForId(int fieldId) {
+    return _Fields.findByThriftId(fieldId);
+  }
+
+  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+  }
+
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("IterInfo(");
+    boolean first = true;
+
+    sb.append("priority:");
+    sb.append(this.priority);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("className:");
+    if (this.className == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.className);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("iterName:");
+    if (this.iterName == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.iterName);
+    }
+    first = false;
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws org.apache.thrift.TException {
+    // check for required fields
+  }
+
+  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+    try {
+      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+    } catch (org.apache.thrift.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+  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);
+    }
+  }
+
+  private static class IterInfoStandardSchemeFactory implements SchemeFactory {
+    public IterInfoStandardScheme getScheme() {
+      return new IterInfoStandardScheme();
+    }
+  }
+
+  private static class IterInfoStandardScheme extends StandardScheme<IterInfo> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, IterInfo struct) throws org.apache.thrift.TException {
+      org.apache.thrift.protocol.TField schemeField;
+      iprot.readStructBegin();
+      while (true)
+      {
+        schemeField = iprot.readFieldBegin();
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+          break;
+        }
+        switch (schemeField.id) {
+          case 1: // PRIORITY
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.priority = iprot.readI32();
+              struct.setPriorityIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // CLASS_NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.className = iprot.readString();
+              struct.setClassNameIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // ITER_NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.iterName = iprot.readString();
+              struct.setIterNameIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          default:
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+
+      // check for required fields of primitive type, which can't be checked in the validate method
+      struct.validate();
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot, IterInfo struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      oprot.writeFieldBegin(PRIORITY_FIELD_DESC);
+      oprot.writeI32(struct.priority);
+      oprot.writeFieldEnd();
+      if (struct.className != null) {
+        oprot.writeFieldBegin(CLASS_NAME_FIELD_DESC);
+        oprot.writeString(struct.className);
+        oprot.writeFieldEnd();
+      }
+      if (struct.iterName != null) {
+        oprot.writeFieldBegin(ITER_NAME_FIELD_DESC);
+        oprot.writeString(struct.iterName);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class IterInfoTupleSchemeFactory implements SchemeFactory {
+    public IterInfoTupleScheme getScheme() {
+      return new IterInfoTupleScheme();
+    }
+  }
+
+  private static class IterInfoTupleScheme extends TupleScheme<IterInfo> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, IterInfo struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetPriority()) {
+        optionals.set(0);
+      }
+      if (struct.isSetClassName()) {
+        optionals.set(1);
+      }
+      if (struct.isSetIterName()) {
+        optionals.set(2);
+      }
+      oprot.writeBitSet(optionals, 3);
+      if (struct.isSetPriority()) {
+        oprot.writeI32(struct.priority);
+      }
+      if (struct.isSetClassName()) {
+        oprot.writeString(struct.className);
+      }
+      if (struct.isSetIterName()) {
+        oprot.writeString(struct.iterName);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, IterInfo struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(3);
+      if (incoming.get(0)) {
+        struct.priority = iprot.readI32();
+        struct.setPriorityIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.className = iprot.readString();
+        struct.setClassNameIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.iterName = iprot.readString();
+        struct.setIterNameIsSet(true);
+      }
+    }
+  }
+
+}
+


Mime
View raw message