accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1437135 [5/5] - in /accumulo/trunk: core/src/main/java/org/apache/accumulo/core/client/admin/ core/src/main/java/org/apache/accumulo/core/data/ core/src/test/java/org/apache/accumulo/core/client/mapreduce/ proxy/examples/python/ proxy/src/...
Date Tue, 22 Jan 2013 20:05:24 GMT
Added: accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PKeyExtent.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PKeyExtent.java?rev=1437135&view=auto
==============================================================================
--- accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PKeyExtent.java (added)
+++ accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PKeyExtent.java Tue Jan 22 20:05:24 2013
@@ -0,0 +1,635 @@
+/*
+ * 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.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.accumulo.proxy.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 org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+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 PKeyExtent implements org.apache.thrift.TBase<PKeyExtent, PKeyExtent._Fields>, java.io.Serializable, Cloneable {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PKeyExtent");
+
+  private static final org.apache.thrift.protocol.TField TABLE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("tableId", org.apache.thrift.protocol.TType.STRING, (short)1);
+  private static final org.apache.thrift.protocol.TField END_ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("endRow", org.apache.thrift.protocol.TType.STRING, (short)2);
+  private static final org.apache.thrift.protocol.TField PREV_END_ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("prevEndRow", org.apache.thrift.protocol.TType.STRING, (short)3);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new PKeyExtentStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new PKeyExtentTupleSchemeFactory());
+  }
+
+  public ByteBuffer tableId; // required
+  public ByteBuffer endRow; // required
+  public ByteBuffer prevEndRow; // required
+
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+  @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+    TABLE_ID((short)1, "tableId"),
+    END_ROW((short)2, "endRow"),
+    PREV_END_ROW((short)3, "prevEndRow");
+
+    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: // TABLE_ID
+          return TABLE_ID;
+        case 2: // END_ROW
+          return END_ROW;
+        case 3: // PREV_END_ROW
+          return PREV_END_ROW;
+        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.TABLE_ID, new org.apache.thrift.meta_data.FieldMetaData("tableId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , true)));
+    tmpMap.put(_Fields.END_ROW, new org.apache.thrift.meta_data.FieldMetaData("endRow", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , true)));
+    tmpMap.put(_Fields.PREV_END_ROW, new org.apache.thrift.meta_data.FieldMetaData("prevEndRow", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , true)));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PKeyExtent.class, metaDataMap);
+  }
+
+  public PKeyExtent() {
+  }
+
+  public PKeyExtent(
+    ByteBuffer tableId,
+    ByteBuffer endRow,
+    ByteBuffer prevEndRow)
+  {
+    this();
+    this.tableId = tableId;
+    this.endRow = endRow;
+    this.prevEndRow = prevEndRow;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public PKeyExtent(PKeyExtent other) {
+    if (other.isSetTableId()) {
+      this.tableId = org.apache.thrift.TBaseHelper.copyBinary(other.tableId);
+;
+    }
+    if (other.isSetEndRow()) {
+      this.endRow = org.apache.thrift.TBaseHelper.copyBinary(other.endRow);
+;
+    }
+    if (other.isSetPrevEndRow()) {
+      this.prevEndRow = org.apache.thrift.TBaseHelper.copyBinary(other.prevEndRow);
+;
+    }
+  }
+
+  public PKeyExtent deepCopy() {
+    return new PKeyExtent(this);
+  }
+
+  @Override
+  public void clear() {
+    this.tableId = null;
+    this.endRow = null;
+    this.prevEndRow = null;
+  }
+
+  public byte[] getTableId() {
+    setTableId(org.apache.thrift.TBaseHelper.rightSize(tableId));
+    return tableId == null ? null : tableId.array();
+  }
+
+  public ByteBuffer bufferForTableId() {
+    return tableId;
+  }
+
+  public PKeyExtent setTableId(byte[] tableId) {
+    setTableId(tableId == null ? (ByteBuffer)null : ByteBuffer.wrap(tableId));
+    return this;
+  }
+
+  public PKeyExtent setTableId(ByteBuffer tableId) {
+    this.tableId = tableId;
+    return this;
+  }
+
+  public void unsetTableId() {
+    this.tableId = null;
+  }
+
+  /** Returns true if field tableId is set (has been assigned a value) and false otherwise */
+  public boolean isSetTableId() {
+    return this.tableId != null;
+  }
+
+  public void setTableIdIsSet(boolean value) {
+    if (!value) {
+      this.tableId = null;
+    }
+  }
+
+  public byte[] getEndRow() {
+    setEndRow(org.apache.thrift.TBaseHelper.rightSize(endRow));
+    return endRow == null ? null : endRow.array();
+  }
+
+  public ByteBuffer bufferForEndRow() {
+    return endRow;
+  }
+
+  public PKeyExtent setEndRow(byte[] endRow) {
+    setEndRow(endRow == null ? (ByteBuffer)null : ByteBuffer.wrap(endRow));
+    return this;
+  }
+
+  public PKeyExtent setEndRow(ByteBuffer endRow) {
+    this.endRow = endRow;
+    return this;
+  }
+
+  public void unsetEndRow() {
+    this.endRow = null;
+  }
+
+  /** Returns true if field endRow is set (has been assigned a value) and false otherwise */
+  public boolean isSetEndRow() {
+    return this.endRow != null;
+  }
+
+  public void setEndRowIsSet(boolean value) {
+    if (!value) {
+      this.endRow = null;
+    }
+  }
+
+  public byte[] getPrevEndRow() {
+    setPrevEndRow(org.apache.thrift.TBaseHelper.rightSize(prevEndRow));
+    return prevEndRow == null ? null : prevEndRow.array();
+  }
+
+  public ByteBuffer bufferForPrevEndRow() {
+    return prevEndRow;
+  }
+
+  public PKeyExtent setPrevEndRow(byte[] prevEndRow) {
+    setPrevEndRow(prevEndRow == null ? (ByteBuffer)null : ByteBuffer.wrap(prevEndRow));
+    return this;
+  }
+
+  public PKeyExtent setPrevEndRow(ByteBuffer prevEndRow) {
+    this.prevEndRow = prevEndRow;
+    return this;
+  }
+
+  public void unsetPrevEndRow() {
+    this.prevEndRow = null;
+  }
+
+  /** Returns true if field prevEndRow is set (has been assigned a value) and false otherwise */
+  public boolean isSetPrevEndRow() {
+    return this.prevEndRow != null;
+  }
+
+  public void setPrevEndRowIsSet(boolean value) {
+    if (!value) {
+      this.prevEndRow = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case TABLE_ID:
+      if (value == null) {
+        unsetTableId();
+      } else {
+        setTableId((ByteBuffer)value);
+      }
+      break;
+
+    case END_ROW:
+      if (value == null) {
+        unsetEndRow();
+      } else {
+        setEndRow((ByteBuffer)value);
+      }
+      break;
+
+    case PREV_END_ROW:
+      if (value == null) {
+        unsetPrevEndRow();
+      } else {
+        setPrevEndRow((ByteBuffer)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case TABLE_ID:
+      return getTableId();
+
+    case END_ROW:
+      return getEndRow();
+
+    case PREV_END_ROW:
+      return getPrevEndRow();
+
+    }
+    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 TABLE_ID:
+      return isSetTableId();
+    case END_ROW:
+      return isSetEndRow();
+    case PREV_END_ROW:
+      return isSetPrevEndRow();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof PKeyExtent)
+      return this.equals((PKeyExtent)that);
+    return false;
+  }
+
+  public boolean equals(PKeyExtent that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_tableId = true && this.isSetTableId();
+    boolean that_present_tableId = true && that.isSetTableId();
+    if (this_present_tableId || that_present_tableId) {
+      if (!(this_present_tableId && that_present_tableId))
+        return false;
+      if (!this.tableId.equals(that.tableId))
+        return false;
+    }
+
+    boolean this_present_endRow = true && this.isSetEndRow();
+    boolean that_present_endRow = true && that.isSetEndRow();
+    if (this_present_endRow || that_present_endRow) {
+      if (!(this_present_endRow && that_present_endRow))
+        return false;
+      if (!this.endRow.equals(that.endRow))
+        return false;
+    }
+
+    boolean this_present_prevEndRow = true && this.isSetPrevEndRow();
+    boolean that_present_prevEndRow = true && that.isSetPrevEndRow();
+    if (this_present_prevEndRow || that_present_prevEndRow) {
+      if (!(this_present_prevEndRow && that_present_prevEndRow))
+        return false;
+      if (!this.prevEndRow.equals(that.prevEndRow))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    return 0;
+  }
+
+  public int compareTo(PKeyExtent other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+    PKeyExtent typedOther = (PKeyExtent)other;
+
+    lastComparison = Boolean.valueOf(isSetTableId()).compareTo(typedOther.isSetTableId());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetTableId()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableId, typedOther.tableId);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetEndRow()).compareTo(typedOther.isSetEndRow());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetEndRow()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endRow, typedOther.endRow);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetPrevEndRow()).compareTo(typedOther.isSetPrevEndRow());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetPrevEndRow()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prevEndRow, typedOther.prevEndRow);
+      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("PKeyExtent(");
+    boolean first = true;
+
+    sb.append("tableId:");
+    if (this.tableId == null) {
+      sb.append("null");
+    } else {
+      org.apache.thrift.TBaseHelper.toString(this.tableId, sb);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("endRow:");
+    if (this.endRow == null) {
+      sb.append("null");
+    } else {
+      org.apache.thrift.TBaseHelper.toString(this.endRow, sb);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("prevEndRow:");
+    if (this.prevEndRow == null) {
+      sb.append("null");
+    } else {
+      org.apache.thrift.TBaseHelper.toString(this.prevEndRow, sb);
+    }
+    first = false;
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws org.apache.thrift.TException {
+    // check for required fields
+    // check for sub-struct validity
+  }
+
+  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 PKeyExtentStandardSchemeFactory implements SchemeFactory {
+    public PKeyExtentStandardScheme getScheme() {
+      return new PKeyExtentStandardScheme();
+    }
+  }
+
+  private static class PKeyExtentStandardScheme extends StandardScheme<PKeyExtent> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, PKeyExtent 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: // TABLE_ID
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.tableId = iprot.readBinary();
+              struct.setTableIdIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // END_ROW
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.endRow = iprot.readBinary();
+              struct.setEndRowIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // PREV_END_ROW
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.prevEndRow = iprot.readBinary();
+              struct.setPrevEndRowIsSet(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, PKeyExtent struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.tableId != null) {
+        oprot.writeFieldBegin(TABLE_ID_FIELD_DESC);
+        oprot.writeBinary(struct.tableId);
+        oprot.writeFieldEnd();
+      }
+      if (struct.endRow != null) {
+        oprot.writeFieldBegin(END_ROW_FIELD_DESC);
+        oprot.writeBinary(struct.endRow);
+        oprot.writeFieldEnd();
+      }
+      if (struct.prevEndRow != null) {
+        oprot.writeFieldBegin(PREV_END_ROW_FIELD_DESC);
+        oprot.writeBinary(struct.prevEndRow);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class PKeyExtentTupleSchemeFactory implements SchemeFactory {
+    public PKeyExtentTupleScheme getScheme() {
+      return new PKeyExtentTupleScheme();
+    }
+  }
+
+  private static class PKeyExtentTupleScheme extends TupleScheme<PKeyExtent> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, PKeyExtent struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetTableId()) {
+        optionals.set(0);
+      }
+      if (struct.isSetEndRow()) {
+        optionals.set(1);
+      }
+      if (struct.isSetPrevEndRow()) {
+        optionals.set(2);
+      }
+      oprot.writeBitSet(optionals, 3);
+      if (struct.isSetTableId()) {
+        oprot.writeBinary(struct.tableId);
+      }
+      if (struct.isSetEndRow()) {
+        oprot.writeBinary(struct.endRow);
+      }
+      if (struct.isSetPrevEndRow()) {
+        oprot.writeBinary(struct.prevEndRow);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, PKeyExtent struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(3);
+      if (incoming.get(0)) {
+        struct.tableId = iprot.readBinary();
+        struct.setTableIdIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.endRow = iprot.readBinary();
+        struct.setEndRowIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.prevEndRow = iprot.readBinary();
+        struct.setPrevEndRowIsSet(true);
+      }
+    }
+  }
+
+}
+

Propchange: accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PKeyExtent.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PPartialKey.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PPartialKey.java?rev=1437135&view=auto
==============================================================================
--- accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PPartialKey.java (added)
+++ accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PPartialKey.java Tue Jan 22 20:05:24 2013
@@ -0,0 +1,73 @@
+/*
+ * 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.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.accumulo.proxy.thrift;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+@SuppressWarnings("all") public enum PPartialKey implements org.apache.thrift.TEnum {
+  ROW(0),
+  ROW_COLFAM(1),
+  ROW_COLFAM_COLQUAL(2),
+  ROW_COLFAM_COLQUAL_COLVIS(3),
+  ROW_COLFAM_COLQUAL_COLVIS_TIME(4),
+  ROW_COLFAM_COLQUAL_COLVIS_TIME_DEL(5);
+
+  private final int value;
+
+  private PPartialKey(int value) {
+    this.value = value;
+  }
+
+  /**
+   * Get the integer value of this enum value, as defined in the Thrift IDL.
+   */
+  public int getValue() {
+    return value;
+  }
+
+  /**
+   * Find a the enum type by its integer value, as defined in the Thrift IDL.
+   * @return null if the value is not found.
+   */
+  public static PPartialKey findByValue(int value) { 
+    switch (value) {
+      case 0:
+        return ROW;
+      case 1:
+        return ROW_COLFAM;
+      case 2:
+        return ROW_COLFAM_COLQUAL;
+      case 3:
+        return ROW_COLFAM_COLQUAL_COLVIS;
+      case 4:
+        return ROW_COLFAM_COLQUAL_COLVIS_TIME;
+      case 5:
+        return ROW_COLFAM_COLQUAL_COLVIS_TIME_DEL;
+      default:
+        return null;
+    }
+  }
+}

Propchange: accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PPartialKey.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PRange.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PRange.java?rev=1437135&r1=1437134&r2=1437135&view=diff
==============================================================================
--- accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PRange.java (original)
+++ accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PRange.java Tue Jan 22 20:05:24 2013
@@ -50,7 +50,9 @@ import org.slf4j.LoggerFactory;
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PRange");
 
   private static final org.apache.thrift.protocol.TField START_FIELD_DESC = new org.apache.thrift.protocol.TField("start", org.apache.thrift.protocol.TType.STRUCT, (short)1);
-  private static final org.apache.thrift.protocol.TField STOP_FIELD_DESC = new org.apache.thrift.protocol.TField("stop", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+  private static final org.apache.thrift.protocol.TField START_INCLUSIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("startInclusive", org.apache.thrift.protocol.TType.BOOL, (short)2);
+  private static final org.apache.thrift.protocol.TField STOP_FIELD_DESC = new org.apache.thrift.protocol.TField("stop", org.apache.thrift.protocol.TType.STRUCT, (short)3);
+  private static final org.apache.thrift.protocol.TField STOP_INCLUSIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("stopInclusive", org.apache.thrift.protocol.TType.BOOL, (short)4);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
@@ -59,12 +61,16 @@ import org.slf4j.LoggerFactory;
   }
 
   public PKey start; // required
+  public boolean startInclusive; // required
   public PKey stop; // required
+  public boolean stopInclusive; // required
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
     START((short)1, "start"),
-    STOP((short)2, "stop");
+    START_INCLUSIVE((short)2, "startInclusive"),
+    STOP((short)3, "stop"),
+    STOP_INCLUSIVE((short)4, "stopInclusive");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -81,8 +87,12 @@ import org.slf4j.LoggerFactory;
       switch(fieldId) {
         case 1: // START
           return START;
-        case 2: // STOP
+        case 2: // START_INCLUSIVE
+          return START_INCLUSIVE;
+        case 3: // STOP
           return STOP;
+        case 4: // STOP_INCLUSIVE
+          return STOP_INCLUSIVE;
         default:
           return null;
       }
@@ -123,13 +133,20 @@ import org.slf4j.LoggerFactory;
   }
 
   // isset id assignments
+  private static final int __STARTINCLUSIVE_ISSET_ID = 0;
+  private static final int __STOPINCLUSIVE_ISSET_ID = 1;
+  private byte __isset_bitfield = 0;
   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.START, new org.apache.thrift.meta_data.FieldMetaData("start", org.apache.thrift.TFieldRequirementType.DEFAULT, 
         new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PKey.class)));
+    tmpMap.put(_Fields.START_INCLUSIVE, new org.apache.thrift.meta_data.FieldMetaData("startInclusive", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
     tmpMap.put(_Fields.STOP, new org.apache.thrift.meta_data.FieldMetaData("stop", org.apache.thrift.TFieldRequirementType.DEFAULT, 
         new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PKey.class)));
+    tmpMap.put(_Fields.STOP_INCLUSIVE, new org.apache.thrift.meta_data.FieldMetaData("stopInclusive", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PRange.class, metaDataMap);
   }
@@ -139,23 +156,32 @@ import org.slf4j.LoggerFactory;
 
   public PRange(
     PKey start,
-    PKey stop)
+    boolean startInclusive,
+    PKey stop,
+    boolean stopInclusive)
   {
     this();
     this.start = start;
+    this.startInclusive = startInclusive;
+    setStartInclusiveIsSet(true);
     this.stop = stop;
+    this.stopInclusive = stopInclusive;
+    setStopInclusiveIsSet(true);
   }
 
   /**
    * Performs a deep copy on <i>other</i>.
    */
   public PRange(PRange other) {
+    __isset_bitfield = other.__isset_bitfield;
     if (other.isSetStart()) {
       this.start = new PKey(other.start);
     }
+    this.startInclusive = other.startInclusive;
     if (other.isSetStop()) {
       this.stop = new PKey(other.stop);
     }
+    this.stopInclusive = other.stopInclusive;
   }
 
   public PRange deepCopy() {
@@ -165,7 +191,11 @@ import org.slf4j.LoggerFactory;
   @Override
   public void clear() {
     this.start = null;
+    setStartInclusiveIsSet(false);
+    this.startInclusive = false;
     this.stop = null;
+    setStopInclusiveIsSet(false);
+    this.stopInclusive = false;
   }
 
   public PKey getStart() {
@@ -192,6 +222,29 @@ import org.slf4j.LoggerFactory;
     }
   }
 
+  public boolean isStartInclusive() {
+    return this.startInclusive;
+  }
+
+  public PRange setStartInclusive(boolean startInclusive) {
+    this.startInclusive = startInclusive;
+    setStartInclusiveIsSet(true);
+    return this;
+  }
+
+  public void unsetStartInclusive() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STARTINCLUSIVE_ISSET_ID);
+  }
+
+  /** Returns true if field startInclusive is set (has been assigned a value) and false otherwise */
+  public boolean isSetStartInclusive() {
+    return EncodingUtils.testBit(__isset_bitfield, __STARTINCLUSIVE_ISSET_ID);
+  }
+
+  public void setStartInclusiveIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STARTINCLUSIVE_ISSET_ID, value);
+  }
+
   public PKey getStop() {
     return this.stop;
   }
@@ -216,6 +269,29 @@ import org.slf4j.LoggerFactory;
     }
   }
 
+  public boolean isStopInclusive() {
+    return this.stopInclusive;
+  }
+
+  public PRange setStopInclusive(boolean stopInclusive) {
+    this.stopInclusive = stopInclusive;
+    setStopInclusiveIsSet(true);
+    return this;
+  }
+
+  public void unsetStopInclusive() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STOPINCLUSIVE_ISSET_ID);
+  }
+
+  /** Returns true if field stopInclusive is set (has been assigned a value) and false otherwise */
+  public boolean isSetStopInclusive() {
+    return EncodingUtils.testBit(__isset_bitfield, __STOPINCLUSIVE_ISSET_ID);
+  }
+
+  public void setStopInclusiveIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STOPINCLUSIVE_ISSET_ID, value);
+  }
+
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
     case START:
@@ -226,6 +302,14 @@ import org.slf4j.LoggerFactory;
       }
       break;
 
+    case START_INCLUSIVE:
+      if (value == null) {
+        unsetStartInclusive();
+      } else {
+        setStartInclusive((Boolean)value);
+      }
+      break;
+
     case STOP:
       if (value == null) {
         unsetStop();
@@ -234,6 +318,14 @@ import org.slf4j.LoggerFactory;
       }
       break;
 
+    case STOP_INCLUSIVE:
+      if (value == null) {
+        unsetStopInclusive();
+      } else {
+        setStopInclusive((Boolean)value);
+      }
+      break;
+
     }
   }
 
@@ -242,9 +334,15 @@ import org.slf4j.LoggerFactory;
     case START:
       return getStart();
 
+    case START_INCLUSIVE:
+      return Boolean.valueOf(isStartInclusive());
+
     case STOP:
       return getStop();
 
+    case STOP_INCLUSIVE:
+      return Boolean.valueOf(isStopInclusive());
+
     }
     throw new IllegalStateException();
   }
@@ -258,8 +356,12 @@ import org.slf4j.LoggerFactory;
     switch (field) {
     case START:
       return isSetStart();
+    case START_INCLUSIVE:
+      return isSetStartInclusive();
     case STOP:
       return isSetStop();
+    case STOP_INCLUSIVE:
+      return isSetStopInclusive();
     }
     throw new IllegalStateException();
   }
@@ -286,6 +388,15 @@ import org.slf4j.LoggerFactory;
         return false;
     }
 
+    boolean this_present_startInclusive = true;
+    boolean that_present_startInclusive = true;
+    if (this_present_startInclusive || that_present_startInclusive) {
+      if (!(this_present_startInclusive && that_present_startInclusive))
+        return false;
+      if (this.startInclusive != that.startInclusive)
+        return false;
+    }
+
     boolean this_present_stop = true && this.isSetStop();
     boolean that_present_stop = true && that.isSetStop();
     if (this_present_stop || that_present_stop) {
@@ -295,6 +406,15 @@ import org.slf4j.LoggerFactory;
         return false;
     }
 
+    boolean this_present_stopInclusive = true;
+    boolean that_present_stopInclusive = true;
+    if (this_present_stopInclusive || that_present_stopInclusive) {
+      if (!(this_present_stopInclusive && that_present_stopInclusive))
+        return false;
+      if (this.stopInclusive != that.stopInclusive)
+        return false;
+    }
+
     return true;
   }
 
@@ -321,6 +441,16 @@ import org.slf4j.LoggerFactory;
         return lastComparison;
       }
     }
+    lastComparison = Boolean.valueOf(isSetStartInclusive()).compareTo(typedOther.isSetStartInclusive());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetStartInclusive()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startInclusive, typedOther.startInclusive);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
     lastComparison = Boolean.valueOf(isSetStop()).compareTo(typedOther.isSetStop());
     if (lastComparison != 0) {
       return lastComparison;
@@ -331,6 +461,16 @@ import org.slf4j.LoggerFactory;
         return lastComparison;
       }
     }
+    lastComparison = Boolean.valueOf(isSetStopInclusive()).compareTo(typedOther.isSetStopInclusive());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetStopInclusive()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stopInclusive, typedOther.stopInclusive);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
     return 0;
   }
 
@@ -359,6 +499,10 @@ import org.slf4j.LoggerFactory;
     }
     first = false;
     if (!first) sb.append(", ");
+    sb.append("startInclusive:");
+    sb.append(this.startInclusive);
+    first = false;
+    if (!first) sb.append(", ");
     sb.append("stop:");
     if (this.stop == null) {
       sb.append("null");
@@ -366,6 +510,10 @@ import org.slf4j.LoggerFactory;
       sb.append(this.stop);
     }
     first = false;
+    if (!first) sb.append(", ");
+    sb.append("stopInclusive:");
+    sb.append(this.stopInclusive);
+    first = false;
     sb.append(")");
     return sb.toString();
   }
@@ -391,6 +539,8 @@ import org.slf4j.LoggerFactory;
 
   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_bitfield = 0;
       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);
@@ -424,7 +574,15 @@ import org.slf4j.LoggerFactory;
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 2: // STOP
+          case 2: // START_INCLUSIVE
+            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+              struct.startInclusive = iprot.readBool();
+              struct.setStartInclusiveIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // STOP
             if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
               struct.stop = new PKey();
               struct.stop.read(iprot);
@@ -433,6 +591,14 @@ import org.slf4j.LoggerFactory;
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
+          case 4: // STOP_INCLUSIVE
+            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+              struct.stopInclusive = iprot.readBool();
+              struct.setStopInclusiveIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
           default:
             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
@@ -453,11 +619,17 @@ import org.slf4j.LoggerFactory;
         struct.start.write(oprot);
         oprot.writeFieldEnd();
       }
+      oprot.writeFieldBegin(START_INCLUSIVE_FIELD_DESC);
+      oprot.writeBool(struct.startInclusive);
+      oprot.writeFieldEnd();
       if (struct.stop != null) {
         oprot.writeFieldBegin(STOP_FIELD_DESC);
         struct.stop.write(oprot);
         oprot.writeFieldEnd();
       }
+      oprot.writeFieldBegin(STOP_INCLUSIVE_FIELD_DESC);
+      oprot.writeBool(struct.stopInclusive);
+      oprot.writeFieldEnd();
       oprot.writeFieldStop();
       oprot.writeStructEnd();
     }
@@ -479,32 +651,52 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetStart()) {
         optionals.set(0);
       }
-      if (struct.isSetStop()) {
+      if (struct.isSetStartInclusive()) {
         optionals.set(1);
       }
-      oprot.writeBitSet(optionals, 2);
+      if (struct.isSetStop()) {
+        optionals.set(2);
+      }
+      if (struct.isSetStopInclusive()) {
+        optionals.set(3);
+      }
+      oprot.writeBitSet(optionals, 4);
       if (struct.isSetStart()) {
         struct.start.write(oprot);
       }
+      if (struct.isSetStartInclusive()) {
+        oprot.writeBool(struct.startInclusive);
+      }
       if (struct.isSetStop()) {
         struct.stop.write(oprot);
       }
+      if (struct.isSetStopInclusive()) {
+        oprot.writeBool(struct.stopInclusive);
+      }
     }
 
     @Override
     public void read(org.apache.thrift.protocol.TProtocol prot, PRange struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
-      BitSet incoming = iprot.readBitSet(2);
+      BitSet incoming = iprot.readBitSet(4);
       if (incoming.get(0)) {
         struct.start = new PKey();
         struct.start.read(iprot);
         struct.setStartIsSet(true);
       }
       if (incoming.get(1)) {
+        struct.startInclusive = iprot.readBool();
+        struct.setStartInclusiveIsSet(true);
+      }
+      if (incoming.get(2)) {
         struct.stop = new PKey();
         struct.stop.read(iprot);
         struct.setStopIsSet(true);
       }
+      if (incoming.get(3)) {
+        struct.stopInclusive = iprot.readBool();
+        struct.setStopInclusiveIsSet(true);
+      }
     }
   }
 

Added: accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PScanState.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PScanState.java?rev=1437135&view=auto
==============================================================================
--- accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PScanState.java (added)
+++ accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PScanState.java Tue Jan 22 20:05:24 2013
@@ -0,0 +1,64 @@
+/*
+ * 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.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.accumulo.proxy.thrift;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+@SuppressWarnings("all") public enum PScanState implements org.apache.thrift.TEnum {
+  IDLE(0),
+  RUNNING(1),
+  QUEUED(2);
+
+  private final int value;
+
+  private PScanState(int value) {
+    this.value = value;
+  }
+
+  /**
+   * Get the integer value of this enum value, as defined in the Thrift IDL.
+   */
+  public int getValue() {
+    return value;
+  }
+
+  /**
+   * Find a the enum type by its integer value, as defined in the Thrift IDL.
+   * @return null if the value is not found.
+   */
+  public static PScanState findByValue(int value) { 
+    switch (value) {
+      case 0:
+        return IDLE;
+      case 1:
+        return RUNNING;
+      case 2:
+        return QUEUED;
+      default:
+        return null;
+    }
+  }
+}

Propchange: accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PScanState.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PScanType.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PScanType.java?rev=1437135&view=auto
==============================================================================
--- accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PScanType.java (added)
+++ accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PScanType.java Tue Jan 22 20:05:24 2013
@@ -0,0 +1,61 @@
+/*
+ * 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.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.accumulo.proxy.thrift;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+@SuppressWarnings("all") public enum PScanType implements org.apache.thrift.TEnum {
+  SINGLE(0),
+  BATCH(1);
+
+  private final int value;
+
+  private PScanType(int value) {
+    this.value = value;
+  }
+
+  /**
+   * Get the integer value of this enum value, as defined in the Thrift IDL.
+   */
+  public int getValue() {
+    return value;
+  }
+
+  /**
+   * Find a the enum type by its integer value, as defined in the Thrift IDL.
+   * @return null if the value is not found.
+   */
+  public static PScanType findByValue(int value) { 
+    switch (value) {
+      case 0:
+        return SINGLE;
+      case 1:
+        return BATCH;
+      default:
+        return null;
+    }
+  }
+}

Propchange: accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PScanType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: accumulo/trunk/proxy/src/main/thrift/proxy.thrift
URL: http://svn.apache.org/viewvc/accumulo/trunk/proxy/src/main/thrift/proxy.thrift?rev=1437135&r1=1437134&r2=1437135&view=diff
==============================================================================
--- accumulo/trunk/proxy/src/main/thrift/proxy.thrift (original)
+++ accumulo/trunk/proxy/src/main/thrift/proxy.thrift Tue Jan 22 20:05:24 2013
@@ -24,6 +24,15 @@ struct PKey {
 	5:optional i64 timestamp
 }
 
+enum PPartialKey {
+  ROW,
+  ROW_COLFAM,
+  ROW_COLFAM_COLQUAL,
+  ROW_COLFAM_COLQUAL_COLVIS,
+  ROW_COLFAM_COLQUAL_COLVIS_TIME,
+  ROW_COLFAM_COLQUAL_COLVIS_TIME_DEL
+}
+
 struct PColumnUpdate {
 	1:binary colFamily;
 	2:binary colQualifier;
@@ -43,14 +52,11 @@ struct PScanResult {
 	2:bool more
 }
 
-// Ranges by default assume that start is inclusive and that stop is exclusive.
-// To make an inclusive stop value, (resp. exclusive start value), use the successor of the key
-// desired. To obtain a successor key, append a binary 0 to the most-specific value that is defined in the key.
-// (See the method org.apache.accumulo.core.data.Key.followingKey(PartialKey part) )
-
 struct PRange {
         1:PKey start,
-        2:PKey stop,
+	2:bool startInclusive
+        3:PKey stop,
+	4:bool stopInclusive
 }
 
 struct UserPass
@@ -91,6 +97,76 @@ enum PSystemPermission {
   SYSTEM = 7,
 }
 
+enum PScanType {
+    SINGLE,
+    BATCH
+}
+
+enum PScanState {
+    IDLE,
+    RUNNING,
+    QUEUED
+}
+
+struct PKeyExtent {
+  1:binary tableId,
+  2:binary endRow,
+  3:binary prevEndRow
+}
+
+struct PColumn {
+  1:binary colFamily;
+  2:binary colQualifier;
+  3:binary colVisibility;
+}
+
+struct PActiveScan {
+    1:string client
+    2:string user
+    3:string tableId
+    4:i64 age
+    5:i64 idleTime
+    6:PScanType type
+    7:PScanState state
+    8:PKeyExtent extent
+    9:list<PColumn> columns
+    10:list<PIteratorSetting> iterators
+    11:list<binary> authorizations
+}
+
+enum PCompactionType {
+   MINOR,
+   MERGE,
+   MAJOR,
+   FULL
+}
+
+enum PCompactionReason {
+   USER,
+   SYSTEM,
+   CHOP,
+   IDLE,
+   CLOSE
+}
+
+struct PActiveCompaction {
+    1:PKeyExtent extent
+    2:i64 age
+    3:list<string> inputFiles
+    4:string outputFile
+    5:PCompactionType type
+    6:PCompactionReason reason
+    7:string localityGroup
+    8:i64 entriesRead
+    9:i64 entriesWritten
+    10:list<PIteratorSetting> iterators;
+}
+
+enum PIteratorScope {
+  MINC,
+  MAJC,
+  SCAN
+}
 
 exception NoMoreEntriesException
 {
@@ -127,21 +203,21 @@ service AccumuloProxy
   //table operations
 
   i32 tableOperations_addConstraint (1:UserPass userpass, 2:string tableName, 3:string constraintClassName) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2, 3:TableNotFoundException ouch3);
-  void tableOperations_addSplits (1:UserPass userpass, 2:string tableName, 3:set<string> splits) throws (1:TableNotFoundException ouch1, 2:AccumuloException ouch2, 3:AccumuloSecurityException ouch3);
+  void tableOperations_addSplits (1:UserPass userpass, 2:string tableName, 3:set<binary> splits) throws (1:TableNotFoundException ouch1, 2:AccumuloException ouch2, 3:AccumuloSecurityException ouch3);
   void tableOperations_clearLocatorCache (1:UserPass userpass, 2:string tableName) throws (1:TableNotFoundException ouch1);
-  void tableOperations_compact (1:UserPass userpass, 2:string tableName, 3:string startRow, 4:string endRow, 5:bool flush, 6:bool wait) throws (1:AccumuloSecurityException ouch1, 2:TableNotFoundException ouch2, 3:AccumuloException ouch3);
+  void tableOperations_compact (1:UserPass userpass, 2:string tableName, 3:binary startRow, 4:binary endRow, 5:bool flush, 6:bool wait) throws (1:AccumuloSecurityException ouch1, 2:TableNotFoundException ouch2, 3:AccumuloException ouch3);
   void tableOperations_create (1:UserPass userpass, 2:string tableName) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2, 3:TableExistsException ouch3);
   void tableOperations_delete (1:UserPass userpass, 2:string tableName) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2, 3:TableNotFoundException ouch3);
-  void tableOperations_deleteRows (1:UserPass userpass, 2:string tableName, 3:string startRow, 4:string endRow) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2, 3:TableNotFoundException ouch3);
+  void tableOperations_deleteRows (1:UserPass userpass, 2:string tableName, 3:binary startRow, 4:binary endRow) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2, 3:TableNotFoundException ouch3);
   bool tableOperations_exists (1:UserPass userpass, 2:string tableName);
-  void tableOperations_flush (1:UserPass userpass, 2:string tableName) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2);
+  void tableOperations_flush (1:UserPass userpass, 2:string tableName, 3:binary startRow, 4:binary endRow, 5:bool wait) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2);
   map<string,set<string>> tableOperations_getLocalityGroups (1:UserPass userpass, 2:string tableName) throws (1:AccumuloException ouch1, 2:TableNotFoundException ouch2);
-  string tableOperations_getMaxRow (1:UserPass userpass, 2:string tableName, 3:list<binary> auths, 4:string startRow, 5:bool startInclusive, 6:string endRow, 7:bool endInclusive) throws (1:TableNotFoundException ouch1, 2:AccumuloException ouch2, 3:AccumuloSecurityException ouch3);
+  binary tableOperations_getMaxRow (1:UserPass userpass, 2:string tableName, 3:list<binary> auths, 4:binary startRow, 5:bool startInclusive, 6:binary endRow, 7:bool endInclusive) throws (1:TableNotFoundException ouch1, 2:AccumuloException ouch2, 3:AccumuloSecurityException ouch3);
   map<string,string> tableOperations_getProperties (1:UserPass userpass, 2:string tableName) throws (1:AccumuloException ouch1, 2:TableNotFoundException ouch2);
-  list<string> tableOperations_getSplits (1:UserPass userpass, 2:string tableName, 3:i32 maxSplits) throws (1:TableNotFoundException ouch1);
+  list<binary> tableOperations_getSplits (1:UserPass userpass, 2:string tableName, 3:i32 maxSplits) throws (1:TableNotFoundException ouch1);
   set<string> tableOperations_list (1:UserPass userpass);
   map<string,i32> tableOperations_listConstraints (1:UserPass userpass, 2:string tableName) throws (1:AccumuloException ouch1, 2:TableNotFoundException ouch2);
-  void tableOperations_merge (1:UserPass userpass, 2:string tableName, 3:string startRow, 4:string endRow) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2, 3:TableNotFoundException ouch3);
+  void tableOperations_merge (1:UserPass userpass, 2:string tableName, 3:binary startRow, 4:binary endRow) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2, 3:TableNotFoundException ouch3);
   void tableOperations_offline (1:UserPass userpass, 2:string tableName) throws (1:AccumuloSecurityException ouch1, 2:AccumuloException ouch2, 3:TableNotFoundException ouch3);
   void tableOperations_online (1:UserPass userpass, 2:string tableName) throws (1:AccumuloSecurityException ouch1, 2:AccumuloException ouch2, 3:TableNotFoundException ouch3);
   void tableOperations_removeConstraint (1:UserPass userpass, 2:string tableName, 3:i32 constraint) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2);
@@ -152,7 +228,8 @@ service AccumuloProxy
   map<string,string> tableOperations_tableIdMap (1:UserPass userpass);
 
   //instance operations
-  //list<E> instanceOperations_getActiveScans (1:UserPass userpass, 2:string tserver) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2);
+  list<PActiveScan> instanceOperations_getActiveScans (1:UserPass userpass, 2:string tserver) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2);
+  list<PActiveCompaction> instanceOperations_getActiveCompactions(1:UserPass userpass, 2:string tserver) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2);
   map<string,string> instanceOperations_getSiteConfiguration (1:UserPass userpass) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2);
   map<string,string> instanceOperations_getSystemConfiguration (1:UserPass userpass) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2);
   list<string> instanceOperations_getTabletServers (1:UserPass userpass);
@@ -177,7 +254,6 @@ service AccumuloProxy
   void securityOperations_revokeTablePermission (1:UserPass userpass, 2:string user, 3:string table, 4:PTablePermission perm) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2);
 
 
-
   //scanning
 
   string createBatchScanner(1:UserPass userpass, 2:string tableName, 3:set<string> authorizations, 4:PIteratorSetting iteratorSetting, 5:list<PRange> range);
@@ -190,35 +266,28 @@ service AccumuloProxy
 
   //writing
 
-  //this method is guaranteed to perform an atomic update on all cells with the same row.
   void updateAndFlush(1:UserPass userpass, 2:string tableName, 3:map<binary, list<PColumnUpdate>> cells);
 
-
-  //this method creates a persistent writer. use writer_update to perform updates with the returned cookie.
   string createWriter(1:UserPass userpass, 2:string tableName);
 
-  //this method is guaranteed to perform an atomic update on all cells with the same row.
   oneway void writer_update(1:string writer, 2:map<binary, list<PColumnUpdate>> cells);
 
   void writer_flush(1:string writer)
 
   void writer_close(1:string writer)
 
-  //  void tableOperations_attachIterator (1:UserPass userpass, 2:string arg2, 3:PIteratorSetting arg3) throws (1:AccumuloSecurityException ouch1, 2:AccumuloException ouch2, 3:TableNotFoundException ouch3);
-  //  void tableOperations_attachIterator (1:UserPass userpass, 2:string arg2, 3:PIteratorSetting arg3, 4:EnumSet<E> arg4) throws (1:AccumuloSecurityException ouch1, 2:AccumuloException ouch2, 3:TableNotFoundException ouch3);
-  //  void tableOperations_checkIteratorConflicts (1:UserPass userpass, 2:string arg2, 3:PIteratorSetting arg3, 4:EnumSet<E> arg4) throws (1:AccumuloException ouch1, 2:TableNotFoundException ouch2);
-  //  void tableOperations_clone (1:UserPass userpass, 2:string arg2, 3:string arg3, 4:bool arg4, 5:map<K,V> arg5, 6:set<E> arg6) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2, 3:TableNotFoundException ouch3, 4:TableExistsException ouch4);
-  //  void tableOperations_compact (1:UserPass userpass, 2:string arg2, 3:string arg3, 4:string arg4, 5:list<E> arg5, 6:bool arg6, 7:bool arg7) throws (1:AccumuloSecurityException ouch1, 2:TableNotFoundException ouch2, 3:AccumuloException ouch3);
-  //  void tableOperations_create (1:UserPass userpass, 2:string arg2, 3:bool arg3) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2, 3:TableExistsException ouch3);
-  //  void tableOperations_create (1:UserPass userpass, 2:string arg2, 3:bool arg3, 4:TimeType arg4) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2, 3:TableExistsException ouch3);
-  //  void tableOperations_exportTable (1:UserPass userpass, 2:string arg2, 3:string arg3) throws (1:TableNotFoundException ouch1, 2:AccumuloException ouch2, 3:AccumuloSecurityException ouch3);
-  //  void tableOperations_flush (1:UserPass userpass, 2:string arg2, 3:string arg3, 4:string arg4, 5:bool arg5) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2, 3:TableNotFoundException ouch3);
-  //  PIteratorSetting tableOperations_getIteratorSetting (1:UserPass userpass, 2:string arg2, 3:string arg3, 4:IteratorScope arg4) throws (1:AccumuloSecurityException ouch1, 2:AccumuloException ouch2, 3:TableNotFoundException ouch3);
-  //  list<E> tableOperations_getSplits (1:UserPass userpass, 2:string arg2) throws (1:TableNotFoundException ouch1);
-  //  map<K,V> tableOperations_listIterators (1:UserPass userpass, 2:string arg2) throws (1:AccumuloSecurityException ouch1, 2:AccumuloException ouch2, 3:TableNotFoundException ouch3);
-  //  void tableOperations_removeIterator (1:UserPass userpass, 2:string arg2, 3:string arg3, 4:EnumSet<E> arg4) throws (1:AccumuloSecurityException ouch1, 2:AccumuloException ouch2, 3:TableNotFoundException ouch3);
-  //  set<E> tableOperations_splitRangeByTablets (1:UserPass userpass, 2:string arg2, 3:Range arg3, 4:int arg4) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2, 3:TableNotFoundException ouch3);
-  //  void tableOperations_importDirectory (1:UserPass userpass, 2:string arg2, 3:string arg3, 4:string arg4, 5:bool arg5) throws (1:TableNotFoundException ouch1, 2:IOException ouch2, 3:AccumuloException ouch3, 4:AccumuloSecurityException ouch4);
-  //  void tableOperations_importTable (1:UserPass userpass, 2:string arg2, 3:string arg3) throws (1:TableExistsException ouch1, 2:AccumuloException ouch2, 3:AccumuloSecurityException ouch3);
-
+  void tableOperations_attachIterator (1:UserPass userpass, 2:string tableName, 3:PIteratorSetting setting, 4:set<PIteratorScope> scopes) throws (1:AccumuloSecurityException ouch1, 2:AccumuloException ouch2, 3:TableNotFoundException ouch3);
+  void tableOperations_checkIteratorConflicts (1:UserPass userpass, 2:string tableName, 3:PIteratorSetting setting, 4:set<PIteratorScope> scopes) throws (1:AccumuloException ouch1, 2:TableNotFoundException ouch2);
+  void tableOperations_clone (1:UserPass userpass, 2:string tableName, 3:string newTableName, 4:bool flush, 5:map<string,string> propertiesToSet, 6:set<string> propertiesToExclude) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2, 3:TableNotFoundException ouch3, 4:TableExistsException ouch4);
+  void tableOperations_exportTable (1:UserPass userpass, 2:string tableName, 3:string exportDir) throws (1:TableNotFoundException ouch1, 2:AccumuloException ouch2, 3:AccumuloSecurityException ouch3);
+  void tableOperations_importTable (1:UserPass userpass, 2:string tableName, 3:string importDir) throws (1:TableExistsException ouch1, 2:AccumuloException ouch2, 3:AccumuloSecurityException ouch3);
+  PIteratorSetting tableOperations_getIteratorSetting (1:UserPass userpass, 2:string tableName, 3:string iteratorName, 4:PIteratorScope scope) throws (1:AccumuloSecurityException ouch1, 2:AccumuloException ouch2, 3:TableNotFoundException ouch3);
+  map<string,set<PIteratorScope>> tableOperations_listIterators (1:UserPass userpass, 2:string tableName) throws (1:AccumuloSecurityException ouch1, 2:AccumuloException ouch2, 3:TableNotFoundException ouch3);
+  void tableOperations_removeIterator (1:UserPass userpass, 2:string tableName, 3:string iterName, 4:set<PIteratorScope> scopes) throws (1:AccumuloSecurityException ouch1, 2:AccumuloException ouch2, 3:TableNotFoundException ouch3);
+  set<PRange> tableOperations_splitRangeByTablets (1:UserPass userpass, 2:string tableName, 3:PRange range, 4:i32 maxSplits) throws (1:AccumuloException ouch1, 2:AccumuloSecurityException ouch2, 3:TableNotFoundException ouch3);
+  void tableOperations_importDirectory (1:UserPass userpass, 2:string tableName, 3:string importDir, 4:string failureDir, 5:bool setTime) throws (1:TableNotFoundException ouch1, 2:AccumuloException ouch3, 3:AccumuloSecurityException ouch4);
+
+  // utilities
+  PRange getRowRange(1:binary row);
+  PKey getFollowing(1:PKey key, 2:PPartialKey part);
 }

Modified: accumulo/trunk/proxy/src/test/java/org/apache/accumulo/TestProxyReadWrite.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/proxy/src/test/java/org/apache/accumulo/TestProxyReadWrite.java?rev=1437135&r1=1437134&r2=1437135&view=diff
==============================================================================
--- accumulo/trunk/proxy/src/test/java/org/apache/accumulo/TestProxyReadWrite.java (original)
+++ accumulo/trunk/proxy/src/test/java/org/apache/accumulo/TestProxyReadWrite.java Tue Jan 22 20:05:24 2013
@@ -125,7 +125,7 @@ public class TestProxyReadWrite {
     PKey stop = new PKey();
     stop.setRow("5".getBytes());
     List<PRange> pranges = new ArrayList<PRange>();
-    pranges.add(new PRange(null, stop));
+    pranges.add(new PRange(null, false, stop, false));
     String cookie = tpc.proxy().createBatchScanner(userpass, testtable, null, null, pranges);
     
     int i = 0;
@@ -199,7 +199,7 @@ public class TestProxyReadWrite {
     
     PKey stop = new PKey();
     stop.setRow("5".getBytes());
-    String cookie = tpc.proxy().createScanner(userpass, testtable, null, null, new PRange(null, stop));
+    String cookie = tpc.proxy().createScanner(userpass, testtable, null, null, new PRange(null, false, stop, false));
     
     int i = 0;
     boolean hasNext = true;

Modified: accumulo/trunk/proxy/src/test/java/org/apache/accumulo/TestProxyTableOperations.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/proxy/src/test/java/org/apache/accumulo/TestProxyTableOperations.java?rev=1437135&r1=1437134&r2=1437135&view=diff
==============================================================================
--- accumulo/trunk/proxy/src/test/java/org/apache/accumulo/TestProxyTableOperations.java (original)
+++ accumulo/trunk/proxy/src/test/java/org/apache/accumulo/TestProxyTableOperations.java Tue Jan 22 20:05:24 2013
@@ -113,19 +113,19 @@ public class TestProxyTableOperations {
   // TODO: add back in as a test when Mock is improved
   // @Test
   public void merge() throws TException {
-    Set<String> splits = new HashSet<String>();
-    splits.add("a");
-    splits.add("c");
-    splits.add("z");
+    Set<ByteBuffer> splits = new HashSet<ByteBuffer>();
+    splits.add(ByteBuffer.wrap("a".getBytes()));
+    splits.add(ByteBuffer.wrap("c".getBytes()));
+    splits.add(ByteBuffer.wrap("z".getBytes()));
     tpc.proxy().tableOperations_addSplits(userpass, testtable, splits);
     
-    tpc.proxy().tableOperations_merge(userpass, testtable, "b", "d");
+    tpc.proxy().tableOperations_merge(userpass, testtable, ByteBuffer.wrap("b".getBytes()), ByteBuffer.wrap("d".getBytes()));
     
     splits.remove("c");
     
-    List<String> tableSplits = tpc.proxy().tableOperations_getSplits(userpass, testtable, 10);
+    List<ByteBuffer> tableSplits = tpc.proxy().tableOperations_getSplits(userpass, testtable, 10);
     
-    for (String split : tableSplits)
+    for (ByteBuffer split : tableSplits)
       assertTrue(splits.contains(split));
     assertTrue(tableSplits.size() == splits.size());
     
@@ -133,15 +133,15 @@ public class TestProxyTableOperations {
   
   @Test
   public void splits() throws TException {
-    Set<String> splits = new HashSet<String>();
-    splits.add("a");
-    splits.add("b");
-    splits.add("z");
+    Set<ByteBuffer> splits = new HashSet<ByteBuffer>();
+    splits.add(ByteBuffer.wrap("a".getBytes()));
+    splits.add(ByteBuffer.wrap("b".getBytes()));
+    splits.add(ByteBuffer.wrap("z".getBytes()));
     tpc.proxy().tableOperations_addSplits(userpass, testtable, splits);
     
-    List<String> tableSplits = tpc.proxy().tableOperations_getSplits(userpass, testtable, 10);
+    List<ByteBuffer> tableSplits = tpc.proxy().tableOperations_getSplits(userpass, testtable, 10);
     
-    for (String split : tableSplits)
+    for (ByteBuffer split : tableSplits)
       assertTrue(splits.contains(split));
     assertTrue(tableSplits.size() == splits.size());
   }
@@ -206,15 +206,10 @@ public class TestProxyTableOperations {
     }
     tpc.proxy().updateAndFlush(userpass, testtable, mutations);
     
-    assertEquals(tpc.proxy().tableOperations_getMaxRow(userpass, testtable, auths, null, true, null, true), "9");
-    
-    // TODO: Uncomment when the Mock isn't broken
-    // tpc.proxy().tableOperations_deleteRows(userpass,testtable,"51","99");
-    // assertEquals(tpc.proxy().tableOperations_getMaxRow(userpass, testtable, auths, null, true, null, true),"5");
+    assertEquals(tpc.proxy().tableOperations_getMaxRow(userpass, testtable, auths, null, true, null, true), ByteBuffer.wrap("9".getBytes()));
     
+    tpc.proxy().tableOperations_deleteRows(userpass,testtable,ByteBuffer.wrap("51".getBytes()), ByteBuffer.wrap("99".getBytes()));
+    assertEquals(tpc.proxy().tableOperations_getMaxRow(userpass, testtable, auths, null, true, null, true), ByteBuffer.wrap("5".getBytes()));
   }
   
-  /*
-   * @Test(expected = TException.class) public void peekTest() { }
-   */
 }



Mime
View raw message