accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [08/61] [abbrv] [partial] accumulo git commit: ACCUMULO-722 put trunk in my sandbox
Date Thu, 03 Mar 2016 21:59:33 GMT
http://git-wip-us.apache.org/repos/asf/accumulo/blob/7bdbfccb/1.5/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TabletMutations.java
----------------------------------------------------------------------
diff --git a/1.5/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TabletMutations.java b/1.5/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TabletMutations.java
new file mode 100644
index 0000000..2140c9f
--- /dev/null
+++ b/1.5/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TabletMutations.java
@@ -0,0 +1,629 @@
+/**
+ * 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.tabletserver.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 TabletMutations implements org.apache.thrift.TBase<TabletMutations, TabletMutations._Fields>, java.io.Serializable, Cloneable {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TabletMutations");
+
+  private static final org.apache.thrift.protocol.TField TABLET_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("tabletID", org.apache.thrift.protocol.TType.I32, (short)1);
+  private static final org.apache.thrift.protocol.TField SEQ_FIELD_DESC = new org.apache.thrift.protocol.TField("seq", org.apache.thrift.protocol.TType.I64, (short)2);
+  private static final org.apache.thrift.protocol.TField MUTATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("mutations", org.apache.thrift.protocol.TType.LIST, (short)3);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new TabletMutationsStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new TabletMutationsTupleSchemeFactory());
+  }
+
+  public int tabletID; // required
+  public long seq; // required
+  public List<org.apache.accumulo.core.data.thrift.TMutation> mutations; // 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 {
+    TABLET_ID((short)1, "tabletID"),
+    SEQ((short)2, "seq"),
+    MUTATIONS((short)3, "mutations");
+
+    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: // TABLET_ID
+          return TABLET_ID;
+        case 2: // SEQ
+          return SEQ;
+        case 3: // MUTATIONS
+          return MUTATIONS;
+        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 __TABLETID_ISSET_ID = 0;
+  private static final int __SEQ_ISSET_ID = 1;
+  private BitSet __isset_bit_vector = new BitSet(2);
+  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.TABLET_ID, new org.apache.thrift.meta_data.FieldMetaData("tabletID", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32        , "TabletID")));
+    tmpMap.put(_Fields.SEQ, new org.apache.thrift.meta_data.FieldMetaData("seq", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+    tmpMap.put(_Fields.MUTATIONS, new org.apache.thrift.meta_data.FieldMetaData("mutations", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
+            new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.data.thrift.TMutation.class))));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TabletMutations.class, metaDataMap);
+  }
+
+  public TabletMutations() {
+  }
+
+  public TabletMutations(
+    int tabletID,
+    long seq,
+    List<org.apache.accumulo.core.data.thrift.TMutation> mutations)
+  {
+    this();
+    this.tabletID = tabletID;
+    setTabletIDIsSet(true);
+    this.seq = seq;
+    setSeqIsSet(true);
+    this.mutations = mutations;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public TabletMutations(TabletMutations other) {
+    __isset_bit_vector.clear();
+    __isset_bit_vector.or(other.__isset_bit_vector);
+    this.tabletID = other.tabletID;
+    this.seq = other.seq;
+    if (other.isSetMutations()) {
+      List<org.apache.accumulo.core.data.thrift.TMutation> __this__mutations = new ArrayList<org.apache.accumulo.core.data.thrift.TMutation>();
+      for (org.apache.accumulo.core.data.thrift.TMutation other_element : other.mutations) {
+        __this__mutations.add(new org.apache.accumulo.core.data.thrift.TMutation(other_element));
+      }
+      this.mutations = __this__mutations;
+    }
+  }
+
+  public TabletMutations deepCopy() {
+    return new TabletMutations(this);
+  }
+
+  @Override
+  public void clear() {
+    setTabletIDIsSet(false);
+    this.tabletID = 0;
+    setSeqIsSet(false);
+    this.seq = 0;
+    this.mutations = null;
+  }
+
+  public int getTabletID() {
+    return this.tabletID;
+  }
+
+  public TabletMutations setTabletID(int tabletID) {
+    this.tabletID = tabletID;
+    setTabletIDIsSet(true);
+    return this;
+  }
+
+  public void unsetTabletID() {
+    __isset_bit_vector.clear(__TABLETID_ISSET_ID);
+  }
+
+  /** Returns true if field tabletID is set (has been assigned a value) and false otherwise */
+  public boolean isSetTabletID() {
+    return __isset_bit_vector.get(__TABLETID_ISSET_ID);
+  }
+
+  public void setTabletIDIsSet(boolean value) {
+    __isset_bit_vector.set(__TABLETID_ISSET_ID, value);
+  }
+
+  public long getSeq() {
+    return this.seq;
+  }
+
+  public TabletMutations setSeq(long seq) {
+    this.seq = seq;
+    setSeqIsSet(true);
+    return this;
+  }
+
+  public void unsetSeq() {
+    __isset_bit_vector.clear(__SEQ_ISSET_ID);
+  }
+
+  /** Returns true if field seq is set (has been assigned a value) and false otherwise */
+  public boolean isSetSeq() {
+    return __isset_bit_vector.get(__SEQ_ISSET_ID);
+  }
+
+  public void setSeqIsSet(boolean value) {
+    __isset_bit_vector.set(__SEQ_ISSET_ID, value);
+  }
+
+  public int getMutationsSize() {
+    return (this.mutations == null) ? 0 : this.mutations.size();
+  }
+
+  public java.util.Iterator<org.apache.accumulo.core.data.thrift.TMutation> getMutationsIterator() {
+    return (this.mutations == null) ? null : this.mutations.iterator();
+  }
+
+  public void addToMutations(org.apache.accumulo.core.data.thrift.TMutation elem) {
+    if (this.mutations == null) {
+      this.mutations = new ArrayList<org.apache.accumulo.core.data.thrift.TMutation>();
+    }
+    this.mutations.add(elem);
+  }
+
+  public List<org.apache.accumulo.core.data.thrift.TMutation> getMutations() {
+    return this.mutations;
+  }
+
+  public TabletMutations setMutations(List<org.apache.accumulo.core.data.thrift.TMutation> mutations) {
+    this.mutations = mutations;
+    return this;
+  }
+
+  public void unsetMutations() {
+    this.mutations = null;
+  }
+
+  /** Returns true if field mutations is set (has been assigned a value) and false otherwise */
+  public boolean isSetMutations() {
+    return this.mutations != null;
+  }
+
+  public void setMutationsIsSet(boolean value) {
+    if (!value) {
+      this.mutations = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case TABLET_ID:
+      if (value == null) {
+        unsetTabletID();
+      } else {
+        setTabletID((Integer)value);
+      }
+      break;
+
+    case SEQ:
+      if (value == null) {
+        unsetSeq();
+      } else {
+        setSeq((Long)value);
+      }
+      break;
+
+    case MUTATIONS:
+      if (value == null) {
+        unsetMutations();
+      } else {
+        setMutations((List<org.apache.accumulo.core.data.thrift.TMutation>)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case TABLET_ID:
+      return Integer.valueOf(getTabletID());
+
+    case SEQ:
+      return Long.valueOf(getSeq());
+
+    case MUTATIONS:
+      return getMutations();
+
+    }
+    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 TABLET_ID:
+      return isSetTabletID();
+    case SEQ:
+      return isSetSeq();
+    case MUTATIONS:
+      return isSetMutations();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof TabletMutations)
+      return this.equals((TabletMutations)that);
+    return false;
+  }
+
+  public boolean equals(TabletMutations that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_tabletID = true;
+    boolean that_present_tabletID = true;
+    if (this_present_tabletID || that_present_tabletID) {
+      if (!(this_present_tabletID && that_present_tabletID))
+        return false;
+      if (this.tabletID != that.tabletID)
+        return false;
+    }
+
+    boolean this_present_seq = true;
+    boolean that_present_seq = true;
+    if (this_present_seq || that_present_seq) {
+      if (!(this_present_seq && that_present_seq))
+        return false;
+      if (this.seq != that.seq)
+        return false;
+    }
+
+    boolean this_present_mutations = true && this.isSetMutations();
+    boolean that_present_mutations = true && that.isSetMutations();
+    if (this_present_mutations || that_present_mutations) {
+      if (!(this_present_mutations && that_present_mutations))
+        return false;
+      if (!this.mutations.equals(that.mutations))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    return 0;
+  }
+
+  public int compareTo(TabletMutations other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+    TabletMutations typedOther = (TabletMutations)other;
+
+    lastComparison = Boolean.valueOf(isSetTabletID()).compareTo(typedOther.isSetTabletID());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetTabletID()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tabletID, typedOther.tabletID);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetSeq()).compareTo(typedOther.isSetSeq());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetSeq()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.seq, typedOther.seq);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetMutations()).compareTo(typedOther.isSetMutations());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetMutations()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mutations, typedOther.mutations);
+      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("TabletMutations(");
+    boolean first = true;
+
+    sb.append("tabletID:");
+    sb.append(this.tabletID);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("seq:");
+    sb.append(this.seq);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("mutations:");
+    if (this.mutations == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.mutations);
+    }
+    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 TabletMutationsStandardSchemeFactory implements SchemeFactory {
+    public TabletMutationsStandardScheme getScheme() {
+      return new TabletMutationsStandardScheme();
+    }
+  }
+
+  private static class TabletMutationsStandardScheme extends StandardScheme<TabletMutations> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, TabletMutations 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: // TABLET_ID
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.tabletID = iprot.readI32();
+              struct.setTabletIDIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // SEQ
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.seq = iprot.readI64();
+              struct.setSeqIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // MUTATIONS
+            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+              {
+                org.apache.thrift.protocol.TList _list62 = iprot.readListBegin();
+                struct.mutations = new ArrayList<org.apache.accumulo.core.data.thrift.TMutation>(_list62.size);
+                for (int _i63 = 0; _i63 < _list62.size; ++_i63)
+                {
+                  org.apache.accumulo.core.data.thrift.TMutation _elem64; // required
+                  _elem64 = new org.apache.accumulo.core.data.thrift.TMutation();
+                  _elem64.read(iprot);
+                  struct.mutations.add(_elem64);
+                }
+                iprot.readListEnd();
+              }
+              struct.setMutationsIsSet(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, TabletMutations struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      oprot.writeFieldBegin(TABLET_ID_FIELD_DESC);
+      oprot.writeI32(struct.tabletID);
+      oprot.writeFieldEnd();
+      oprot.writeFieldBegin(SEQ_FIELD_DESC);
+      oprot.writeI64(struct.seq);
+      oprot.writeFieldEnd();
+      if (struct.mutations != null) {
+        oprot.writeFieldBegin(MUTATIONS_FIELD_DESC);
+        {
+          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.mutations.size()));
+          for (org.apache.accumulo.core.data.thrift.TMutation _iter65 : struct.mutations)
+          {
+            _iter65.write(oprot);
+          }
+          oprot.writeListEnd();
+        }
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class TabletMutationsTupleSchemeFactory implements SchemeFactory {
+    public TabletMutationsTupleScheme getScheme() {
+      return new TabletMutationsTupleScheme();
+    }
+  }
+
+  private static class TabletMutationsTupleScheme extends TupleScheme<TabletMutations> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, TabletMutations struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetTabletID()) {
+        optionals.set(0);
+      }
+      if (struct.isSetSeq()) {
+        optionals.set(1);
+      }
+      if (struct.isSetMutations()) {
+        optionals.set(2);
+      }
+      oprot.writeBitSet(optionals, 3);
+      if (struct.isSetTabletID()) {
+        oprot.writeI32(struct.tabletID);
+      }
+      if (struct.isSetSeq()) {
+        oprot.writeI64(struct.seq);
+      }
+      if (struct.isSetMutations()) {
+        {
+          oprot.writeI32(struct.mutations.size());
+          for (org.apache.accumulo.core.data.thrift.TMutation _iter66 : struct.mutations)
+          {
+            _iter66.write(oprot);
+          }
+        }
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, TabletMutations struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(3);
+      if (incoming.get(0)) {
+        struct.tabletID = iprot.readI32();
+        struct.setTabletIDIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.seq = iprot.readI64();
+        struct.setSeqIsSet(true);
+      }
+      if (incoming.get(2)) {
+        {
+          org.apache.thrift.protocol.TList _list67 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.mutations = new ArrayList<org.apache.accumulo.core.data.thrift.TMutation>(_list67.size);
+          for (int _i68 = 0; _i68 < _list67.size; ++_i68)
+          {
+            org.apache.accumulo.core.data.thrift.TMutation _elem69; // required
+            _elem69 = new org.apache.accumulo.core.data.thrift.TMutation();
+            _elem69.read(iprot);
+            struct.mutations.add(_elem69);
+          }
+        }
+        struct.setMutationsIsSet(true);
+      }
+    }
+  }
+
+}
+

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7bdbfccb/1.5/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TabletStats.java
----------------------------------------------------------------------
diff --git a/1.5/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TabletStats.java b/1.5/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TabletStats.java
new file mode 100644
index 0000000..bda1705
--- /dev/null
+++ b/1.5/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TabletStats.java
@@ -0,0 +1,1071 @@
+/**
+ * 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.tabletserver.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 TabletStats implements org.apache.thrift.TBase<TabletStats, TabletStats._Fields>, java.io.Serializable, Cloneable {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TabletStats");
+
+  private static final org.apache.thrift.protocol.TField EXTENT_FIELD_DESC = new org.apache.thrift.protocol.TField("extent", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+  private static final org.apache.thrift.protocol.TField MAJOR_FIELD_DESC = new org.apache.thrift.protocol.TField("major", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+  private static final org.apache.thrift.protocol.TField MINOR_FIELD_DESC = new org.apache.thrift.protocol.TField("minor", org.apache.thrift.protocol.TType.STRUCT, (short)3);
+  private static final org.apache.thrift.protocol.TField SPLIT_FIELD_DESC = new org.apache.thrift.protocol.TField("split", org.apache.thrift.protocol.TType.STRUCT, (short)4);
+  private static final org.apache.thrift.protocol.TField NUM_ENTRIES_FIELD_DESC = new org.apache.thrift.protocol.TField("numEntries", org.apache.thrift.protocol.TType.I64, (short)5);
+  private static final org.apache.thrift.protocol.TField INGEST_RATE_FIELD_DESC = new org.apache.thrift.protocol.TField("ingestRate", org.apache.thrift.protocol.TType.DOUBLE, (short)6);
+  private static final org.apache.thrift.protocol.TField QUERY_RATE_FIELD_DESC = new org.apache.thrift.protocol.TField("queryRate", org.apache.thrift.protocol.TType.DOUBLE, (short)7);
+  private static final org.apache.thrift.protocol.TField SPLIT_CREATION_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("splitCreationTime", org.apache.thrift.protocol.TType.I64, (short)8);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new TabletStatsStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new TabletStatsTupleSchemeFactory());
+  }
+
+  public org.apache.accumulo.core.data.thrift.TKeyExtent extent; // required
+  public ActionStats major; // required
+  public ActionStats minor; // required
+  public ActionStats split; // required
+  public long numEntries; // required
+  public double ingestRate; // required
+  public double queryRate; // required
+  public long splitCreationTime; // 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 {
+    EXTENT((short)1, "extent"),
+    MAJOR((short)2, "major"),
+    MINOR((short)3, "minor"),
+    SPLIT((short)4, "split"),
+    NUM_ENTRIES((short)5, "numEntries"),
+    INGEST_RATE((short)6, "ingestRate"),
+    QUERY_RATE((short)7, "queryRate"),
+    SPLIT_CREATION_TIME((short)8, "splitCreationTime");
+
+    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: // EXTENT
+          return EXTENT;
+        case 2: // MAJOR
+          return MAJOR;
+        case 3: // MINOR
+          return MINOR;
+        case 4: // SPLIT
+          return SPLIT;
+        case 5: // NUM_ENTRIES
+          return NUM_ENTRIES;
+        case 6: // INGEST_RATE
+          return INGEST_RATE;
+        case 7: // QUERY_RATE
+          return QUERY_RATE;
+        case 8: // SPLIT_CREATION_TIME
+          return SPLIT_CREATION_TIME;
+        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 __NUMENTRIES_ISSET_ID = 0;
+  private static final int __INGESTRATE_ISSET_ID = 1;
+  private static final int __QUERYRATE_ISSET_ID = 2;
+  private static final int __SPLITCREATIONTIME_ISSET_ID = 3;
+  private BitSet __isset_bit_vector = new BitSet(4);
+  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.EXTENT, new org.apache.thrift.meta_data.FieldMetaData("extent", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.data.thrift.TKeyExtent.class)));
+    tmpMap.put(_Fields.MAJOR, new org.apache.thrift.meta_data.FieldMetaData("major", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ActionStats.class)));
+    tmpMap.put(_Fields.MINOR, new org.apache.thrift.meta_data.FieldMetaData("minor", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ActionStats.class)));
+    tmpMap.put(_Fields.SPLIT, new org.apache.thrift.meta_data.FieldMetaData("split", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ActionStats.class)));
+    tmpMap.put(_Fields.NUM_ENTRIES, new org.apache.thrift.meta_data.FieldMetaData("numEntries", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+    tmpMap.put(_Fields.INGEST_RATE, new org.apache.thrift.meta_data.FieldMetaData("ingestRate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
+    tmpMap.put(_Fields.QUERY_RATE, new org.apache.thrift.meta_data.FieldMetaData("queryRate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
+    tmpMap.put(_Fields.SPLIT_CREATION_TIME, new org.apache.thrift.meta_data.FieldMetaData("splitCreationTime", 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(TabletStats.class, metaDataMap);
+  }
+
+  public TabletStats() {
+  }
+
+  public TabletStats(
+    org.apache.accumulo.core.data.thrift.TKeyExtent extent,
+    ActionStats major,
+    ActionStats minor,
+    ActionStats split,
+    long numEntries,
+    double ingestRate,
+    double queryRate,
+    long splitCreationTime)
+  {
+    this();
+    this.extent = extent;
+    this.major = major;
+    this.minor = minor;
+    this.split = split;
+    this.numEntries = numEntries;
+    setNumEntriesIsSet(true);
+    this.ingestRate = ingestRate;
+    setIngestRateIsSet(true);
+    this.queryRate = queryRate;
+    setQueryRateIsSet(true);
+    this.splitCreationTime = splitCreationTime;
+    setSplitCreationTimeIsSet(true);
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public TabletStats(TabletStats other) {
+    __isset_bit_vector.clear();
+    __isset_bit_vector.or(other.__isset_bit_vector);
+    if (other.isSetExtent()) {
+      this.extent = new org.apache.accumulo.core.data.thrift.TKeyExtent(other.extent);
+    }
+    if (other.isSetMajor()) {
+      this.major = new ActionStats(other.major);
+    }
+    if (other.isSetMinor()) {
+      this.minor = new ActionStats(other.minor);
+    }
+    if (other.isSetSplit()) {
+      this.split = new ActionStats(other.split);
+    }
+    this.numEntries = other.numEntries;
+    this.ingestRate = other.ingestRate;
+    this.queryRate = other.queryRate;
+    this.splitCreationTime = other.splitCreationTime;
+  }
+
+  public TabletStats deepCopy() {
+    return new TabletStats(this);
+  }
+
+  @Override
+  public void clear() {
+    this.extent = null;
+    this.major = null;
+    this.minor = null;
+    this.split = null;
+    setNumEntriesIsSet(false);
+    this.numEntries = 0;
+    setIngestRateIsSet(false);
+    this.ingestRate = 0.0;
+    setQueryRateIsSet(false);
+    this.queryRate = 0.0;
+    setSplitCreationTimeIsSet(false);
+    this.splitCreationTime = 0;
+  }
+
+  public org.apache.accumulo.core.data.thrift.TKeyExtent getExtent() {
+    return this.extent;
+  }
+
+  public TabletStats setExtent(org.apache.accumulo.core.data.thrift.TKeyExtent extent) {
+    this.extent = extent;
+    return this;
+  }
+
+  public void unsetExtent() {
+    this.extent = null;
+  }
+
+  /** Returns true if field extent is set (has been assigned a value) and false otherwise */
+  public boolean isSetExtent() {
+    return this.extent != null;
+  }
+
+  public void setExtentIsSet(boolean value) {
+    if (!value) {
+      this.extent = null;
+    }
+  }
+
+  public ActionStats getMajor() {
+    return this.major;
+  }
+
+  public TabletStats setMajor(ActionStats major) {
+    this.major = major;
+    return this;
+  }
+
+  public void unsetMajor() {
+    this.major = null;
+  }
+
+  /** Returns true if field major is set (has been assigned a value) and false otherwise */
+  public boolean isSetMajor() {
+    return this.major != null;
+  }
+
+  public void setMajorIsSet(boolean value) {
+    if (!value) {
+      this.major = null;
+    }
+  }
+
+  public ActionStats getMinor() {
+    return this.minor;
+  }
+
+  public TabletStats setMinor(ActionStats minor) {
+    this.minor = minor;
+    return this;
+  }
+
+  public void unsetMinor() {
+    this.minor = null;
+  }
+
+  /** Returns true if field minor is set (has been assigned a value) and false otherwise */
+  public boolean isSetMinor() {
+    return this.minor != null;
+  }
+
+  public void setMinorIsSet(boolean value) {
+    if (!value) {
+      this.minor = null;
+    }
+  }
+
+  public ActionStats getSplit() {
+    return this.split;
+  }
+
+  public TabletStats setSplit(ActionStats split) {
+    this.split = split;
+    return this;
+  }
+
+  public void unsetSplit() {
+    this.split = null;
+  }
+
+  /** Returns true if field split is set (has been assigned a value) and false otherwise */
+  public boolean isSetSplit() {
+    return this.split != null;
+  }
+
+  public void setSplitIsSet(boolean value) {
+    if (!value) {
+      this.split = null;
+    }
+  }
+
+  public long getNumEntries() {
+    return this.numEntries;
+  }
+
+  public TabletStats setNumEntries(long numEntries) {
+    this.numEntries = numEntries;
+    setNumEntriesIsSet(true);
+    return this;
+  }
+
+  public void unsetNumEntries() {
+    __isset_bit_vector.clear(__NUMENTRIES_ISSET_ID);
+  }
+
+  /** Returns true if field numEntries is set (has been assigned a value) and false otherwise */
+  public boolean isSetNumEntries() {
+    return __isset_bit_vector.get(__NUMENTRIES_ISSET_ID);
+  }
+
+  public void setNumEntriesIsSet(boolean value) {
+    __isset_bit_vector.set(__NUMENTRIES_ISSET_ID, value);
+  }
+
+  public double getIngestRate() {
+    return this.ingestRate;
+  }
+
+  public TabletStats setIngestRate(double ingestRate) {
+    this.ingestRate = ingestRate;
+    setIngestRateIsSet(true);
+    return this;
+  }
+
+  public void unsetIngestRate() {
+    __isset_bit_vector.clear(__INGESTRATE_ISSET_ID);
+  }
+
+  /** Returns true if field ingestRate is set (has been assigned a value) and false otherwise */
+  public boolean isSetIngestRate() {
+    return __isset_bit_vector.get(__INGESTRATE_ISSET_ID);
+  }
+
+  public void setIngestRateIsSet(boolean value) {
+    __isset_bit_vector.set(__INGESTRATE_ISSET_ID, value);
+  }
+
+  public double getQueryRate() {
+    return this.queryRate;
+  }
+
+  public TabletStats setQueryRate(double queryRate) {
+    this.queryRate = queryRate;
+    setQueryRateIsSet(true);
+    return this;
+  }
+
+  public void unsetQueryRate() {
+    __isset_bit_vector.clear(__QUERYRATE_ISSET_ID);
+  }
+
+  /** Returns true if field queryRate is set (has been assigned a value) and false otherwise */
+  public boolean isSetQueryRate() {
+    return __isset_bit_vector.get(__QUERYRATE_ISSET_ID);
+  }
+
+  public void setQueryRateIsSet(boolean value) {
+    __isset_bit_vector.set(__QUERYRATE_ISSET_ID, value);
+  }
+
+  public long getSplitCreationTime() {
+    return this.splitCreationTime;
+  }
+
+  public TabletStats setSplitCreationTime(long splitCreationTime) {
+    this.splitCreationTime = splitCreationTime;
+    setSplitCreationTimeIsSet(true);
+    return this;
+  }
+
+  public void unsetSplitCreationTime() {
+    __isset_bit_vector.clear(__SPLITCREATIONTIME_ISSET_ID);
+  }
+
+  /** Returns true if field splitCreationTime is set (has been assigned a value) and false otherwise */
+  public boolean isSetSplitCreationTime() {
+    return __isset_bit_vector.get(__SPLITCREATIONTIME_ISSET_ID);
+  }
+
+  public void setSplitCreationTimeIsSet(boolean value) {
+    __isset_bit_vector.set(__SPLITCREATIONTIME_ISSET_ID, value);
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case EXTENT:
+      if (value == null) {
+        unsetExtent();
+      } else {
+        setExtent((org.apache.accumulo.core.data.thrift.TKeyExtent)value);
+      }
+      break;
+
+    case MAJOR:
+      if (value == null) {
+        unsetMajor();
+      } else {
+        setMajor((ActionStats)value);
+      }
+      break;
+
+    case MINOR:
+      if (value == null) {
+        unsetMinor();
+      } else {
+        setMinor((ActionStats)value);
+      }
+      break;
+
+    case SPLIT:
+      if (value == null) {
+        unsetSplit();
+      } else {
+        setSplit((ActionStats)value);
+      }
+      break;
+
+    case NUM_ENTRIES:
+      if (value == null) {
+        unsetNumEntries();
+      } else {
+        setNumEntries((Long)value);
+      }
+      break;
+
+    case INGEST_RATE:
+      if (value == null) {
+        unsetIngestRate();
+      } else {
+        setIngestRate((Double)value);
+      }
+      break;
+
+    case QUERY_RATE:
+      if (value == null) {
+        unsetQueryRate();
+      } else {
+        setQueryRate((Double)value);
+      }
+      break;
+
+    case SPLIT_CREATION_TIME:
+      if (value == null) {
+        unsetSplitCreationTime();
+      } else {
+        setSplitCreationTime((Long)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case EXTENT:
+      return getExtent();
+
+    case MAJOR:
+      return getMajor();
+
+    case MINOR:
+      return getMinor();
+
+    case SPLIT:
+      return getSplit();
+
+    case NUM_ENTRIES:
+      return Long.valueOf(getNumEntries());
+
+    case INGEST_RATE:
+      return Double.valueOf(getIngestRate());
+
+    case QUERY_RATE:
+      return Double.valueOf(getQueryRate());
+
+    case SPLIT_CREATION_TIME:
+      return Long.valueOf(getSplitCreationTime());
+
+    }
+    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 EXTENT:
+      return isSetExtent();
+    case MAJOR:
+      return isSetMajor();
+    case MINOR:
+      return isSetMinor();
+    case SPLIT:
+      return isSetSplit();
+    case NUM_ENTRIES:
+      return isSetNumEntries();
+    case INGEST_RATE:
+      return isSetIngestRate();
+    case QUERY_RATE:
+      return isSetQueryRate();
+    case SPLIT_CREATION_TIME:
+      return isSetSplitCreationTime();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof TabletStats)
+      return this.equals((TabletStats)that);
+    return false;
+  }
+
+  public boolean equals(TabletStats that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_extent = true && this.isSetExtent();
+    boolean that_present_extent = true && that.isSetExtent();
+    if (this_present_extent || that_present_extent) {
+      if (!(this_present_extent && that_present_extent))
+        return false;
+      if (!this.extent.equals(that.extent))
+        return false;
+    }
+
+    boolean this_present_major = true && this.isSetMajor();
+    boolean that_present_major = true && that.isSetMajor();
+    if (this_present_major || that_present_major) {
+      if (!(this_present_major && that_present_major))
+        return false;
+      if (!this.major.equals(that.major))
+        return false;
+    }
+
+    boolean this_present_minor = true && this.isSetMinor();
+    boolean that_present_minor = true && that.isSetMinor();
+    if (this_present_minor || that_present_minor) {
+      if (!(this_present_minor && that_present_minor))
+        return false;
+      if (!this.minor.equals(that.minor))
+        return false;
+    }
+
+    boolean this_present_split = true && this.isSetSplit();
+    boolean that_present_split = true && that.isSetSplit();
+    if (this_present_split || that_present_split) {
+      if (!(this_present_split && that_present_split))
+        return false;
+      if (!this.split.equals(that.split))
+        return false;
+    }
+
+    boolean this_present_numEntries = true;
+    boolean that_present_numEntries = true;
+    if (this_present_numEntries || that_present_numEntries) {
+      if (!(this_present_numEntries && that_present_numEntries))
+        return false;
+      if (this.numEntries != that.numEntries)
+        return false;
+    }
+
+    boolean this_present_ingestRate = true;
+    boolean that_present_ingestRate = true;
+    if (this_present_ingestRate || that_present_ingestRate) {
+      if (!(this_present_ingestRate && that_present_ingestRate))
+        return false;
+      if (this.ingestRate != that.ingestRate)
+        return false;
+    }
+
+    boolean this_present_queryRate = true;
+    boolean that_present_queryRate = true;
+    if (this_present_queryRate || that_present_queryRate) {
+      if (!(this_present_queryRate && that_present_queryRate))
+        return false;
+      if (this.queryRate != that.queryRate)
+        return false;
+    }
+
+    boolean this_present_splitCreationTime = true;
+    boolean that_present_splitCreationTime = true;
+    if (this_present_splitCreationTime || that_present_splitCreationTime) {
+      if (!(this_present_splitCreationTime && that_present_splitCreationTime))
+        return false;
+      if (this.splitCreationTime != that.splitCreationTime)
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    return 0;
+  }
+
+  public int compareTo(TabletStats other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+    TabletStats typedOther = (TabletStats)other;
+
+    lastComparison = Boolean.valueOf(isSetExtent()).compareTo(typedOther.isSetExtent());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetExtent()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.extent, typedOther.extent);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetMajor()).compareTo(typedOther.isSetMajor());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetMajor()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.major, typedOther.major);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetMinor()).compareTo(typedOther.isSetMinor());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetMinor()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.minor, typedOther.minor);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetSplit()).compareTo(typedOther.isSetSplit());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetSplit()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.split, typedOther.split);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetNumEntries()).compareTo(typedOther.isSetNumEntries());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetNumEntries()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numEntries, typedOther.numEntries);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetIngestRate()).compareTo(typedOther.isSetIngestRate());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetIngestRate()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ingestRate, typedOther.ingestRate);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetQueryRate()).compareTo(typedOther.isSetQueryRate());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetQueryRate()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queryRate, typedOther.queryRate);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetSplitCreationTime()).compareTo(typedOther.isSetSplitCreationTime());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetSplitCreationTime()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.splitCreationTime, typedOther.splitCreationTime);
+      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("TabletStats(");
+    boolean first = true;
+
+    sb.append("extent:");
+    if (this.extent == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.extent);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("major:");
+    if (this.major == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.major);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("minor:");
+    if (this.minor == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.minor);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("split:");
+    if (this.split == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.split);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("numEntries:");
+    sb.append(this.numEntries);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("ingestRate:");
+    sb.append(this.ingestRate);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("queryRate:");
+    sb.append(this.queryRate);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("splitCreationTime:");
+    sb.append(this.splitCreationTime);
+    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 TabletStatsStandardSchemeFactory implements SchemeFactory {
+    public TabletStatsStandardScheme getScheme() {
+      return new TabletStatsStandardScheme();
+    }
+  }
+
+  private static class TabletStatsStandardScheme extends StandardScheme<TabletStats> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, TabletStats 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: // EXTENT
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+              struct.extent = new org.apache.accumulo.core.data.thrift.TKeyExtent();
+              struct.extent.read(iprot);
+              struct.setExtentIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // MAJOR
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+              struct.major = new ActionStats();
+              struct.major.read(iprot);
+              struct.setMajorIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // MINOR
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+              struct.minor = new ActionStats();
+              struct.minor.read(iprot);
+              struct.setMinorIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 4: // SPLIT
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+              struct.split = new ActionStats();
+              struct.split.read(iprot);
+              struct.setSplitIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 5: // NUM_ENTRIES
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.numEntries = iprot.readI64();
+              struct.setNumEntriesIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 6: // INGEST_RATE
+            if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) {
+              struct.ingestRate = iprot.readDouble();
+              struct.setIngestRateIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 7: // QUERY_RATE
+            if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) {
+              struct.queryRate = iprot.readDouble();
+              struct.setQueryRateIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 8: // SPLIT_CREATION_TIME
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.splitCreationTime = iprot.readI64();
+              struct.setSplitCreationTimeIsSet(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, TabletStats struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.extent != null) {
+        oprot.writeFieldBegin(EXTENT_FIELD_DESC);
+        struct.extent.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      if (struct.major != null) {
+        oprot.writeFieldBegin(MAJOR_FIELD_DESC);
+        struct.major.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      if (struct.minor != null) {
+        oprot.writeFieldBegin(MINOR_FIELD_DESC);
+        struct.minor.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      if (struct.split != null) {
+        oprot.writeFieldBegin(SPLIT_FIELD_DESC);
+        struct.split.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldBegin(NUM_ENTRIES_FIELD_DESC);
+      oprot.writeI64(struct.numEntries);
+      oprot.writeFieldEnd();
+      oprot.writeFieldBegin(INGEST_RATE_FIELD_DESC);
+      oprot.writeDouble(struct.ingestRate);
+      oprot.writeFieldEnd();
+      oprot.writeFieldBegin(QUERY_RATE_FIELD_DESC);
+      oprot.writeDouble(struct.queryRate);
+      oprot.writeFieldEnd();
+      oprot.writeFieldBegin(SPLIT_CREATION_TIME_FIELD_DESC);
+      oprot.writeI64(struct.splitCreationTime);
+      oprot.writeFieldEnd();
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class TabletStatsTupleSchemeFactory implements SchemeFactory {
+    public TabletStatsTupleScheme getScheme() {
+      return new TabletStatsTupleScheme();
+    }
+  }
+
+  private static class TabletStatsTupleScheme extends TupleScheme<TabletStats> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, TabletStats struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetExtent()) {
+        optionals.set(0);
+      }
+      if (struct.isSetMajor()) {
+        optionals.set(1);
+      }
+      if (struct.isSetMinor()) {
+        optionals.set(2);
+      }
+      if (struct.isSetSplit()) {
+        optionals.set(3);
+      }
+      if (struct.isSetNumEntries()) {
+        optionals.set(4);
+      }
+      if (struct.isSetIngestRate()) {
+        optionals.set(5);
+      }
+      if (struct.isSetQueryRate()) {
+        optionals.set(6);
+      }
+      if (struct.isSetSplitCreationTime()) {
+        optionals.set(7);
+      }
+      oprot.writeBitSet(optionals, 8);
+      if (struct.isSetExtent()) {
+        struct.extent.write(oprot);
+      }
+      if (struct.isSetMajor()) {
+        struct.major.write(oprot);
+      }
+      if (struct.isSetMinor()) {
+        struct.minor.write(oprot);
+      }
+      if (struct.isSetSplit()) {
+        struct.split.write(oprot);
+      }
+      if (struct.isSetNumEntries()) {
+        oprot.writeI64(struct.numEntries);
+      }
+      if (struct.isSetIngestRate()) {
+        oprot.writeDouble(struct.ingestRate);
+      }
+      if (struct.isSetQueryRate()) {
+        oprot.writeDouble(struct.queryRate);
+      }
+      if (struct.isSetSplitCreationTime()) {
+        oprot.writeI64(struct.splitCreationTime);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, TabletStats struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(8);
+      if (incoming.get(0)) {
+        struct.extent = new org.apache.accumulo.core.data.thrift.TKeyExtent();
+        struct.extent.read(iprot);
+        struct.setExtentIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.major = new ActionStats();
+        struct.major.read(iprot);
+        struct.setMajorIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.minor = new ActionStats();
+        struct.minor.read(iprot);
+        struct.setMinorIsSet(true);
+      }
+      if (incoming.get(3)) {
+        struct.split = new ActionStats();
+        struct.split.read(iprot);
+        struct.setSplitIsSet(true);
+      }
+      if (incoming.get(4)) {
+        struct.numEntries = iprot.readI64();
+        struct.setNumEntriesIsSet(true);
+      }
+      if (incoming.get(5)) {
+        struct.ingestRate = iprot.readDouble();
+        struct.setIngestRateIsSet(true);
+      }
+      if (incoming.get(6)) {
+        struct.queryRate = iprot.readDouble();
+        struct.setQueryRateIsSet(true);
+      }
+      if (incoming.get(7)) {
+        struct.splitCreationTime = iprot.readI64();
+        struct.setSplitCreationTimeIsSet(true);
+      }
+    }
+  }
+
+}
+

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7bdbfccb/1.5/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TooManyFilesException.java
----------------------------------------------------------------------
diff --git a/1.5/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TooManyFilesException.java b/1.5/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TooManyFilesException.java
new file mode 100644
index 0000000..714959b
--- /dev/null
+++ b/1.5/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TooManyFilesException.java
@@ -0,0 +1,384 @@
+/**
+ * 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.tabletserver.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 TooManyFilesException extends Exception implements org.apache.thrift.TBase<TooManyFilesException, TooManyFilesException._Fields>, java.io.Serializable, Cloneable {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TooManyFilesException");
+
+  private static final org.apache.thrift.protocol.TField EXTENT_FIELD_DESC = new org.apache.thrift.protocol.TField("extent", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new TooManyFilesExceptionStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new TooManyFilesExceptionTupleSchemeFactory());
+  }
+
+  public org.apache.accumulo.core.data.thrift.TKeyExtent extent; // 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 {
+    EXTENT((short)1, "extent");
+
+    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: // EXTENT
+          return EXTENT;
+        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
+  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.EXTENT, new org.apache.thrift.meta_data.FieldMetaData("extent", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.data.thrift.TKeyExtent.class)));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TooManyFilesException.class, metaDataMap);
+  }
+
+  public TooManyFilesException() {
+  }
+
+  public TooManyFilesException(
+    org.apache.accumulo.core.data.thrift.TKeyExtent extent)
+  {
+    this();
+    this.extent = extent;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public TooManyFilesException(TooManyFilesException other) {
+    if (other.isSetExtent()) {
+      this.extent = new org.apache.accumulo.core.data.thrift.TKeyExtent(other.extent);
+    }
+  }
+
+  public TooManyFilesException deepCopy() {
+    return new TooManyFilesException(this);
+  }
+
+  @Override
+  public void clear() {
+    this.extent = null;
+  }
+
+  public org.apache.accumulo.core.data.thrift.TKeyExtent getExtent() {
+    return this.extent;
+  }
+
+  public TooManyFilesException setExtent(org.apache.accumulo.core.data.thrift.TKeyExtent extent) {
+    this.extent = extent;
+    return this;
+  }
+
+  public void unsetExtent() {
+    this.extent = null;
+  }
+
+  /** Returns true if field extent is set (has been assigned a value) and false otherwise */
+  public boolean isSetExtent() {
+    return this.extent != null;
+  }
+
+  public void setExtentIsSet(boolean value) {
+    if (!value) {
+      this.extent = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case EXTENT:
+      if (value == null) {
+        unsetExtent();
+      } else {
+        setExtent((org.apache.accumulo.core.data.thrift.TKeyExtent)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case EXTENT:
+      return getExtent();
+
+    }
+    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 EXTENT:
+      return isSetExtent();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof TooManyFilesException)
+      return this.equals((TooManyFilesException)that);
+    return false;
+  }
+
+  public boolean equals(TooManyFilesException that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_extent = true && this.isSetExtent();
+    boolean that_present_extent = true && that.isSetExtent();
+    if (this_present_extent || that_present_extent) {
+      if (!(this_present_extent && that_present_extent))
+        return false;
+      if (!this.extent.equals(that.extent))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    return 0;
+  }
+
+  public int compareTo(TooManyFilesException other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+    TooManyFilesException typedOther = (TooManyFilesException)other;
+
+    lastComparison = Boolean.valueOf(isSetExtent()).compareTo(typedOther.isSetExtent());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetExtent()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.extent, typedOther.extent);
+      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("TooManyFilesException(");
+    boolean first = true;
+
+    sb.append("extent:");
+    if (this.extent == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.extent);
+    }
+    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 {
+      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 TooManyFilesExceptionStandardSchemeFactory implements SchemeFactory {
+    public TooManyFilesExceptionStandardScheme getScheme() {
+      return new TooManyFilesExceptionStandardScheme();
+    }
+  }
+
+  private static class TooManyFilesExceptionStandardScheme extends StandardScheme<TooManyFilesException> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, TooManyFilesException 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: // EXTENT
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+              struct.extent = new org.apache.accumulo.core.data.thrift.TKeyExtent();
+              struct.extent.read(iprot);
+              struct.setExtentIsSet(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, TooManyFilesException struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.extent != null) {
+        oprot.writeFieldBegin(EXTENT_FIELD_DESC);
+        struct.extent.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class TooManyFilesExceptionTupleSchemeFactory implements SchemeFactory {
+    public TooManyFilesExceptionTupleScheme getScheme() {
+      return new TooManyFilesExceptionTupleScheme();
+    }
+  }
+
+  private static class TooManyFilesExceptionTupleScheme extends TupleScheme<TooManyFilesException> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, TooManyFilesException struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetExtent()) {
+        optionals.set(0);
+      }
+      oprot.writeBitSet(optionals, 1);
+      if (struct.isSetExtent()) {
+        struct.extent.write(oprot);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, TooManyFilesException struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(1);
+      if (incoming.get(0)) {
+        struct.extent = new org.apache.accumulo.core.data.thrift.TKeyExtent();
+        struct.extent.read(iprot);
+        struct.setExtentIsSet(true);
+      }
+    }
+  }
+
+}
+

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7bdbfccb/1.5/core/src/main/java/org/apache/accumulo/core/trace/DistributedTrace.java
----------------------------------------------------------------------
diff --git a/1.5/core/src/main/java/org/apache/accumulo/core/trace/DistributedTrace.java b/1.5/core/src/main/java/org/apache/accumulo/core/trace/DistributedTrace.java
new file mode 100644
index 0000000..a5113bc
--- /dev/null
+++ b/1.5/core/src/main/java/org/apache/accumulo/core/trace/DistributedTrace.java
@@ -0,0 +1,43 @@
+/*
+ * 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.trace;
+
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+
+import org.apache.accumulo.cloudtrace.instrument.Tracer;
+import org.apache.accumulo.core.Constants;
+import org.apache.accumulo.core.client.Instance;
+import org.apache.accumulo.core.zookeeper.ZooUtil;
+import org.apache.accumulo.fate.zookeeper.ZooReader;
+import org.apache.zookeeper.KeeperException;
+
+
+public class DistributedTrace {
+  public static void enable(Instance instance, ZooReader zoo, String application, String address) throws IOException, KeeperException, InterruptedException {
+    String path = ZooUtil.getRoot(instance) + Constants.ZTRACERS;
+    if (address == null) {
+      try {
+        address = InetAddress.getLocalHost().getHostAddress().toString();
+      } catch (UnknownHostException e) {
+        address = "unknown";
+      }
+    }
+    Tracer.getInstance().addReceiver(new ZooTraceClient(zoo, path, address, application, 1000));
+  }
+}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7bdbfccb/1.5/core/src/main/java/org/apache/accumulo/core/trace/InstanceUserPassword.java
----------------------------------------------------------------------
diff --git a/1.5/core/src/main/java/org/apache/accumulo/core/trace/InstanceUserPassword.java b/1.5/core/src/main/java/org/apache/accumulo/core/trace/InstanceUserPassword.java
new file mode 100644
index 0000000..e9cb439
--- /dev/null
+++ b/1.5/core/src/main/java/org/apache/accumulo/core/trace/InstanceUserPassword.java
@@ -0,0 +1,31 @@
+/*
+ * 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.trace;
+
+import org.apache.accumulo.core.client.Instance;
+
+public class InstanceUserPassword {
+  public Instance instance;
+  public String username;
+  public byte[] password;
+  
+  public InstanceUserPassword(Instance instance, String username, String password) {
+    this.instance = instance;
+    this.username = username;
+    this.password = password.getBytes();
+  }
+}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7bdbfccb/1.5/core/src/main/java/org/apache/accumulo/core/trace/SpanTree.java
----------------------------------------------------------------------
diff --git a/1.5/core/src/main/java/org/apache/accumulo/core/trace/SpanTree.java b/1.5/core/src/main/java/org/apache/accumulo/core/trace/SpanTree.java
new file mode 100644
index 0000000..91d152f
--- /dev/null
+++ b/1.5/core/src/main/java/org/apache/accumulo/core/trace/SpanTree.java
@@ -0,0 +1,77 @@
+/*
+ * 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.trace;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.accumulo.cloudtrace.instrument.Span;
+import org.apache.accumulo.cloudtrace.thrift.RemoteSpan;
+
+
+public class SpanTree {
+  final Map<Long,List<Long>> parentChildren = new HashMap<Long,List<Long>>();
+  public final Map<Long,RemoteSpan> nodes = new HashMap<Long,RemoteSpan>();
+  
+  public SpanTree() {}
+  
+  public void addNode(RemoteSpan span) {
+    nodes.put(span.spanId, span);
+    if (parentChildren.get(span.parentId) == null)
+      parentChildren.put(span.parentId, new ArrayList<Long>());
+    parentChildren.get(span.parentId).add(span.spanId);
+  }
+  
+  public Set<Long> visit(SpanTreeVisitor visitor) {
+    Set<Long> visited = new HashSet<Long>();
+    List<Long> root = parentChildren.get(new Long(Span.ROOT_SPAN_ID));
+    if (root == null || root.isEmpty())
+      return visited;
+    RemoteSpan rootSpan = nodes.get(root.iterator().next());
+    if (rootSpan == null)
+      return visited;
+    recurse(0, null, rootSpan, visitor, visited);
+    return visited;
+  }
+  
+  private void recurse(int level, RemoteSpan parent, RemoteSpan node, SpanTreeVisitor visitor, Set<Long> visited) {
+    // improbable case: duplicate spanId in a trace tree: prevent
+    // infinite recursion
+    if (visited.contains(node.spanId))
+      return;
+    visited.add(node.spanId);
+    List<RemoteSpan> children = new ArrayList<RemoteSpan>();
+    List<Long> childrenIds = parentChildren.get(node.spanId);
+    if (childrenIds != null) {
+      for (Long childId : childrenIds) {
+        RemoteSpan child = nodes.get(childId);
+        if (child != null) {
+          children.add(child);
+        }
+      }
+    }
+    children = TraceDump.sortByStart(children);
+    visitor.visit(level, parent, node, children);
+    for (RemoteSpan child : children) {
+      recurse(level + 1, node, child, visitor, visited);
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7bdbfccb/1.5/core/src/main/java/org/apache/accumulo/core/trace/SpanTreeVisitor.java
----------------------------------------------------------------------
diff --git a/1.5/core/src/main/java/org/apache/accumulo/core/trace/SpanTreeVisitor.java b/1.5/core/src/main/java/org/apache/accumulo/core/trace/SpanTreeVisitor.java
new file mode 100644
index 0000000..aab0992
--- /dev/null
+++ b/1.5/core/src/main/java/org/apache/accumulo/core/trace/SpanTreeVisitor.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.trace;
+
+import java.util.Collection;
+
+import org.apache.accumulo.cloudtrace.thrift.RemoteSpan;
+
+
+public interface SpanTreeVisitor {
+  void visit(int level, RemoteSpan parent, RemoteSpan node, Collection<RemoteSpan> children);
+}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7bdbfccb/1.5/core/src/main/java/org/apache/accumulo/core/trace/TraceDump.java
----------------------------------------------------------------------
diff --git a/1.5/core/src/main/java/org/apache/accumulo/core/trace/TraceDump.java b/1.5/core/src/main/java/org/apache/accumulo/core/trace/TraceDump.java
new file mode 100644
index 0000000..c01d505
--- /dev/null
+++ b/1.5/core/src/main/java/org/apache/accumulo/core/trace/TraceDump.java
@@ -0,0 +1,177 @@
+/*
+ * 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.trace;
+
+import static java.lang.Math.min;
+
+import java.io.PrintStream;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Date;
+import java.util.List;
+import java.util.Map.Entry;
+import java.util.Set;
+
+import org.apache.accumulo.cloudtrace.thrift.RemoteSpan;
+import org.apache.accumulo.core.client.Connector;
+import org.apache.accumulo.core.client.Scanner;
+import org.apache.accumulo.core.client.ZooKeeperInstance;
+import org.apache.accumulo.core.data.Key;
+import org.apache.accumulo.core.data.Range;
+import org.apache.accumulo.core.data.Value;
+import org.apache.commons.cli.BasicParser;
+import org.apache.commons.cli.CommandLine;
+import org.apache.commons.cli.Option;
+import org.apache.commons.cli.Options;
+import org.apache.hadoop.io.Text;
+
+
+public class TraceDump {
+  static final long DEFAULT_TIME_IN_MILLIS = 10 * 60 * 1000l;
+  
+  private static final Options OPTIONS = new Options();
+  public static final Option LIST_SPANS = new Option("l", "list", false, "List recent traces.");
+  public static final Option START_TIME = new Option("s", "start", true, "The start time of traces to display");
+  public static final Option END_TIME = new Option("e", "end", true, "The end time of traces to display");
+  public static final Option DUMP_TRACE = new Option("d", "dump", false, "Dump the traces");
+  public static final Option INSTANCE_URL = new Option("i", "instance", true, "URL to point to accumulo.");
+  public static final String TRACE_TABLE = "trace";
+  
+  static {
+    for (Option opt : new Option[] {LIST_SPANS, START_TIME, END_TIME, DUMP_TRACE, INSTANCE_URL}) {
+      OPTIONS.addOption(opt);
+    }
+  }
+  
+  public static void main(String[] args) throws Exception {
+    CommandLine commandLine = new BasicParser().parse(OPTIONS, args);
+    int code = 0;
+    if (code == 0 && commandLine.hasOption(LIST_SPANS.getLongOpt())) {
+      code = listSpans(commandLine);
+    }
+    if (code == 0 && commandLine.hasOption(DUMP_TRACE.getLongOpt())) {
+      code = dumpTrace(commandLine);
+    }
+    System.exit(code);
+  }
+  
+  public static InstanceUserPassword getInstance(CommandLine commandLine) {
+    InstanceUserPassword result = null;
+    String url = commandLine.getOptionValue(INSTANCE_URL.getOpt(), "zoo://root:secret@localhost/test");
+    if (!url.startsWith("zoo://")) {
+      throw new IllegalArgumentException("Instance url must start with zoo://");
+    }
+    String uri = url.substring(6); // root:secret@localhost/test
+    String parts[] = uri.split("@", 2); // root:secret, localhost/test
+    String userPass = parts[0];
+    String zooInstance = parts[1];
+    parts = userPass.split(":", 2); // root, secret
+    String user = parts[0];
+    String password = parts[1];
+    parts = zooInstance.split("/", 2); // localhost, test
+    String zoo = parts[0];
+    String instance = parts[1];
+    result = new InstanceUserPassword(new ZooKeeperInstance(instance, zoo), user, password);
+    return result;
+  }
+  
+  public static List<RemoteSpan> sortByStart(Collection<RemoteSpan> spans) {
+    List<RemoteSpan> spanList = new ArrayList<RemoteSpan>(spans);
+    Collections.sort(spanList, new Comparator<RemoteSpan>() {
+      @Override
+      public int compare(RemoteSpan o1, RemoteSpan o2) {
+        return (int) (o1.start - o2.start);
+      }
+    });
+    return spanList;
+  }
+  
+  private static int listSpans(CommandLine commandLine) throws Exception {
+    PrintStream out = System.out;
+    long endTime = System.currentTimeMillis();
+    long startTime = endTime - DEFAULT_TIME_IN_MILLIS;
+    InstanceUserPassword info = getInstance(commandLine);
+    Connector conn = info.instance.getConnector(info.username, info.password);
+    Scanner scanner = conn.createScanner(TRACE_TABLE, conn.securityOperations().getUserAuthorizations(info.username));
+    Range range = new Range(new Text("start:" + Long.toHexString(startTime)), new Text("start:" + Long.toHexString(endTime)));
+    scanner.setRange(range);
+    out.println("Trace            Day/Time                 (ms)  Start");
+    for (Entry<Key,Value> entry : scanner) {
+      RemoteSpan span = TraceFormatter.getRemoteSpan(entry);
+      out.println(String.format("%016x %s %5d %s", span.traceId, TraceFormatter.formatDate(new Date(span.getStart())), span.stop - span.start, span.description));
+    }
+    return 0;
+  }
+  
+  public interface Printer {
+    void print(String line);
+  }
+  
+  private static int dumpTrace(CommandLine commandLine) throws Exception {
+    final PrintStream out = System.out;
+    InstanceUserPassword info = getInstance(commandLine);
+    Connector conn = info.instance.getConnector(info.username, info.password);
+    
+    int count = 0;
+    for (Object arg : commandLine.getArgList()) {
+      Scanner scanner = conn.createScanner(TRACE_TABLE, conn.securityOperations().getUserAuthorizations(info.username));
+      Range range = new Range(new Text(arg.toString()));
+      scanner.setRange(range);
+      count = printTrace(scanner, new Printer() {
+        @Override
+        public void print(String line) {
+          out.println(line);
+        }
+      });
+    }
+    return count > 0 ? 0 : 1;
+  }
+  
+  public static int printTrace(Scanner scanner, final Printer out) {
+    int count = 0;
+    SpanTree tree = new SpanTree();
+    long start = Long.MAX_VALUE;
+    for (Entry<Key,Value> entry : scanner) {
+      RemoteSpan span = TraceFormatter.getRemoteSpan(entry);
+      tree.addNode(span);
+      start = min(start, span.start);
+      if (span.parentId <= 0)
+        count++;
+    }
+    out.print(String.format("Trace started at %s", TraceFormatter.formatDate(new Date(start))));
+    out.print("Time  Start  Service@Location       Name");
+    
+    final long finalStart = start;
+    Set<Long> visited = tree.visit(new SpanTreeVisitor() {
+      @Override
+      public void visit(int level, RemoteSpan parent, RemoteSpan node, Collection<RemoteSpan> children) {
+        String fmt = "%5d+%-5d %" + (level * 2 + 1) + "s%s@%s %s";
+        out.print(String.format(fmt, node.stop - node.start, node.start - finalStart, "", node.svc, node.sender, node.description));
+      }
+    });
+    tree.nodes.keySet().removeAll(visited);
+    if (!tree.nodes.isEmpty()) {
+      out.print("Warning: the following spans are not rooted!");
+      for (RemoteSpan span : sortByStart(tree.nodes.values())) {
+        out.print(String.format("%s %s %s", Long.toHexString(span.spanId), Long.toHexString(span.parentId), span.description));
+      }
+    }
+    return count;
+  }
+}


Mime
View raw message