Updated Branches: refs/heads/trunk 6ca616800 -> c72a3b1a5
http://git-wip-us.apache.org/repos/asf/flume/blob/c72a3b1a/flume-ng-sources/flume-scribe-source/src/main/java/org/apache/flume/source/scribe/LogEntry.java ---------------------------------------------------------------------- diff --git a/flume-ng-sources/flume-scribe-source/src/main/java/org/apache/flume/source/scribe/LogEntry.java b/flume-ng-sources/flume-scribe-source/src/main/java/org/apache/flume/source/scribe/LogEntry.java index 792e196..be703a9 100644 --- a/flume-ng-sources/flume-scribe-source/src/main/java/org/apache/flume/source/scribe/LogEntry.java +++ b/flume-ng-sources/flume-scribe-source/src/main/java/org/apache/flume/source/scribe/LogEntry.java @@ -17,23 +17,13 @@ * under the License. */ /** - * Autogenerated by Thrift Compiler (0.9.0) + * Autogenerated by Thrift Compiler (0.7.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated */ package org.apache.flume.source.scribe; import org.apache.commons.lang.builder.HashCodeBuilder; -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -55,12 +45,6 @@ public class LogEntry implements org.apache.thrift.TBase<LogEntry, LogEntry._Fie private static final org.apache.thrift.protocol.TField CATEGORY_FIELD_DESC = new org.apache.thrift.protocol.TField("category", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new LogEntryStandardSchemeFactory()); - schemes.put(TupleScheme.class, new LogEntryTupleSchemeFactory()); - } - public String category; // required public String message; // required @@ -126,6 +110,7 @@ public class LogEntry implements org.apache.thrift.TBase<LogEntry, LogEntry._Fie } // 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); @@ -354,11 +339,56 @@ public class LogEntry implements org.apache.thrift.TBase<LogEntry, LogEntry._Fie } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + 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: // CATEGORY + if (field.type == org.apache.thrift.protocol.TType.STRING) { + this.category = iprot.readString(); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // MESSAGE + if (field.type == org.apache.thrift.protocol.TType.STRING) { + this.message = iprot.readString(); + } 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(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.category != null) { + oprot.writeFieldBegin(CATEGORY_FIELD_DESC); + oprot.writeString(this.category); + oprot.writeFieldEnd(); + } + if (this.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(this.message); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); } @Override @@ -387,7 +417,6 @@ public class LogEntry implements org.apache.thrift.TBase<LogEntry, LogEntry._Fie public void validate() throws org.apache.thrift.TException { // check for required fields - // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -406,112 +435,5 @@ public class LogEntry implements org.apache.thrift.TBase<LogEntry, LogEntry._Fie } } - private static class LogEntryStandardSchemeFactory implements SchemeFactory { - public LogEntryStandardScheme getScheme() { - return new LogEntryStandardScheme(); - } - } - - private static class LogEntryStandardScheme extends StandardScheme<LogEntry> { - - public void read(org.apache.thrift.protocol.TProtocol iprot, LogEntry 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: // CATEGORY - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.category = iprot.readString(); - struct.setCategoryIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // MESSAGE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.message = iprot.readString(); - struct.setMessageIsSet(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, LogEntry struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.category != null) { - oprot.writeFieldBegin(CATEGORY_FIELD_DESC); - oprot.writeString(struct.category); - oprot.writeFieldEnd(); - } - if (struct.message != null) { - oprot.writeFieldBegin(MESSAGE_FIELD_DESC); - oprot.writeString(struct.message); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class LogEntryTupleSchemeFactory implements SchemeFactory { - public LogEntryTupleScheme getScheme() { - return new LogEntryTupleScheme(); - } - } - - private static class LogEntryTupleScheme extends TupleScheme<LogEntry> { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, LogEntry struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetCategory()) { - optionals.set(0); - } - if (struct.isSetMessage()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetCategory()) { - oprot.writeString(struct.category); - } - if (struct.isSetMessage()) { - oprot.writeString(struct.message); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, LogEntry struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.category = iprot.readString(); - struct.setCategoryIsSet(true); - } - if (incoming.get(1)) { - struct.message = iprot.readString(); - struct.setMessageIsSet(true); - } - } - } - } http://git-wip-us.apache.org/repos/asf/flume/blob/c72a3b1a/flume-ng-sources/flume-scribe-source/src/main/java/org/apache/flume/source/scribe/ResultCode.java ---------------------------------------------------------------------- diff --git a/flume-ng-sources/flume-scribe-source/src/main/java/org/apache/flume/source/scribe/ResultCode.java b/flume-ng-sources/flume-scribe-source/src/main/java/org/apache/flume/source/scribe/ResultCode.java index 2ab0bcc..210e21e 100644 --- a/flume-ng-sources/flume-scribe-source/src/main/java/org/apache/flume/source/scribe/ResultCode.java +++ b/flume-ng-sources/flume-scribe-source/src/main/java/org/apache/flume/source/scribe/ResultCode.java @@ -17,10 +17,9 @@ * under the License. */ /** - * Autogenerated by Thrift Compiler (0.9.0) + * Autogenerated by Thrift Compiler (0.7.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated */ package org.apache.flume.source.scribe; http://git-wip-us.apache.org/repos/asf/flume/blob/c72a3b1a/flume-ng-sources/flume-scribe-source/src/main/java/org/apache/flume/source/scribe/Scribe.java ---------------------------------------------------------------------- diff --git a/flume-ng-sources/flume-scribe-source/src/main/java/org/apache/flume/source/scribe/Scribe.java b/flume-ng-sources/flume-scribe-source/src/main/java/org/apache/flume/source/scribe/Scribe.java index 99f302f..eba8d2e 100644 --- a/flume-ng-sources/flume-scribe-source/src/main/java/org/apache/flume/source/scribe/Scribe.java +++ b/flume-ng-sources/flume-scribe-source/src/main/java/org/apache/flume/source/scribe/Scribe.java @@ -17,23 +17,13 @@ * under the License. */ /** - * Autogenerated by Thrift Compiler (0.9.0) + * Autogenerated by Thrift Compiler (0.7.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated */ package org.apache.flume.source.scribe; import org.apache.commons.lang.builder.HashCodeBuilder; -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -158,7 +148,7 @@ public class Scribe { } - public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor { + public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor { private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); public Processor(I iface) { super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>())); @@ -173,20 +163,16 @@ public class Scribe { return processMap; } - public static class Log<I extends Iface> extends org.apache.thrift.ProcessFunction<I, Log_args> { + private static class Log<I extends Iface> extends org.apache.thrift.ProcessFunction<I, Log_args> { public Log() { super("Log"); } - public Log_args getEmptyArgsInstance() { + protected Log_args getEmptyArgsInstance() { return new Log_args(); } - protected boolean isOneway() { - return false; - } - - public Log_result getResult(I iface, Log_args args) throws org.apache.thrift.TException { + protected Log_result getResult(I iface, Log_args args) throws org.apache.thrift.TException { Log_result result = new Log_result(); result.success = iface.Log(args.messages); return result; @@ -200,12 +186,6 @@ public class Scribe { private static final org.apache.thrift.protocol.TField MESSAGES_FIELD_DESC = new org.apache.thrift.protocol.TField("messages", org.apache.thrift.protocol.TType.LIST, (short)1); - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new Log_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new Log_argsTupleSchemeFactory()); - } - public List<LogEntry> messages; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -267,6 +247,7 @@ public class Scribe { } // 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); @@ -446,11 +427,62 @@ public class Scribe { } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + 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: // MESSAGES + if (field.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); + this.messages = new ArrayList<LogEntry>(_list0.size); + for (int _i1 = 0; _i1 < _list0.size; ++_i1) + { + LogEntry _elem2; // required + _elem2 = new LogEntry(); + _elem2.read(iprot); + this.messages.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(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.messages != null) { + oprot.writeFieldBegin(MESSAGES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.messages.size())); + for (LogEntry _iter3 : this.messages) + { + _iter3.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); } @Override @@ -471,7 +503,6 @@ public class Scribe { public void validate() throws org.apache.thrift.TException { // check for required fields - // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -490,124 +521,6 @@ public class Scribe { } } - private static class Log_argsStandardSchemeFactory implements SchemeFactory { - public Log_argsStandardScheme getScheme() { - return new Log_argsStandardScheme(); - } - } - - private static class Log_argsStandardScheme extends StandardScheme<Log_args> { - - public void read(org.apache.thrift.protocol.TProtocol iprot, Log_args 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: // MESSAGES - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); - struct.messages = new ArrayList<LogEntry>(_list0.size); - for (int _i1 = 0; _i1 < _list0.size; ++_i1) - { - LogEntry _elem2; // required - _elem2 = new LogEntry(); - _elem2.read(iprot); - struct.messages.add(_elem2); - } - iprot.readListEnd(); - } - struct.setMessagesIsSet(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, Log_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.messages != null) { - oprot.writeFieldBegin(MESSAGES_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.messages.size())); - for (LogEntry _iter3 : struct.messages) - { - _iter3.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class Log_argsTupleSchemeFactory implements SchemeFactory { - public Log_argsTupleScheme getScheme() { - return new Log_argsTupleScheme(); - } - } - - private static class Log_argsTupleScheme extends TupleScheme<Log_args> { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, Log_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetMessages()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetMessages()) { - { - oprot.writeI32(struct.messages.size()); - for (LogEntry _iter4 : struct.messages) - { - _iter4.write(oprot); - } - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, Log_args 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.messages = new ArrayList<LogEntry>(_list5.size); - for (int _i6 = 0; _i6 < _list5.size; ++_i6) - { - LogEntry _elem7; // required - _elem7 = new LogEntry(); - _elem7.read(iprot); - struct.messages.add(_elem7); - } - } - struct.setMessagesIsSet(true); - } - } - } - } public static class Log_result implements org.apache.thrift.TBase<Log_result, Log_result._Fields>, java.io.Serializable, Cloneable { @@ -615,12 +528,6 @@ public class Scribe { private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0); - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new Log_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new Log_resultTupleSchemeFactory()); - } - /** * * @see ResultCode @@ -690,6 +597,7 @@ public class Scribe { } // 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); @@ -857,12 +765,44 @@ public class Scribe { } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + 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 0: // SUCCESS + if (field.type == org.apache.thrift.protocol.TType.I32) { + this.success = ResultCode.findByValue(iprot.readI32()); + } 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(); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeI32(this.success.getValue()); + oprot.writeFieldEnd(); } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } @Override public String toString() { @@ -882,7 +822,6 @@ public class Scribe { public void validate() throws org.apache.thrift.TException { // check for required fields - // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -901,90 +840,6 @@ public class Scribe { } } - private static class Log_resultStandardSchemeFactory implements SchemeFactory { - public Log_resultStandardScheme getScheme() { - return new Log_resultStandardScheme(); - } - } - - private static class Log_resultStandardScheme extends StandardScheme<Log_result> { - - public void read(org.apache.thrift.protocol.TProtocol iprot, Log_result 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 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.success = ResultCode.findByValue(iprot.readI32()); - struct.setSuccessIsSet(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, Log_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeI32(struct.success.getValue()); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class Log_resultTupleSchemeFactory implements SchemeFactory { - public Log_resultTupleScheme getScheme() { - return new Log_resultTupleScheme(); - } - } - - private static class Log_resultTupleScheme extends TupleScheme<Log_result> { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, Log_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - oprot.writeI32(struct.success.getValue()); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, Log_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = ResultCode.findByValue(iprot.readI32()); - struct.setSuccessIsSet(true); - } - } - } - } } http://git-wip-us.apache.org/repos/asf/flume/blob/c72a3b1a/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index 1388e86..9aff211 100644 --- a/pom.xml +++ b/pom.xml @@ -725,7 +725,7 @@ limitations under the License. <dependency> <groupId>org.apache.thrift</groupId> <artifactId>libthrift</artifactId> - <version>0.9.0</version> + <version>0.7.0</version> <exclusions> <exclusion> <groupId>javax.servlet</groupId>
