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 2012/07/05 21:39:05 UTC
svn commit: r1357829 [9/12] - in /accumulo/branches/ACCUMULO-672:
core/src/main/java/org/apache/accumulo/core/client/impl/thrift/
core/src/main/java/org/apache/accumulo/core/data/thrift/
core/src/main/java/org/apache/accumulo/core/gc/thrift/ core/src/m...
Modified: accumulo/branches/ACCUMULO-672/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ActiveScan.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-672/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ActiveScan.java?rev=1357829&r1=1357828&r2=1357829&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-672/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ActiveScan.java (original)
+++ accumulo/branches/ACCUMULO-672/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ActiveScan.java Thu Jul 5 19:39:03 2012
@@ -1,10 +1,17 @@
/**
- * Autogenerated by Thrift
+ * Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
*/
package org.apache.accumulo.core.tabletserver.thrift;
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
@@ -35,25 +42,31 @@ import org.slf4j.LoggerFactory;
private static final org.apache.thrift.protocol.TField SSI_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("ssiList", org.apache.thrift.protocol.TType.LIST, (short)11);
private static final org.apache.thrift.protocol.TField SSIO_FIELD_DESC = new org.apache.thrift.protocol.TField("ssio", org.apache.thrift.protocol.TType.MAP, (short)12);
- public String client;
- public String user;
- public String tableId;
- public long age;
- public long idleTime;
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new ActiveScanStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new ActiveScanTupleSchemeFactory());
+ }
+
+ public String client; // required
+ public String user; // required
+ public String tableId; // required
+ public long age; // required
+ public long idleTime; // required
/**
*
* @see ScanType
*/
- public ScanType type;
+ public ScanType type; // required
/**
*
* @see ScanState
*/
- public ScanState state;
- public org.apache.accumulo.core.data.thrift.TKeyExtent extent;
- public List<org.apache.accumulo.core.data.thrift.TColumn> columns;
- public List<org.apache.accumulo.core.data.thrift.IterInfo> ssiList;
- public Map<String,Map<String,String>> ssio;
+ public ScanState state; // required
+ public org.apache.accumulo.core.data.thrift.TKeyExtent extent; // required
+ public List<org.apache.accumulo.core.data.thrift.TColumn> columns; // required
+ public List<org.apache.accumulo.core.data.thrift.IterInfo> ssiList; // required
+ public Map<String,Map<String,String>> ssio; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -155,7 +168,6 @@ import org.slf4j.LoggerFactory;
private static final int __AGE_ISSET_ID = 0;
private static final int __IDLETIME_ISSET_ID = 1;
private BitSet __isset_bit_vector = new BitSet(2);
-
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -736,10 +748,10 @@ import org.slf4j.LoggerFactory;
return getTableId();
case AGE:
- return new Long(getAge());
+ return Long.valueOf(getAge());
case IDLE_TIME:
- return new Long(getIdleTime());
+ return Long.valueOf(getIdleTime());
case TYPE:
return getType();
@@ -1042,239 +1054,11 @@ import org.slf4j.LoggerFactory;
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField field;
- iprot.readStructBegin();
- while (true)
- {
- field = iprot.readFieldBegin();
- if (field.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (field.id) {
- case 2: // CLIENT
- if (field.type == org.apache.thrift.protocol.TType.STRING) {
- this.client = iprot.readString();
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 3: // USER
- if (field.type == org.apache.thrift.protocol.TType.STRING) {
- this.user = iprot.readString();
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 4: // TABLE_ID
- if (field.type == org.apache.thrift.protocol.TType.STRING) {
- this.tableId = iprot.readString();
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 5: // AGE
- if (field.type == org.apache.thrift.protocol.TType.I64) {
- this.age = iprot.readI64();
- setAgeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 6: // IDLE_TIME
- if (field.type == org.apache.thrift.protocol.TType.I64) {
- this.idleTime = iprot.readI64();
- setIdleTimeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 7: // TYPE
- if (field.type == org.apache.thrift.protocol.TType.I32) {
- this.type = ScanType.findByValue(iprot.readI32());
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 8: // STATE
- if (field.type == org.apache.thrift.protocol.TType.I32) {
- this.state = ScanState.findByValue(iprot.readI32());
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 9: // EXTENT
- if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
- this.extent = new org.apache.accumulo.core.data.thrift.TKeyExtent();
- this.extent.read(iprot);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 10: // COLUMNS
- if (field.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();
- this.columns = new ArrayList<org.apache.accumulo.core.data.thrift.TColumn>(_list4.size);
- for (int _i5 = 0; _i5 < _list4.size; ++_i5)
- {
- org.apache.accumulo.core.data.thrift.TColumn _elem6;
- _elem6 = new org.apache.accumulo.core.data.thrift.TColumn();
- _elem6.read(iprot);
- this.columns.add(_elem6);
- }
- iprot.readListEnd();
- }
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 11: // SSI_LIST
- if (field.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list7 = iprot.readListBegin();
- this.ssiList = new ArrayList<org.apache.accumulo.core.data.thrift.IterInfo>(_list7.size);
- for (int _i8 = 0; _i8 < _list7.size; ++_i8)
- {
- org.apache.accumulo.core.data.thrift.IterInfo _elem9;
- _elem9 = new org.apache.accumulo.core.data.thrift.IterInfo();
- _elem9.read(iprot);
- this.ssiList.add(_elem9);
- }
- iprot.readListEnd();
- }
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 12: // SSIO
- if (field.type == org.apache.thrift.protocol.TType.MAP) {
- {
- org.apache.thrift.protocol.TMap _map10 = iprot.readMapBegin();
- this.ssio = new HashMap<String,Map<String,String>>(2*_map10.size);
- for (int _i11 = 0; _i11 < _map10.size; ++_i11)
- {
- String _key12;
- Map<String,String> _val13;
- _key12 = iprot.readString();
- {
- org.apache.thrift.protocol.TMap _map14 = iprot.readMapBegin();
- _val13 = new HashMap<String,String>(2*_map14.size);
- for (int _i15 = 0; _i15 < _map14.size; ++_i15)
- {
- String _key16;
- String _val17;
- _key16 = iprot.readString();
- _val17 = iprot.readString();
- _val13.put(_key16, _val17);
- }
- iprot.readMapEnd();
- }
- this.ssio.put(_key12, _val13);
- }
- iprot.readMapEnd();
- }
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- validate();
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (this.client != null) {
- oprot.writeFieldBegin(CLIENT_FIELD_DESC);
- oprot.writeString(this.client);
- oprot.writeFieldEnd();
- }
- if (this.user != null) {
- oprot.writeFieldBegin(USER_FIELD_DESC);
- oprot.writeString(this.user);
- oprot.writeFieldEnd();
- }
- if (this.tableId != null) {
- oprot.writeFieldBegin(TABLE_ID_FIELD_DESC);
- oprot.writeString(this.tableId);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldBegin(AGE_FIELD_DESC);
- oprot.writeI64(this.age);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(IDLE_TIME_FIELD_DESC);
- oprot.writeI64(this.idleTime);
- oprot.writeFieldEnd();
- if (this.type != null) {
- oprot.writeFieldBegin(TYPE_FIELD_DESC);
- oprot.writeI32(this.type.getValue());
- oprot.writeFieldEnd();
- }
- if (this.state != null) {
- oprot.writeFieldBegin(STATE_FIELD_DESC);
- oprot.writeI32(this.state.getValue());
- oprot.writeFieldEnd();
- }
- if (this.extent != null) {
- oprot.writeFieldBegin(EXTENT_FIELD_DESC);
- this.extent.write(oprot);
- oprot.writeFieldEnd();
- }
- if (this.columns != null) {
- oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.columns.size()));
- for (org.apache.accumulo.core.data.thrift.TColumn _iter18 : this.columns)
- {
- _iter18.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- if (this.ssiList != null) {
- oprot.writeFieldBegin(SSI_LIST_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.ssiList.size()));
- for (org.apache.accumulo.core.data.thrift.IterInfo _iter19 : this.ssiList)
- {
- _iter19.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- if (this.ssio != null) {
- oprot.writeFieldBegin(SSIO_FIELD_DESC);
- {
- oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, this.ssio.size()));
- for (Map.Entry<String, Map<String,String>> _iter20 : this.ssio.entrySet())
- {
- oprot.writeString(_iter20.getKey());
- {
- oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, _iter20.getValue().size()));
- for (Map.Entry<String, String> _iter21 : _iter20.getValue().entrySet())
- {
- oprot.writeString(_iter21.getKey());
- oprot.writeString(_iter21.getValue());
- }
- oprot.writeMapEnd();
- }
- }
- oprot.writeMapEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
@@ -1387,5 +1171,461 @@ import org.slf4j.LoggerFactory;
}
}
+ private static class ActiveScanStandardSchemeFactory implements SchemeFactory {
+ public ActiveScanStandardScheme getScheme() {
+ return new ActiveScanStandardScheme();
+ }
+ }
+
+ private static class ActiveScanStandardScheme extends StandardScheme<ActiveScan> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, ActiveScan 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 2: // 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 3: // 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 4: // 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 5: // 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 6: // 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 7: // TYPE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.type = ScanType.findByValue(iprot.readI32());
+ struct.setTypeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 8: // STATE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.state = ScanState.findByValue(iprot.readI32());
+ struct.setStateIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 9: // EXTENT
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.extent = new org.apache.accumulo.core.data.thrift.TKeyExtent();
+ struct.extent.read(iprot);
+ struct.setExtentIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 10: // COLUMNS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
+ struct.columns = new ArrayList<org.apache.accumulo.core.data.thrift.TColumn>(_list8.size);
+ for (int _i9 = 0; _i9 < _list8.size; ++_i9)
+ {
+ org.apache.accumulo.core.data.thrift.TColumn _elem10; // required
+ _elem10 = new org.apache.accumulo.core.data.thrift.TColumn();
+ _elem10.read(iprot);
+ struct.columns.add(_elem10);
+ }
+ iprot.readListEnd();
+ }
+ struct.setColumnsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 11: // SSI_LIST
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list11 = iprot.readListBegin();
+ struct.ssiList = new ArrayList<org.apache.accumulo.core.data.thrift.IterInfo>(_list11.size);
+ for (int _i12 = 0; _i12 < _list11.size; ++_i12)
+ {
+ org.apache.accumulo.core.data.thrift.IterInfo _elem13; // required
+ _elem13 = new org.apache.accumulo.core.data.thrift.IterInfo();
+ _elem13.read(iprot);
+ struct.ssiList.add(_elem13);
+ }
+ iprot.readListEnd();
+ }
+ struct.setSsiListIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 12: // SSIO
+ if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
+ {
+ org.apache.thrift.protocol.TMap _map14 = iprot.readMapBegin();
+ struct.ssio = new HashMap<String,Map<String,String>>(2*_map14.size);
+ for (int _i15 = 0; _i15 < _map14.size; ++_i15)
+ {
+ String _key16; // required
+ Map<String,String> _val17; // required
+ _key16 = iprot.readString();
+ {
+ org.apache.thrift.protocol.TMap _map18 = iprot.readMapBegin();
+ _val17 = new HashMap<String,String>(2*_map18.size);
+ for (int _i19 = 0; _i19 < _map18.size; ++_i19)
+ {
+ String _key20; // required
+ String _val21; // required
+ _key20 = iprot.readString();
+ _val21 = iprot.readString();
+ _val17.put(_key20, _val21);
+ }
+ iprot.readMapEnd();
+ }
+ struct.ssio.put(_key16, _val17);
+ }
+ iprot.readMapEnd();
+ }
+ struct.setSsioIsSet(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, ActiveScan 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 (org.apache.accumulo.core.data.thrift.TColumn _iter22 : struct.columns)
+ {
+ _iter22.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ if (struct.ssiList != null) {
+ oprot.writeFieldBegin(SSI_LIST_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.ssiList.size()));
+ for (org.apache.accumulo.core.data.thrift.IterInfo _iter23 : struct.ssiList)
+ {
+ _iter23.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ if (struct.ssio != null) {
+ oprot.writeFieldBegin(SSIO_FIELD_DESC);
+ {
+ oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, struct.ssio.size()));
+ for (Map.Entry<String, Map<String,String>> _iter24 : struct.ssio.entrySet())
+ {
+ oprot.writeString(_iter24.getKey());
+ {
+ oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, _iter24.getValue().size()));
+ for (Map.Entry<String, String> _iter25 : _iter24.getValue().entrySet())
+ {
+ oprot.writeString(_iter25.getKey());
+ oprot.writeString(_iter25.getValue());
+ }
+ oprot.writeMapEnd();
+ }
+ }
+ oprot.writeMapEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class ActiveScanTupleSchemeFactory implements SchemeFactory {
+ public ActiveScanTupleScheme getScheme() {
+ return new ActiveScanTupleScheme();
+ }
+ }
+
+ private static class ActiveScanTupleScheme extends TupleScheme<ActiveScan> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, ActiveScan 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.isSetSsiList()) {
+ optionals.set(9);
+ }
+ if (struct.isSetSsio()) {
+ 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 (org.apache.accumulo.core.data.thrift.TColumn _iter26 : struct.columns)
+ {
+ _iter26.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetSsiList()) {
+ {
+ oprot.writeI32(struct.ssiList.size());
+ for (org.apache.accumulo.core.data.thrift.IterInfo _iter27 : struct.ssiList)
+ {
+ _iter27.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetSsio()) {
+ {
+ oprot.writeI32(struct.ssio.size());
+ for (Map.Entry<String, Map<String,String>> _iter28 : struct.ssio.entrySet())
+ {
+ oprot.writeString(_iter28.getKey());
+ {
+ oprot.writeI32(_iter28.getValue().size());
+ for (Map.Entry<String, String> _iter29 : _iter28.getValue().entrySet())
+ {
+ oprot.writeString(_iter29.getKey());
+ oprot.writeString(_iter29.getValue());
+ }
+ }
+ }
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, ActiveScan 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 = ScanType.findByValue(iprot.readI32());
+ struct.setTypeIsSet(true);
+ }
+ if (incoming.get(6)) {
+ struct.state = ScanState.findByValue(iprot.readI32());
+ struct.setStateIsSet(true);
+ }
+ if (incoming.get(7)) {
+ struct.extent = new org.apache.accumulo.core.data.thrift.TKeyExtent();
+ struct.extent.read(iprot);
+ struct.setExtentIsSet(true);
+ }
+ if (incoming.get(8)) {
+ {
+ org.apache.thrift.protocol.TList _list30 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.columns = new ArrayList<org.apache.accumulo.core.data.thrift.TColumn>(_list30.size);
+ for (int _i31 = 0; _i31 < _list30.size; ++_i31)
+ {
+ org.apache.accumulo.core.data.thrift.TColumn _elem32; // required
+ _elem32 = new org.apache.accumulo.core.data.thrift.TColumn();
+ _elem32.read(iprot);
+ struct.columns.add(_elem32);
+ }
+ }
+ struct.setColumnsIsSet(true);
+ }
+ if (incoming.get(9)) {
+ {
+ org.apache.thrift.protocol.TList _list33 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.ssiList = new ArrayList<org.apache.accumulo.core.data.thrift.IterInfo>(_list33.size);
+ for (int _i34 = 0; _i34 < _list33.size; ++_i34)
+ {
+ org.apache.accumulo.core.data.thrift.IterInfo _elem35; // required
+ _elem35 = new org.apache.accumulo.core.data.thrift.IterInfo();
+ _elem35.read(iprot);
+ struct.ssiList.add(_elem35);
+ }
+ }
+ struct.setSsiListIsSet(true);
+ }
+ if (incoming.get(10)) {
+ {
+ org.apache.thrift.protocol.TMap _map36 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, iprot.readI32());
+ struct.ssio = new HashMap<String,Map<String,String>>(2*_map36.size);
+ for (int _i37 = 0; _i37 < _map36.size; ++_i37)
+ {
+ String _key38; // required
+ Map<String,String> _val39; // required
+ _key38 = iprot.readString();
+ {
+ org.apache.thrift.protocol.TMap _map40 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ _val39 = new HashMap<String,String>(2*_map40.size);
+ for (int _i41 = 0; _i41 < _map40.size; ++_i41)
+ {
+ String _key42; // required
+ String _val43; // required
+ _key42 = iprot.readString();
+ _val43 = iprot.readString();
+ _val39.put(_key42, _val43);
+ }
+ }
+ struct.ssio.put(_key38, _val39);
+ }
+ }
+ struct.setSsioIsSet(true);
+ }
+ }
+ }
+
}
Modified: accumulo/branches/ACCUMULO-672/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ConstraintViolationException.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-672/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ConstraintViolationException.java?rev=1357829&r1=1357828&r2=1357829&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-672/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ConstraintViolationException.java (original)
+++ accumulo/branches/ACCUMULO-672/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ConstraintViolationException.java Thu Jul 5 19:39:03 2012
@@ -1,10 +1,17 @@
/**
- * Autogenerated by Thrift
+ * Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
*/
package org.apache.accumulo.core.tabletserver.thrift;
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
@@ -25,7 +32,13 @@ import org.slf4j.LoggerFactory;
private static final org.apache.thrift.protocol.TField VIOLATION_SUMMARIES_FIELD_DESC = new org.apache.thrift.protocol.TField("violationSummaries", org.apache.thrift.protocol.TType.LIST, (short)1);
- public List<org.apache.accumulo.core.data.thrift.TConstraintViolationSummary> violationSummaries;
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new ConstraintViolationExceptionStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new ConstraintViolationExceptionTupleSchemeFactory());
+ }
+
+ public List<org.apache.accumulo.core.data.thrift.TConstraintViolationSummary> violationSummaries; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -86,7 +99,6 @@ import org.slf4j.LoggerFactory;
}
// 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);
@@ -259,62 +271,11 @@ import org.slf4j.LoggerFactory;
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField field;
- iprot.readStructBegin();
- while (true)
- {
- field = iprot.readFieldBegin();
- if (field.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (field.id) {
- case 1: // VIOLATION_SUMMARIES
- if (field.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
- this.violationSummaries = new ArrayList<org.apache.accumulo.core.data.thrift.TConstraintViolationSummary>(_list0.size);
- for (int _i1 = 0; _i1 < _list0.size; ++_i1)
- {
- org.apache.accumulo.core.data.thrift.TConstraintViolationSummary _elem2;
- _elem2 = new org.apache.accumulo.core.data.thrift.TConstraintViolationSummary();
- _elem2.read(iprot);
- this.violationSummaries.add(_elem2);
- }
- iprot.readListEnd();
- }
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- validate();
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (this.violationSummaries != null) {
- oprot.writeFieldBegin(VIOLATION_SUMMARIES_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.violationSummaries.size()));
- for (org.apache.accumulo.core.data.thrift.TConstraintViolationSummary _iter3 : this.violationSummaries)
- {
- _iter3.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
@@ -353,5 +314,123 @@ import org.slf4j.LoggerFactory;
}
}
+ private static class ConstraintViolationExceptionStandardSchemeFactory implements SchemeFactory {
+ public ConstraintViolationExceptionStandardScheme getScheme() {
+ return new ConstraintViolationExceptionStandardScheme();
+ }
+ }
+
+ private static class ConstraintViolationExceptionStandardScheme extends StandardScheme<ConstraintViolationException> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, ConstraintViolationException 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: // VIOLATION_SUMMARIES
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
+ struct.violationSummaries = new ArrayList<org.apache.accumulo.core.data.thrift.TConstraintViolationSummary>(_list0.size);
+ for (int _i1 = 0; _i1 < _list0.size; ++_i1)
+ {
+ org.apache.accumulo.core.data.thrift.TConstraintViolationSummary _elem2; // required
+ _elem2 = new org.apache.accumulo.core.data.thrift.TConstraintViolationSummary();
+ _elem2.read(iprot);
+ struct.violationSummaries.add(_elem2);
+ }
+ iprot.readListEnd();
+ }
+ struct.setViolationSummariesIsSet(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, ConstraintViolationException struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.violationSummaries != null) {
+ oprot.writeFieldBegin(VIOLATION_SUMMARIES_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.violationSummaries.size()));
+ for (org.apache.accumulo.core.data.thrift.TConstraintViolationSummary _iter3 : struct.violationSummaries)
+ {
+ _iter3.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class ConstraintViolationExceptionTupleSchemeFactory implements SchemeFactory {
+ public ConstraintViolationExceptionTupleScheme getScheme() {
+ return new ConstraintViolationExceptionTupleScheme();
+ }
+ }
+
+ private static class ConstraintViolationExceptionTupleScheme extends TupleScheme<ConstraintViolationException> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, ConstraintViolationException struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetViolationSummaries()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetViolationSummaries()) {
+ {
+ oprot.writeI32(struct.violationSummaries.size());
+ for (org.apache.accumulo.core.data.thrift.TConstraintViolationSummary _iter4 : struct.violationSummaries)
+ {
+ _iter4.write(oprot);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, ConstraintViolationException struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ {
+ org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.violationSummaries = new ArrayList<org.apache.accumulo.core.data.thrift.TConstraintViolationSummary>(_list5.size);
+ for (int _i6 = 0; _i6 < _list5.size; ++_i6)
+ {
+ org.apache.accumulo.core.data.thrift.TConstraintViolationSummary _elem7; // required
+ _elem7 = new org.apache.accumulo.core.data.thrift.TConstraintViolationSummary();
+ _elem7.read(iprot);
+ struct.violationSummaries.add(_elem7);
+ }
+ }
+ struct.setViolationSummariesIsSet(true);
+ }
+ }
+ }
+
}
Modified: accumulo/branches/ACCUMULO-672/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/IteratorConfig.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-672/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/IteratorConfig.java?rev=1357829&r1=1357828&r2=1357829&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-672/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/IteratorConfig.java (original)
+++ accumulo/branches/ACCUMULO-672/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/IteratorConfig.java Thu Jul 5 19:39:03 2012
@@ -1,10 +1,17 @@
/**
- * Autogenerated by Thrift
+ * Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
*/
package org.apache.accumulo.core.tabletserver.thrift;
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
@@ -25,7 +32,13 @@ import org.slf4j.LoggerFactory;
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)1);
- public List<TIteratorSetting> iterators;
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new IteratorConfigStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new IteratorConfigTupleSchemeFactory());
+ }
+
+ public List<TIteratorSetting> iterators; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -86,7 +99,6 @@ import org.slf4j.LoggerFactory;
}
// 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);
@@ -259,62 +271,11 @@ import org.slf4j.LoggerFactory;
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField field;
- iprot.readStructBegin();
- while (true)
- {
- field = iprot.readFieldBegin();
- if (field.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (field.id) {
- case 1: // ITERATORS
- if (field.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list27 = iprot.readListBegin();
- this.iterators = new ArrayList<TIteratorSetting>(_list27.size);
- for (int _i28 = 0; _i28 < _list27.size; ++_i28)
- {
- TIteratorSetting _elem29;
- _elem29 = new TIteratorSetting();
- _elem29.read(iprot);
- this.iterators.add(_elem29);
- }
- iprot.readListEnd();
- }
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- validate();
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (this.iterators != null) {
- oprot.writeFieldBegin(ITERATORS_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.iterators.size()));
- for (TIteratorSetting _iter30 : this.iterators)
- {
- _iter30.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
@@ -353,5 +314,123 @@ import org.slf4j.LoggerFactory;
}
}
+ private static class IteratorConfigStandardSchemeFactory implements SchemeFactory {
+ public IteratorConfigStandardScheme getScheme() {
+ return new IteratorConfigStandardScheme();
+ }
+ }
+
+ private static class IteratorConfigStandardScheme extends StandardScheme<IteratorConfig> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, IteratorConfig 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: // ITERATORS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list54 = iprot.readListBegin();
+ struct.iterators = new ArrayList<TIteratorSetting>(_list54.size);
+ for (int _i55 = 0; _i55 < _list54.size; ++_i55)
+ {
+ TIteratorSetting _elem56; // required
+ _elem56 = new TIteratorSetting();
+ _elem56.read(iprot);
+ struct.iterators.add(_elem56);
+ }
+ iprot.readListEnd();
+ }
+ struct.setIteratorsIsSet(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, IteratorConfig struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ 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 (TIteratorSetting _iter57 : struct.iterators)
+ {
+ _iter57.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class IteratorConfigTupleSchemeFactory implements SchemeFactory {
+ public IteratorConfigTupleScheme getScheme() {
+ return new IteratorConfigTupleScheme();
+ }
+ }
+
+ private static class IteratorConfigTupleScheme extends TupleScheme<IteratorConfig> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, IteratorConfig struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetIterators()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetIterators()) {
+ {
+ oprot.writeI32(struct.iterators.size());
+ for (TIteratorSetting _iter58 : struct.iterators)
+ {
+ _iter58.write(oprot);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, IteratorConfig struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ {
+ org.apache.thrift.protocol.TList _list59 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.iterators = new ArrayList<TIteratorSetting>(_list59.size);
+ for (int _i60 = 0; _i60 < _list59.size; ++_i60)
+ {
+ TIteratorSetting _elem61; // required
+ _elem61 = new TIteratorSetting();
+ _elem61.read(iprot);
+ struct.iterators.add(_elem61);
+ }
+ }
+ struct.setIteratorsIsSet(true);
+ }
+ }
+ }
+
}
Modified: accumulo/branches/ACCUMULO-672/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/NoSuchScanIDException.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-672/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/NoSuchScanIDException.java?rev=1357829&r1=1357828&r2=1357829&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-672/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/NoSuchScanIDException.java (original)
+++ accumulo/branches/ACCUMULO-672/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/NoSuchScanIDException.java Thu Jul 5 19:39:03 2012
@@ -1,10 +1,17 @@
/**
- * Autogenerated by Thrift
+ * Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
*/
package org.apache.accumulo.core.tabletserver.thrift;
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
@@ -24,6 +31,12 @@ import org.slf4j.LoggerFactory;
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NoSuchScanIDException");
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new NoSuchScanIDExceptionStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new NoSuchScanIDExceptionTupleSchemeFactory());
+ }
+
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -163,32 +176,11 @@ import org.slf4j.LoggerFactory;
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField field;
- iprot.readStructBegin();
- while (true)
- {
- field = iprot.readFieldBegin();
- if (field.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (field.id) {
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- validate();
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- oprot.writeFieldStop();
- oprot.writeStructEnd();
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
@@ -220,5 +212,63 @@ import org.slf4j.LoggerFactory;
}
}
+ private static class NoSuchScanIDExceptionStandardSchemeFactory implements SchemeFactory {
+ public NoSuchScanIDExceptionStandardScheme getScheme() {
+ return new NoSuchScanIDExceptionStandardScheme();
+ }
+ }
+
+ private static class NoSuchScanIDExceptionStandardScheme extends StandardScheme<NoSuchScanIDException> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, NoSuchScanIDException 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) {
+ 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, NoSuchScanIDException struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class NoSuchScanIDExceptionTupleSchemeFactory implements SchemeFactory {
+ public NoSuchScanIDExceptionTupleScheme getScheme() {
+ return new NoSuchScanIDExceptionTupleScheme();
+ }
+ }
+
+ private static class NoSuchScanIDExceptionTupleScheme extends TupleScheme<NoSuchScanIDException> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, NoSuchScanIDException struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, NoSuchScanIDException struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ }
+ }
+
}
Modified: accumulo/branches/ACCUMULO-672/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/NotServingTabletException.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-672/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/NotServingTabletException.java?rev=1357829&r1=1357828&r2=1357829&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-672/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/NotServingTabletException.java (original)
+++ accumulo/branches/ACCUMULO-672/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/NotServingTabletException.java Thu Jul 5 19:39:03 2012
@@ -1,10 +1,17 @@
/**
- * Autogenerated by Thrift
+ * Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
*/
package org.apache.accumulo.core.tabletserver.thrift;
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
@@ -25,7 +32,13 @@ import org.slf4j.LoggerFactory;
private static final org.apache.thrift.protocol.TField EXTENT_FIELD_DESC = new org.apache.thrift.protocol.TField("extent", org.apache.thrift.protocol.TType.STRUCT, (short)1);
- public org.apache.accumulo.core.data.thrift.TKeyExtent extent;
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new NotServingTabletExceptionStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new NotServingTabletExceptionTupleSchemeFactory());
+ }
+
+ public org.apache.accumulo.core.data.thrift.TKeyExtent extent; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -86,7 +99,6 @@ import org.slf4j.LoggerFactory;
}
// 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);
@@ -239,45 +251,11 @@ import org.slf4j.LoggerFactory;
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField field;
- iprot.readStructBegin();
- while (true)
- {
- field = iprot.readFieldBegin();
- if (field.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (field.id) {
- case 1: // EXTENT
- if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
- this.extent = new org.apache.accumulo.core.data.thrift.TKeyExtent();
- this.extent.read(iprot);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- validate();
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (this.extent != null) {
- oprot.writeFieldBegin(EXTENT_FIELD_DESC);
- this.extent.write(oprot);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
@@ -316,5 +294,91 @@ import org.slf4j.LoggerFactory;
}
}
+ private static class NotServingTabletExceptionStandardSchemeFactory implements SchemeFactory {
+ public NotServingTabletExceptionStandardScheme getScheme() {
+ return new NotServingTabletExceptionStandardScheme();
+ }
+ }
+
+ private static class NotServingTabletExceptionStandardScheme extends StandardScheme<NotServingTabletException> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, NotServingTabletException struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // EXTENT
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.extent = new org.apache.accumulo.core.data.thrift.TKeyExtent();
+ struct.extent.read(iprot);
+ struct.setExtentIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, NotServingTabletException struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.extent != null) {
+ oprot.writeFieldBegin(EXTENT_FIELD_DESC);
+ struct.extent.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class NotServingTabletExceptionTupleSchemeFactory implements SchemeFactory {
+ public NotServingTabletExceptionTupleScheme getScheme() {
+ return new NotServingTabletExceptionTupleScheme();
+ }
+ }
+
+ private static class NotServingTabletExceptionTupleScheme extends TupleScheme<NotServingTabletException> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, NotServingTabletException struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetExtent()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetExtent()) {
+ struct.extent.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, NotServingTabletException struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.extent = new org.apache.accumulo.core.data.thrift.TKeyExtent();
+ struct.extent.read(iprot);
+ struct.setExtentIsSet(true);
+ }
+ }
+ }
+
}
Modified: accumulo/branches/ACCUMULO-672/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ScanState.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-672/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ScanState.java?rev=1357829&r1=1357828&r2=1357829&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-672/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ScanState.java (original)
+++ accumulo/branches/ACCUMULO-672/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ScanState.java Thu Jul 5 19:39:03 2012
@@ -1,7 +1,8 @@
/**
- * Autogenerated by Thrift
+ * Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
*/
package org.apache.accumulo.core.tabletserver.thrift;
Modified: accumulo/branches/ACCUMULO-672/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ScanType.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-672/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ScanType.java?rev=1357829&r1=1357828&r2=1357829&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-672/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ScanType.java (original)
+++ accumulo/branches/ACCUMULO-672/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ScanType.java Thu Jul 5 19:39:03 2012
@@ -1,7 +1,8 @@
/**
- * Autogenerated by Thrift
+ * Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
*/
package org.apache.accumulo.core.tabletserver.thrift;
Modified: accumulo/branches/ACCUMULO-672/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TIteratorSetting.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-672/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TIteratorSetting.java?rev=1357829&r1=1357828&r2=1357829&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-672/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TIteratorSetting.java (original)
+++ accumulo/branches/ACCUMULO-672/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TIteratorSetting.java Thu Jul 5 19:39:03 2012
@@ -1,10 +1,17 @@
/**
- * Autogenerated by Thrift
+ * Autogenerated by Thrift Compiler (0.8.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
*/
package org.apache.accumulo.core.tabletserver.thrift;
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
@@ -28,10 +35,16 @@ import org.slf4j.LoggerFactory;
private static final org.apache.thrift.protocol.TField ITERATOR_CLASS_FIELD_DESC = new org.apache.thrift.protocol.TField("iteratorClass", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField PROPERTIES_FIELD_DESC = new org.apache.thrift.protocol.TField("properties", org.apache.thrift.protocol.TType.MAP, (short)4);
- public int priority;
- public String name;
- public String iteratorClass;
- public Map<String,String> properties;
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new TIteratorSettingStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new TIteratorSettingTupleSchemeFactory());
+ }
+
+ public int priority; // required
+ public String name; // required
+ public String iteratorClass; // required
+ public Map<String,String> properties; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -103,7 +116,6 @@ import org.slf4j.LoggerFactory;
// isset id assignments
private static final int __PRIORITY_ISSET_ID = 0;
private BitSet __isset_bit_vector = new BitSet(1);
-
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -327,7 +339,7 @@ import org.slf4j.LoggerFactory;
public Object getFieldValue(_Fields field) {
switch (field) {
case PRIORITY:
- return new Integer(getPriority());
+ return Integer.valueOf(getPriority());
case NAME:
return getName();
@@ -474,99 +486,11 @@ import org.slf4j.LoggerFactory;
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField field;
- iprot.readStructBegin();
- while (true)
- {
- field = iprot.readFieldBegin();
- if (field.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (field.id) {
- case 1: // PRIORITY
- if (field.type == org.apache.thrift.protocol.TType.I32) {
- this.priority = iprot.readI32();
- setPriorityIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 2: // NAME
- if (field.type == org.apache.thrift.protocol.TType.STRING) {
- this.name = iprot.readString();
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 3: // ITERATOR_CLASS
- if (field.type == org.apache.thrift.protocol.TType.STRING) {
- this.iteratorClass = iprot.readString();
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 4: // PROPERTIES
- if (field.type == org.apache.thrift.protocol.TType.MAP) {
- {
- org.apache.thrift.protocol.TMap _map22 = iprot.readMapBegin();
- this.properties = new HashMap<String,String>(2*_map22.size);
- for (int _i23 = 0; _i23 < _map22.size; ++_i23)
- {
- String _key24;
- String _val25;
- _key24 = iprot.readString();
- _val25 = iprot.readString();
- this.properties.put(_key24, _val25);
- }
- iprot.readMapEnd();
- }
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
-
- // check for required fields of primitive type, which can't be checked in the validate method
- validate();
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- oprot.writeFieldBegin(PRIORITY_FIELD_DESC);
- oprot.writeI32(this.priority);
- oprot.writeFieldEnd();
- if (this.name != null) {
- oprot.writeFieldBegin(NAME_FIELD_DESC);
- oprot.writeString(this.name);
- oprot.writeFieldEnd();
- }
- if (this.iteratorClass != null) {
- oprot.writeFieldBegin(ITERATOR_CLASS_FIELD_DESC);
- oprot.writeString(this.iteratorClass);
- oprot.writeFieldEnd();
- }
- if (this.properties != null) {
- oprot.writeFieldBegin(PROPERTIES_FIELD_DESC);
- {
- oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.properties.size()));
- for (Map.Entry<String, String> _iter26 : this.properties.entrySet())
- {
- oprot.writeString(_iter26.getKey());
- oprot.writeString(_iter26.getValue());
- }
- oprot.writeMapEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
@@ -627,5 +551,194 @@ import org.slf4j.LoggerFactory;
}
}
+ private static class TIteratorSettingStandardSchemeFactory implements SchemeFactory {
+ public TIteratorSettingStandardScheme getScheme() {
+ return new TIteratorSettingStandardScheme();
+ }
+ }
+
+ private static class TIteratorSettingStandardScheme extends StandardScheme<TIteratorSetting> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, TIteratorSetting struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // PRIORITY
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.priority = iprot.readI32();
+ struct.setPriorityIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // ITERATOR_CLASS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.iteratorClass = iprot.readString();
+ struct.setIteratorClassIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // PROPERTIES
+ if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
+ {
+ org.apache.thrift.protocol.TMap _map44 = iprot.readMapBegin();
+ struct.properties = new HashMap<String,String>(2*_map44.size);
+ for (int _i45 = 0; _i45 < _map44.size; ++_i45)
+ {
+ String _key46; // required
+ String _val47; // required
+ _key46 = iprot.readString();
+ _val47 = iprot.readString();
+ struct.properties.put(_key46, _val47);
+ }
+ iprot.readMapEnd();
+ }
+ struct.setPropertiesIsSet(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, TIteratorSetting struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldBegin(PRIORITY_FIELD_DESC);
+ oprot.writeI32(struct.priority);
+ oprot.writeFieldEnd();
+ if (struct.name != null) {
+ oprot.writeFieldBegin(NAME_FIELD_DESC);
+ oprot.writeString(struct.name);
+ oprot.writeFieldEnd();
+ }
+ if (struct.iteratorClass != null) {
+ oprot.writeFieldBegin(ITERATOR_CLASS_FIELD_DESC);
+ oprot.writeString(struct.iteratorClass);
+ oprot.writeFieldEnd();
+ }
+ if (struct.properties != null) {
+ oprot.writeFieldBegin(PROPERTIES_FIELD_DESC);
+ {
+ oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.properties.size()));
+ for (Map.Entry<String, String> _iter48 : struct.properties.entrySet())
+ {
+ oprot.writeString(_iter48.getKey());
+ oprot.writeString(_iter48.getValue());
+ }
+ oprot.writeMapEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class TIteratorSettingTupleSchemeFactory implements SchemeFactory {
+ public TIteratorSettingTupleScheme getScheme() {
+ return new TIteratorSettingTupleScheme();
+ }
+ }
+
+ private static class TIteratorSettingTupleScheme extends TupleScheme<TIteratorSetting> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, TIteratorSetting struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetPriority()) {
+ optionals.set(0);
+ }
+ if (struct.isSetName()) {
+ optionals.set(1);
+ }
+ if (struct.isSetIteratorClass()) {
+ optionals.set(2);
+ }
+ if (struct.isSetProperties()) {
+ optionals.set(3);
+ }
+ oprot.writeBitSet(optionals, 4);
+ if (struct.isSetPriority()) {
+ oprot.writeI32(struct.priority);
+ }
+ if (struct.isSetName()) {
+ oprot.writeString(struct.name);
+ }
+ if (struct.isSetIteratorClass()) {
+ oprot.writeString(struct.iteratorClass);
+ }
+ if (struct.isSetProperties()) {
+ {
+ oprot.writeI32(struct.properties.size());
+ for (Map.Entry<String, String> _iter49 : struct.properties.entrySet())
+ {
+ oprot.writeString(_iter49.getKey());
+ oprot.writeString(_iter49.getValue());
+ }
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, TIteratorSetting struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(4);
+ if (incoming.get(0)) {
+ struct.priority = iprot.readI32();
+ struct.setPriorityIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.iteratorClass = iprot.readString();
+ struct.setIteratorClassIsSet(true);
+ }
+ if (incoming.get(3)) {
+ {
+ org.apache.thrift.protocol.TMap _map50 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.properties = new HashMap<String,String>(2*_map50.size);
+ for (int _i51 = 0; _i51 < _map50.size; ++_i51)
+ {
+ String _key52; // required
+ String _val53; // required
+ _key52 = iprot.readString();
+ _val53 = iprot.readString();
+ struct.properties.put(_key52, _val53);
+ }
+ }
+ struct.setPropertiesIsSet(true);
+ }
+ }
+ }
+
}