http://git-wip-us.apache.org/repos/asf/storm/blob/a6171bd6/storm-core/src/jvm/backtype/storm/generated/GlobalStreamId.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/backtype/storm/generated/GlobalStreamId.java b/storm-core/src/jvm/backtype/storm/generated/GlobalStreamId.java deleted file mode 100644 index 677dfd8..0000000 --- a/storm-core/src/jvm/backtype/storm/generated/GlobalStreamId.java +++ /dev/null @@ -1,507 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.storm.generated; - -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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class GlobalStreamId implements org.apache.thrift.TBase<GlobalStreamId, GlobalStreamId._Fields>, java.io.Serializable, Cloneable, Comparable<GlobalStreamId> { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GlobalStreamId"); - - private static final org.apache.thrift.protocol.TField COMPONENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("componentId", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField STREAM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("streamId", 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 GlobalStreamIdStandardSchemeFactory()); - schemes.put(TupleScheme.class, new GlobalStreamIdTupleSchemeFactory()); - } - - private String componentId; // required - private String streamId; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - COMPONENT_ID((short)1, "componentId"), - STREAM_ID((short)2, "streamId"); - - 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: // COMPONENT_ID - return COMPONENT_ID; - case 2: // STREAM_ID - return STREAM_ID; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.COMPONENT_ID, new org.apache.thrift.meta_data.FieldMetaData("componentId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.STREAM_ID, new org.apache.thrift.meta_data.FieldMetaData("streamId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GlobalStreamId.class, metaDataMap); - } - - public GlobalStreamId() { - } - - public GlobalStreamId( - String componentId, - String streamId) - { - this(); - this.componentId = componentId; - this.streamId = streamId; - } - - /** - * Performs a deep copy on <i>other</i>. - */ - public GlobalStreamId(GlobalStreamId other) { - if (other.is_set_componentId()) { - this.componentId = other.componentId; - } - if (other.is_set_streamId()) { - this.streamId = other.streamId; - } - } - - public GlobalStreamId deepCopy() { - return new GlobalStreamId(this); - } - - @Override - public void clear() { - this.componentId = null; - this.streamId = null; - } - - public String get_componentId() { - return this.componentId; - } - - public void set_componentId(String componentId) { - this.componentId = componentId; - } - - public void unset_componentId() { - this.componentId = null; - } - - /** Returns true if field componentId is set (has been assigned a value) and false otherwise */ - public boolean is_set_componentId() { - return this.componentId != null; - } - - public void set_componentId_isSet(boolean value) { - if (!value) { - this.componentId = null; - } - } - - public String get_streamId() { - return this.streamId; - } - - public void set_streamId(String streamId) { - this.streamId = streamId; - } - - public void unset_streamId() { - this.streamId = null; - } - - /** Returns true if field streamId is set (has been assigned a value) and false otherwise */ - public boolean is_set_streamId() { - return this.streamId != null; - } - - public void set_streamId_isSet(boolean value) { - if (!value) { - this.streamId = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case COMPONENT_ID: - if (value == null) { - unset_componentId(); - } else { - set_componentId((String)value); - } - break; - - case STREAM_ID: - if (value == null) { - unset_streamId(); - } else { - set_streamId((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case COMPONENT_ID: - return get_componentId(); - - case STREAM_ID: - return get_streamId(); - - } - 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 COMPONENT_ID: - return is_set_componentId(); - case STREAM_ID: - return is_set_streamId(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof GlobalStreamId) - return this.equals((GlobalStreamId)that); - return false; - } - - public boolean equals(GlobalStreamId that) { - if (that == null) - return false; - - boolean this_present_componentId = true && this.is_set_componentId(); - boolean that_present_componentId = true && that.is_set_componentId(); - if (this_present_componentId || that_present_componentId) { - if (!(this_present_componentId && that_present_componentId)) - return false; - if (!this.componentId.equals(that.componentId)) - return false; - } - - boolean this_present_streamId = true && this.is_set_streamId(); - boolean that_present_streamId = true && that.is_set_streamId(); - if (this_present_streamId || that_present_streamId) { - if (!(this_present_streamId && that_present_streamId)) - return false; - if (!this.streamId.equals(that.streamId)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List<Object> list = new ArrayList<Object>(); - - boolean present_componentId = true && (is_set_componentId()); - list.add(present_componentId); - if (present_componentId) - list.add(componentId); - - boolean present_streamId = true && (is_set_streamId()); - list.add(present_streamId); - if (present_streamId) - list.add(streamId); - - return list.hashCode(); - } - - @Override - public int compareTo(GlobalStreamId other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(is_set_componentId()).compareTo(other.is_set_componentId()); - if (lastComparison != 0) { - return lastComparison; - } - if (is_set_componentId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.componentId, other.componentId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(is_set_streamId()).compareTo(other.is_set_streamId()); - if (lastComparison != 0) { - return lastComparison; - } - if (is_set_streamId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.streamId, other.streamId); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("GlobalStreamId("); - boolean first = true; - - sb.append("componentId:"); - if (this.componentId == null) { - sb.append("null"); - } else { - sb.append(this.componentId); - } - first = false; - if (!first) sb.append(", "); - sb.append("streamId:"); - if (this.streamId == null) { - sb.append("null"); - } else { - sb.append(this.streamId); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!is_set_componentId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'componentId' is unset! Struct:" + toString()); - } - - if (!is_set_streamId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'streamId' is unset! Struct:" + toString()); - } - - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class GlobalStreamIdStandardSchemeFactory implements SchemeFactory { - public GlobalStreamIdStandardScheme getScheme() { - return new GlobalStreamIdStandardScheme(); - } - } - - private static class GlobalStreamIdStandardScheme extends StandardScheme<GlobalStreamId> { - - public void read(org.apache.thrift.protocol.TProtocol iprot, GlobalStreamId 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: // COMPONENT_ID - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.componentId = iprot.readString(); - struct.set_componentId_isSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // STREAM_ID - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.streamId = iprot.readString(); - struct.set_streamId_isSet(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(); - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, GlobalStreamId struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.componentId != null) { - oprot.writeFieldBegin(COMPONENT_ID_FIELD_DESC); - oprot.writeString(struct.componentId); - oprot.writeFieldEnd(); - } - if (struct.streamId != null) { - oprot.writeFieldBegin(STREAM_ID_FIELD_DESC); - oprot.writeString(struct.streamId); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class GlobalStreamIdTupleSchemeFactory implements SchemeFactory { - public GlobalStreamIdTupleScheme getScheme() { - return new GlobalStreamIdTupleScheme(); - } - } - - private static class GlobalStreamIdTupleScheme extends TupleScheme<GlobalStreamId> { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, GlobalStreamId struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeString(struct.componentId); - oprot.writeString(struct.streamId); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, GlobalStreamId struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.componentId = iprot.readString(); - struct.set_componentId_isSet(true); - struct.streamId = iprot.readString(); - struct.set_streamId_isSet(true); - } - } - -} -
http://git-wip-us.apache.org/repos/asf/storm/blob/a6171bd6/storm-core/src/jvm/backtype/storm/generated/Grouping.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/backtype/storm/generated/Grouping.java b/storm-core/src/jvm/backtype/storm/generated/Grouping.java deleted file mode 100644 index ccb19bc..0000000 --- a/storm-core/src/jvm/backtype/storm/generated/Grouping.java +++ /dev/null @@ -1,800 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.storm.generated; - -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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -public class Grouping extends org.apache.thrift.TUnion<Grouping, Grouping._Fields> { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Grouping"); - private static final org.apache.thrift.protocol.TField FIELDS_FIELD_DESC = new org.apache.thrift.protocol.TField("fields", org.apache.thrift.protocol.TType.LIST, (short)1); - private static final org.apache.thrift.protocol.TField SHUFFLE_FIELD_DESC = new org.apache.thrift.protocol.TField("shuffle", org.apache.thrift.protocol.TType.STRUCT, (short)2); - private static final org.apache.thrift.protocol.TField ALL_FIELD_DESC = new org.apache.thrift.protocol.TField("all", org.apache.thrift.protocol.TType.STRUCT, (short)3); - private static final org.apache.thrift.protocol.TField NONE_FIELD_DESC = new org.apache.thrift.protocol.TField("none", org.apache.thrift.protocol.TType.STRUCT, (short)4); - private static final org.apache.thrift.protocol.TField DIRECT_FIELD_DESC = new org.apache.thrift.protocol.TField("direct", org.apache.thrift.protocol.TType.STRUCT, (short)5); - private static final org.apache.thrift.protocol.TField CUSTOM_OBJECT_FIELD_DESC = new org.apache.thrift.protocol.TField("custom_object", org.apache.thrift.protocol.TType.STRUCT, (short)6); - private static final org.apache.thrift.protocol.TField CUSTOM_SERIALIZED_FIELD_DESC = new org.apache.thrift.protocol.TField("custom_serialized", org.apache.thrift.protocol.TType.STRING, (short)7); - private static final org.apache.thrift.protocol.TField LOCAL_OR_SHUFFLE_FIELD_DESC = new org.apache.thrift.protocol.TField("local_or_shuffle", org.apache.thrift.protocol.TType.STRUCT, (short)8); - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - FIELDS((short)1, "fields"), - SHUFFLE((short)2, "shuffle"), - ALL((short)3, "all"), - NONE((short)4, "none"), - DIRECT((short)5, "direct"), - CUSTOM_OBJECT((short)6, "custom_object"), - CUSTOM_SERIALIZED((short)7, "custom_serialized"), - LOCAL_OR_SHUFFLE((short)8, "local_or_shuffle"); - - 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: // FIELDS - return FIELDS; - case 2: // SHUFFLE - return SHUFFLE; - case 3: // ALL - return ALL; - case 4: // NONE - return NONE; - case 5: // DIRECT - return DIRECT; - case 6: // CUSTOM_OBJECT - return CUSTOM_OBJECT; - case 7: // CUSTOM_SERIALIZED - return CUSTOM_SERIALIZED; - case 8: // LOCAL_OR_SHUFFLE - return LOCAL_OR_SHUFFLE; - 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; - } - } - - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.FIELDS, new org.apache.thrift.meta_data.FieldMetaData("fields", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.SHUFFLE, new org.apache.thrift.meta_data.FieldMetaData("shuffle", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NullStruct.class))); - tmpMap.put(_Fields.ALL, new org.apache.thrift.meta_data.FieldMetaData("all", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NullStruct.class))); - tmpMap.put(_Fields.NONE, new org.apache.thrift.meta_data.FieldMetaData("none", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NullStruct.class))); - tmpMap.put(_Fields.DIRECT, new org.apache.thrift.meta_data.FieldMetaData("direct", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NullStruct.class))); - tmpMap.put(_Fields.CUSTOM_OBJECT, new org.apache.thrift.meta_data.FieldMetaData("custom_object", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, JavaObject.class))); - tmpMap.put(_Fields.CUSTOM_SERIALIZED, new org.apache.thrift.meta_data.FieldMetaData("custom_serialized", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.LOCAL_OR_SHUFFLE, new org.apache.thrift.meta_data.FieldMetaData("local_or_shuffle", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NullStruct.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Grouping.class, metaDataMap); - } - - public Grouping() { - super(); - } - - public Grouping(_Fields setField, Object value) { - super(setField, value); - } - - public Grouping(Grouping other) { - super(other); - } - public Grouping deepCopy() { - return new Grouping(this); - } - - public static Grouping fields(List<String> value) { - Grouping x = new Grouping(); - x.set_fields(value); - return x; - } - - public static Grouping shuffle(NullStruct value) { - Grouping x = new Grouping(); - x.set_shuffle(value); - return x; - } - - public static Grouping all(NullStruct value) { - Grouping x = new Grouping(); - x.set_all(value); - return x; - } - - public static Grouping none(NullStruct value) { - Grouping x = new Grouping(); - x.set_none(value); - return x; - } - - public static Grouping direct(NullStruct value) { - Grouping x = new Grouping(); - x.set_direct(value); - return x; - } - - public static Grouping custom_object(JavaObject value) { - Grouping x = new Grouping(); - x.set_custom_object(value); - return x; - } - - public static Grouping custom_serialized(ByteBuffer value) { - Grouping x = new Grouping(); - x.set_custom_serialized(value); - return x; - } - - public static Grouping custom_serialized(byte[] value) { - Grouping x = new Grouping(); - x.set_custom_serialized(ByteBuffer.wrap(Arrays.copyOf(value, value.length))); - return x; - } - - public static Grouping local_or_shuffle(NullStruct value) { - Grouping x = new Grouping(); - x.set_local_or_shuffle(value); - return x; - } - - - @Override - protected void checkType(_Fields setField, Object value) throws ClassCastException { - switch (setField) { - case FIELDS: - if (value instanceof List) { - break; - } - throw new ClassCastException("Was expecting value of type List<String> for field 'fields', but got " + value.getClass().getSimpleName()); - case SHUFFLE: - if (value instanceof NullStruct) { - break; - } - throw new ClassCastException("Was expecting value of type NullStruct for field 'shuffle', but got " + value.getClass().getSimpleName()); - case ALL: - if (value instanceof NullStruct) { - break; - } - throw new ClassCastException("Was expecting value of type NullStruct for field 'all', but got " + value.getClass().getSimpleName()); - case NONE: - if (value instanceof NullStruct) { - break; - } - throw new ClassCastException("Was expecting value of type NullStruct for field 'none', but got " + value.getClass().getSimpleName()); - case DIRECT: - if (value instanceof NullStruct) { - break; - } - throw new ClassCastException("Was expecting value of type NullStruct for field 'direct', but got " + value.getClass().getSimpleName()); - case CUSTOM_OBJECT: - if (value instanceof JavaObject) { - break; - } - throw new ClassCastException("Was expecting value of type JavaObject for field 'custom_object', but got " + value.getClass().getSimpleName()); - case CUSTOM_SERIALIZED: - if (value instanceof ByteBuffer) { - break; - } - throw new ClassCastException("Was expecting value of type ByteBuffer for field 'custom_serialized', but got " + value.getClass().getSimpleName()); - case LOCAL_OR_SHUFFLE: - if (value instanceof NullStruct) { - break; - } - throw new ClassCastException("Was expecting value of type NullStruct for field 'local_or_shuffle', but got " + value.getClass().getSimpleName()); - default: - throw new IllegalArgumentException("Unknown field id " + setField); - } - } - - @Override - protected Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TField field) throws org.apache.thrift.TException { - _Fields setField = _Fields.findByThriftId(field.id); - if (setField != null) { - switch (setField) { - case FIELDS: - if (field.type == FIELDS_FIELD_DESC.type) { - List<String> fields; - { - org.apache.thrift.protocol.TList _list8 = iprot.readListBegin(); - fields = new ArrayList<String>(_list8.size); - String _elem9; - for (int _i10 = 0; _i10 < _list8.size; ++_i10) - { - _elem9 = iprot.readString(); - fields.add(_elem9); - } - iprot.readListEnd(); - } - return fields; - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - return null; - } - case SHUFFLE: - if (field.type == SHUFFLE_FIELD_DESC.type) { - NullStruct shuffle; - shuffle = new NullStruct(); - shuffle.read(iprot); - return shuffle; - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - return null; - } - case ALL: - if (field.type == ALL_FIELD_DESC.type) { - NullStruct all; - all = new NullStruct(); - all.read(iprot); - return all; - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - return null; - } - case NONE: - if (field.type == NONE_FIELD_DESC.type) { - NullStruct none; - none = new NullStruct(); - none.read(iprot); - return none; - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - return null; - } - case DIRECT: - if (field.type == DIRECT_FIELD_DESC.type) { - NullStruct direct; - direct = new NullStruct(); - direct.read(iprot); - return direct; - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - return null; - } - case CUSTOM_OBJECT: - if (field.type == CUSTOM_OBJECT_FIELD_DESC.type) { - JavaObject custom_object; - custom_object = new JavaObject(); - custom_object.read(iprot); - return custom_object; - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - return null; - } - case CUSTOM_SERIALIZED: - if (field.type == CUSTOM_SERIALIZED_FIELD_DESC.type) { - ByteBuffer custom_serialized; - custom_serialized = iprot.readBinary(); - return custom_serialized; - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - return null; - } - case LOCAL_OR_SHUFFLE: - if (field.type == LOCAL_OR_SHUFFLE_FIELD_DESC.type) { - NullStruct local_or_shuffle; - local_or_shuffle = new NullStruct(); - local_or_shuffle.read(iprot); - return local_or_shuffle; - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - return null; - } - default: - throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!"); - } - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - return null; - } - } - - @Override - protected void standardSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - switch (setField_) { - case FIELDS: - List<String> fields = (List<String>)value_; - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, fields.size())); - for (String _iter11 : fields) - { - oprot.writeString(_iter11); - } - oprot.writeListEnd(); - } - return; - case SHUFFLE: - NullStruct shuffle = (NullStruct)value_; - shuffle.write(oprot); - return; - case ALL: - NullStruct all = (NullStruct)value_; - all.write(oprot); - return; - case NONE: - NullStruct none = (NullStruct)value_; - none.write(oprot); - return; - case DIRECT: - NullStruct direct = (NullStruct)value_; - direct.write(oprot); - return; - case CUSTOM_OBJECT: - JavaObject custom_object = (JavaObject)value_; - custom_object.write(oprot); - return; - case CUSTOM_SERIALIZED: - ByteBuffer custom_serialized = (ByteBuffer)value_; - oprot.writeBinary(custom_serialized); - return; - case LOCAL_OR_SHUFFLE: - NullStruct local_or_shuffle = (NullStruct)value_; - local_or_shuffle.write(oprot); - return; - default: - throw new IllegalStateException("Cannot write union with unknown field " + setField_); - } - } - - @Override - protected Object tupleSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, short fieldID) throws org.apache.thrift.TException { - _Fields setField = _Fields.findByThriftId(fieldID); - if (setField != null) { - switch (setField) { - case FIELDS: - List<String> fields; - { - org.apache.thrift.protocol.TList _list12 = iprot.readListBegin(); - fields = new ArrayList<String>(_list12.size); - String _elem13; - for (int _i14 = 0; _i14 < _list12.size; ++_i14) - { - _elem13 = iprot.readString(); - fields.add(_elem13); - } - iprot.readListEnd(); - } - return fields; - case SHUFFLE: - NullStruct shuffle; - shuffle = new NullStruct(); - shuffle.read(iprot); - return shuffle; - case ALL: - NullStruct all; - all = new NullStruct(); - all.read(iprot); - return all; - case NONE: - NullStruct none; - none = new NullStruct(); - none.read(iprot); - return none; - case DIRECT: - NullStruct direct; - direct = new NullStruct(); - direct.read(iprot); - return direct; - case CUSTOM_OBJECT: - JavaObject custom_object; - custom_object = new JavaObject(); - custom_object.read(iprot); - return custom_object; - case CUSTOM_SERIALIZED: - ByteBuffer custom_serialized; - custom_serialized = iprot.readBinary(); - return custom_serialized; - case LOCAL_OR_SHUFFLE: - NullStruct local_or_shuffle; - local_or_shuffle = new NullStruct(); - local_or_shuffle.read(iprot); - return local_or_shuffle; - default: - throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!"); - } - } else { - throw new TProtocolException("Couldn't find a field with field id " + fieldID); - } - } - - @Override - protected void tupleSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - switch (setField_) { - case FIELDS: - List<String> fields = (List<String>)value_; - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, fields.size())); - for (String _iter15 : fields) - { - oprot.writeString(_iter15); - } - oprot.writeListEnd(); - } - return; - case SHUFFLE: - NullStruct shuffle = (NullStruct)value_; - shuffle.write(oprot); - return; - case ALL: - NullStruct all = (NullStruct)value_; - all.write(oprot); - return; - case NONE: - NullStruct none = (NullStruct)value_; - none.write(oprot); - return; - case DIRECT: - NullStruct direct = (NullStruct)value_; - direct.write(oprot); - return; - case CUSTOM_OBJECT: - JavaObject custom_object = (JavaObject)value_; - custom_object.write(oprot); - return; - case CUSTOM_SERIALIZED: - ByteBuffer custom_serialized = (ByteBuffer)value_; - oprot.writeBinary(custom_serialized); - return; - case LOCAL_OR_SHUFFLE: - NullStruct local_or_shuffle = (NullStruct)value_; - local_or_shuffle.write(oprot); - return; - default: - throw new IllegalStateException("Cannot write union with unknown field " + setField_); - } - } - - @Override - protected org.apache.thrift.protocol.TField getFieldDesc(_Fields setField) { - switch (setField) { - case FIELDS: - return FIELDS_FIELD_DESC; - case SHUFFLE: - return SHUFFLE_FIELD_DESC; - case ALL: - return ALL_FIELD_DESC; - case NONE: - return NONE_FIELD_DESC; - case DIRECT: - return DIRECT_FIELD_DESC; - case CUSTOM_OBJECT: - return CUSTOM_OBJECT_FIELD_DESC; - case CUSTOM_SERIALIZED: - return CUSTOM_SERIALIZED_FIELD_DESC; - case LOCAL_OR_SHUFFLE: - return LOCAL_OR_SHUFFLE_FIELD_DESC; - default: - throw new IllegalArgumentException("Unknown field id " + setField); - } - } - - @Override - protected org.apache.thrift.protocol.TStruct getStructDesc() { - return STRUCT_DESC; - } - - @Override - protected _Fields enumForId(short id) { - return _Fields.findByThriftIdOrThrow(id); - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - - public List<String> get_fields() { - if (getSetField() == _Fields.FIELDS) { - return (List<String>)getFieldValue(); - } else { - throw new RuntimeException("Cannot get field 'fields' because union is currently set to " + getFieldDesc(getSetField()).name); - } - } - - public void set_fields(List<String> value) { - if (value == null) throw new NullPointerException(); - setField_ = _Fields.FIELDS; - value_ = value; - } - - public NullStruct get_shuffle() { - if (getSetField() == _Fields.SHUFFLE) { - return (NullStruct)getFieldValue(); - } else { - throw new RuntimeException("Cannot get field 'shuffle' because union is currently set to " + getFieldDesc(getSetField()).name); - } - } - - public void set_shuffle(NullStruct value) { - if (value == null) throw new NullPointerException(); - setField_ = _Fields.SHUFFLE; - value_ = value; - } - - public NullStruct get_all() { - if (getSetField() == _Fields.ALL) { - return (NullStruct)getFieldValue(); - } else { - throw new RuntimeException("Cannot get field 'all' because union is currently set to " + getFieldDesc(getSetField()).name); - } - } - - public void set_all(NullStruct value) { - if (value == null) throw new NullPointerException(); - setField_ = _Fields.ALL; - value_ = value; - } - - public NullStruct get_none() { - if (getSetField() == _Fields.NONE) { - return (NullStruct)getFieldValue(); - } else { - throw new RuntimeException("Cannot get field 'none' because union is currently set to " + getFieldDesc(getSetField()).name); - } - } - - public void set_none(NullStruct value) { - if (value == null) throw new NullPointerException(); - setField_ = _Fields.NONE; - value_ = value; - } - - public NullStruct get_direct() { - if (getSetField() == _Fields.DIRECT) { - return (NullStruct)getFieldValue(); - } else { - throw new RuntimeException("Cannot get field 'direct' because union is currently set to " + getFieldDesc(getSetField()).name); - } - } - - public void set_direct(NullStruct value) { - if (value == null) throw new NullPointerException(); - setField_ = _Fields.DIRECT; - value_ = value; - } - - public JavaObject get_custom_object() { - if (getSetField() == _Fields.CUSTOM_OBJECT) { - return (JavaObject)getFieldValue(); - } else { - throw new RuntimeException("Cannot get field 'custom_object' because union is currently set to " + getFieldDesc(getSetField()).name); - } - } - - public void set_custom_object(JavaObject value) { - if (value == null) throw new NullPointerException(); - setField_ = _Fields.CUSTOM_OBJECT; - value_ = value; - } - - public byte[] get_custom_serialized() { - set_custom_serialized(org.apache.thrift.TBaseHelper.rightSize(buffer_for_custom_serialized())); - ByteBuffer b = buffer_for_custom_serialized(); - return b == null ? null : b.array(); - } - - public ByteBuffer buffer_for_custom_serialized() { - if (getSetField() == _Fields.CUSTOM_SERIALIZED) { - return org.apache.thrift.TBaseHelper.copyBinary((ByteBuffer)getFieldValue()); - } else { - throw new RuntimeException("Cannot get field 'custom_serialized' because union is currently set to " + getFieldDesc(getSetField()).name); - } - } - - public void set_custom_serialized(byte[] value) { - set_custom_serialized(ByteBuffer.wrap(Arrays.copyOf(value, value.length))); - } - - public void set_custom_serialized(ByteBuffer value) { - if (value == null) throw new NullPointerException(); - setField_ = _Fields.CUSTOM_SERIALIZED; - value_ = value; - } - - public NullStruct get_local_or_shuffle() { - if (getSetField() == _Fields.LOCAL_OR_SHUFFLE) { - return (NullStruct)getFieldValue(); - } else { - throw new RuntimeException("Cannot get field 'local_or_shuffle' because union is currently set to " + getFieldDesc(getSetField()).name); - } - } - - public void set_local_or_shuffle(NullStruct value) { - if (value == null) throw new NullPointerException(); - setField_ = _Fields.LOCAL_OR_SHUFFLE; - value_ = value; - } - - public boolean is_set_fields() { - return setField_ == _Fields.FIELDS; - } - - - public boolean is_set_shuffle() { - return setField_ == _Fields.SHUFFLE; - } - - - public boolean is_set_all() { - return setField_ == _Fields.ALL; - } - - - public boolean is_set_none() { - return setField_ == _Fields.NONE; - } - - - public boolean is_set_direct() { - return setField_ == _Fields.DIRECT; - } - - - public boolean is_set_custom_object() { - return setField_ == _Fields.CUSTOM_OBJECT; - } - - - public boolean is_set_custom_serialized() { - return setField_ == _Fields.CUSTOM_SERIALIZED; - } - - - public boolean is_set_local_or_shuffle() { - return setField_ == _Fields.LOCAL_OR_SHUFFLE; - } - - - public boolean equals(Object other) { - if (other instanceof Grouping) { - return equals((Grouping)other); - } else { - return false; - } - } - - public boolean equals(Grouping other) { - return other != null && getSetField() == other.getSetField() && getFieldValue().equals(other.getFieldValue()); - } - - @Override - public int compareTo(Grouping other) { - int lastComparison = org.apache.thrift.TBaseHelper.compareTo(getSetField(), other.getSetField()); - if (lastComparison == 0) { - return org.apache.thrift.TBaseHelper.compareTo(getFieldValue(), other.getFieldValue()); - } - return lastComparison; - } - - - @Override - public int hashCode() { - List<Object> list = new ArrayList<Object>(); - list.add(this.getClass().getName()); - org.apache.thrift.TFieldIdEnum setField = getSetField(); - if (setField != null) { - list.add(setField.getThriftFieldId()); - Object value = getFieldValue(); - if (value instanceof org.apache.thrift.TEnum) { - list.add(((org.apache.thrift.TEnum)getFieldValue()).getValue()); - } else { - list.add(value); - } - } - return list.hashCode(); - } - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - -} http://git-wip-us.apache.org/repos/asf/storm/blob/a6171bd6/storm-core/src/jvm/backtype/storm/generated/HBAuthorizationException.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/backtype/storm/generated/HBAuthorizationException.java b/storm-core/src/jvm/backtype/storm/generated/HBAuthorizationException.java deleted file mode 100644 index cb31213..0000000 --- a/storm-core/src/jvm/backtype/storm/generated/HBAuthorizationException.java +++ /dev/null @@ -1,406 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.storm.generated; - -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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class HBAuthorizationException extends TException implements org.apache.thrift.TBase<HBAuthorizationException, HBAuthorizationException._Fields>, java.io.Serializable, Cloneable, Comparable<HBAuthorizationException> { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("HBAuthorizationException"); - - private static final org.apache.thrift.protocol.TField MSG_FIELD_DESC = new org.apache.thrift.protocol.TField("msg", org.apache.thrift.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 HBAuthorizationExceptionStandardSchemeFactory()); - schemes.put(TupleScheme.class, new HBAuthorizationExceptionTupleSchemeFactory()); - } - - private String msg; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - MSG((short)1, "msg"); - - 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: // MSG - return MSG; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.MSG, new org.apache.thrift.meta_data.FieldMetaData("msg", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(HBAuthorizationException.class, metaDataMap); - } - - public HBAuthorizationException() { - } - - public HBAuthorizationException( - String msg) - { - this(); - this.msg = msg; - } - - /** - * Performs a deep copy on <i>other</i>. - */ - public HBAuthorizationException(HBAuthorizationException other) { - if (other.is_set_msg()) { - this.msg = other.msg; - } - } - - public HBAuthorizationException deepCopy() { - return new HBAuthorizationException(this); - } - - @Override - public void clear() { - this.msg = null; - } - - public String get_msg() { - return this.msg; - } - - public void set_msg(String msg) { - this.msg = msg; - } - - public void unset_msg() { - this.msg = null; - } - - /** Returns true if field msg is set (has been assigned a value) and false otherwise */ - public boolean is_set_msg() { - return this.msg != null; - } - - public void set_msg_isSet(boolean value) { - if (!value) { - this.msg = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case MSG: - if (value == null) { - unset_msg(); - } else { - set_msg((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case MSG: - return get_msg(); - - } - 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 MSG: - return is_set_msg(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof HBAuthorizationException) - return this.equals((HBAuthorizationException)that); - return false; - } - - public boolean equals(HBAuthorizationException that) { - if (that == null) - return false; - - boolean this_present_msg = true && this.is_set_msg(); - boolean that_present_msg = true && that.is_set_msg(); - if (this_present_msg || that_present_msg) { - if (!(this_present_msg && that_present_msg)) - return false; - if (!this.msg.equals(that.msg)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List<Object> list = new ArrayList<Object>(); - - boolean present_msg = true && (is_set_msg()); - list.add(present_msg); - if (present_msg) - list.add(msg); - - return list.hashCode(); - } - - @Override - public int compareTo(HBAuthorizationException other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(is_set_msg()).compareTo(other.is_set_msg()); - if (lastComparison != 0) { - return lastComparison; - } - if (is_set_msg()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.msg, other.msg); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("HBAuthorizationException("); - boolean first = true; - - sb.append("msg:"); - if (this.msg == null) { - sb.append("null"); - } else { - sb.append(this.msg); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!is_set_msg()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'msg' is unset! Struct:" + toString()); - } - - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class HBAuthorizationExceptionStandardSchemeFactory implements SchemeFactory { - public HBAuthorizationExceptionStandardScheme getScheme() { - return new HBAuthorizationExceptionStandardScheme(); - } - } - - private static class HBAuthorizationExceptionStandardScheme extends StandardScheme<HBAuthorizationException> { - - public void read(org.apache.thrift.protocol.TProtocol iprot, HBAuthorizationException 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: // MSG - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.msg = iprot.readString(); - struct.set_msg_isSet(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(); - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, HBAuthorizationException struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.msg != null) { - oprot.writeFieldBegin(MSG_FIELD_DESC); - oprot.writeString(struct.msg); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class HBAuthorizationExceptionTupleSchemeFactory implements SchemeFactory { - public HBAuthorizationExceptionTupleScheme getScheme() { - return new HBAuthorizationExceptionTupleScheme(); - } - } - - private static class HBAuthorizationExceptionTupleScheme extends TupleScheme<HBAuthorizationException> { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, HBAuthorizationException struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeString(struct.msg); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, HBAuthorizationException struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.msg = iprot.readString(); - struct.set_msg_isSet(true); - } - } - -} - http://git-wip-us.apache.org/repos/asf/storm/blob/a6171bd6/storm-core/src/jvm/backtype/storm/generated/HBExecutionException.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/backtype/storm/generated/HBExecutionException.java b/storm-core/src/jvm/backtype/storm/generated/HBExecutionException.java deleted file mode 100644 index 697dd06..0000000 --- a/storm-core/src/jvm/backtype/storm/generated/HBExecutionException.java +++ /dev/null @@ -1,406 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.storm.generated; - -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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class HBExecutionException extends TException implements org.apache.thrift.TBase<HBExecutionException, HBExecutionException._Fields>, java.io.Serializable, Cloneable, Comparable<HBExecutionException> { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("HBExecutionException"); - - private static final org.apache.thrift.protocol.TField MSG_FIELD_DESC = new org.apache.thrift.protocol.TField("msg", org.apache.thrift.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 HBExecutionExceptionStandardSchemeFactory()); - schemes.put(TupleScheme.class, new HBExecutionExceptionTupleSchemeFactory()); - } - - private String msg; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - MSG((short)1, "msg"); - - 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: // MSG - return MSG; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.MSG, new org.apache.thrift.meta_data.FieldMetaData("msg", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(HBExecutionException.class, metaDataMap); - } - - public HBExecutionException() { - } - - public HBExecutionException( - String msg) - { - this(); - this.msg = msg; - } - - /** - * Performs a deep copy on <i>other</i>. - */ - public HBExecutionException(HBExecutionException other) { - if (other.is_set_msg()) { - this.msg = other.msg; - } - } - - public HBExecutionException deepCopy() { - return new HBExecutionException(this); - } - - @Override - public void clear() { - this.msg = null; - } - - public String get_msg() { - return this.msg; - } - - public void set_msg(String msg) { - this.msg = msg; - } - - public void unset_msg() { - this.msg = null; - } - - /** Returns true if field msg is set (has been assigned a value) and false otherwise */ - public boolean is_set_msg() { - return this.msg != null; - } - - public void set_msg_isSet(boolean value) { - if (!value) { - this.msg = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case MSG: - if (value == null) { - unset_msg(); - } else { - set_msg((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case MSG: - return get_msg(); - - } - 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 MSG: - return is_set_msg(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof HBExecutionException) - return this.equals((HBExecutionException)that); - return false; - } - - public boolean equals(HBExecutionException that) { - if (that == null) - return false; - - boolean this_present_msg = true && this.is_set_msg(); - boolean that_present_msg = true && that.is_set_msg(); - if (this_present_msg || that_present_msg) { - if (!(this_present_msg && that_present_msg)) - return false; - if (!this.msg.equals(that.msg)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List<Object> list = new ArrayList<Object>(); - - boolean present_msg = true && (is_set_msg()); - list.add(present_msg); - if (present_msg) - list.add(msg); - - return list.hashCode(); - } - - @Override - public int compareTo(HBExecutionException other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(is_set_msg()).compareTo(other.is_set_msg()); - if (lastComparison != 0) { - return lastComparison; - } - if (is_set_msg()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.msg, other.msg); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("HBExecutionException("); - boolean first = true; - - sb.append("msg:"); - if (this.msg == null) { - sb.append("null"); - } else { - sb.append(this.msg); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!is_set_msg()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'msg' is unset! Struct:" + toString()); - } - - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class HBExecutionExceptionStandardSchemeFactory implements SchemeFactory { - public HBExecutionExceptionStandardScheme getScheme() { - return new HBExecutionExceptionStandardScheme(); - } - } - - private static class HBExecutionExceptionStandardScheme extends StandardScheme<HBExecutionException> { - - public void read(org.apache.thrift.protocol.TProtocol iprot, HBExecutionException 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: // MSG - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.msg = iprot.readString(); - struct.set_msg_isSet(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(); - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, HBExecutionException struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.msg != null) { - oprot.writeFieldBegin(MSG_FIELD_DESC); - oprot.writeString(struct.msg); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class HBExecutionExceptionTupleSchemeFactory implements SchemeFactory { - public HBExecutionExceptionTupleScheme getScheme() { - return new HBExecutionExceptionTupleScheme(); - } - } - - private static class HBExecutionExceptionTupleScheme extends TupleScheme<HBExecutionException> { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, HBExecutionException struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeString(struct.msg); - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, HBExecutionException struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.msg = iprot.readString(); - struct.set_msg_isSet(true); - } - } - -} -