You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ec...@apache.org on 2013/01/22 21:05:24 UTC
svn commit: r1437135 [4/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/...
Added: accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PActiveScan.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PActiveScan.java?rev=1437135&view=auto
==============================================================================
--- accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PActiveScan.java (added)
+++ accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PActiveScan.java Tue Jan 22 20:05:24 2013
@@ -0,0 +1,1593 @@
+/*
+ * 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 PActiveScan implements org.apache.thrift.TBase<PActiveScan, PActiveScan._Fields>, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PActiveScan");
+
+ private static final org.apache.thrift.protocol.TField CLIENT_FIELD_DESC = new org.apache.thrift.protocol.TField("client", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField USER_FIELD_DESC = new org.apache.thrift.protocol.TField("user", org.apache.thrift.protocol.TType.STRING, (short)2);
+ 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)3);
+ private static final org.apache.thrift.protocol.TField AGE_FIELD_DESC = new org.apache.thrift.protocol.TField("age", org.apache.thrift.protocol.TType.I64, (short)4);
+ private static final org.apache.thrift.protocol.TField IDLE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("idleTime", org.apache.thrift.protocol.TType.I64, (short)5);
+ private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)6);
+ private static final org.apache.thrift.protocol.TField STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("state", org.apache.thrift.protocol.TType.I32, (short)7);
+ 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)8);
+ private static final org.apache.thrift.protocol.TField COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("columns", org.apache.thrift.protocol.TType.LIST, (short)9);
+ private static final org.apache.thrift.protocol.TField ITERATORS_FIELD_DESC = new org.apache.thrift.protocol.TField("iterators", org.apache.thrift.protocol.TType.LIST, (short)10);
+ private static final org.apache.thrift.protocol.TField AUTHORIZATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("authorizations", org.apache.thrift.protocol.TType.LIST, (short)11);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new PActiveScanStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new PActiveScanTupleSchemeFactory());
+ }
+
+ public String client; // required
+ public String user; // required
+ public String tableId; // required
+ public long age; // required
+ public long idleTime; // required
+ /**
+ *
+ * @see PScanType
+ */
+ public PScanType type; // required
+ /**
+ *
+ * @see PScanState
+ */
+ public PScanState state; // required
+ public PKeyExtent extent; // required
+ public List<PColumn> columns; // required
+ public List<PIteratorSetting> iterators; // required
+ public List<ByteBuffer> authorizations; // 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 {
+ CLIENT((short)1, "client"),
+ USER((short)2, "user"),
+ TABLE_ID((short)3, "tableId"),
+ AGE((short)4, "age"),
+ IDLE_TIME((short)5, "idleTime"),
+ /**
+ *
+ * @see PScanType
+ */
+ TYPE((short)6, "type"),
+ /**
+ *
+ * @see PScanState
+ */
+ STATE((short)7, "state"),
+ EXTENT((short)8, "extent"),
+ COLUMNS((short)9, "columns"),
+ ITERATORS((short)10, "iterators"),
+ AUTHORIZATIONS((short)11, "authorizations");
+
+ 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: // CLIENT
+ return CLIENT;
+ case 2: // USER
+ return USER;
+ case 3: // TABLE_ID
+ return TABLE_ID;
+ case 4: // AGE
+ return AGE;
+ case 5: // IDLE_TIME
+ return IDLE_TIME;
+ case 6: // TYPE
+ return TYPE;
+ case 7: // STATE
+ return STATE;
+ case 8: // EXTENT
+ return EXTENT;
+ case 9: // COLUMNS
+ return COLUMNS;
+ case 10: // ITERATORS
+ return ITERATORS;
+ case 11: // AUTHORIZATIONS
+ return AUTHORIZATIONS;
+ 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 __AGE_ISSET_ID = 0;
+ private static final int __IDLETIME_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.CLIENT, new org.apache.thrift.meta_data.FieldMetaData("client", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.USER, new org.apache.thrift.meta_data.FieldMetaData("user", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ 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)));
+ tmpMap.put(_Fields.AGE, new org.apache.thrift.meta_data.FieldMetaData("age", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.IDLE_TIME, new org.apache.thrift.meta_data.FieldMetaData("idleTime", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PScanType.class)));
+ tmpMap.put(_Fields.STATE, new org.apache.thrift.meta_data.FieldMetaData("state", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PScanState.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, PKeyExtent.class)));
+ tmpMap.put(_Fields.COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("columns", 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, PColumn.class))));
+ tmpMap.put(_Fields.ITERATORS, new org.apache.thrift.meta_data.FieldMetaData("iterators", 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, PIteratorSetting.class))));
+ tmpMap.put(_Fields.AUTHORIZATIONS, new org.apache.thrift.meta_data.FieldMetaData("authorizations", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ 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(PActiveScan.class, metaDataMap);
+ }
+
+ public PActiveScan() {
+ }
+
+ public PActiveScan(
+ String client,
+ String user,
+ String tableId,
+ long age,
+ long idleTime,
+ PScanType type,
+ PScanState state,
+ PKeyExtent extent,
+ List<PColumn> columns,
+ List<PIteratorSetting> iterators,
+ List<ByteBuffer> authorizations)
+ {
+ this();
+ this.client = client;
+ this.user = user;
+ this.tableId = tableId;
+ this.age = age;
+ setAgeIsSet(true);
+ this.idleTime = idleTime;
+ setIdleTimeIsSet(true);
+ this.type = type;
+ this.state = state;
+ this.extent = extent;
+ this.columns = columns;
+ this.iterators = iterators;
+ this.authorizations = authorizations;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public PActiveScan(PActiveScan other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetClient()) {
+ this.client = other.client;
+ }
+ if (other.isSetUser()) {
+ this.user = other.user;
+ }
+ if (other.isSetTableId()) {
+ this.tableId = other.tableId;
+ }
+ this.age = other.age;
+ this.idleTime = other.idleTime;
+ if (other.isSetType()) {
+ this.type = other.type;
+ }
+ if (other.isSetState()) {
+ this.state = other.state;
+ }
+ if (other.isSetExtent()) {
+ this.extent = new PKeyExtent(other.extent);
+ }
+ if (other.isSetColumns()) {
+ List<PColumn> __this__columns = new ArrayList<PColumn>();
+ for (PColumn other_element : other.columns) {
+ __this__columns.add(new PColumn(other_element));
+ }
+ this.columns = __this__columns;
+ }
+ if (other.isSetIterators()) {
+ List<PIteratorSetting> __this__iterators = new ArrayList<PIteratorSetting>();
+ for (PIteratorSetting other_element : other.iterators) {
+ __this__iterators.add(new PIteratorSetting(other_element));
+ }
+ this.iterators = __this__iterators;
+ }
+ if (other.isSetAuthorizations()) {
+ List<ByteBuffer> __this__authorizations = new ArrayList<ByteBuffer>();
+ for (ByteBuffer other_element : other.authorizations) {
+ ByteBuffer temp_binary_element = org.apache.thrift.TBaseHelper.copyBinary(other_element);
+;
+ __this__authorizations.add(temp_binary_element);
+ }
+ this.authorizations = __this__authorizations;
+ }
+ }
+
+ public PActiveScan deepCopy() {
+ return new PActiveScan(this);
+ }
+
+ @Override
+ public void clear() {
+ this.client = null;
+ this.user = null;
+ this.tableId = null;
+ setAgeIsSet(false);
+ this.age = 0;
+ setIdleTimeIsSet(false);
+ this.idleTime = 0;
+ this.type = null;
+ this.state = null;
+ this.extent = null;
+ this.columns = null;
+ this.iterators = null;
+ this.authorizations = null;
+ }
+
+ public String getClient() {
+ return this.client;
+ }
+
+ public PActiveScan setClient(String client) {
+ this.client = client;
+ return this;
+ }
+
+ public void unsetClient() {
+ this.client = null;
+ }
+
+ /** Returns true if field client is set (has been assigned a value) and false otherwise */
+ public boolean isSetClient() {
+ return this.client != null;
+ }
+
+ public void setClientIsSet(boolean value) {
+ if (!value) {
+ this.client = null;
+ }
+ }
+
+ public String getUser() {
+ return this.user;
+ }
+
+ public PActiveScan setUser(String user) {
+ this.user = user;
+ return this;
+ }
+
+ public void unsetUser() {
+ this.user = null;
+ }
+
+ /** Returns true if field user is set (has been assigned a value) and false otherwise */
+ public boolean isSetUser() {
+ return this.user != null;
+ }
+
+ public void setUserIsSet(boolean value) {
+ if (!value) {
+ this.user = null;
+ }
+ }
+
+ public String getTableId() {
+ return this.tableId;
+ }
+
+ public PActiveScan setTableId(String 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 long getAge() {
+ return this.age;
+ }
+
+ public PActiveScan setAge(long age) {
+ this.age = age;
+ setAgeIsSet(true);
+ return this;
+ }
+
+ public void unsetAge() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __AGE_ISSET_ID);
+ }
+
+ /** Returns true if field age is set (has been assigned a value) and false otherwise */
+ public boolean isSetAge() {
+ return EncodingUtils.testBit(__isset_bitfield, __AGE_ISSET_ID);
+ }
+
+ public void setAgeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __AGE_ISSET_ID, value);
+ }
+
+ public long getIdleTime() {
+ return this.idleTime;
+ }
+
+ public PActiveScan setIdleTime(long idleTime) {
+ this.idleTime = idleTime;
+ setIdleTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetIdleTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __IDLETIME_ISSET_ID);
+ }
+
+ /** Returns true if field idleTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetIdleTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __IDLETIME_ISSET_ID);
+ }
+
+ public void setIdleTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __IDLETIME_ISSET_ID, value);
+ }
+
+ /**
+ *
+ * @see PScanType
+ */
+ public PScanType getType() {
+ return this.type;
+ }
+
+ /**
+ *
+ * @see PScanType
+ */
+ public PActiveScan setType(PScanType type) {
+ this.type = type;
+ return this;
+ }
+
+ public void unsetType() {
+ this.type = null;
+ }
+
+ /** Returns true if field type is set (has been assigned a value) and false otherwise */
+ public boolean isSetType() {
+ return this.type != null;
+ }
+
+ public void setTypeIsSet(boolean value) {
+ if (!value) {
+ this.type = null;
+ }
+ }
+
+ /**
+ *
+ * @see PScanState
+ */
+ public PScanState getState() {
+ return this.state;
+ }
+
+ /**
+ *
+ * @see PScanState
+ */
+ public PActiveScan setState(PScanState state) {
+ this.state = state;
+ return this;
+ }
+
+ public void unsetState() {
+ this.state = null;
+ }
+
+ /** Returns true if field state is set (has been assigned a value) and false otherwise */
+ public boolean isSetState() {
+ return this.state != null;
+ }
+
+ public void setStateIsSet(boolean value) {
+ if (!value) {
+ this.state = null;
+ }
+ }
+
+ public PKeyExtent getExtent() {
+ return this.extent;
+ }
+
+ public PActiveScan setExtent(PKeyExtent 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 int getColumnsSize() {
+ return (this.columns == null) ? 0 : this.columns.size();
+ }
+
+ public java.util.Iterator<PColumn> getColumnsIterator() {
+ return (this.columns == null) ? null : this.columns.iterator();
+ }
+
+ public void addToColumns(PColumn elem) {
+ if (this.columns == null) {
+ this.columns = new ArrayList<PColumn>();
+ }
+ this.columns.add(elem);
+ }
+
+ public List<PColumn> getColumns() {
+ return this.columns;
+ }
+
+ public PActiveScan setColumns(List<PColumn> columns) {
+ this.columns = columns;
+ return this;
+ }
+
+ public void unsetColumns() {
+ this.columns = null;
+ }
+
+ /** Returns true if field columns is set (has been assigned a value) and false otherwise */
+ public boolean isSetColumns() {
+ return this.columns != null;
+ }
+
+ public void setColumnsIsSet(boolean value) {
+ if (!value) {
+ this.columns = null;
+ }
+ }
+
+ public int getIteratorsSize() {
+ return (this.iterators == null) ? 0 : this.iterators.size();
+ }
+
+ public java.util.Iterator<PIteratorSetting> getIteratorsIterator() {
+ return (this.iterators == null) ? null : this.iterators.iterator();
+ }
+
+ public void addToIterators(PIteratorSetting elem) {
+ if (this.iterators == null) {
+ this.iterators = new ArrayList<PIteratorSetting>();
+ }
+ this.iterators.add(elem);
+ }
+
+ public List<PIteratorSetting> getIterators() {
+ return this.iterators;
+ }
+
+ public PActiveScan setIterators(List<PIteratorSetting> iterators) {
+ this.iterators = iterators;
+ return this;
+ }
+
+ public void unsetIterators() {
+ this.iterators = null;
+ }
+
+ /** Returns true if field iterators is set (has been assigned a value) and false otherwise */
+ public boolean isSetIterators() {
+ return this.iterators != null;
+ }
+
+ public void setIteratorsIsSet(boolean value) {
+ if (!value) {
+ this.iterators = null;
+ }
+ }
+
+ public int getAuthorizationsSize() {
+ return (this.authorizations == null) ? 0 : this.authorizations.size();
+ }
+
+ public java.util.Iterator<ByteBuffer> getAuthorizationsIterator() {
+ return (this.authorizations == null) ? null : this.authorizations.iterator();
+ }
+
+ public void addToAuthorizations(ByteBuffer elem) {
+ if (this.authorizations == null) {
+ this.authorizations = new ArrayList<ByteBuffer>();
+ }
+ this.authorizations.add(elem);
+ }
+
+ public List<ByteBuffer> getAuthorizations() {
+ return this.authorizations;
+ }
+
+ public PActiveScan setAuthorizations(List<ByteBuffer> authorizations) {
+ this.authorizations = authorizations;
+ return this;
+ }
+
+ public void unsetAuthorizations() {
+ this.authorizations = null;
+ }
+
+ /** Returns true if field authorizations is set (has been assigned a value) and false otherwise */
+ public boolean isSetAuthorizations() {
+ return this.authorizations != null;
+ }
+
+ public void setAuthorizationsIsSet(boolean value) {
+ if (!value) {
+ this.authorizations = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case CLIENT:
+ if (value == null) {
+ unsetClient();
+ } else {
+ setClient((String)value);
+ }
+ break;
+
+ case USER:
+ if (value == null) {
+ unsetUser();
+ } else {
+ setUser((String)value);
+ }
+ break;
+
+ case TABLE_ID:
+ if (value == null) {
+ unsetTableId();
+ } else {
+ setTableId((String)value);
+ }
+ break;
+
+ case AGE:
+ if (value == null) {
+ unsetAge();
+ } else {
+ setAge((Long)value);
+ }
+ break;
+
+ case IDLE_TIME:
+ if (value == null) {
+ unsetIdleTime();
+ } else {
+ setIdleTime((Long)value);
+ }
+ break;
+
+ case TYPE:
+ if (value == null) {
+ unsetType();
+ } else {
+ setType((PScanType)value);
+ }
+ break;
+
+ case STATE:
+ if (value == null) {
+ unsetState();
+ } else {
+ setState((PScanState)value);
+ }
+ break;
+
+ case EXTENT:
+ if (value == null) {
+ unsetExtent();
+ } else {
+ setExtent((PKeyExtent)value);
+ }
+ break;
+
+ case COLUMNS:
+ if (value == null) {
+ unsetColumns();
+ } else {
+ setColumns((List<PColumn>)value);
+ }
+ break;
+
+ case ITERATORS:
+ if (value == null) {
+ unsetIterators();
+ } else {
+ setIterators((List<PIteratorSetting>)value);
+ }
+ break;
+
+ case AUTHORIZATIONS:
+ if (value == null) {
+ unsetAuthorizations();
+ } else {
+ setAuthorizations((List<ByteBuffer>)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case CLIENT:
+ return getClient();
+
+ case USER:
+ return getUser();
+
+ case TABLE_ID:
+ return getTableId();
+
+ case AGE:
+ return Long.valueOf(getAge());
+
+ case IDLE_TIME:
+ return Long.valueOf(getIdleTime());
+
+ case TYPE:
+ return getType();
+
+ case STATE:
+ return getState();
+
+ case EXTENT:
+ return getExtent();
+
+ case COLUMNS:
+ return getColumns();
+
+ case ITERATORS:
+ return getIterators();
+
+ case AUTHORIZATIONS:
+ return getAuthorizations();
+
+ }
+ 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 CLIENT:
+ return isSetClient();
+ case USER:
+ return isSetUser();
+ case TABLE_ID:
+ return isSetTableId();
+ case AGE:
+ return isSetAge();
+ case IDLE_TIME:
+ return isSetIdleTime();
+ case TYPE:
+ return isSetType();
+ case STATE:
+ return isSetState();
+ case EXTENT:
+ return isSetExtent();
+ case COLUMNS:
+ return isSetColumns();
+ case ITERATORS:
+ return isSetIterators();
+ case AUTHORIZATIONS:
+ return isSetAuthorizations();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof PActiveScan)
+ return this.equals((PActiveScan)that);
+ return false;
+ }
+
+ public boolean equals(PActiveScan that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_client = true && this.isSetClient();
+ boolean that_present_client = true && that.isSetClient();
+ if (this_present_client || that_present_client) {
+ if (!(this_present_client && that_present_client))
+ return false;
+ if (!this.client.equals(that.client))
+ return false;
+ }
+
+ boolean this_present_user = true && this.isSetUser();
+ boolean that_present_user = true && that.isSetUser();
+ if (this_present_user || that_present_user) {
+ if (!(this_present_user && that_present_user))
+ return false;
+ if (!this.user.equals(that.user))
+ 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_age = true;
+ boolean that_present_age = true;
+ if (this_present_age || that_present_age) {
+ if (!(this_present_age && that_present_age))
+ return false;
+ if (this.age != that.age)
+ return false;
+ }
+
+ boolean this_present_idleTime = true;
+ boolean that_present_idleTime = true;
+ if (this_present_idleTime || that_present_idleTime) {
+ if (!(this_present_idleTime && that_present_idleTime))
+ return false;
+ if (this.idleTime != that.idleTime)
+ return false;
+ }
+
+ boolean this_present_type = true && this.isSetType();
+ boolean that_present_type = true && that.isSetType();
+ if (this_present_type || that_present_type) {
+ if (!(this_present_type && that_present_type))
+ return false;
+ if (!this.type.equals(that.type))
+ return false;
+ }
+
+ boolean this_present_state = true && this.isSetState();
+ boolean that_present_state = true && that.isSetState();
+ if (this_present_state || that_present_state) {
+ if (!(this_present_state && that_present_state))
+ return false;
+ if (!this.state.equals(that.state))
+ 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_columns = true && this.isSetColumns();
+ boolean that_present_columns = true && that.isSetColumns();
+ if (this_present_columns || that_present_columns) {
+ if (!(this_present_columns && that_present_columns))
+ return false;
+ if (!this.columns.equals(that.columns))
+ return false;
+ }
+
+ boolean this_present_iterators = true && this.isSetIterators();
+ boolean that_present_iterators = true && that.isSetIterators();
+ if (this_present_iterators || that_present_iterators) {
+ if (!(this_present_iterators && that_present_iterators))
+ return false;
+ if (!this.iterators.equals(that.iterators))
+ return false;
+ }
+
+ boolean this_present_authorizations = true && this.isSetAuthorizations();
+ boolean that_present_authorizations = true && that.isSetAuthorizations();
+ if (this_present_authorizations || that_present_authorizations) {
+ if (!(this_present_authorizations && that_present_authorizations))
+ return false;
+ if (!this.authorizations.equals(that.authorizations))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ public int compareTo(PActiveScan other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ PActiveScan typedOther = (PActiveScan)other;
+
+ lastComparison = Boolean.valueOf(isSetClient()).compareTo(typedOther.isSetClient());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetClient()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.client, typedOther.client);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUser()).compareTo(typedOther.isSetUser());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUser()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user, typedOther.user);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ 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(isSetAge()).compareTo(typedOther.isSetAge());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAge()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.age, typedOther.age);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetIdleTime()).compareTo(typedOther.isSetIdleTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetIdleTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.idleTime, typedOther.idleTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetType()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetState()).compareTo(typedOther.isSetState());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetState()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.state, typedOther.state);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ 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(isSetColumns()).compareTo(typedOther.isSetColumns());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetColumns()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, typedOther.columns);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetIterators()).compareTo(typedOther.isSetIterators());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetIterators()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.iterators, typedOther.iterators);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetAuthorizations()).compareTo(typedOther.isSetAuthorizations());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAuthorizations()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authorizations, typedOther.authorizations);
+ 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("PActiveScan(");
+ boolean first = true;
+
+ sb.append("client:");
+ if (this.client == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.client);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("user:");
+ if (this.user == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.user);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("tableId:");
+ if (this.tableId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.tableId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("age:");
+ sb.append(this.age);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("idleTime:");
+ sb.append(this.idleTime);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("type:");
+ if (this.type == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.type);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("state:");
+ if (this.state == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.state);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("extent:");
+ if (this.extent == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.extent);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("columns:");
+ if (this.columns == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.columns);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("iterators:");
+ if (this.iterators == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.iterators);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("authorizations:");
+ if (this.authorizations == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.authorizations);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ if (extent != null) {
+ extent.validate();
+ }
+ }
+
+ 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_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);
+ }
+ }
+
+ private static class PActiveScanStandardSchemeFactory implements SchemeFactory {
+ public PActiveScanStandardScheme getScheme() {
+ return new PActiveScanStandardScheme();
+ }
+ }
+
+ private static class PActiveScanStandardScheme extends StandardScheme<PActiveScan> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, PActiveScan 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: // CLIENT
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.client = iprot.readString();
+ struct.setClientIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // USER
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.user = iprot.readString();
+ struct.setUserIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // TABLE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.tableId = iprot.readString();
+ struct.setTableIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // AGE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.age = iprot.readI64();
+ struct.setAgeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // IDLE_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.idleTime = iprot.readI64();
+ struct.setIdleTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // TYPE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.type = PScanType.findByValue(iprot.readI32());
+ struct.setTypeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 7: // STATE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.state = PScanState.findByValue(iprot.readI32());
+ struct.setStateIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 8: // EXTENT
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.extent = new PKeyExtent();
+ struct.extent.read(iprot);
+ struct.setExtentIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 9: // COLUMNS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list18 = iprot.readListBegin();
+ struct.columns = new ArrayList<PColumn>(_list18.size);
+ for (int _i19 = 0; _i19 < _list18.size; ++_i19)
+ {
+ PColumn _elem20; // required
+ _elem20 = new PColumn();
+ _elem20.read(iprot);
+ struct.columns.add(_elem20);
+ }
+ iprot.readListEnd();
+ }
+ struct.setColumnsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 10: // ITERATORS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list21 = iprot.readListBegin();
+ struct.iterators = new ArrayList<PIteratorSetting>(_list21.size);
+ for (int _i22 = 0; _i22 < _list21.size; ++_i22)
+ {
+ PIteratorSetting _elem23; // required
+ _elem23 = new PIteratorSetting();
+ _elem23.read(iprot);
+ struct.iterators.add(_elem23);
+ }
+ iprot.readListEnd();
+ }
+ struct.setIteratorsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 11: // AUTHORIZATIONS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list24 = iprot.readListBegin();
+ struct.authorizations = new ArrayList<ByteBuffer>(_list24.size);
+ for (int _i25 = 0; _i25 < _list24.size; ++_i25)
+ {
+ ByteBuffer _elem26; // required
+ _elem26 = iprot.readBinary();
+ struct.authorizations.add(_elem26);
+ }
+ iprot.readListEnd();
+ }
+ struct.setAuthorizationsIsSet(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, PActiveScan struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.client != null) {
+ oprot.writeFieldBegin(CLIENT_FIELD_DESC);
+ oprot.writeString(struct.client);
+ oprot.writeFieldEnd();
+ }
+ if (struct.user != null) {
+ oprot.writeFieldBegin(USER_FIELD_DESC);
+ oprot.writeString(struct.user);
+ oprot.writeFieldEnd();
+ }
+ if (struct.tableId != null) {
+ oprot.writeFieldBegin(TABLE_ID_FIELD_DESC);
+ oprot.writeString(struct.tableId);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(AGE_FIELD_DESC);
+ oprot.writeI64(struct.age);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(IDLE_TIME_FIELD_DESC);
+ oprot.writeI64(struct.idleTime);
+ oprot.writeFieldEnd();
+ if (struct.type != null) {
+ oprot.writeFieldBegin(TYPE_FIELD_DESC);
+ oprot.writeI32(struct.type.getValue());
+ oprot.writeFieldEnd();
+ }
+ if (struct.state != null) {
+ oprot.writeFieldBegin(STATE_FIELD_DESC);
+ oprot.writeI32(struct.state.getValue());
+ oprot.writeFieldEnd();
+ }
+ if (struct.extent != null) {
+ oprot.writeFieldBegin(EXTENT_FIELD_DESC);
+ struct.extent.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.columns != null) {
+ oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.columns.size()));
+ for (PColumn _iter27 : struct.columns)
+ {
+ _iter27.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ if (struct.iterators != null) {
+ oprot.writeFieldBegin(ITERATORS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.iterators.size()));
+ for (PIteratorSetting _iter28 : struct.iterators)
+ {
+ _iter28.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ if (struct.authorizations != null) {
+ oprot.writeFieldBegin(AUTHORIZATIONS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.authorizations.size()));
+ for (ByteBuffer _iter29 : struct.authorizations)
+ {
+ oprot.writeBinary(_iter29);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class PActiveScanTupleSchemeFactory implements SchemeFactory {
+ public PActiveScanTupleScheme getScheme() {
+ return new PActiveScanTupleScheme();
+ }
+ }
+
+ private static class PActiveScanTupleScheme extends TupleScheme<PActiveScan> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, PActiveScan struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetClient()) {
+ optionals.set(0);
+ }
+ if (struct.isSetUser()) {
+ optionals.set(1);
+ }
+ if (struct.isSetTableId()) {
+ optionals.set(2);
+ }
+ if (struct.isSetAge()) {
+ optionals.set(3);
+ }
+ if (struct.isSetIdleTime()) {
+ optionals.set(4);
+ }
+ if (struct.isSetType()) {
+ optionals.set(5);
+ }
+ if (struct.isSetState()) {
+ optionals.set(6);
+ }
+ if (struct.isSetExtent()) {
+ optionals.set(7);
+ }
+ if (struct.isSetColumns()) {
+ optionals.set(8);
+ }
+ if (struct.isSetIterators()) {
+ optionals.set(9);
+ }
+ if (struct.isSetAuthorizations()) {
+ optionals.set(10);
+ }
+ oprot.writeBitSet(optionals, 11);
+ if (struct.isSetClient()) {
+ oprot.writeString(struct.client);
+ }
+ if (struct.isSetUser()) {
+ oprot.writeString(struct.user);
+ }
+ if (struct.isSetTableId()) {
+ oprot.writeString(struct.tableId);
+ }
+ if (struct.isSetAge()) {
+ oprot.writeI64(struct.age);
+ }
+ if (struct.isSetIdleTime()) {
+ oprot.writeI64(struct.idleTime);
+ }
+ if (struct.isSetType()) {
+ oprot.writeI32(struct.type.getValue());
+ }
+ if (struct.isSetState()) {
+ oprot.writeI32(struct.state.getValue());
+ }
+ if (struct.isSetExtent()) {
+ struct.extent.write(oprot);
+ }
+ if (struct.isSetColumns()) {
+ {
+ oprot.writeI32(struct.columns.size());
+ for (PColumn _iter30 : struct.columns)
+ {
+ _iter30.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetIterators()) {
+ {
+ oprot.writeI32(struct.iterators.size());
+ for (PIteratorSetting _iter31 : struct.iterators)
+ {
+ _iter31.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetAuthorizations()) {
+ {
+ oprot.writeI32(struct.authorizations.size());
+ for (ByteBuffer _iter32 : struct.authorizations)
+ {
+ oprot.writeBinary(_iter32);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, PActiveScan struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(11);
+ if (incoming.get(0)) {
+ struct.client = iprot.readString();
+ struct.setClientIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.user = iprot.readString();
+ struct.setUserIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.tableId = iprot.readString();
+ struct.setTableIdIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.age = iprot.readI64();
+ struct.setAgeIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.idleTime = iprot.readI64();
+ struct.setIdleTimeIsSet(true);
+ }
+ if (incoming.get(5)) {
+ struct.type = PScanType.findByValue(iprot.readI32());
+ struct.setTypeIsSet(true);
+ }
+ if (incoming.get(6)) {
+ struct.state = PScanState.findByValue(iprot.readI32());
+ struct.setStateIsSet(true);
+ }
+ if (incoming.get(7)) {
+ struct.extent = new PKeyExtent();
+ struct.extent.read(iprot);
+ struct.setExtentIsSet(true);
+ }
+ if (incoming.get(8)) {
+ {
+ org.apache.thrift.protocol.TList _list33 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.columns = new ArrayList<PColumn>(_list33.size);
+ for (int _i34 = 0; _i34 < _list33.size; ++_i34)
+ {
+ PColumn _elem35; // required
+ _elem35 = new PColumn();
+ _elem35.read(iprot);
+ struct.columns.add(_elem35);
+ }
+ }
+ struct.setColumnsIsSet(true);
+ }
+ if (incoming.get(9)) {
+ {
+ org.apache.thrift.protocol.TList _list36 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.iterators = new ArrayList<PIteratorSetting>(_list36.size);
+ for (int _i37 = 0; _i37 < _list36.size; ++_i37)
+ {
+ PIteratorSetting _elem38; // required
+ _elem38 = new PIteratorSetting();
+ _elem38.read(iprot);
+ struct.iterators.add(_elem38);
+ }
+ }
+ struct.setIteratorsIsSet(true);
+ }
+ if (incoming.get(10)) {
+ {
+ org.apache.thrift.protocol.TList _list39 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.authorizations = new ArrayList<ByteBuffer>(_list39.size);
+ for (int _i40 = 0; _i40 < _list39.size; ++_i40)
+ {
+ ByteBuffer _elem41; // required
+ _elem41 = iprot.readBinary();
+ struct.authorizations.add(_elem41);
+ }
+ }
+ struct.setAuthorizationsIsSet(true);
+ }
+ }
+ }
+
+}
+
Propchange: accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PActiveScan.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PColumn.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PColumn.java?rev=1437135&view=auto
==============================================================================
--- accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PColumn.java (added)
+++ accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PColumn.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 PColumn implements org.apache.thrift.TBase<PColumn, PColumn._Fields>, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PColumn");
+
+ private static final org.apache.thrift.protocol.TField COL_FAMILY_FIELD_DESC = new org.apache.thrift.protocol.TField("colFamily", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField COL_QUALIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("colQualifier", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField COL_VISIBILITY_FIELD_DESC = new org.apache.thrift.protocol.TField("colVisibility", 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 PColumnStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new PColumnTupleSchemeFactory());
+ }
+
+ public ByteBuffer colFamily; // required
+ public ByteBuffer colQualifier; // required
+ public ByteBuffer colVisibility; // 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 {
+ COL_FAMILY((short)1, "colFamily"),
+ COL_QUALIFIER((short)2, "colQualifier"),
+ COL_VISIBILITY((short)3, "colVisibility");
+
+ 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: // COL_FAMILY
+ return COL_FAMILY;
+ case 2: // COL_QUALIFIER
+ return COL_QUALIFIER;
+ case 3: // COL_VISIBILITY
+ return COL_VISIBILITY;
+ 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.COL_FAMILY, new org.apache.thrift.meta_data.FieldMetaData("colFamily", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
+ tmpMap.put(_Fields.COL_QUALIFIER, new org.apache.thrift.meta_data.FieldMetaData("colQualifier", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
+ tmpMap.put(_Fields.COL_VISIBILITY, new org.apache.thrift.meta_data.FieldMetaData("colVisibility", 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(PColumn.class, metaDataMap);
+ }
+
+ public PColumn() {
+ }
+
+ public PColumn(
+ ByteBuffer colFamily,
+ ByteBuffer colQualifier,
+ ByteBuffer colVisibility)
+ {
+ this();
+ this.colFamily = colFamily;
+ this.colQualifier = colQualifier;
+ this.colVisibility = colVisibility;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public PColumn(PColumn other) {
+ if (other.isSetColFamily()) {
+ this.colFamily = org.apache.thrift.TBaseHelper.copyBinary(other.colFamily);
+;
+ }
+ if (other.isSetColQualifier()) {
+ this.colQualifier = org.apache.thrift.TBaseHelper.copyBinary(other.colQualifier);
+;
+ }
+ if (other.isSetColVisibility()) {
+ this.colVisibility = org.apache.thrift.TBaseHelper.copyBinary(other.colVisibility);
+;
+ }
+ }
+
+ public PColumn deepCopy() {
+ return new PColumn(this);
+ }
+
+ @Override
+ public void clear() {
+ this.colFamily = null;
+ this.colQualifier = null;
+ this.colVisibility = null;
+ }
+
+ public byte[] getColFamily() {
+ setColFamily(org.apache.thrift.TBaseHelper.rightSize(colFamily));
+ return colFamily == null ? null : colFamily.array();
+ }
+
+ public ByteBuffer bufferForColFamily() {
+ return colFamily;
+ }
+
+ public PColumn setColFamily(byte[] colFamily) {
+ setColFamily(colFamily == null ? (ByteBuffer)null : ByteBuffer.wrap(colFamily));
+ return this;
+ }
+
+ public PColumn setColFamily(ByteBuffer colFamily) {
+ this.colFamily = colFamily;
+ return this;
+ }
+
+ public void unsetColFamily() {
+ this.colFamily = null;
+ }
+
+ /** Returns true if field colFamily is set (has been assigned a value) and false otherwise */
+ public boolean isSetColFamily() {
+ return this.colFamily != null;
+ }
+
+ public void setColFamilyIsSet(boolean value) {
+ if (!value) {
+ this.colFamily = null;
+ }
+ }
+
+ public byte[] getColQualifier() {
+ setColQualifier(org.apache.thrift.TBaseHelper.rightSize(colQualifier));
+ return colQualifier == null ? null : colQualifier.array();
+ }
+
+ public ByteBuffer bufferForColQualifier() {
+ return colQualifier;
+ }
+
+ public PColumn setColQualifier(byte[] colQualifier) {
+ setColQualifier(colQualifier == null ? (ByteBuffer)null : ByteBuffer.wrap(colQualifier));
+ return this;
+ }
+
+ public PColumn setColQualifier(ByteBuffer colQualifier) {
+ this.colQualifier = colQualifier;
+ return this;
+ }
+
+ public void unsetColQualifier() {
+ this.colQualifier = null;
+ }
+
+ /** Returns true if field colQualifier is set (has been assigned a value) and false otherwise */
+ public boolean isSetColQualifier() {
+ return this.colQualifier != null;
+ }
+
+ public void setColQualifierIsSet(boolean value) {
+ if (!value) {
+ this.colQualifier = null;
+ }
+ }
+
+ public byte[] getColVisibility() {
+ setColVisibility(org.apache.thrift.TBaseHelper.rightSize(colVisibility));
+ return colVisibility == null ? null : colVisibility.array();
+ }
+
+ public ByteBuffer bufferForColVisibility() {
+ return colVisibility;
+ }
+
+ public PColumn setColVisibility(byte[] colVisibility) {
+ setColVisibility(colVisibility == null ? (ByteBuffer)null : ByteBuffer.wrap(colVisibility));
+ return this;
+ }
+
+ public PColumn setColVisibility(ByteBuffer colVisibility) {
+ this.colVisibility = colVisibility;
+ return this;
+ }
+
+ public void unsetColVisibility() {
+ this.colVisibility = null;
+ }
+
+ /** Returns true if field colVisibility is set (has been assigned a value) and false otherwise */
+ public boolean isSetColVisibility() {
+ return this.colVisibility != null;
+ }
+
+ public void setColVisibilityIsSet(boolean value) {
+ if (!value) {
+ this.colVisibility = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case COL_FAMILY:
+ if (value == null) {
+ unsetColFamily();
+ } else {
+ setColFamily((ByteBuffer)value);
+ }
+ break;
+
+ case COL_QUALIFIER:
+ if (value == null) {
+ unsetColQualifier();
+ } else {
+ setColQualifier((ByteBuffer)value);
+ }
+ break;
+
+ case COL_VISIBILITY:
+ if (value == null) {
+ unsetColVisibility();
+ } else {
+ setColVisibility((ByteBuffer)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case COL_FAMILY:
+ return getColFamily();
+
+ case COL_QUALIFIER:
+ return getColQualifier();
+
+ case COL_VISIBILITY:
+ return getColVisibility();
+
+ }
+ 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 COL_FAMILY:
+ return isSetColFamily();
+ case COL_QUALIFIER:
+ return isSetColQualifier();
+ case COL_VISIBILITY:
+ return isSetColVisibility();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof PColumn)
+ return this.equals((PColumn)that);
+ return false;
+ }
+
+ public boolean equals(PColumn that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_colFamily = true && this.isSetColFamily();
+ boolean that_present_colFamily = true && that.isSetColFamily();
+ if (this_present_colFamily || that_present_colFamily) {
+ if (!(this_present_colFamily && that_present_colFamily))
+ return false;
+ if (!this.colFamily.equals(that.colFamily))
+ return false;
+ }
+
+ boolean this_present_colQualifier = true && this.isSetColQualifier();
+ boolean that_present_colQualifier = true && that.isSetColQualifier();
+ if (this_present_colQualifier || that_present_colQualifier) {
+ if (!(this_present_colQualifier && that_present_colQualifier))
+ return false;
+ if (!this.colQualifier.equals(that.colQualifier))
+ return false;
+ }
+
+ boolean this_present_colVisibility = true && this.isSetColVisibility();
+ boolean that_present_colVisibility = true && that.isSetColVisibility();
+ if (this_present_colVisibility || that_present_colVisibility) {
+ if (!(this_present_colVisibility && that_present_colVisibility))
+ return false;
+ if (!this.colVisibility.equals(that.colVisibility))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ public int compareTo(PColumn other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ PColumn typedOther = (PColumn)other;
+
+ lastComparison = Boolean.valueOf(isSetColFamily()).compareTo(typedOther.isSetColFamily());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetColFamily()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.colFamily, typedOther.colFamily);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetColQualifier()).compareTo(typedOther.isSetColQualifier());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetColQualifier()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.colQualifier, typedOther.colQualifier);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetColVisibility()).compareTo(typedOther.isSetColVisibility());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetColVisibility()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.colVisibility, typedOther.colVisibility);
+ 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("PColumn(");
+ boolean first = true;
+
+ sb.append("colFamily:");
+ if (this.colFamily == null) {
+ sb.append("null");
+ } else {
+ org.apache.thrift.TBaseHelper.toString(this.colFamily, sb);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("colQualifier:");
+ if (this.colQualifier == null) {
+ sb.append("null");
+ } else {
+ org.apache.thrift.TBaseHelper.toString(this.colQualifier, sb);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("colVisibility:");
+ if (this.colVisibility == null) {
+ sb.append("null");
+ } else {
+ org.apache.thrift.TBaseHelper.toString(this.colVisibility, 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 PColumnStandardSchemeFactory implements SchemeFactory {
+ public PColumnStandardScheme getScheme() {
+ return new PColumnStandardScheme();
+ }
+ }
+
+ private static class PColumnStandardScheme extends StandardScheme<PColumn> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, PColumn 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: // COL_FAMILY
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.colFamily = iprot.readBinary();
+ struct.setColFamilyIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // COL_QUALIFIER
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.colQualifier = iprot.readBinary();
+ struct.setColQualifierIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // COL_VISIBILITY
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.colVisibility = iprot.readBinary();
+ struct.setColVisibilityIsSet(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, PColumn struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.colFamily != null) {
+ oprot.writeFieldBegin(COL_FAMILY_FIELD_DESC);
+ oprot.writeBinary(struct.colFamily);
+ oprot.writeFieldEnd();
+ }
+ if (struct.colQualifier != null) {
+ oprot.writeFieldBegin(COL_QUALIFIER_FIELD_DESC);
+ oprot.writeBinary(struct.colQualifier);
+ oprot.writeFieldEnd();
+ }
+ if (struct.colVisibility != null) {
+ oprot.writeFieldBegin(COL_VISIBILITY_FIELD_DESC);
+ oprot.writeBinary(struct.colVisibility);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class PColumnTupleSchemeFactory implements SchemeFactory {
+ public PColumnTupleScheme getScheme() {
+ return new PColumnTupleScheme();
+ }
+ }
+
+ private static class PColumnTupleScheme extends TupleScheme<PColumn> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, PColumn struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetColFamily()) {
+ optionals.set(0);
+ }
+ if (struct.isSetColQualifier()) {
+ optionals.set(1);
+ }
+ if (struct.isSetColVisibility()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetColFamily()) {
+ oprot.writeBinary(struct.colFamily);
+ }
+ if (struct.isSetColQualifier()) {
+ oprot.writeBinary(struct.colQualifier);
+ }
+ if (struct.isSetColVisibility()) {
+ oprot.writeBinary(struct.colVisibility);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, PColumn struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(3);
+ if (incoming.get(0)) {
+ struct.colFamily = iprot.readBinary();
+ struct.setColFamilyIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.colQualifier = iprot.readBinary();
+ struct.setColQualifierIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.colVisibility = iprot.readBinary();
+ struct.setColVisibilityIsSet(true);
+ }
+ }
+ }
+
+}
+
Propchange: accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PColumn.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PCompactionReason.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PCompactionReason.java?rev=1437135&view=auto
==============================================================================
--- accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PCompactionReason.java (added)
+++ accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PCompactionReason.java Tue Jan 22 20:05:24 2013
@@ -0,0 +1,70 @@
+/*
+ * 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 PCompactionReason implements org.apache.thrift.TEnum {
+ USER(0),
+ SYSTEM(1),
+ CHOP(2),
+ IDLE(3),
+ CLOSE(4);
+
+ private final int value;
+
+ private PCompactionReason(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 PCompactionReason findByValue(int value) {
+ switch (value) {
+ case 0:
+ return USER;
+ case 1:
+ return SYSTEM;
+ case 2:
+ return CHOP;
+ case 3:
+ return IDLE;
+ case 4:
+ return CLOSE;
+ default:
+ return null;
+ }
+ }
+}
Propchange: accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PCompactionReason.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PCompactionType.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PCompactionType.java?rev=1437135&view=auto
==============================================================================
--- accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PCompactionType.java (added)
+++ accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PCompactionType.java Tue Jan 22 20:05:24 2013
@@ -0,0 +1,67 @@
+/*
+ * 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 PCompactionType implements org.apache.thrift.TEnum {
+ MINOR(0),
+ MERGE(1),
+ MAJOR(2),
+ FULL(3);
+
+ private final int value;
+
+ private PCompactionType(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 PCompactionType findByValue(int value) {
+ switch (value) {
+ case 0:
+ return MINOR;
+ case 1:
+ return MERGE;
+ case 2:
+ return MAJOR;
+ case 3:
+ return FULL;
+ default:
+ return null;
+ }
+ }
+}
Propchange: accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PCompactionType.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PIteratorScope.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PIteratorScope.java?rev=1437135&view=auto
==============================================================================
--- accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PIteratorScope.java (added)
+++ accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PIteratorScope.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 PIteratorScope implements org.apache.thrift.TEnum {
+ MINC(0),
+ MAJC(1),
+ SCAN(2);
+
+ private final int value;
+
+ private PIteratorScope(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 PIteratorScope findByValue(int value) {
+ switch (value) {
+ case 0:
+ return MINC;
+ case 1:
+ return MAJC;
+ case 2:
+ return SCAN;
+ default:
+ return null;
+ }
+ }
+}
Propchange: accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PIteratorScope.java
------------------------------------------------------------------------------
svn:eol-style = native