accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [21/61] [abbrv] [partial] accumulo git commit: ACCUMULO-722 put trunk in my sandbox
Date Thu, 03 Mar 2016 21:59:46 GMT
http://git-wip-us.apache.org/repos/asf/accumulo/blob/7bdbfccb/1.5/core/src/main/java/org/apache/accumulo/core/gc/thrift/GcCycleStats.java
----------------------------------------------------------------------
diff --git a/1.5/core/src/main/java/org/apache/accumulo/core/gc/thrift/GcCycleStats.java b/1.5/core/src/main/java/org/apache/accumulo/core/gc/thrift/GcCycleStats.java
new file mode 100644
index 0000000..6075628
--- /dev/null
+++ b/1.5/core/src/main/java/org/apache/accumulo/core/gc/thrift/GcCycleStats.java
@@ -0,0 +1,851 @@
+/**
+ * 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.gc.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 GcCycleStats implements org.apache.thrift.TBase<GcCycleStats, GcCycleStats._Fields>, java.io.Serializable, Cloneable {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GcCycleStats");
+
+  private static final org.apache.thrift.protocol.TField STARTED_FIELD_DESC = new org.apache.thrift.protocol.TField("started", org.apache.thrift.protocol.TType.I64, (short)1);
+  private static final org.apache.thrift.protocol.TField FINISHED_FIELD_DESC = new org.apache.thrift.protocol.TField("finished", org.apache.thrift.protocol.TType.I64, (short)2);
+  private static final org.apache.thrift.protocol.TField CANDIDATES_FIELD_DESC = new org.apache.thrift.protocol.TField("candidates", org.apache.thrift.protocol.TType.I64, (short)3);
+  private static final org.apache.thrift.protocol.TField IN_USE_FIELD_DESC = new org.apache.thrift.protocol.TField("inUse", org.apache.thrift.protocol.TType.I64, (short)4);
+  private static final org.apache.thrift.protocol.TField DELETED_FIELD_DESC = new org.apache.thrift.protocol.TField("deleted", org.apache.thrift.protocol.TType.I64, (short)5);
+  private static final org.apache.thrift.protocol.TField ERRORS_FIELD_DESC = new org.apache.thrift.protocol.TField("errors", org.apache.thrift.protocol.TType.I64, (short)6);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new GcCycleStatsStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new GcCycleStatsTupleSchemeFactory());
+  }
+
+  public long started; // required
+  public long finished; // required
+  public long candidates; // required
+  public long inUse; // required
+  public long deleted; // required
+  public long errors; // 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 {
+    STARTED((short)1, "started"),
+    FINISHED((short)2, "finished"),
+    CANDIDATES((short)3, "candidates"),
+    IN_USE((short)4, "inUse"),
+    DELETED((short)5, "deleted"),
+    ERRORS((short)6, "errors");
+
+    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: // STARTED
+          return STARTED;
+        case 2: // FINISHED
+          return FINISHED;
+        case 3: // CANDIDATES
+          return CANDIDATES;
+        case 4: // IN_USE
+          return IN_USE;
+        case 5: // DELETED
+          return DELETED;
+        case 6: // ERRORS
+          return ERRORS;
+        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 __STARTED_ISSET_ID = 0;
+  private static final int __FINISHED_ISSET_ID = 1;
+  private static final int __CANDIDATES_ISSET_ID = 2;
+  private static final int __INUSE_ISSET_ID = 3;
+  private static final int __DELETED_ISSET_ID = 4;
+  private static final int __ERRORS_ISSET_ID = 5;
+  private BitSet __isset_bit_vector = new BitSet(6);
+  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.STARTED, new org.apache.thrift.meta_data.FieldMetaData("started", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+    tmpMap.put(_Fields.FINISHED, new org.apache.thrift.meta_data.FieldMetaData("finished", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+    tmpMap.put(_Fields.CANDIDATES, new org.apache.thrift.meta_data.FieldMetaData("candidates", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+    tmpMap.put(_Fields.IN_USE, new org.apache.thrift.meta_data.FieldMetaData("inUse", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+    tmpMap.put(_Fields.DELETED, new org.apache.thrift.meta_data.FieldMetaData("deleted", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+    tmpMap.put(_Fields.ERRORS, new org.apache.thrift.meta_data.FieldMetaData("errors", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GcCycleStats.class, metaDataMap);
+  }
+
+  public GcCycleStats() {
+  }
+
+  public GcCycleStats(
+    long started,
+    long finished,
+    long candidates,
+    long inUse,
+    long deleted,
+    long errors)
+  {
+    this();
+    this.started = started;
+    setStartedIsSet(true);
+    this.finished = finished;
+    setFinishedIsSet(true);
+    this.candidates = candidates;
+    setCandidatesIsSet(true);
+    this.inUse = inUse;
+    setInUseIsSet(true);
+    this.deleted = deleted;
+    setDeletedIsSet(true);
+    this.errors = errors;
+    setErrorsIsSet(true);
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public GcCycleStats(GcCycleStats other) {
+    __isset_bit_vector.clear();
+    __isset_bit_vector.or(other.__isset_bit_vector);
+    this.started = other.started;
+    this.finished = other.finished;
+    this.candidates = other.candidates;
+    this.inUse = other.inUse;
+    this.deleted = other.deleted;
+    this.errors = other.errors;
+  }
+
+  public GcCycleStats deepCopy() {
+    return new GcCycleStats(this);
+  }
+
+  @Override
+  public void clear() {
+    setStartedIsSet(false);
+    this.started = 0;
+    setFinishedIsSet(false);
+    this.finished = 0;
+    setCandidatesIsSet(false);
+    this.candidates = 0;
+    setInUseIsSet(false);
+    this.inUse = 0;
+    setDeletedIsSet(false);
+    this.deleted = 0;
+    setErrorsIsSet(false);
+    this.errors = 0;
+  }
+
+  public long getStarted() {
+    return this.started;
+  }
+
+  public GcCycleStats setStarted(long started) {
+    this.started = started;
+    setStartedIsSet(true);
+    return this;
+  }
+
+  public void unsetStarted() {
+    __isset_bit_vector.clear(__STARTED_ISSET_ID);
+  }
+
+  /** Returns true if field started is set (has been assigned a value) and false otherwise */
+  public boolean isSetStarted() {
+    return __isset_bit_vector.get(__STARTED_ISSET_ID);
+  }
+
+  public void setStartedIsSet(boolean value) {
+    __isset_bit_vector.set(__STARTED_ISSET_ID, value);
+  }
+
+  public long getFinished() {
+    return this.finished;
+  }
+
+  public GcCycleStats setFinished(long finished) {
+    this.finished = finished;
+    setFinishedIsSet(true);
+    return this;
+  }
+
+  public void unsetFinished() {
+    __isset_bit_vector.clear(__FINISHED_ISSET_ID);
+  }
+
+  /** Returns true if field finished is set (has been assigned a value) and false otherwise */
+  public boolean isSetFinished() {
+    return __isset_bit_vector.get(__FINISHED_ISSET_ID);
+  }
+
+  public void setFinishedIsSet(boolean value) {
+    __isset_bit_vector.set(__FINISHED_ISSET_ID, value);
+  }
+
+  public long getCandidates() {
+    return this.candidates;
+  }
+
+  public GcCycleStats setCandidates(long candidates) {
+    this.candidates = candidates;
+    setCandidatesIsSet(true);
+    return this;
+  }
+
+  public void unsetCandidates() {
+    __isset_bit_vector.clear(__CANDIDATES_ISSET_ID);
+  }
+
+  /** Returns true if field candidates is set (has been assigned a value) and false otherwise */
+  public boolean isSetCandidates() {
+    return __isset_bit_vector.get(__CANDIDATES_ISSET_ID);
+  }
+
+  public void setCandidatesIsSet(boolean value) {
+    __isset_bit_vector.set(__CANDIDATES_ISSET_ID, value);
+  }
+
+  public long getInUse() {
+    return this.inUse;
+  }
+
+  public GcCycleStats setInUse(long inUse) {
+    this.inUse = inUse;
+    setInUseIsSet(true);
+    return this;
+  }
+
+  public void unsetInUse() {
+    __isset_bit_vector.clear(__INUSE_ISSET_ID);
+  }
+
+  /** Returns true if field inUse is set (has been assigned a value) and false otherwise */
+  public boolean isSetInUse() {
+    return __isset_bit_vector.get(__INUSE_ISSET_ID);
+  }
+
+  public void setInUseIsSet(boolean value) {
+    __isset_bit_vector.set(__INUSE_ISSET_ID, value);
+  }
+
+  public long getDeleted() {
+    return this.deleted;
+  }
+
+  public GcCycleStats setDeleted(long deleted) {
+    this.deleted = deleted;
+    setDeletedIsSet(true);
+    return this;
+  }
+
+  public void unsetDeleted() {
+    __isset_bit_vector.clear(__DELETED_ISSET_ID);
+  }
+
+  /** Returns true if field deleted is set (has been assigned a value) and false otherwise */
+  public boolean isSetDeleted() {
+    return __isset_bit_vector.get(__DELETED_ISSET_ID);
+  }
+
+  public void setDeletedIsSet(boolean value) {
+    __isset_bit_vector.set(__DELETED_ISSET_ID, value);
+  }
+
+  public long getErrors() {
+    return this.errors;
+  }
+
+  public GcCycleStats setErrors(long errors) {
+    this.errors = errors;
+    setErrorsIsSet(true);
+    return this;
+  }
+
+  public void unsetErrors() {
+    __isset_bit_vector.clear(__ERRORS_ISSET_ID);
+  }
+
+  /** Returns true if field errors is set (has been assigned a value) and false otherwise */
+  public boolean isSetErrors() {
+    return __isset_bit_vector.get(__ERRORS_ISSET_ID);
+  }
+
+  public void setErrorsIsSet(boolean value) {
+    __isset_bit_vector.set(__ERRORS_ISSET_ID, value);
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case STARTED:
+      if (value == null) {
+        unsetStarted();
+      } else {
+        setStarted((Long)value);
+      }
+      break;
+
+    case FINISHED:
+      if (value == null) {
+        unsetFinished();
+      } else {
+        setFinished((Long)value);
+      }
+      break;
+
+    case CANDIDATES:
+      if (value == null) {
+        unsetCandidates();
+      } else {
+        setCandidates((Long)value);
+      }
+      break;
+
+    case IN_USE:
+      if (value == null) {
+        unsetInUse();
+      } else {
+        setInUse((Long)value);
+      }
+      break;
+
+    case DELETED:
+      if (value == null) {
+        unsetDeleted();
+      } else {
+        setDeleted((Long)value);
+      }
+      break;
+
+    case ERRORS:
+      if (value == null) {
+        unsetErrors();
+      } else {
+        setErrors((Long)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case STARTED:
+      return Long.valueOf(getStarted());
+
+    case FINISHED:
+      return Long.valueOf(getFinished());
+
+    case CANDIDATES:
+      return Long.valueOf(getCandidates());
+
+    case IN_USE:
+      return Long.valueOf(getInUse());
+
+    case DELETED:
+      return Long.valueOf(getDeleted());
+
+    case ERRORS:
+      return Long.valueOf(getErrors());
+
+    }
+    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 STARTED:
+      return isSetStarted();
+    case FINISHED:
+      return isSetFinished();
+    case CANDIDATES:
+      return isSetCandidates();
+    case IN_USE:
+      return isSetInUse();
+    case DELETED:
+      return isSetDeleted();
+    case ERRORS:
+      return isSetErrors();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof GcCycleStats)
+      return this.equals((GcCycleStats)that);
+    return false;
+  }
+
+  public boolean equals(GcCycleStats that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_started = true;
+    boolean that_present_started = true;
+    if (this_present_started || that_present_started) {
+      if (!(this_present_started && that_present_started))
+        return false;
+      if (this.started != that.started)
+        return false;
+    }
+
+    boolean this_present_finished = true;
+    boolean that_present_finished = true;
+    if (this_present_finished || that_present_finished) {
+      if (!(this_present_finished && that_present_finished))
+        return false;
+      if (this.finished != that.finished)
+        return false;
+    }
+
+    boolean this_present_candidates = true;
+    boolean that_present_candidates = true;
+    if (this_present_candidates || that_present_candidates) {
+      if (!(this_present_candidates && that_present_candidates))
+        return false;
+      if (this.candidates != that.candidates)
+        return false;
+    }
+
+    boolean this_present_inUse = true;
+    boolean that_present_inUse = true;
+    if (this_present_inUse || that_present_inUse) {
+      if (!(this_present_inUse && that_present_inUse))
+        return false;
+      if (this.inUse != that.inUse)
+        return false;
+    }
+
+    boolean this_present_deleted = true;
+    boolean that_present_deleted = true;
+    if (this_present_deleted || that_present_deleted) {
+      if (!(this_present_deleted && that_present_deleted))
+        return false;
+      if (this.deleted != that.deleted)
+        return false;
+    }
+
+    boolean this_present_errors = true;
+    boolean that_present_errors = true;
+    if (this_present_errors || that_present_errors) {
+      if (!(this_present_errors && that_present_errors))
+        return false;
+      if (this.errors != that.errors)
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    return 0;
+  }
+
+  public int compareTo(GcCycleStats other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+    GcCycleStats typedOther = (GcCycleStats)other;
+
+    lastComparison = Boolean.valueOf(isSetStarted()).compareTo(typedOther.isSetStarted());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetStarted()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.started, typedOther.started);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetFinished()).compareTo(typedOther.isSetFinished());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetFinished()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.finished, typedOther.finished);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetCandidates()).compareTo(typedOther.isSetCandidates());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetCandidates()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.candidates, typedOther.candidates);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetInUse()).compareTo(typedOther.isSetInUse());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetInUse()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inUse, typedOther.inUse);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetDeleted()).compareTo(typedOther.isSetDeleted());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetDeleted()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleted, typedOther.deleted);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetErrors()).compareTo(typedOther.isSetErrors());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetErrors()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errors, typedOther.errors);
+      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("GcCycleStats(");
+    boolean first = true;
+
+    sb.append("started:");
+    sb.append(this.started);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("finished:");
+    sb.append(this.finished);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("candidates:");
+    sb.append(this.candidates);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("inUse:");
+    sb.append(this.inUse);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("deleted:");
+    sb.append(this.deleted);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("errors:");
+    sb.append(this.errors);
+    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 GcCycleStatsStandardSchemeFactory implements SchemeFactory {
+    public GcCycleStatsStandardScheme getScheme() {
+      return new GcCycleStatsStandardScheme();
+    }
+  }
+
+  private static class GcCycleStatsStandardScheme extends StandardScheme<GcCycleStats> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, GcCycleStats 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: // STARTED
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.started = iprot.readI64();
+              struct.setStartedIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // FINISHED
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.finished = iprot.readI64();
+              struct.setFinishedIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // CANDIDATES
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.candidates = iprot.readI64();
+              struct.setCandidatesIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 4: // IN_USE
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.inUse = iprot.readI64();
+              struct.setInUseIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 5: // DELETED
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.deleted = iprot.readI64();
+              struct.setDeletedIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 6: // ERRORS
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.errors = iprot.readI64();
+              struct.setErrorsIsSet(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, GcCycleStats struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      oprot.writeFieldBegin(STARTED_FIELD_DESC);
+      oprot.writeI64(struct.started);
+      oprot.writeFieldEnd();
+      oprot.writeFieldBegin(FINISHED_FIELD_DESC);
+      oprot.writeI64(struct.finished);
+      oprot.writeFieldEnd();
+      oprot.writeFieldBegin(CANDIDATES_FIELD_DESC);
+      oprot.writeI64(struct.candidates);
+      oprot.writeFieldEnd();
+      oprot.writeFieldBegin(IN_USE_FIELD_DESC);
+      oprot.writeI64(struct.inUse);
+      oprot.writeFieldEnd();
+      oprot.writeFieldBegin(DELETED_FIELD_DESC);
+      oprot.writeI64(struct.deleted);
+      oprot.writeFieldEnd();
+      oprot.writeFieldBegin(ERRORS_FIELD_DESC);
+      oprot.writeI64(struct.errors);
+      oprot.writeFieldEnd();
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class GcCycleStatsTupleSchemeFactory implements SchemeFactory {
+    public GcCycleStatsTupleScheme getScheme() {
+      return new GcCycleStatsTupleScheme();
+    }
+  }
+
+  private static class GcCycleStatsTupleScheme extends TupleScheme<GcCycleStats> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, GcCycleStats struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetStarted()) {
+        optionals.set(0);
+      }
+      if (struct.isSetFinished()) {
+        optionals.set(1);
+      }
+      if (struct.isSetCandidates()) {
+        optionals.set(2);
+      }
+      if (struct.isSetInUse()) {
+        optionals.set(3);
+      }
+      if (struct.isSetDeleted()) {
+        optionals.set(4);
+      }
+      if (struct.isSetErrors()) {
+        optionals.set(5);
+      }
+      oprot.writeBitSet(optionals, 6);
+      if (struct.isSetStarted()) {
+        oprot.writeI64(struct.started);
+      }
+      if (struct.isSetFinished()) {
+        oprot.writeI64(struct.finished);
+      }
+      if (struct.isSetCandidates()) {
+        oprot.writeI64(struct.candidates);
+      }
+      if (struct.isSetInUse()) {
+        oprot.writeI64(struct.inUse);
+      }
+      if (struct.isSetDeleted()) {
+        oprot.writeI64(struct.deleted);
+      }
+      if (struct.isSetErrors()) {
+        oprot.writeI64(struct.errors);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, GcCycleStats struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(6);
+      if (incoming.get(0)) {
+        struct.started = iprot.readI64();
+        struct.setStartedIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.finished = iprot.readI64();
+        struct.setFinishedIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.candidates = iprot.readI64();
+        struct.setCandidatesIsSet(true);
+      }
+      if (incoming.get(3)) {
+        struct.inUse = iprot.readI64();
+        struct.setInUseIsSet(true);
+      }
+      if (incoming.get(4)) {
+        struct.deleted = iprot.readI64();
+        struct.setDeletedIsSet(true);
+      }
+      if (incoming.get(5)) {
+        struct.errors = iprot.readI64();
+        struct.setErrorsIsSet(true);
+      }
+    }
+  }
+
+}
+

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7bdbfccb/1.5/core/src/main/java/org/apache/accumulo/core/iterators/AggregatingIterator.java
----------------------------------------------------------------------
diff --git a/1.5/core/src/main/java/org/apache/accumulo/core/iterators/AggregatingIterator.java b/1.5/core/src/main/java/org/apache/accumulo/core/iterators/AggregatingIterator.java
new file mode 100644
index 0000000..2fa3121
--- /dev/null
+++ b/1.5/core/src/main/java/org/apache/accumulo/core/iterators/AggregatingIterator.java
@@ -0,0 +1,208 @@
+/*
+ * 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.iterators;
+
+import java.io.IOException;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.apache.accumulo.core.data.ByteSequence;
+import org.apache.accumulo.core.data.Key;
+import org.apache.accumulo.core.data.PartialKey;
+import org.apache.accumulo.core.data.Range;
+import org.apache.accumulo.core.data.Value;
+import org.apache.accumulo.core.iterators.aggregation.Aggregator;
+import org.apache.accumulo.core.iterators.conf.ColumnToClassMapping;
+import org.apache.accumulo.start.classloader.AccumuloClassLoader;
+import org.apache.log4j.Logger;
+
+/**
+ * This iterator wraps another iterator. It automatically aggregates.
+ * 
+ * @deprecated since 1.4, replaced by {@link org.apache.accumulo.core.iterators.Combiner}
+ */
+
+public class AggregatingIterator implements SortedKeyValueIterator<Key,Value>, OptionDescriber {
+  
+  private SortedKeyValueIterator<Key,Value> iterator;
+  private ColumnToClassMapping<Aggregator> aggregators;
+  
+  private Key workKey = new Key();
+  
+  private Key aggrKey;
+  private Value aggrValue;
+  // private boolean propogateDeletes;
+  private static final Logger log = Logger.getLogger(AggregatingIterator.class);
+  
+  public AggregatingIterator deepCopy(IteratorEnvironment env) {
+    return new AggregatingIterator(this, env);
+  }
+  
+  private AggregatingIterator(AggregatingIterator other, IteratorEnvironment env) {
+    iterator = other.iterator.deepCopy(env);
+    aggregators = other.aggregators;
+  }
+  
+  public AggregatingIterator() {}
+  
+  private void aggregateRowColumn(Aggregator aggr) throws IOException {
+    // this function assumes that first value is not delete
+    
+    if (iterator.getTopKey().isDeleted())
+      return;
+    
+    workKey.set(iterator.getTopKey());
+    
+    Key keyToAggregate = workKey;
+    
+    aggr.reset();
+    
+    aggr.collect(iterator.getTopValue());
+    iterator.next();
+    
+    while (iterator.hasTop() && !iterator.getTopKey().isDeleted() && iterator.getTopKey().equals(keyToAggregate, PartialKey.ROW_COLFAM_COLQUAL_COLVIS)) {
+      aggr.collect(iterator.getTopValue());
+      iterator.next();
+    }
+    
+    aggrKey = workKey;
+    aggrValue = aggr.aggregate();
+    
+  }
+  
+  private void findTop() throws IOException {
+    // check if aggregation is needed
+    if (iterator.hasTop()) {
+      Aggregator aggr = aggregators.getObject(iterator.getTopKey());
+      if (aggr != null) {
+        aggregateRowColumn(aggr);
+      }
+    }
+  }
+  
+  public AggregatingIterator(SortedKeyValueIterator<Key,Value> iterator, ColumnToClassMapping<Aggregator> aggregators) throws IOException {
+    this.iterator = iterator;
+    this.aggregators = aggregators;
+  }
+  
+  @Override
+  public Key getTopKey() {
+    if (aggrKey != null) {
+      return aggrKey;
+    }
+    return iterator.getTopKey();
+  }
+  
+  @Override
+  public Value getTopValue() {
+    if (aggrKey != null) {
+      return aggrValue;
+    }
+    return iterator.getTopValue();
+  }
+  
+  @Override
+  public boolean hasTop() {
+    return aggrKey != null || iterator.hasTop();
+  }
+  
+  @Override
+  public void next() throws IOException {
+    if (aggrKey != null) {
+      aggrKey = null;
+      aggrValue = null;
+    } else {
+      iterator.next();
+    }
+    
+    findTop();
+  }
+  
+  @Override
+  public void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive) throws IOException {
+    // do not want to seek to the middle of a value that should be
+    // aggregated...
+    
+    Range seekRange = IteratorUtil.maximizeStartKeyTimeStamp(range);
+    
+    iterator.seek(seekRange, columnFamilies, inclusive);
+    findTop();
+    
+    if (range.getStartKey() != null) {
+      while (hasTop() && getTopKey().equals(range.getStartKey(), PartialKey.ROW_COLFAM_COLQUAL_COLVIS)
+          && getTopKey().getTimestamp() > range.getStartKey().getTimestamp()) {
+        // the value has a more recent time stamp, so
+        // pass it up
+        // log.debug("skipping "+getTopKey());
+        next();
+      }
+      
+      while (hasTop() && range.beforeStartKey(getTopKey())) {
+        next();
+      }
+    }
+    
+  }
+  
+  @Override
+  public void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options, IteratorEnvironment env) throws IOException {
+    
+    this.iterator = source;
+    
+    try {
+      this.aggregators = new ColumnToClassMapping<Aggregator>(options, Aggregator.class);
+    } catch (ClassNotFoundException e) {
+      log.error(e.toString());
+      throw new IllegalArgumentException(e);
+    } catch (InstantiationException e) {
+      log.error(e.toString());
+      throw new IllegalArgumentException(e);
+    } catch (IllegalAccessException e) {
+      log.error(e.toString());
+      throw new IllegalArgumentException(e);
+    }
+  }
+  
+  @Override
+  public IteratorOptions describeOptions() {
+    return new IteratorOptions("agg", "Aggregators apply aggregating functions to values with identical keys", null,
+        Collections.singletonList("<columnName> <aggregatorClass>"));
+  }
+  
+  @Override
+  public boolean validateOptions(Map<String,String> options) {
+    for (Entry<String,String> entry : options.entrySet()) {
+      String classname = entry.getValue();
+      if (classname == null)
+        return false;
+      Class<? extends Aggregator> clazz;
+      try {
+        clazz = AccumuloClassLoader.loadClass(classname, Aggregator.class);
+        clazz.newInstance();
+      } catch (ClassNotFoundException e) {
+        throw new IllegalArgumentException("class not found: " + classname);
+      } catch (InstantiationException e) {
+        throw new IllegalArgumentException("instantiation exception: " + classname);
+      } catch (IllegalAccessException e) {
+        throw new IllegalArgumentException("illegal access exception: " + classname);
+      }
+    }
+    return true;
+  }
+}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7bdbfccb/1.5/core/src/main/java/org/apache/accumulo/core/iterators/ColumnFamilyCounter.java
----------------------------------------------------------------------
diff --git a/1.5/core/src/main/java/org/apache/accumulo/core/iterators/ColumnFamilyCounter.java b/1.5/core/src/main/java/org/apache/accumulo/core/iterators/ColumnFamilyCounter.java
new file mode 100644
index 0000000..59d39b0
--- /dev/null
+++ b/1.5/core/src/main/java/org/apache/accumulo/core/iterators/ColumnFamilyCounter.java
@@ -0,0 +1,91 @@
+/*
+ * 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.iterators;
+
+import java.io.IOException;
+import java.util.Collection;
+import java.util.Map;
+
+import org.apache.accumulo.core.data.ByteSequence;
+import org.apache.accumulo.core.data.Key;
+import org.apache.accumulo.core.data.Range;
+import org.apache.accumulo.core.data.Value;
+
+public class ColumnFamilyCounter implements SortedKeyValueIterator<Key,Value> {
+  
+  private SortedKeyValueIterator<Key,Value> source;
+  private Key key;
+  private Value value;
+  
+  @Override
+  public void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options, IteratorEnvironment env) throws IOException {
+    this.source = source;
+  }
+  
+  @Override
+  public boolean hasTop() {
+    return key != null;
+  }
+  
+  @Override
+  public void next() throws IOException {
+    if (source.hasTop()) {
+      ByteSequence currentRow = source.getTopKey().getRowData();
+      ByteSequence currentColf = source.getTopKey().getColumnFamilyData();
+      long ts = source.getTopKey().getTimestamp();
+      
+      source.next();
+      
+      int count = 1;
+      
+      while (source.hasTop() && source.getTopKey().getRowData().equals(currentRow) && source.getTopKey().getColumnFamilyData().equals(currentColf)) {
+        count++;
+        source.next();
+      }
+      
+      this.key = new Key(currentRow.toArray(), currentColf.toArray(), new byte[0], new byte[0], ts);
+      this.value = new Value(Integer.toString(count).getBytes());
+      
+    } else {
+      this.key = null;
+      this.value = null;
+    }
+  }
+  
+  @Override
+  public void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive) throws IOException {
+    source.seek(range, columnFamilies, inclusive);
+    next();
+  }
+  
+  @Override
+  public Key getTopKey() {
+    return key;
+  }
+  
+  @Override
+  public Value getTopValue() {
+    return value;
+  }
+  
+  @Override
+  public SortedKeyValueIterator<Key,Value> deepCopy(IteratorEnvironment env) {
+    // TODO Auto-generated method stub
+    return null;
+  }
+  
+}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7bdbfccb/1.5/core/src/main/java/org/apache/accumulo/core/iterators/Combiner.java
----------------------------------------------------------------------
diff --git a/1.5/core/src/main/java/org/apache/accumulo/core/iterators/Combiner.java b/1.5/core/src/main/java/org/apache/accumulo/core/iterators/Combiner.java
new file mode 100644
index 0000000..6e72073
--- /dev/null
+++ b/1.5/core/src/main/java/org/apache/accumulo/core/iterators/Combiner.java
@@ -0,0 +1,308 @@
+/*
+ * 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.iterators;
+
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.NoSuchElementException;
+
+import org.apache.accumulo.core.client.IteratorSetting;
+import org.apache.accumulo.core.client.IteratorSetting.Column;
+import org.apache.accumulo.core.data.ByteSequence;
+import org.apache.accumulo.core.data.Key;
+import org.apache.accumulo.core.data.PartialKey;
+import org.apache.accumulo.core.data.Range;
+import org.apache.accumulo.core.data.Value;
+import org.apache.accumulo.core.iterators.conf.ColumnSet;
+import org.apache.log4j.Logger;
+
+/**
+ * A SortedKeyValueIterator that combines the Values for different versions of a Key into a single Value. Combiner will replace one or more versions of a Key
+ * and their Values with the most recent Key and a Value which is the result of the reduce method.
+ * 
+ * Subclasses must implement a reduce method: {@code public Value reduce(Key key, Iterator<Value> iter)}.
+ * 
+ * This reduce method will be passed the most recent Key and an iterator over the Values for all non-deleted versions of that Key.
+ */
+public abstract class Combiner extends WrappingIterator implements OptionDescriber {
+  static final Logger log = Logger.getLogger(Combiner.class);
+  protected static final String COLUMNS_OPTION = "columns";
+  protected static final String ALL_OPTION = "all";
+  
+  /**
+   * A Java Iterator that iterates over the Values for a given Key from a source SortedKeyValueIterator.
+   */
+  public static class ValueIterator implements Iterator<Value> {
+    Key topKey;
+    SortedKeyValueIterator<Key,Value> source;
+    boolean hasNext;
+    
+    /**
+     * Constructs an iterator over Values whose Keys are versions of the current topKey of the source SortedKeyValueIterator.
+     * 
+     * @param source
+     *          The SortedKeyValueIterator<Key,Value> from which to read data.
+     */
+    public ValueIterator(SortedKeyValueIterator<Key,Value> source) {
+      this.source = source;
+      topKey = source.getTopKey();
+      hasNext = _hasNext();
+    }
+    
+    private boolean _hasNext() {
+      return source.hasTop() && !source.getTopKey().isDeleted() && topKey.equals(source.getTopKey(), PartialKey.ROW_COLFAM_COLQUAL_COLVIS);
+    }
+    
+    /**
+     * @return <tt>true</tt> if there is another Value
+     * 
+     * @see java.util.Iterator#hasNext()
+     */
+    @Override
+    public boolean hasNext() {
+      return hasNext;
+    }
+    
+    /**
+     * @return the next Value
+     * 
+     * @see java.util.Iterator#next()
+     */
+    @Override
+    public Value next() {
+      if (!hasNext)
+        throw new NoSuchElementException();
+      Value topValue = new Value(source.getTopValue());
+      try {
+        source.next();
+        hasNext = _hasNext();
+      } catch (IOException e) {
+        throw new RuntimeException(e);
+      }
+      return topValue;
+    }
+    
+    /**
+     * unsupported
+     * 
+     * @see java.util.Iterator#remove()
+     */
+    @Override
+    public void remove() {
+      throw new UnsupportedOperationException();
+    }
+  }
+  
+  Key topKey;
+  Value topValue;
+  
+  @Override
+  public Key getTopKey() {
+    if (topKey == null)
+      return super.getTopKey();
+    return topKey;
+  }
+  
+  @Override
+  public Value getTopValue() {
+    if (topKey == null)
+      return super.getTopValue();
+    return topValue;
+  }
+  
+  @Override
+  public boolean hasTop() {
+    return topKey != null || super.hasTop();
+  }
+  
+  @Override
+  public void next() throws IOException {
+    if (topKey != null) {
+      topKey = null;
+      topValue = null;
+    } else {
+      super.next();
+    }
+    
+    findTop();
+  }
+  
+  private Key workKey = new Key();
+  
+  /**
+   * Sets the topKey and topValue based on the top key of the source. If the column of the source top key is in the set of combiners, topKey will be the top key
+   * of the source and topValue will be the result of the reduce method. Otherwise, topKey and topValue will be unchanged. (They are always set to null before
+   * this method is called.)
+   */
+  private void findTop() throws IOException {
+    // check if aggregation is needed
+    if (super.hasTop()) {
+      workKey.set(super.getTopKey());
+      if (combineAllColumns || combiners.contains(workKey)) {
+        if (workKey.isDeleted())
+          return;
+        topKey = workKey;
+        Iterator<Value> viter = new ValueIterator(getSource());
+        topValue = reduce(topKey, viter);
+        while (viter.hasNext())
+          viter.next();
+      }
+    }
+  }
+  
+  @Override
+  public void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive) throws IOException {
+    // do not want to seek to the middle of a value that should be combined...
+    
+    Range seekRange = IteratorUtil.maximizeStartKeyTimeStamp(range);
+    
+    super.seek(seekRange, columnFamilies, inclusive);
+    findTop();
+    
+    if (range.getStartKey() != null) {
+      while (hasTop() && getTopKey().equals(range.getStartKey(), PartialKey.ROW_COLFAM_COLQUAL_COLVIS)
+          && getTopKey().getTimestamp() > range.getStartKey().getTimestamp()) {
+        // the value has a more recent time stamp, so pass it up
+        // log.debug("skipping "+getTopKey());
+        next();
+      }
+      
+      while (hasTop() && range.beforeStartKey(getTopKey())) {
+        next();
+      }
+    }
+  }
+  
+  /**
+   * Reduces a list of Values into a single Value.
+   * 
+   * @param key
+   *          The most recent version of the Key being reduced.
+   * 
+   * @param iter
+   *          An iterator over the Values for different versions of the key.
+   * 
+   * @return The combined Value.
+   */
+  public abstract Value reduce(Key key, Iterator<Value> iter);
+  
+  private ColumnSet combiners;
+  private boolean combineAllColumns;
+  
+  @Override
+  public void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options, IteratorEnvironment env) throws IOException {
+    super.init(source, options, env);
+    
+    combineAllColumns = false;
+    if (options.containsKey(ALL_OPTION)) {
+      combineAllColumns = Boolean.parseBoolean(options.get(ALL_OPTION));
+      if (combineAllColumns)
+        return;
+    }
+    if (!options.containsKey(COLUMNS_OPTION))
+      throw new IllegalArgumentException("Must specify " + COLUMNS_OPTION + " option");
+    
+    String encodedColumns = options.get(COLUMNS_OPTION);
+    if (encodedColumns.length() == 0)
+      throw new IllegalArgumentException("The " + COLUMNS_OPTION + " must not be empty");
+    
+    combiners = new ColumnSet(Arrays.asList(encodedColumns.split(",")));
+  }
+  
+  @Override
+  public SortedKeyValueIterator<Key,Value> deepCopy(IteratorEnvironment env) {
+    Combiner newInstance;
+    try {
+      newInstance = this.getClass().newInstance();
+    } catch (Exception e) {
+      throw new RuntimeException(e);
+    }
+    newInstance.setSource(getSource().deepCopy(env));
+    newInstance.combiners = combiners;
+    newInstance.combineAllColumns = combineAllColumns;
+    return newInstance;
+  }
+  
+  @Override
+  public IteratorOptions describeOptions() {
+    IteratorOptions io = new IteratorOptions("comb", "Combiners apply reduce functions to values with identical keys", null, null);
+    io.addNamedOption(ALL_OPTION, "set to true to apply Combiner to every column, otherwise leave blank. if true, " + COLUMNS_OPTION
+        + " option will be ignored.");
+    io.addNamedOption(COLUMNS_OPTION, "<col fam>[:<col qual>]{,<col fam>[:<col qual>]} escape non-alphanum chars using %<hex>.");
+    return io;
+  }
+  
+  @Override
+  public boolean validateOptions(Map<String,String> options) {
+    if (options.containsKey(ALL_OPTION)) {
+      combineAllColumns = Boolean.parseBoolean(options.get(ALL_OPTION));
+      if (combineAllColumns)
+        return true;
+    }
+    if (!options.containsKey(COLUMNS_OPTION))
+      return false;
+    
+    String encodedColumns = options.get(COLUMNS_OPTION);
+    if (encodedColumns.length() == 0)
+      return false;
+    
+    for (String columns : encodedColumns.split(",")) {
+      if (!ColumnSet.isValidEncoding(columns))
+        return false;
+    }
+    
+    return true;
+  }
+  
+  /**
+   * A convenience method to set which columns a combiner should be applied to.
+   * 
+   * @param is
+   *          iterator settings object to configure
+   * @param columns
+   *          a list of columns to encode as the value for the combiner column configuration
+   */
+  
+  public static void setColumns(IteratorSetting is, List<IteratorSetting.Column> columns) {
+    String sep = "";
+    StringBuilder sb = new StringBuilder();
+    
+    for (Column col : columns) {
+      sb.append(sep);
+      sep = ",";
+      sb.append(ColumnSet.encodeColumns(col.getFirst(), col.getSecond()));
+    }
+    
+    is.addOption(COLUMNS_OPTION, sb.toString());
+  }
+  
+  /**
+   * A convenience method to set the "all columns" option on a Combiner.
+   * 
+   * @param is
+   *          iterator settings object to configure
+   * @param combineAllColumns
+   *          if true, the columns option is ignored and the Combiner will be applied to all columns
+   */
+  public static void setCombineAllColumns(IteratorSetting is, boolean combineAllColumns) {
+    is.addOption(ALL_OPTION, Boolean.toString(combineAllColumns));
+  }
+}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7bdbfccb/1.5/core/src/main/java/org/apache/accumulo/core/iterators/DebugIterator.java
----------------------------------------------------------------------
diff --git a/1.5/core/src/main/java/org/apache/accumulo/core/iterators/DebugIterator.java b/1.5/core/src/main/java/org/apache/accumulo/core/iterators/DebugIterator.java
new file mode 100644
index 0000000..c1689b1
--- /dev/null
+++ b/1.5/core/src/main/java/org/apache/accumulo/core/iterators/DebugIterator.java
@@ -0,0 +1,82 @@
+/*
+ * 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.iterators;
+
+import java.io.IOException;
+import java.util.Collection;
+import java.util.Map;
+
+import org.apache.accumulo.core.data.ByteSequence;
+import org.apache.accumulo.core.data.Key;
+import org.apache.accumulo.core.data.Range;
+import org.apache.accumulo.core.data.Value;
+import org.apache.log4j.Logger;
+
+public class DebugIterator extends WrappingIterator {
+  
+  private String prefix;
+  
+  private static final Logger log = Logger.getLogger(DebugIterator.class);
+  
+  public DebugIterator() {}
+  
+  public DebugIterator deepCopy(IteratorEnvironment env) {
+    return new DebugIterator(this, env);
+  }
+  
+  private DebugIterator(DebugIterator other, IteratorEnvironment env) {
+    setSource(other.getSource().deepCopy(env));
+    prefix = other.prefix;
+  }
+  
+  public DebugIterator(String prefix, SortedKeyValueIterator<Key,Value> source) {
+    this.prefix = prefix;
+    this.setSource(source);
+  }
+  
+  @Override
+  public Key getTopKey() {
+    Key wc = super.getTopKey();
+    log.debug(prefix + " getTopKey() --> " + wc);
+    return wc;
+  }
+  
+  @Override
+  public Value getTopValue() {
+    Value w = super.getTopValue();
+    log.debug(prefix + " getTopValue() --> " + w);
+    return w;
+  }
+  
+  @Override
+  public boolean hasTop() {
+    boolean b = super.hasTop();
+    log.debug(prefix + " hasTop() --> " + b);
+    return b;
+  }
+  
+  @Override
+  public void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive) throws IOException {
+    log.debug(prefix + " seek(" + range + ", " + columnFamilies + ", " + inclusive + ")");
+    super.seek(range, columnFamilies, inclusive);
+  }
+  
+  @Override
+  public void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options, IteratorEnvironment env) throws IOException {
+    super.init(source, options, env);
+  }
+}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7bdbfccb/1.5/core/src/main/java/org/apache/accumulo/core/iterators/DevNull.java
----------------------------------------------------------------------
diff --git a/1.5/core/src/main/java/org/apache/accumulo/core/iterators/DevNull.java b/1.5/core/src/main/java/org/apache/accumulo/core/iterators/DevNull.java
new file mode 100644
index 0000000..dfde628
--- /dev/null
+++ b/1.5/core/src/main/java/org/apache/accumulo/core/iterators/DevNull.java
@@ -0,0 +1,81 @@
+/*
+ * 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.iterators;
+
+import java.io.IOException;
+import java.util.Collection;
+import java.util.Map;
+
+import org.apache.accumulo.core.data.ByteSequence;
+import org.apache.accumulo.core.data.Key;
+import org.apache.accumulo.core.data.Range;
+import org.apache.accumulo.core.data.Value;
+
+/**
+ * An iterator that is useful testing... for example if you want to test ingest performance w/o writing data to disk, insert this iterator for scan as follows
+ * using the accumulo shell.
+ * 
+ * config -t ci -s table.iterator.minc.devnull=21,accumulo.core.iterators.DevNull
+ * 
+ * Could also make scans never return anything very quickly by adding it to the scan stack
+ * 
+ * config -t ci -s table.iterator.scan.devnull=21,accumulo.core.iterators.DevNull
+ * 
+ * And to make major compactions never write anything
+ * 
+ * config -t ci -s table.iterator.majc.devnull=21,accumulo.core.iterators.DevNull
+ * 
+ */
+
+public class DevNull implements SortedKeyValueIterator<Key,Value> {
+  
+  @Override
+  public SortedKeyValueIterator<Key,Value> deepCopy(IteratorEnvironment env) {
+    throw new UnsupportedOperationException();
+  }
+  
+  @Override
+  public Key getTopKey() {
+    return null;
+  }
+  
+  @Override
+  public Value getTopValue() {
+    return null;
+  }
+  
+  @Override
+  public boolean hasTop() {
+    return false;
+  }
+  
+  @Override
+  public void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options, IteratorEnvironment env) throws IOException {
+    
+  }
+  
+  @Override
+  public void next() throws IOException {
+    throw new UnsupportedOperationException();
+  }
+  
+  @Override
+  public void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive) throws IOException {
+    
+  }
+  
+}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7bdbfccb/1.5/core/src/main/java/org/apache/accumulo/core/iterators/FamilyIntersectingIterator.java
----------------------------------------------------------------------
diff --git a/1.5/core/src/main/java/org/apache/accumulo/core/iterators/FamilyIntersectingIterator.java b/1.5/core/src/main/java/org/apache/accumulo/core/iterators/FamilyIntersectingIterator.java
new file mode 100644
index 0000000..8efd9fd
--- /dev/null
+++ b/1.5/core/src/main/java/org/apache/accumulo/core/iterators/FamilyIntersectingIterator.java
@@ -0,0 +1,28 @@
+/**
+ * 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.iterators;
+
+import org.apache.accumulo.core.iterators.user.IndexedDocIterator;
+
+/**
+ * This class remains here for backwards compatibility.
+ * 
+ * @deprecated since 1.4, replaced by {@link org.apache.accumulo.core.iterators.user.IndexedDocIterator}
+ */
+public class FamilyIntersectingIterator extends IndexedDocIterator {
+  
+}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7bdbfccb/1.5/core/src/main/java/org/apache/accumulo/core/iterators/Filter.java
----------------------------------------------------------------------
diff --git a/1.5/core/src/main/java/org/apache/accumulo/core/iterators/Filter.java b/1.5/core/src/main/java/org/apache/accumulo/core/iterators/Filter.java
new file mode 100644
index 0000000..a9ed76c
--- /dev/null
+++ b/1.5/core/src/main/java/org/apache/accumulo/core/iterators/Filter.java
@@ -0,0 +1,120 @@
+/*
+ * 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.iterators;
+
+import java.io.IOException;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Map;
+
+import org.apache.accumulo.core.client.IteratorSetting;
+import org.apache.accumulo.core.data.ByteSequence;
+import org.apache.accumulo.core.data.Key;
+import org.apache.accumulo.core.data.Range;
+import org.apache.accumulo.core.data.Value;
+
+/**
+ * A SortedKeyValueIterator that filters entries from its source iterator.
+ * 
+ * Subclasses must implement an accept method: public boolean accept(Key k, Value v);
+ * 
+ * Key/Value pairs for which the accept method returns true are said to match the filter. By default, this class iterates over entries that match its filter.
+ * This iterator takes an optional "negate" boolean parameter that defaults to false. If negate is set to true, this class instead omits entries that match its
+ * filter, thus iterating over entries that do not match its filter.
+ */
+public abstract class Filter extends WrappingIterator implements OptionDescriber {
+  @Override
+  public SortedKeyValueIterator<Key,Value> deepCopy(IteratorEnvironment env) {
+    Filter newInstance;
+    try {
+      newInstance = this.getClass().newInstance();
+    } catch (Exception e) {
+      throw new RuntimeException(e);
+    }
+    newInstance.setSource(getSource().deepCopy(env));
+    newInstance.negate = negate;
+    return newInstance;
+  }
+  
+  private static final String NEGATE = "negate";
+  boolean negate = false;
+  
+  @Override
+  public void next() throws IOException {
+    super.next();
+    findTop();
+  }
+  
+  @Override
+  public void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive) throws IOException {
+    super.seek(range, columnFamilies, inclusive);
+    findTop();
+  }
+  
+  /**
+   * Iterates over the source until an acceptable key/value pair is found.
+   */
+  protected void findTop() {
+    while (getSource().hasTop() && !getSource().getTopKey().isDeleted() && (negate == accept(getSource().getTopKey(), getSource().getTopValue()))) {
+      try {
+        getSource().next();
+      } catch (IOException e) {
+        throw new RuntimeException(e);
+      }
+    }
+  }
+  
+  /**
+   * @return <tt>true</tt> if the key/value pair is accepted by the filter.
+   */
+  public abstract boolean accept(Key k, Value v);
+  
+  @Override
+  public void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options, IteratorEnvironment env) throws IOException {
+    super.init(source, options, env);
+    negate = false;
+    if (options.get(NEGATE) != null) {
+      negate = Boolean.parseBoolean(options.get(NEGATE));
+    }
+  }
+  
+  @Override
+  public IteratorOptions describeOptions() {
+    return new IteratorOptions("filter", "Filter accepts or rejects each Key/Value pair", Collections.singletonMap("negate",
+        "default false keeps k/v that pass accept method, true rejects k/v that pass accept method"), null);
+  }
+  
+  @Override
+  public boolean validateOptions(Map<String,String> options) {
+    if (options.get(NEGATE) != null) {
+      Boolean.parseBoolean(options.get(NEGATE));
+    }
+    return true;
+  }
+  
+  /**
+   * A convenience method for setting the negation option on a filter.
+   * 
+   * @param is
+   *          IteratorSetting object to configure.
+   * @param negate
+   *          if false, filter accepts k/v for which the accept method returns true; if true, filter accepts k/v for which the accept method returns false.
+   */
+  public static void setNegate(IteratorSetting is, boolean negate) {
+    is.addOption(NEGATE, Boolean.toString(negate));
+  }
+}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7bdbfccb/1.5/core/src/main/java/org/apache/accumulo/core/iterators/FirstEntryInRowIterator.java
----------------------------------------------------------------------
diff --git a/1.5/core/src/main/java/org/apache/accumulo/core/iterators/FirstEntryInRowIterator.java b/1.5/core/src/main/java/org/apache/accumulo/core/iterators/FirstEntryInRowIterator.java
new file mode 100644
index 0000000..7507bff
--- /dev/null
+++ b/1.5/core/src/main/java/org/apache/accumulo/core/iterators/FirstEntryInRowIterator.java
@@ -0,0 +1,139 @@
+/*
+ * 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.iterators;
+
+import java.io.IOException;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.accumulo.core.client.IteratorSetting;
+import org.apache.accumulo.core.data.ByteSequence;
+import org.apache.accumulo.core.data.Key;
+import org.apache.accumulo.core.data.PartialKey;
+import org.apache.accumulo.core.data.Range;
+import org.apache.accumulo.core.data.Value;
+import org.apache.hadoop.io.Text;
+
+public class FirstEntryInRowIterator extends SkippingIterator implements OptionDescriber {
+  
+  // options
+  private static final String NUM_SCANS_STRING_NAME = "scansBeforeSeek";
+  
+  // iterator predecessor seek options to pass through
+  private Range latestRange;
+  private Collection<ByteSequence> latestColumnFamilies;
+  private boolean latestInclusive;
+  
+  // private fields
+  private Text lastRowFound;
+  private int numscans;
+  
+  /**
+   * convenience method to set the option to optimize the frequency of scans vs. seeks
+   */
+  public static void setNumScansBeforeSeek(IteratorSetting cfg, int num) {
+    cfg.addOption(NUM_SCANS_STRING_NAME, Integer.toString(num));
+  }
+  
+  // this must be public for OptionsDescriber
+  public FirstEntryInRowIterator() {
+    super();
+  }
+  
+  public FirstEntryInRowIterator(FirstEntryInRowIterator other, IteratorEnvironment env) {
+    super();
+    setSource(other.getSource().deepCopy(env));
+  }
+  
+  @Override
+  public SortedKeyValueIterator<Key,Value> deepCopy(IteratorEnvironment env) {
+    return new FirstEntryInRowIterator(this, env);
+  }
+  
+  @Override
+  public void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options, IteratorEnvironment env) throws IOException {
+    super.init(source, options, env);
+    String o = options.get(NUM_SCANS_STRING_NAME);
+    numscans = o == null ? 10 : Integer.parseInt(o);
+  }
+  
+  // this is only ever called immediately after getting "next" entry
+  @Override
+  protected void consume() throws IOException {
+    if (lastRowFound == null)
+      return;
+    int count = 0;
+    while (getSource().hasTop() && lastRowFound.equals(getSource().getTopKey().getRow())) {
+      
+      // try to efficiently jump to the next matching key
+      if (count < numscans) {
+        ++count;
+        getSource().next(); // scan
+      } else {
+        // too many scans, just seek
+        count = 0;
+        
+        // determine where to seek to, but don't go beyond the user-specified range
+        Key nextKey = getSource().getTopKey().followingKey(PartialKey.ROW);
+        if (!latestRange.afterEndKey(nextKey))
+          getSource().seek(new Range(nextKey, true, latestRange.getEndKey(), latestRange.isEndKeyInclusive()), latestColumnFamilies, latestInclusive);
+      }
+    }
+    lastRowFound = getSource().hasTop() ? getSource().getTopKey().getRow(lastRowFound) : null;
+  }
+  
+  @Override
+  public void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive) throws IOException {
+    // save parameters for future internal seeks
+    latestRange = range;
+    latestColumnFamilies = columnFamilies;
+    latestInclusive = inclusive;
+    lastRowFound = null;
+    
+    Key startKey = range.getStartKey();
+    Range seekRange = new Range(startKey == null ? null : new Key(startKey.getRow()), true, range.getEndKey(), range.isEndKeyInclusive());
+    super.seek(seekRange, columnFamilies, inclusive);
+    
+    if (getSource().hasTop()) {
+      lastRowFound = getSource().getTopKey().getRow();
+      if (range.beforeStartKey(getSource().getTopKey()))
+        consume();
+    }
+  }
+  
+  @Override
+  public IteratorOptions describeOptions() {
+    String name = "firstEntry";
+    String desc = "Only allows iteration over the first entry per row";
+    HashMap<String,String> namedOptions = new HashMap<String,String>();
+    namedOptions.put(NUM_SCANS_STRING_NAME, "Number of scans to try before seeking [10]");
+    return new IteratorOptions(name, desc, namedOptions, null);
+  }
+  
+  @Override
+  public boolean validateOptions(Map<String,String> options) {
+    try {
+      String o = options.get(NUM_SCANS_STRING_NAME);
+      Integer i = o == null ? 10 : Integer.parseInt(o);
+      return i != null;
+    } catch (Exception e) {
+      return false;
+    }
+  }
+  
+}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7bdbfccb/1.5/core/src/main/java/org/apache/accumulo/core/iterators/GrepIterator.java
----------------------------------------------------------------------
diff --git a/1.5/core/src/main/java/org/apache/accumulo/core/iterators/GrepIterator.java b/1.5/core/src/main/java/org/apache/accumulo/core/iterators/GrepIterator.java
new file mode 100644
index 0000000..7e4c015
--- /dev/null
+++ b/1.5/core/src/main/java/org/apache/accumulo/core/iterators/GrepIterator.java
@@ -0,0 +1,26 @@
+/*
+ * 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.iterators;
+
+/**
+ * This class remains here for backwards compatibility.
+ * 
+ * @deprecated since 1.4, replaced by {@link org.apache.accumulo.core.iterators.user.GrepIterator}
+ */
+public class GrepIterator extends org.apache.accumulo.core.iterators.user.GrepIterator {
+  
+}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7bdbfccb/1.5/core/src/main/java/org/apache/accumulo/core/iterators/IntersectingIterator.java
----------------------------------------------------------------------
diff --git a/1.5/core/src/main/java/org/apache/accumulo/core/iterators/IntersectingIterator.java b/1.5/core/src/main/java/org/apache/accumulo/core/iterators/IntersectingIterator.java
new file mode 100644
index 0000000..b52a0b9
--- /dev/null
+++ b/1.5/core/src/main/java/org/apache/accumulo/core/iterators/IntersectingIterator.java
@@ -0,0 +1,26 @@
+/*
+ * 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.iterators;
+
+/**
+ * This class remains here for backwards compatibility.
+ * 
+ * @deprecated since 1.4, replaced by {@link org.apache.accumulo.core.iterators.user.IntersectingIterator}
+ */
+public class IntersectingIterator extends org.apache.accumulo.core.iterators.user.IntersectingIterator {
+  
+}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7bdbfccb/1.5/core/src/main/java/org/apache/accumulo/core/iterators/IterationInterruptedException.java
----------------------------------------------------------------------
diff --git a/1.5/core/src/main/java/org/apache/accumulo/core/iterators/IterationInterruptedException.java b/1.5/core/src/main/java/org/apache/accumulo/core/iterators/IterationInterruptedException.java
new file mode 100644
index 0000000..63f6d01
--- /dev/null
+++ b/1.5/core/src/main/java/org/apache/accumulo/core/iterators/IterationInterruptedException.java
@@ -0,0 +1,30 @@
+/*
+ * 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.iterators;
+
+public class IterationInterruptedException extends RuntimeException {
+  
+  private static final long serialVersionUID = 1L;
+  
+  public IterationInterruptedException() {
+    super();
+  }
+  
+  public IterationInterruptedException(String msg) {
+    super(msg);
+  }
+}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7bdbfccb/1.5/core/src/main/java/org/apache/accumulo/core/iterators/IteratorEnvironment.java
----------------------------------------------------------------------
diff --git a/1.5/core/src/main/java/org/apache/accumulo/core/iterators/IteratorEnvironment.java b/1.5/core/src/main/java/org/apache/accumulo/core/iterators/IteratorEnvironment.java
new file mode 100644
index 0000000..9e20cb1
--- /dev/null
+++ b/1.5/core/src/main/java/org/apache/accumulo/core/iterators/IteratorEnvironment.java
@@ -0,0 +1,38 @@
+/*
+ * 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.iterators;
+
+import java.io.IOException;
+
+import org.apache.accumulo.core.conf.AccumuloConfiguration;
+import org.apache.accumulo.core.data.Key;
+import org.apache.accumulo.core.data.Value;
+import org.apache.accumulo.core.iterators.IteratorUtil.IteratorScope;
+
+public interface IteratorEnvironment {
+  
+  SortedKeyValueIterator<Key,Value> reserveMapFileReader(String mapFileName) throws IOException;
+  
+  AccumuloConfiguration getConfig();
+  
+  IteratorScope getIteratorScope();
+  
+  boolean isFullMajorCompaction();
+  
+  void registerSideChannel(SortedKeyValueIterator<Key,Value> iter);
+  
+}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7bdbfccb/1.5/core/src/main/java/org/apache/accumulo/core/iterators/IteratorUtil.java
----------------------------------------------------------------------
diff --git a/1.5/core/src/main/java/org/apache/accumulo/core/iterators/IteratorUtil.java b/1.5/core/src/main/java/org/apache/accumulo/core/iterators/IteratorUtil.java
new file mode 100644
index 0000000..172fa63
--- /dev/null
+++ b/1.5/core/src/main/java/org/apache/accumulo/core/iterators/IteratorUtil.java
@@ -0,0 +1,321 @@
+/*
+ * 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.iterators;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.TreeMap;
+
+import org.apache.accumulo.core.client.IteratorSetting;
+import org.apache.accumulo.core.conf.AccumuloConfiguration;
+import org.apache.accumulo.core.conf.Property;
+import org.apache.accumulo.core.data.Key;
+import org.apache.accumulo.core.data.KeyExtent;
+import org.apache.accumulo.core.data.Range;
+import org.apache.accumulo.core.data.thrift.IterInfo;
+import org.apache.accumulo.core.iterators.system.SynchronizedIterator;
+import org.apache.accumulo.core.iterators.user.VersioningIterator;
+import org.apache.accumulo.core.tabletserver.thrift.IteratorConfig;
+import org.apache.accumulo.core.tabletserver.thrift.TIteratorSetting;
+import org.apache.accumulo.start.classloader.AccumuloClassLoader;
+import org.apache.hadoop.io.Writable;
+import org.apache.hadoop.io.WritableComparable;
+import org.apache.log4j.Logger;
+import org.apache.thrift.TDeserializer;
+import org.apache.thrift.TException;
+import org.apache.thrift.TSerializer;
+import org.apache.thrift.protocol.TBinaryProtocol;
+public class IteratorUtil {
+  
+  private static final Logger log = Logger.getLogger(IteratorUtil.class);
+  
+  public static enum IteratorScope {
+    majc, minc, scan;
+  }
+  
+  public static class IterInfoComparator implements Comparator<IterInfo> {
+    
+    @Override
+    public int compare(IterInfo o1, IterInfo o2) {
+      return (o1.priority < o2.priority ? -1 : (o1.priority == o2.priority ? 0 : 1));
+    }
+    
+  }
+  
+  public static Map<String,String> generateInitialTableProperties() {
+    TreeMap<String,String> props = new TreeMap<String,String>();
+    
+    for (IteratorScope iterScope : IteratorScope.values()) {
+      props.put(Property.TABLE_ITERATOR_PREFIX + iterScope.name() + ".vers", "20," + VersioningIterator.class.getName());
+      props.put(Property.TABLE_ITERATOR_PREFIX + iterScope.name() + ".vers.opt.maxVersions", "1");
+    }
+    return props;
+  }
+  
+  public static int getMaxPriority(IteratorScope scope, AccumuloConfiguration conf) {
+    List<IterInfo> iters = new ArrayList<IterInfo>();
+    parseIterConf(scope, iters, new HashMap<String,Map<String,String>>(), conf);
+    
+    int max = 0;
+    
+    for (IterInfo iterInfo : iters) {
+      if (iterInfo.priority > max)
+        max = iterInfo.priority;
+    }
+    
+    return max;
+  }
+  
+  private static void parseIterConf(IteratorScope scope, List<IterInfo> iters, Map<String,Map<String,String>> allOptions, AccumuloConfiguration conf) {
+    for (Entry<String,String> entry : conf) {
+      if (entry.getKey().startsWith(Property.TABLE_ITERATOR_PREFIX.getKey())) {
+        
+        String suffix = entry.getKey().substring(Property.TABLE_ITERATOR_PREFIX.getKey().length());
+        String suffixSplit[] = suffix.split("\\.", 4);
+        
+        if (!suffixSplit[0].equals(scope.name())) {
+          
+          // do a sanity check to see if this is a valid scope
+          boolean found = false;
+          IteratorScope[] scopes = IteratorScope.values();
+          for (IteratorScope s : scopes) {
+            found = found || suffixSplit[0].equals(s.name());
+          }
+          
+          if (!found) {
+            log.warn("Option contains unknown scope: " + entry.getKey());
+          }
+          
+          continue;
+        }
+        
+        if (suffixSplit.length == 2) {
+          String sa[] = entry.getValue().split(",");
+          int prio = Integer.parseInt(sa[0]);
+          String className = sa[1];
+          iters.add(new IterInfo(prio, className, suffixSplit[1]));
+        } else if (suffixSplit.length == 4 && suffixSplit[2].equals("opt")) {
+          String iterName = suffixSplit[1];
+          String optName = suffixSplit[3];
+          
+          Map<String,String> options = allOptions.get(iterName);
+          if (options == null) {
+            options = new HashMap<String,String>();
+            allOptions.put(iterName, options);
+          }
+          
+          options.put(optName, entry.getValue());
+          
+        } else {
+          log.warn("Unrecognizable option: " + entry.getKey());
+        }
+      }
+    }
+    
+    Collections.sort(iters, new IterInfoComparator());
+  }
+  
+  public static String findIterator(IteratorScope scope, String className, AccumuloConfiguration conf, Map<String,String> opts) {
+    ArrayList<IterInfo> iters = new ArrayList<IterInfo>();
+    Map<String,Map<String,String>> allOptions = new HashMap<String,Map<String,String>>();
+    
+    parseIterConf(scope, iters, allOptions, conf);
+    
+    for (IterInfo iterInfo : iters)
+      if (iterInfo.className.equals(className)) {
+        Map<String,String> tmpOpts = allOptions.get(iterInfo.iterName);
+        if (tmpOpts != null) {
+          opts.putAll(tmpOpts);
+        }
+        return iterInfo.iterName;
+      }
+    
+    return null;
+  }
+  
+  public static <K extends WritableComparable<?>,V extends Writable> SortedKeyValueIterator<K,V> loadIterators(IteratorScope scope,
+      SortedKeyValueIterator<K,V> source, KeyExtent extent, AccumuloConfiguration conf, IteratorEnvironment env) throws IOException {
+    List<IterInfo> emptyList = Collections.emptyList();
+    Map<String,Map<String,String>> emptyMap = Collections.emptyMap();
+    return loadIterators(scope, source, extent, conf, emptyList, emptyMap, env);
+  }
+  
+  public static <K extends WritableComparable<?>,V extends Writable> SortedKeyValueIterator<K,V> loadIterators(IteratorScope scope,
+      SortedKeyValueIterator<K,V> source, KeyExtent extent, AccumuloConfiguration conf, List<IteratorSetting> iterators, IteratorEnvironment env)
+      throws IOException {
+    
+    List<IterInfo> ssiList = new ArrayList<IterInfo>();
+    Map<String,Map<String,String>> ssio = new HashMap<String,Map<String,String>>();
+    
+    for (IteratorSetting is : iterators) {
+      ssiList.add(new IterInfo(is.getPriority(), is.getIteratorClass(), is.getName()));
+      ssio.put(is.getName(), is.getOptions());
+    }
+    
+    return loadIterators(scope, source, extent, conf, ssiList, ssio, env, true);
+  }
+  
+  public static <K extends WritableComparable<?>,V extends Writable> SortedKeyValueIterator<K,V> loadIterators(IteratorScope scope,
+      SortedKeyValueIterator<K,V> source, KeyExtent extent, AccumuloConfiguration conf, List<IterInfo> ssiList, Map<String,Map<String,String>> ssio,
+      IteratorEnvironment env) throws IOException {
+    return loadIterators(scope, source, extent, conf, ssiList, ssio, env, true);
+  }
+  
+  public static <K extends WritableComparable<?>,V extends Writable> SortedKeyValueIterator<K,V> loadIterators(IteratorScope scope,
+      SortedKeyValueIterator<K,V> source, KeyExtent extent, AccumuloConfiguration conf, List<IterInfo> ssiList, Map<String,Map<String,String>> ssio,
+      IteratorEnvironment env, boolean useAccumuloClassLoader) throws IOException {
+    List<IterInfo> iters = new ArrayList<IterInfo>(ssiList);
+    Map<String,Map<String,String>> allOptions = new HashMap<String,Map<String,String>>();
+    
+    parseIterConf(scope, iters, allOptions, conf);
+    
+    for (Entry<String,Map<String,String>> entry : ssio.entrySet()) {
+      if (entry.getValue() == null)
+        continue;
+      Map<String,String> options = allOptions.get(entry.getKey());
+      if (options == null) {
+        allOptions.put(entry.getKey(), entry.getValue());
+      } else {
+        options.putAll(entry.getValue());
+      }
+    }
+    
+    return loadIterators(source, iters, allOptions, env, useAccumuloClassLoader);
+  }
+  
+  @SuppressWarnings("unchecked")
+  public static <K extends WritableComparable<?>,V extends Writable> SortedKeyValueIterator<K,V> loadIterators(SortedKeyValueIterator<K,V> source,
+      Collection<IterInfo> iters, Map<String,Map<String,String>> iterOpts, IteratorEnvironment env, boolean useAccumuloClassLoader) throws IOException {
+    // wrap the source in a SynchronizedIterator in case any of the additional configured iterators want to use threading
+    SortedKeyValueIterator<K,V> prev = new SynchronizedIterator<K,V>(source);
+    
+    try {
+      for (IterInfo iterInfo : iters) {
+       
+        Class<? extends SortedKeyValueIterator<K,V>> clazz;
+        if (useAccumuloClassLoader){
+          clazz = (Class<? extends SortedKeyValueIterator<K,V>>) AccumuloClassLoader.loadClass(iterInfo.className, SortedKeyValueIterator.class);
+        }else{
+          clazz = (Class<? extends SortedKeyValueIterator<K,V>>) Class.forName(iterInfo.className).asSubclass(SortedKeyValueIterator.class);
+        }
+        SortedKeyValueIterator<K,V> skvi = clazz.newInstance();
+        
+        Map<String,String> options = iterOpts.get(iterInfo.iterName);
+        
+        if (options == null)
+          options = Collections.emptyMap();
+        
+        skvi.init(prev, options, env);
+        prev = skvi;
+      }
+    } catch (ClassNotFoundException e) {
+      log.error(e.toString());
+      throw new IOException(e);
+    } catch (InstantiationException e) {
+      log.error(e.toString());
+      throw new IOException(e);
+    } catch (IllegalAccessException e) {
+      log.error(e.toString());
+      throw new IOException(e);
+    }
+    return prev;
+  }
+  
+  public static Range maximizeStartKeyTimeStamp(Range range) {
+    Range seekRange = range;
+    
+    if (range.getStartKey() != null && range.getStartKey().getTimestamp() != Long.MAX_VALUE) {
+      Key seekKey = new Key(seekRange.getStartKey());
+      seekKey.setTimestamp(Long.MAX_VALUE);
+      seekRange = new Range(seekKey, true, range.getEndKey(), range.isEndKeyInclusive());
+    }
+    
+    return seekRange;
+  }
+  
+  public static Range minimizeEndKeyTimeStamp(Range range) {
+    Range seekRange = range;
+    
+    if (range.getEndKey() != null && range.getEndKey().getTimestamp() != Long.MIN_VALUE) {
+      Key seekKey = new Key(seekRange.getEndKey());
+      seekKey.setTimestamp(Long.MIN_VALUE);
+      seekRange = new Range(range.getStartKey(), range.isStartKeyInclusive(), seekKey, true);
+    }
+    
+    return seekRange;
+  }
+  
+  public static TIteratorSetting toTIteratorSetting(IteratorSetting is) {
+    return new TIteratorSetting(is.getPriority(), is.getName(), is.getIteratorClass(), is.getOptions());
+  }
+  
+  public static IteratorSetting toIteratorSetting(TIteratorSetting tis) {
+    return new IteratorSetting(tis.getPriority(), tis.getName(), tis.getIteratorClass(), tis.getProperties());
+  }
+
+  public static IteratorConfig toIteratorConfig(List<IteratorSetting> iterators) {
+    ArrayList<TIteratorSetting> tisList = new ArrayList<TIteratorSetting>();
+    
+    for (IteratorSetting iteratorSetting : iterators) {
+      tisList.add(toTIteratorSetting(iteratorSetting));
+    }
+    
+    return new IteratorConfig(tisList);
+  }
+  
+  public static List<IteratorSetting> toIteratorSettings(IteratorConfig ic) {
+    List<IteratorSetting> ret = new ArrayList<IteratorSetting>();
+    for (TIteratorSetting tIteratorSetting : ic.getIterators()) {
+      ret.add(toIteratorSetting(tIteratorSetting));
+    }
+    
+    return ret;
+  }
+
+  public static byte[] encodeIteratorSettings(IteratorConfig iterators) {
+    TSerializer tser = new TSerializer(new TBinaryProtocol.Factory());
+    
+    try {
+      return tser.serialize(iterators);
+    } catch (TException e) {
+      throw new RuntimeException(e);
+    }
+  }
+  
+  public static byte[] encodeIteratorSettings(List<IteratorSetting> iterators) {
+    return encodeIteratorSettings(toIteratorConfig(iterators));
+  }
+
+
+  public static List<IteratorSetting> decodeIteratorSettings(byte[] enc) {
+    TDeserializer tdser = new TDeserializer(new TBinaryProtocol.Factory());
+    IteratorConfig ic = new IteratorConfig();
+    try {
+      tdser.deserialize(ic, enc);
+    } catch (TException e) {
+      throw new RuntimeException(e);
+    }
+    return toIteratorSettings(ic);
+  }
+}


Mime
View raw message