http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b434b067/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Response.java ---------------------------------------------------------------------- diff --git a/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Response.java b/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Response.java index bbe28de..2291733 100644 --- a/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Response.java +++ b/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Response.java @@ -52,12 +52,14 @@ import java.util.Arrays; public class Response extends org.apache.blur.thirdparty.thrift_0_9_0.TUnion<Response, Response._Fields> { private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TStruct STRUCT_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TStruct("Response"); private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField SHARD_TO_VALUE_FIELD_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField("shardToValue", org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.MAP, (short)1); - private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField VALUE_FIELD_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField("value", org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, (short)2); + private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField SERVER_TO_VALUE_FIELD_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField("serverToValue", org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.MAP, (short)2); + private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField VALUE_FIELD_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField("value", org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, (short)3); /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.blur.thirdparty.thrift_0_9_0.TFieldIdEnum { SHARD_TO_VALUE((short)1, "shardToValue"), - VALUE((short)2, "value"); + SERVER_TO_VALUE((short)2, "serverToValue"), + VALUE((short)3, "value"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -74,7 +76,9 @@ public class Response extends org.apache.blur.thirdparty.thrift_0_9_0.TUnion<Res switch(fieldId) { case 1: // SHARD_TO_VALUE return SHARD_TO_VALUE; - case 2: // VALUE + case 2: // SERVER_TO_VALUE + return SERVER_TO_VALUE; + case 3: // VALUE return VALUE; default: return null; @@ -120,7 +124,11 @@ public class Response extends org.apache.blur.thirdparty.thrift_0_9_0.TUnion<Res Map<_Fields, org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SHARD_TO_VALUE, new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData("shardToValue", org.apache.blur.thirdparty.thrift_0_9_0.TFieldRequirementType.DEFAULT, new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.MapMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.MAP, - new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldValueMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING), + new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.StructMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, Shard.class), + new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.StructMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, Value.class)))); + tmpMap.put(_Fields.SERVER_TO_VALUE, new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData("serverToValue", org.apache.blur.thirdparty.thrift_0_9_0.TFieldRequirementType.DEFAULT, + new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.MapMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.MAP, + new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.StructMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, Server.class), new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.StructMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, Value.class)))); tmpMap.put(_Fields.VALUE, new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData("value", org.apache.blur.thirdparty.thrift_0_9_0.TFieldRequirementType.DEFAULT, new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.StructMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, Value.class))); @@ -143,12 +151,18 @@ public class Response extends org.apache.blur.thirdparty.thrift_0_9_0.TUnion<Res return new Response(this); } - public static Response shardToValue(Map<String,Value> value) { + public static Response shardToValue(Map<Shard,Value> value) { Response x = new Response(); x.setShardToValue(value); return x; } + public static Response serverToValue(Map<Server,Value> value) { + Response x = new Response(); + x.setServerToValue(value); + return x; + } + public static Response value(Value value) { Response x = new Response(); x.setValue(value); @@ -163,7 +177,12 @@ public class Response extends org.apache.blur.thirdparty.thrift_0_9_0.TUnion<Res if (value instanceof Map) { break; } - throw new ClassCastException("Was expecting value of type Map<String,Value> for field 'shardToValue', but got " + value.getClass().getSimpleName()); + throw new ClassCastException("Was expecting value of type Map<Shard,Value> for field 'shardToValue', but got " + value.getClass().getSimpleName()); + case SERVER_TO_VALUE: + if (value instanceof Map) { + break; + } + throw new ClassCastException("Was expecting value of type Map<Server,Value> for field 'serverToValue', but got " + value.getClass().getSimpleName()); case VALUE: if (value instanceof Value) { break; @@ -181,15 +200,16 @@ public class Response extends org.apache.blur.thirdparty.thrift_0_9_0.TUnion<Res switch (setField) { case SHARD_TO_VALUE: if (field.type == SHARD_TO_VALUE_FIELD_DESC.type) { - Map<String,Value> shardToValue; + Map<Shard,Value> shardToValue; { org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap _map232 = iprot.readMapBegin(); - shardToValue = new HashMap<String,Value>(2*_map232.size); + shardToValue = new HashMap<Shard,Value>(2*_map232.size); for (int _i233 = 0; _i233 < _map232.size; ++_i233) { - String _key234; // optional + Shard _key234; // optional Value _val235; // required - _key234 = iprot.readString(); + _key234 = new Shard(); + _key234.read(iprot); _val235 = new Value(); _val235.read(iprot); shardToValue.put(_key234, _val235); @@ -201,6 +221,29 @@ public class Response extends org.apache.blur.thirdparty.thrift_0_9_0.TUnion<Res org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolUtil.skip(iprot, field.type); return null; } + case SERVER_TO_VALUE: + if (field.type == SERVER_TO_VALUE_FIELD_DESC.type) { + Map<Server,Value> serverToValue; + { + org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap _map236 = iprot.readMapBegin(); + serverToValue = new HashMap<Server,Value>(2*_map236.size); + for (int _i237 = 0; _i237 < _map236.size; ++_i237) + { + Server _key238; // optional + Value _val239; // required + _key238 = new Server(); + _key238.read(iprot); + _val239 = new Value(); + _val239.read(iprot); + serverToValue.put(_key238, _val239); + } + iprot.readMapEnd(); + } + return serverToValue; + } else { + org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolUtil.skip(iprot, field.type); + return null; + } case VALUE: if (field.type == VALUE_FIELD_DESC.type) { Value value; @@ -223,13 +266,25 @@ public class Response extends org.apache.blur.thirdparty.thrift_0_9_0.TUnion<Res protected void standardSchemeWriteValue(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol oprot) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { switch (setField_) { case SHARD_TO_VALUE: - Map<String,Value> shardToValue = (Map<String,Value>)value_; + Map<Shard,Value> shardToValue = (Map<Shard,Value>)value_; + { + oprot.writeMapBegin(new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, shardToValue.size())); + for (Map.Entry<Shard, Value> _iter240 : shardToValue.entrySet()) + { + _iter240.getKey().write(oprot); + _iter240.getValue().write(oprot); + } + oprot.writeMapEnd(); + } + return; + case SERVER_TO_VALUE: + Map<Server,Value> serverToValue = (Map<Server,Value>)value_; { - oprot.writeMapBegin(new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, shardToValue.size())); - for (Map.Entry<String, Value> _iter236 : shardToValue.entrySet()) + oprot.writeMapBegin(new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, serverToValue.size())); + for (Map.Entry<Server, Value> _iter241 : serverToValue.entrySet()) { - oprot.writeString(_iter236.getKey()); - _iter236.getValue().write(oprot); + _iter241.getKey().write(oprot); + _iter241.getValue().write(oprot); } oprot.writeMapEnd(); } @@ -249,22 +304,41 @@ public class Response extends org.apache.blur.thirdparty.thrift_0_9_0.TUnion<Res if (setField != null) { switch (setField) { case SHARD_TO_VALUE: - Map<String,Value> shardToValue; + Map<Shard,Value> shardToValue; { - org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap _map237 = iprot.readMapBegin(); - shardToValue = new HashMap<String,Value>(2*_map237.size); - for (int _i238 = 0; _i238 < _map237.size; ++_i238) + org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap _map242 = iprot.readMapBegin(); + shardToValue = new HashMap<Shard,Value>(2*_map242.size); + for (int _i243 = 0; _i243 < _map242.size; ++_i243) { - String _key239; // optional - Value _val240; // required - _key239 = iprot.readString(); - _val240 = new Value(); - _val240.read(iprot); - shardToValue.put(_key239, _val240); + Shard _key244; // optional + Value _val245; // required + _key244 = new Shard(); + _key244.read(iprot); + _val245 = new Value(); + _val245.read(iprot); + shardToValue.put(_key244, _val245); } iprot.readMapEnd(); } return shardToValue; + case SERVER_TO_VALUE: + Map<Server,Value> serverToValue; + { + org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap _map246 = iprot.readMapBegin(); + serverToValue = new HashMap<Server,Value>(2*_map246.size); + for (int _i247 = 0; _i247 < _map246.size; ++_i247) + { + Server _key248; // optional + Value _val249; // required + _key248 = new Server(); + _key248.read(iprot); + _val249 = new Value(); + _val249.read(iprot); + serverToValue.put(_key248, _val249); + } + iprot.readMapEnd(); + } + return serverToValue; case VALUE: Value value; value = new Value(); @@ -282,13 +356,25 @@ public class Response extends org.apache.blur.thirdparty.thrift_0_9_0.TUnion<Res protected void tupleSchemeWriteValue(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol oprot) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { switch (setField_) { case SHARD_TO_VALUE: - Map<String,Value> shardToValue = (Map<String,Value>)value_; + Map<Shard,Value> shardToValue = (Map<Shard,Value>)value_; { - oprot.writeMapBegin(new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, shardToValue.size())); - for (Map.Entry<String, Value> _iter241 : shardToValue.entrySet()) + oprot.writeMapBegin(new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, shardToValue.size())); + for (Map.Entry<Shard, Value> _iter250 : shardToValue.entrySet()) { - oprot.writeString(_iter241.getKey()); - _iter241.getValue().write(oprot); + _iter250.getKey().write(oprot); + _iter250.getValue().write(oprot); + } + oprot.writeMapEnd(); + } + return; + case SERVER_TO_VALUE: + Map<Server,Value> serverToValue = (Map<Server,Value>)value_; + { + oprot.writeMapBegin(new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, serverToValue.size())); + for (Map.Entry<Server, Value> _iter251 : serverToValue.entrySet()) + { + _iter251.getKey().write(oprot); + _iter251.getValue().write(oprot); } oprot.writeMapEnd(); } @@ -307,6 +393,8 @@ public class Response extends org.apache.blur.thirdparty.thrift_0_9_0.TUnion<Res switch (setField) { case SHARD_TO_VALUE: return SHARD_TO_VALUE_FIELD_DESC; + case SERVER_TO_VALUE: + return SERVER_TO_VALUE_FIELD_DESC; case VALUE: return VALUE_FIELD_DESC; default: @@ -329,20 +417,34 @@ public class Response extends org.apache.blur.thirdparty.thrift_0_9_0.TUnion<Res } - public Map<String,Value> getShardToValue() { + public Map<Shard,Value> getShardToValue() { if (getSetField() == _Fields.SHARD_TO_VALUE) { - return (Map<String,Value>)getFieldValue(); + return (Map<Shard,Value>)getFieldValue(); } else { throw new RuntimeException("Cannot get field 'shardToValue' because union is currently set to " + getFieldDesc(getSetField()).name); } } - public void setShardToValue(Map<String,Value> value) { + public void setShardToValue(Map<Shard,Value> value) { if (value == null) throw new NullPointerException(); setField_ = _Fields.SHARD_TO_VALUE; value_ = value; } + public Map<Server,Value> getServerToValue() { + if (getSetField() == _Fields.SERVER_TO_VALUE) { + return (Map<Server,Value>)getFieldValue(); + } else { + throw new RuntimeException("Cannot get field 'serverToValue' because union is currently set to " + getFieldDesc(getSetField()).name); + } + } + + public void setServerToValue(Map<Server,Value> value) { + if (value == null) throw new NullPointerException(); + setField_ = _Fields.SERVER_TO_VALUE; + value_ = value; + } + public Value getValue() { if (getSetField() == _Fields.VALUE) { return (Value)getFieldValue(); @@ -362,6 +464,11 @@ public class Response extends org.apache.blur.thirdparty.thrift_0_9_0.TUnion<Res } + public boolean isSetServerToValue() { + return setField_ == _Fields.SERVER_TO_VALUE; + } + + public boolean isSetValue() { return setField_ == _Fields.VALUE; }
http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b434b067/blur-thrift/src/main/java/org/apache/blur/thrift/generated/SafeClientGen.java ---------------------------------------------------------------------- diff --git a/blur-thrift/src/main/java/org/apache/blur/thrift/generated/SafeClientGen.java b/blur-thrift/src/main/java/org/apache/blur/thrift/generated/SafeClientGen.java index 5f2bbb4..6286a5c 100644 --- a/blur-thrift/src/main/java/org/apache/blur/thrift/generated/SafeClientGen.java +++ b/blur-thrift/src/main/java/org/apache/blur/thrift/generated/SafeClientGen.java @@ -28,13 +28,12 @@ package org.apache.blur.thrift.generated; import org.apache.blur.thirdparty.thrift_0_9_0.scheme.IScheme; import org.apache.blur.thirdparty.thrift_0_9_0.scheme.SchemeFactory; import org.apache.blur.thirdparty.thrift_0_9_0.scheme.StandardScheme; + import org.apache.blur.thirdparty.thrift_0_9_0.scheme.TupleScheme; -import org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol; import org.apache.blur.thirdparty.thrift_0_9_0.protocol.TTupleProtocol; import org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolException; import org.apache.blur.thirdparty.thrift_0_9_0.EncodingUtils; import org.apache.blur.thirdparty.thrift_0_9_0.TException; - import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -52,12 +51,980 @@ import java.util.Arrays; public class SafeClientGen extends org.apache.blur.thrift.generated.Blur.Client { - public SafeClientGen(TProtocol iprot, TProtocol oprot) { - super(iprot, oprot); - } +private final org.apache.blur.thrift.ClientLock _lock = new org.apache.blur.thrift.ClientLock("client"); + +public SafeClientGen(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol iprot, org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol oprot) { +super(iprot, oprot); +} + +public SafeClientGen(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot) { +super(prot); +} + +@Override +public boolean addColumnDefinition(java.lang.String arg0, org.apache.blur.thrift.generated.ColumnDefinition arg1) throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.addColumnDefinition(arg0, arg1); + } finally {_lock.unlock();} +} + +@Override +public void cancelQuery(java.lang.String arg0, java.lang.String arg1) throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.cancelQuery(arg0, arg1); + } finally {_lock.unlock();} +} + +@Override +public java.util.Map configuration() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.configuration(); + } finally {_lock.unlock();} +} + +@Override +public java.util.List controllerServerList() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.controllerServerList(); + } finally {_lock.unlock();} +} + +@Override +public void createSnapshot(java.lang.String arg0, java.lang.String arg1) throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.createSnapshot(arg0, arg1); + } finally {_lock.unlock();} +} + +@Override +public void createTable(org.apache.blur.thrift.generated.TableDescriptor arg0) throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.createTable(arg0); + } finally {_lock.unlock();} +} + +@Override +public org.apache.blur.thrift.generated.TableDescriptor describe(java.lang.String arg0) throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.describe(arg0); + } finally {_lock.unlock();} +} + +@Override +public void disableTable(java.lang.String arg0) throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.disableTable(arg0); + } finally {_lock.unlock();} +} + +@Override +public void enableTable(java.lang.String arg0) throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.enableTable(arg0); + } finally {_lock.unlock();} +} + +@Override +public void enqueueMutate(org.apache.blur.thrift.generated.RowMutation arg0) throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.enqueueMutate(arg0); + } finally {_lock.unlock();} +} + +@Override +public void enqueueMutateBatch(java.util.List arg0) throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.enqueueMutateBatch(arg0); + } finally {_lock.unlock();} +} + +@Override +public org.apache.blur.thrift.generated.Response execute(java.lang.String arg0, java.lang.String arg1, org.apache.blur.thrift.generated.Arguments arg2) throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thrift.generated.TimeoutException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.execute(arg0, arg1, arg2); + } finally {_lock.unlock();} +} + +@Override +public org.apache.blur.thrift.generated.FetchResult fetchRow(java.lang.String arg0, org.apache.blur.thrift.generated.Selector arg1) throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.fetchRow(arg0, arg1); + } finally {_lock.unlock();} +} + +@Override +public java.util.List fetchRowBatch(java.lang.String arg0, java.util.List arg1) throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.fetchRowBatch(arg0, arg1); + } finally {_lock.unlock();} +} + +@Override +public boolean isInSafeMode(java.lang.String arg0) throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.isInSafeMode(arg0); + } finally {_lock.unlock();} +} - public SafeClientGen(TProtocol prot) { - super(prot); - } +@Override +public java.util.Map listSnapshots(java.lang.String arg0) throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.listSnapshots(arg0); + } finally {_lock.unlock();} +} + +@Override +public void logging(java.lang.String arg0, org.apache.blur.thrift.generated.Level arg1) throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.logging(arg0, arg1); + } finally {_lock.unlock();} +} + +@Override +public java.util.Map metrics(java.util.Set arg0) throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.metrics(arg0); + } finally {_lock.unlock();} +} + +@Override +public void mutate(org.apache.blur.thrift.generated.RowMutation arg0) throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.mutate(arg0); + } finally {_lock.unlock();} +} + +@Override +public void mutateBatch(java.util.List arg0) throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.mutateBatch(arg0); + } finally {_lock.unlock();} +} + +@Override +public void optimize(java.lang.String arg0, int arg1) throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.optimize(arg0, arg1); + } finally {_lock.unlock();} +} + +@Override +public java.lang.String parseQuery(java.lang.String arg0, org.apache.blur.thrift.generated.Query arg1) throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.parseQuery(arg0, arg1); + } finally {_lock.unlock();} +} + +@Override +public void ping() throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.ping(); + } finally {_lock.unlock();} +} + +@Override +public org.apache.blur.thrift.generated.BlurResults query(java.lang.String arg0, org.apache.blur.thrift.generated.BlurQuery arg1) throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.query(arg0, arg1); + } finally {_lock.unlock();} +} + +@Override +public org.apache.blur.thrift.generated.BlurQueryStatus queryStatusById(java.lang.String arg0, java.lang.String arg1) throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.queryStatusById(arg0, arg1); + } finally {_lock.unlock();} +} + +@Override +public java.util.List queryStatusIdList(java.lang.String arg0) throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.queryStatusIdList(arg0); + } finally {_lock.unlock();} +} + +@Override +public org.apache.blur.thrift.generated.Response reconnect(java.lang.String arg0) throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thrift.generated.TimeoutException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.reconnect(arg0); + } finally {_lock.unlock();} +} + +@Override +public long recordFrequency(java.lang.String arg0, java.lang.String arg1, java.lang.String arg2, java.lang.String arg3) throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.recordFrequency(arg0, arg1, arg2, arg3); + } finally {_lock.unlock();} +} + +@Override +public boolean recv_addColumnDefinition() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.recv_addColumnDefinition(); + } finally {_lock.unlock();} +} + +@Override +public void recv_cancelQuery() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.recv_cancelQuery(); + } finally {_lock.unlock();} +} + +@Override +public java.util.Map recv_configuration() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.recv_configuration(); + } finally {_lock.unlock();} +} + +@Override +public java.util.List recv_controllerServerList() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.recv_controllerServerList(); + } finally {_lock.unlock();} +} + +@Override +public void recv_createSnapshot() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.recv_createSnapshot(); + } finally {_lock.unlock();} +} + +@Override +public void recv_createTable() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.recv_createTable(); + } finally {_lock.unlock();} +} + +@Override +public org.apache.blur.thrift.generated.TableDescriptor recv_describe() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.recv_describe(); + } finally {_lock.unlock();} +} + +@Override +public void recv_disableTable() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.recv_disableTable(); + } finally {_lock.unlock();} +} + +@Override +public void recv_enableTable() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.recv_enableTable(); + } finally {_lock.unlock();} +} + +@Override +public void recv_enqueueMutate() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.recv_enqueueMutate(); + } finally {_lock.unlock();} +} + +@Override +public void recv_enqueueMutateBatch() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.recv_enqueueMutateBatch(); + } finally {_lock.unlock();} +} + +@Override +public org.apache.blur.thrift.generated.Response recv_execute() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thrift.generated.TimeoutException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.recv_execute(); + } finally {_lock.unlock();} +} + +@Override +public org.apache.blur.thrift.generated.FetchResult recv_fetchRow() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.recv_fetchRow(); + } finally {_lock.unlock();} +} + +@Override +public java.util.List recv_fetchRowBatch() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.recv_fetchRowBatch(); + } finally {_lock.unlock();} +} + +@Override +public boolean recv_isInSafeMode() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.recv_isInSafeMode(); + } finally {_lock.unlock();} +} + +@Override +public java.util.Map recv_listSnapshots() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.recv_listSnapshots(); + } finally {_lock.unlock();} +} + +@Override +public void recv_logging() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.recv_logging(); + } finally {_lock.unlock();} +} + +@Override +public java.util.Map recv_metrics() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.recv_metrics(); + } finally {_lock.unlock();} +} + +@Override +public void recv_mutate() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.recv_mutate(); + } finally {_lock.unlock();} +} + +@Override +public void recv_mutateBatch() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.recv_mutateBatch(); + } finally {_lock.unlock();} +} + +@Override +public void recv_optimize() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.recv_optimize(); + } finally {_lock.unlock();} +} + +@Override +public java.lang.String recv_parseQuery() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.recv_parseQuery(); + } finally {_lock.unlock();} +} + +@Override +public void recv_ping() throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.recv_ping(); + } finally {_lock.unlock();} +} + +@Override +public org.apache.blur.thrift.generated.BlurResults recv_query() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.recv_query(); + } finally {_lock.unlock();} +} + +@Override +public org.apache.blur.thrift.generated.BlurQueryStatus recv_queryStatusById() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.recv_queryStatusById(); + } finally {_lock.unlock();} +} + +@Override +public java.util.List recv_queryStatusIdList() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.recv_queryStatusIdList(); + } finally {_lock.unlock();} +} + +@Override +public org.apache.blur.thrift.generated.Response recv_reconnect() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thrift.generated.TimeoutException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.recv_reconnect(); + } finally {_lock.unlock();} +} + +@Override +public long recv_recordFrequency() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.recv_recordFrequency(); + } finally {_lock.unlock();} +} + +@Override +public void recv_removeSnapshot() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.recv_removeSnapshot(); + } finally {_lock.unlock();} +} + +@Override +public void recv_removeTable() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.recv_removeTable(); + } finally {_lock.unlock();} +} + +@Override +public void recv_resetLogging() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.recv_resetLogging(); + } finally {_lock.unlock();} +} + +@Override +public org.apache.blur.thrift.generated.Schema recv_schema() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.recv_schema(); + } finally {_lock.unlock();} +} + +@Override +public java.util.List recv_shardClusterList() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.recv_shardClusterList(); + } finally {_lock.unlock();} +} + +@Override +public java.util.Map recv_shardServerLayout() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.recv_shardServerLayout(); + } finally {_lock.unlock();} +} + +@Override +public java.util.Map recv_shardServerLayoutState() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.recv_shardServerLayoutState(); + } finally {_lock.unlock();} +} + +@Override +public java.util.List recv_shardServerList() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.recv_shardServerList(); + } finally {_lock.unlock();} +} + +@Override +public java.util.List recv_tableList() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.recv_tableList(); + } finally {_lock.unlock();} +} + +@Override +public java.util.List recv_tableListByCluster() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.recv_tableListByCluster(); + } finally {_lock.unlock();} +} + +@Override +public org.apache.blur.thrift.generated.TableStats recv_tableStats() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.recv_tableStats(); + } finally {_lock.unlock();} +} + +@Override +public java.util.List recv_terms() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.recv_terms(); + } finally {_lock.unlock();} +} + +@Override +public java.util.List recv_traceList() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.recv_traceList(); + } finally {_lock.unlock();} +} + +@Override +public void recv_traceRemove() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.recv_traceRemove(); + } finally {_lock.unlock();} +} + +@Override +public java.lang.String recv_traceRequestFetch() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.recv_traceRequestFetch(); + } finally {_lock.unlock();} +} + +@Override +public java.util.List recv_traceRequestList() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.recv_traceRequestList(); + } finally {_lock.unlock();} +} + +@Override +public void refresh() throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.refresh(); + } finally {_lock.unlock();} +} + +@Override +public void removeSnapshot(java.lang.String arg0, java.lang.String arg1) throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.removeSnapshot(arg0, arg1); + } finally {_lock.unlock();} +} + +@Override +public void removeTable(java.lang.String arg0, boolean arg1) throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.removeTable(arg0, arg1); + } finally {_lock.unlock();} +} + +@Override +public void resetLogging() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.resetLogging(); + } finally {_lock.unlock();} +} + +@Override +public org.apache.blur.thrift.generated.Schema schema(java.lang.String arg0) throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.schema(arg0); + } finally {_lock.unlock();} +} + +@Override +public void send_addColumnDefinition(java.lang.String arg0, org.apache.blur.thrift.generated.ColumnDefinition arg1) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_addColumnDefinition(arg0, arg1); + } finally {_lock.unlock();} +} + +@Override +public void send_cancelQuery(java.lang.String arg0, java.lang.String arg1) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_cancelQuery(arg0, arg1); + } finally {_lock.unlock();} +} + +@Override +public void send_configuration() throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_configuration(); + } finally {_lock.unlock();} +} + +@Override +public void send_controllerServerList() throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_controllerServerList(); + } finally {_lock.unlock();} +} + +@Override +public void send_createSnapshot(java.lang.String arg0, java.lang.String arg1) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_createSnapshot(arg0, arg1); + } finally {_lock.unlock();} +} + +@Override +public void send_createTable(org.apache.blur.thrift.generated.TableDescriptor arg0) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_createTable(arg0); + } finally {_lock.unlock();} +} + +@Override +public void send_describe(java.lang.String arg0) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_describe(arg0); + } finally {_lock.unlock();} +} + +@Override +public void send_disableTable(java.lang.String arg0) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_disableTable(arg0); + } finally {_lock.unlock();} +} + +@Override +public void send_enableTable(java.lang.String arg0) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_enableTable(arg0); + } finally {_lock.unlock();} +} + +@Override +public void send_enqueueMutate(org.apache.blur.thrift.generated.RowMutation arg0) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_enqueueMutate(arg0); + } finally {_lock.unlock();} +} + +@Override +public void send_enqueueMutateBatch(java.util.List arg0) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_enqueueMutateBatch(arg0); + } finally {_lock.unlock();} +} + +@Override +public void send_execute(java.lang.String arg0, java.lang.String arg1, org.apache.blur.thrift.generated.Arguments arg2) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_execute(arg0, arg1, arg2); + } finally {_lock.unlock();} +} + +@Override +public void send_fetchRow(java.lang.String arg0, org.apache.blur.thrift.generated.Selector arg1) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_fetchRow(arg0, arg1); + } finally {_lock.unlock();} +} + +@Override +public void send_fetchRowBatch(java.lang.String arg0, java.util.List arg1) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_fetchRowBatch(arg0, arg1); + } finally {_lock.unlock();} +} + +@Override +public void send_isInSafeMode(java.lang.String arg0) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_isInSafeMode(arg0); + } finally {_lock.unlock();} +} + +@Override +public void send_listSnapshots(java.lang.String arg0) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_listSnapshots(arg0); + } finally {_lock.unlock();} +} + +@Override +public void send_logging(java.lang.String arg0, org.apache.blur.thrift.generated.Level arg1) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_logging(arg0, arg1); + } finally {_lock.unlock();} +} + +@Override +public void send_metrics(java.util.Set arg0) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_metrics(arg0); + } finally {_lock.unlock();} +} + +@Override +public void send_mutate(org.apache.blur.thrift.generated.RowMutation arg0) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_mutate(arg0); + } finally {_lock.unlock();} +} + +@Override +public void send_mutateBatch(java.util.List arg0) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_mutateBatch(arg0); + } finally {_lock.unlock();} +} + +@Override +public void send_optimize(java.lang.String arg0, int arg1) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_optimize(arg0, arg1); + } finally {_lock.unlock();} +} + +@Override +public void send_parseQuery(java.lang.String arg0, org.apache.blur.thrift.generated.Query arg1) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_parseQuery(arg0, arg1); + } finally {_lock.unlock();} +} + +@Override +public void send_ping() throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_ping(); + } finally {_lock.unlock();} +} + +@Override +public void send_query(java.lang.String arg0, org.apache.blur.thrift.generated.BlurQuery arg1) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_query(arg0, arg1); + } finally {_lock.unlock();} +} + +@Override +public void send_queryStatusById(java.lang.String arg0, java.lang.String arg1) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_queryStatusById(arg0, arg1); + } finally {_lock.unlock();} +} + +@Override +public void send_queryStatusIdList(java.lang.String arg0) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_queryStatusIdList(arg0); + } finally {_lock.unlock();} +} + +@Override +public void send_reconnect(java.lang.String arg0) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_reconnect(arg0); + } finally {_lock.unlock();} +} + +@Override +public void send_recordFrequency(java.lang.String arg0, java.lang.String arg1, java.lang.String arg2, java.lang.String arg3) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_recordFrequency(arg0, arg1, arg2, arg3); + } finally {_lock.unlock();} +} + +@Override +public void send_refresh() throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_refresh(); + } finally {_lock.unlock();} +} + +@Override +public void send_removeSnapshot(java.lang.String arg0, java.lang.String arg1) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_removeSnapshot(arg0, arg1); + } finally {_lock.unlock();} +} + +@Override +public void send_removeTable(java.lang.String arg0, boolean arg1) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_removeTable(arg0, arg1); + } finally {_lock.unlock();} +} + +@Override +public void send_resetLogging() throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_resetLogging(); + } finally {_lock.unlock();} +} + +@Override +public void send_schema(java.lang.String arg0) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_schema(arg0); + } finally {_lock.unlock();} +} + +@Override +public void send_setUser(org.apache.blur.thrift.generated.User arg0) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_setUser(arg0); + } finally {_lock.unlock();} +} + +@Override +public void send_shardClusterList() throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_shardClusterList(); + } finally {_lock.unlock();} +} + +@Override +public void send_shardServerLayout(java.lang.String arg0) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_shardServerLayout(arg0); + } finally {_lock.unlock();} +} + +@Override +public void send_shardServerLayoutState(java.lang.String arg0) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_shardServerLayoutState(arg0); + } finally {_lock.unlock();} +} + +@Override +public void send_shardServerList(java.lang.String arg0) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_shardServerList(arg0); + } finally {_lock.unlock();} +} + +@Override +public void send_startTrace(java.lang.String arg0, java.lang.String arg1) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_startTrace(arg0, arg1); + } finally {_lock.unlock();} +} + +@Override +public void send_tableList() throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_tableList(); + } finally {_lock.unlock();} +} + +@Override +public void send_tableListByCluster(java.lang.String arg0) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_tableListByCluster(arg0); + } finally {_lock.unlock();} +} + +@Override +public void send_tableStats(java.lang.String arg0) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_tableStats(arg0); + } finally {_lock.unlock();} +} + +@Override +public void send_terms(java.lang.String arg0, java.lang.String arg1, java.lang.String arg2, java.lang.String arg3, short arg4) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_terms(arg0, arg1, arg2, arg3, arg4); + } finally {_lock.unlock();} +} + +@Override +public void send_traceList() throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_traceList(); + } finally {_lock.unlock();} +} + +@Override +public void send_traceRemove(java.lang.String arg0) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_traceRemove(arg0); + } finally {_lock.unlock();} +} + +@Override +public void send_traceRequestFetch(java.lang.String arg0, java.lang.String arg1) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_traceRequestFetch(arg0, arg1); + } finally {_lock.unlock();} +} + +@Override +public void send_traceRequestList(java.lang.String arg0) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.send_traceRequestList(arg0); + } finally {_lock.unlock();} +} + +@Override +public void setUser(org.apache.blur.thrift.generated.User arg0) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.setUser(arg0); + } finally {_lock.unlock();} +} + +@Override +public java.util.List shardClusterList() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.shardClusterList(); + } finally {_lock.unlock();} +} + +@Override +public java.util.Map shardServerLayout(java.lang.String arg0) throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.shardServerLayout(arg0); + } finally {_lock.unlock();} +} + +@Override +public java.util.Map shardServerLayoutState(java.lang.String arg0) throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.shardServerLayoutState(arg0); + } finally {_lock.unlock();} +} + +@Override +public java.util.List shardServerList(java.lang.String arg0) throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.shardServerList(arg0); + } finally {_lock.unlock();} +} + +@Override +public void startTrace(java.lang.String arg0, java.lang.String arg1) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.startTrace(arg0, arg1); + } finally {_lock.unlock();} +} + +@Override +public java.util.List tableList() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.tableList(); + } finally {_lock.unlock();} +} + +@Override +public java.util.List tableListByCluster(java.lang.String arg0) throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.tableListByCluster(arg0); + } finally {_lock.unlock();} +} + +@Override +public org.apache.blur.thrift.generated.TableStats tableStats(java.lang.String arg0) throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.tableStats(arg0); + } finally {_lock.unlock();} +} + +@Override +public java.util.List terms(java.lang.String arg0, java.lang.String arg1, java.lang.String arg2, java.lang.String arg3, short arg4) throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.terms(arg0, arg1, arg2, arg3, arg4); + } finally {_lock.unlock();} +} + +@Override +public java.util.List traceList() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.traceList(); + } finally {_lock.unlock();} +} + +@Override +public void traceRemove(java.lang.String arg0) throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + super.traceRemove(arg0); + } finally {_lock.unlock();} +} + +@Override +public java.lang.String traceRequestFetch(java.lang.String arg0, java.lang.String arg1) throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.traceRequestFetch(arg0, arg1); + } finally {_lock.unlock();} +} + +@Override +public java.util.List traceRequestList(java.lang.String arg0) throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException { + _lock.errorFailLock(); try { + return super.traceRequestList(arg0); + } finally {_lock.unlock();} +} } http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b434b067/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Server.java ---------------------------------------------------------------------- diff --git a/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Server.java b/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Server.java new file mode 100644 index 0000000..5b0e5fd --- /dev/null +++ b/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Server.java @@ -0,0 +1,405 @@ +/** + * 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.blur.thrift.generated; + +/** + * 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. + */ + + + +import org.apache.blur.thirdparty.thrift_0_9_0.scheme.IScheme; +import org.apache.blur.thirdparty.thrift_0_9_0.scheme.SchemeFactory; +import org.apache.blur.thirdparty.thrift_0_9_0.scheme.StandardScheme; + +import org.apache.blur.thirdparty.thrift_0_9_0.scheme.TupleScheme; +import org.apache.blur.thirdparty.thrift_0_9_0.protocol.TTupleProtocol; +import org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolException; +import org.apache.blur.thirdparty.thrift_0_9_0.EncodingUtils; +import org.apache.blur.thirdparty.thrift_0_9_0.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; + +public class Server implements org.apache.blur.thirdparty.thrift_0_9_0.TBase<Server, Server._Fields>, java.io.Serializable, Cloneable { + private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TStruct STRUCT_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TStruct("Server"); + + private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField SERVER_FIELD_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField("server", org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, (short)1); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new ServerStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ServerTupleSchemeFactory()); + } + + public String server; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.blur.thirdparty.thrift_0_9_0.TFieldIdEnum { + SERVER((short)1, "server"); + + 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: // SERVER + return SERVER; + 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.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SERVER, new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData("server", org.apache.blur.thirdparty.thrift_0_9_0.TFieldRequirementType.DEFAULT, + new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldValueMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData.addStructMetaDataMap(Server.class, metaDataMap); + } + + public Server() { + } + + public Server( + String server) + { + this(); + this.server = server; + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public Server(Server other) { + if (other.isSetServer()) { + this.server = other.server; + } + } + + public Server deepCopy() { + return new Server(this); + } + + @Override + public void clear() { + this.server = null; + } + + public String getServer() { + return this.server; + } + + public Server setServer(String server) { + this.server = server; + return this; + } + + public void unsetServer() { + this.server = null; + } + + /** Returns true if field server is set (has been assigned a value) and false otherwise */ + public boolean isSetServer() { + return this.server != null; + } + + public void setServerIsSet(boolean value) { + if (!value) { + this.server = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SERVER: + if (value == null) { + unsetServer(); + } else { + setServer((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SERVER: + return getServer(); + + } + 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 SERVER: + return isSetServer(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof Server) + return this.equals((Server)that); + return false; + } + + public boolean equals(Server that) { + if (that == null) + return false; + + boolean this_present_server = true && this.isSetServer(); + boolean that_present_server = true && that.isSetServer(); + if (this_present_server || that_present_server) { + if (!(this_present_server && that_present_server)) + return false; + if (!this.server.equals(that.server)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(Server other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + Server typedOther = (Server)other; + + lastComparison = Boolean.valueOf(isSetServer()).compareTo(typedOther.isSetServer()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetServer()) { + lastComparison = org.apache.blur.thirdparty.thrift_0_9_0.TBaseHelper.compareTo(this.server, typedOther.server); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol iprot) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol oprot) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("Server("); + boolean first = true; + + sb.append("server:"); + if (this.server == null) { + sb.append("null"); + } else { + sb.append(this.server); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.blur.thirdparty.thrift_0_9_0.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.blur.thirdparty.thrift_0_9_0.protocol.TCompactProtocol(new org.apache.blur.thirdparty.thrift_0_9_0.transport.TIOStreamTransport(out))); + } catch (org.apache.blur.thirdparty.thrift_0_9_0.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.blur.thirdparty.thrift_0_9_0.protocol.TCompactProtocol(new org.apache.blur.thirdparty.thrift_0_9_0.transport.TIOStreamTransport(in))); + } catch (org.apache.blur.thirdparty.thrift_0_9_0.TException te) { + throw new java.io.IOException(te); + } + } + + private static class ServerStandardSchemeFactory implements SchemeFactory { + public ServerStandardScheme getScheme() { + return new ServerStandardScheme(); + } + } + + private static class ServerStandardScheme extends StandardScheme<Server> { + + public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol iprot, Server struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SERVER + if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING) { + struct.server = iprot.readString(); + struct.setServerIsSet(true); + } else { + org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.blur.thirdparty.thrift_0_9_0.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.blur.thirdparty.thrift_0_9_0.protocol.TProtocol oprot, Server struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.server != null) { + oprot.writeFieldBegin(SERVER_FIELD_DESC); + oprot.writeString(struct.server); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class ServerTupleSchemeFactory implements SchemeFactory { + public ServerTupleScheme getScheme() { + return new ServerTupleScheme(); + } + } + + private static class ServerTupleScheme extends TupleScheme<Server> { + + @Override + public void write(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, Server struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetServer()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetServer()) { + oprot.writeString(struct.server); + } + } + + @Override + public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, Server struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.server = iprot.readString(); + struct.setServerIsSet(true); + } + } + } + +} + http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b434b067/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Shard.java ---------------------------------------------------------------------- diff --git a/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Shard.java b/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Shard.java new file mode 100644 index 0000000..751be40 --- /dev/null +++ b/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Shard.java @@ -0,0 +1,405 @@ +/** + * 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.blur.thrift.generated; + +/** + * 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. + */ + + + +import org.apache.blur.thirdparty.thrift_0_9_0.scheme.IScheme; +import org.apache.blur.thirdparty.thrift_0_9_0.scheme.SchemeFactory; +import org.apache.blur.thirdparty.thrift_0_9_0.scheme.StandardScheme; + +import org.apache.blur.thirdparty.thrift_0_9_0.scheme.TupleScheme; +import org.apache.blur.thirdparty.thrift_0_9_0.protocol.TTupleProtocol; +import org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolException; +import org.apache.blur.thirdparty.thrift_0_9_0.EncodingUtils; +import org.apache.blur.thirdparty.thrift_0_9_0.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; + +public class Shard implements org.apache.blur.thirdparty.thrift_0_9_0.TBase<Shard, Shard._Fields>, java.io.Serializable, Cloneable { + private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TStruct STRUCT_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TStruct("Shard"); + + private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField SHARD_FIELD_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField("shard", org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, (short)1); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new ShardStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ShardTupleSchemeFactory()); + } + + public String shard; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.blur.thirdparty.thrift_0_9_0.TFieldIdEnum { + SHARD((short)1, "shard"); + + 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: // SHARD + return SHARD; + 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.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SHARD, new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData("shard", org.apache.blur.thirdparty.thrift_0_9_0.TFieldRequirementType.DEFAULT, + new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldValueMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData.addStructMetaDataMap(Shard.class, metaDataMap); + } + + public Shard() { + } + + public Shard( + String shard) + { + this(); + this.shard = shard; + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public Shard(Shard other) { + if (other.isSetShard()) { + this.shard = other.shard; + } + } + + public Shard deepCopy() { + return new Shard(this); + } + + @Override + public void clear() { + this.shard = null; + } + + public String getShard() { + return this.shard; + } + + public Shard setShard(String shard) { + this.shard = shard; + return this; + } + + public void unsetShard() { + this.shard = null; + } + + /** Returns true if field shard is set (has been assigned a value) and false otherwise */ + public boolean isSetShard() { + return this.shard != null; + } + + public void setShardIsSet(boolean value) { + if (!value) { + this.shard = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SHARD: + if (value == null) { + unsetShard(); + } else { + setShard((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SHARD: + return getShard(); + + } + 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 SHARD: + return isSetShard(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof Shard) + return this.equals((Shard)that); + return false; + } + + public boolean equals(Shard that) { + if (that == null) + return false; + + boolean this_present_shard = true && this.isSetShard(); + boolean that_present_shard = true && that.isSetShard(); + if (this_present_shard || that_present_shard) { + if (!(this_present_shard && that_present_shard)) + return false; + if (!this.shard.equals(that.shard)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(Shard other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + Shard typedOther = (Shard)other; + + lastComparison = Boolean.valueOf(isSetShard()).compareTo(typedOther.isSetShard()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetShard()) { + lastComparison = org.apache.blur.thirdparty.thrift_0_9_0.TBaseHelper.compareTo(this.shard, typedOther.shard); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol iprot) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol oprot) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("Shard("); + boolean first = true; + + sb.append("shard:"); + if (this.shard == null) { + sb.append("null"); + } else { + sb.append(this.shard); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.blur.thirdparty.thrift_0_9_0.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.blur.thirdparty.thrift_0_9_0.protocol.TCompactProtocol(new org.apache.blur.thirdparty.thrift_0_9_0.transport.TIOStreamTransport(out))); + } catch (org.apache.blur.thirdparty.thrift_0_9_0.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.blur.thirdparty.thrift_0_9_0.protocol.TCompactProtocol(new org.apache.blur.thirdparty.thrift_0_9_0.transport.TIOStreamTransport(in))); + } catch (org.apache.blur.thirdparty.thrift_0_9_0.TException te) { + throw new java.io.IOException(te); + } + } + + private static class ShardStandardSchemeFactory implements SchemeFactory { + public ShardStandardScheme getScheme() { + return new ShardStandardScheme(); + } + } + + private static class ShardStandardScheme extends StandardScheme<Shard> { + + public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol iprot, Shard struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SHARD + if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING) { + struct.shard = iprot.readString(); + struct.setShardIsSet(true); + } else { + org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.blur.thirdparty.thrift_0_9_0.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.blur.thirdparty.thrift_0_9_0.protocol.TProtocol oprot, Shard struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.shard != null) { + oprot.writeFieldBegin(SHARD_FIELD_DESC); + oprot.writeString(struct.shard); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class ShardTupleSchemeFactory implements SchemeFactory { + public ShardTupleScheme getScheme() { + return new ShardTupleScheme(); + } + } + + private static class ShardTupleScheme extends TupleScheme<Shard> { + + @Override + public void write(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, Shard struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetShard()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetShard()) { + oprot.writeString(struct.shard); + } + } + + @Override + public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, Shard struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.shard = iprot.readString(); + struct.setShardIsSet(true); + } + } + } + +} +
