http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterGoalState.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterGoalState.java b/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterGoalState.java index 2891727..36eea21 100644 --- a/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterGoalState.java +++ b/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterGoalState.java @@ -15,7 +15,7 @@ * limitations under the License. */ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.10.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -23,11 +23,8 @@ package org.apache.accumulo.core.master.thrift; -import java.util.Map; -import java.util.HashMap; -import org.apache.thrift.TEnum; -@SuppressWarnings({"unused"}) public enum MasterGoalState implements org.apache.thrift.TEnum { +public enum MasterGoalState implements org.apache.thrift.TEnum { CLEAN_STOP(0), SAFE_MODE(1), NORMAL(2);
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterMonitorInfo.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterMonitorInfo.java b/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterMonitorInfo.java index 9e7b8ea..f6be4d6 100644 --- a/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterMonitorInfo.java +++ b/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterMonitorInfo.java @@ -15,42 +15,15 @@ * limitations under the License. */ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.10.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package org.apache.accumulo.core.master.thrift; -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import 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", "unused"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)") public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorInfo, MasterMonitorInfo._Fields>, java.io.Serializable, Cloneable, Comparable<MasterMonitorInfo> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("MasterMonitorInfo"); @@ -64,15 +37,12 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI private static final org.apache.thrift.protocol.TField DEAD_TABLET_SERVERS_FIELD_DESC = new org.apache.thrift.protocol.TField("deadTabletServers", org.apache.thrift.protocol.TType.LIST, (short)10); private static final org.apache.thrift.protocol.TField BULK_IMPORTS_FIELD_DESC = new org.apache.thrift.protocol.TField("bulkImports", org.apache.thrift.protocol.TType.LIST, (short)11); - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new MasterMonitorInfoStandardSchemeFactory()); - schemes.put(TupleScheme.class, new MasterMonitorInfoTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new MasterMonitorInfoStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new MasterMonitorInfoTupleSchemeFactory(); - public Map<String,TableInfo> tableMap; // required - public List<TabletServerStatus> tServerInfo; // required - public Map<String,Byte> badTServers; // required + public java.util.Map<java.lang.String,TableInfo> tableMap; // required + public java.util.List<TabletServerStatus> tServerInfo; // required + public java.util.Map<java.lang.String,java.lang.Byte> badTServers; // required /** * * @see MasterState @@ -84,9 +54,9 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI */ public MasterGoalState goalState; // required public int unassignedTablets; // required - public Set<String> serversShuttingDown; // required - public List<DeadServer> deadTabletServers; // required - public List<BulkImportStatus> bulkImports; // required + public java.util.Set<java.lang.String> serversShuttingDown; // required + public java.util.List<DeadServer> deadTabletServers; // required + public java.util.List<BulkImportStatus> bulkImports; // 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 { @@ -108,10 +78,10 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI DEAD_TABLET_SERVERS((short)10, "deadTabletServers"), BULK_IMPORTS((short)11, "bulkImports"); - private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -150,21 +120,21 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.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) { + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @@ -173,7 +143,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI return _thriftId; } - public String getFieldName() { + public java.lang.String getFieldName() { return _fieldName; } } @@ -181,9 +151,9 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI // isset id assignments private static final int __UNASSIGNEDTABLETS_ISSET_ID = 0; private byte __isset_bitfield = 0; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.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); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.TABLE_MAP, new org.apache.thrift.meta_data.FieldMetaData("tableMap", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), @@ -210,7 +180,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI tmpMap.put(_Fields.BULK_IMPORTS, new org.apache.thrift.meta_data.FieldMetaData("bulkImports", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, BulkImportStatus.class)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(MasterMonitorInfo.class, metaDataMap); } @@ -218,15 +188,15 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI } public MasterMonitorInfo( - Map<String,TableInfo> tableMap, - List<TabletServerStatus> tServerInfo, - Map<String,Byte> badTServers, + java.util.Map<java.lang.String,TableInfo> tableMap, + java.util.List<TabletServerStatus> tServerInfo, + java.util.Map<java.lang.String,java.lang.Byte> badTServers, MasterState state, MasterGoalState goalState, int unassignedTablets, - Set<String> serversShuttingDown, - List<DeadServer> deadTabletServers, - List<BulkImportStatus> bulkImports) + java.util.Set<java.lang.String> serversShuttingDown, + java.util.List<DeadServer> deadTabletServers, + java.util.List<BulkImportStatus> bulkImports) { this(); this.tableMap = tableMap; @@ -247,13 +217,13 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI public MasterMonitorInfo(MasterMonitorInfo other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetTableMap()) { - Map<String,TableInfo> __this__tableMap = new HashMap<String,TableInfo>(other.tableMap.size()); - for (Map.Entry<String, TableInfo> other_element : other.tableMap.entrySet()) { + java.util.Map<java.lang.String,TableInfo> __this__tableMap = new java.util.HashMap<java.lang.String,TableInfo>(other.tableMap.size()); + for (java.util.Map.Entry<java.lang.String, TableInfo> other_element : other.tableMap.entrySet()) { - String other_element_key = other_element.getKey(); + java.lang.String other_element_key = other_element.getKey(); TableInfo other_element_value = other_element.getValue(); - String __this__tableMap_copy_key = other_element_key; + java.lang.String __this__tableMap_copy_key = other_element_key; TableInfo __this__tableMap_copy_value = new TableInfo(other_element_value); @@ -262,14 +232,14 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI this.tableMap = __this__tableMap; } if (other.isSetTServerInfo()) { - List<TabletServerStatus> __this__tServerInfo = new ArrayList<TabletServerStatus>(other.tServerInfo.size()); + java.util.List<TabletServerStatus> __this__tServerInfo = new java.util.ArrayList<TabletServerStatus>(other.tServerInfo.size()); for (TabletServerStatus other_element : other.tServerInfo) { __this__tServerInfo.add(new TabletServerStatus(other_element)); } this.tServerInfo = __this__tServerInfo; } if (other.isSetBadTServers()) { - Map<String,Byte> __this__badTServers = new HashMap<String,Byte>(other.badTServers); + java.util.Map<java.lang.String,java.lang.Byte> __this__badTServers = new java.util.HashMap<java.lang.String,java.lang.Byte>(other.badTServers); this.badTServers = __this__badTServers; } if (other.isSetState()) { @@ -280,18 +250,18 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI } this.unassignedTablets = other.unassignedTablets; if (other.isSetServersShuttingDown()) { - Set<String> __this__serversShuttingDown = new HashSet<String>(other.serversShuttingDown); + java.util.Set<java.lang.String> __this__serversShuttingDown = new java.util.HashSet<java.lang.String>(other.serversShuttingDown); this.serversShuttingDown = __this__serversShuttingDown; } if (other.isSetDeadTabletServers()) { - List<DeadServer> __this__deadTabletServers = new ArrayList<DeadServer>(other.deadTabletServers.size()); + java.util.List<DeadServer> __this__deadTabletServers = new java.util.ArrayList<DeadServer>(other.deadTabletServers.size()); for (DeadServer other_element : other.deadTabletServers) { __this__deadTabletServers.add(new DeadServer(other_element)); } this.deadTabletServers = __this__deadTabletServers; } if (other.isSetBulkImports()) { - List<BulkImportStatus> __this__bulkImports = new ArrayList<BulkImportStatus>(other.bulkImports.size()); + java.util.List<BulkImportStatus> __this__bulkImports = new java.util.ArrayList<BulkImportStatus>(other.bulkImports.size()); for (BulkImportStatus other_element : other.bulkImports) { __this__bulkImports.add(new BulkImportStatus(other_element)); } @@ -321,18 +291,18 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI return (this.tableMap == null) ? 0 : this.tableMap.size(); } - public void putToTableMap(String key, TableInfo val) { + public void putToTableMap(java.lang.String key, TableInfo val) { if (this.tableMap == null) { - this.tableMap = new HashMap<String,TableInfo>(); + this.tableMap = new java.util.HashMap<java.lang.String,TableInfo>(); } this.tableMap.put(key, val); } - public Map<String,TableInfo> getTableMap() { + public java.util.Map<java.lang.String,TableInfo> getTableMap() { return this.tableMap; } - public MasterMonitorInfo setTableMap(Map<String,TableInfo> tableMap) { + public MasterMonitorInfo setTableMap(java.util.Map<java.lang.String,TableInfo> tableMap) { this.tableMap = tableMap; return this; } @@ -362,16 +332,16 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI public void addToTServerInfo(TabletServerStatus elem) { if (this.tServerInfo == null) { - this.tServerInfo = new ArrayList<TabletServerStatus>(); + this.tServerInfo = new java.util.ArrayList<TabletServerStatus>(); } this.tServerInfo.add(elem); } - public List<TabletServerStatus> getTServerInfo() { + public java.util.List<TabletServerStatus> getTServerInfo() { return this.tServerInfo; } - public MasterMonitorInfo setTServerInfo(List<TabletServerStatus> tServerInfo) { + public MasterMonitorInfo setTServerInfo(java.util.List<TabletServerStatus> tServerInfo) { this.tServerInfo = tServerInfo; return this; } @@ -395,18 +365,18 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI return (this.badTServers == null) ? 0 : this.badTServers.size(); } - public void putToBadTServers(String key, byte val) { + public void putToBadTServers(java.lang.String key, byte val) { if (this.badTServers == null) { - this.badTServers = new HashMap<String,Byte>(); + this.badTServers = new java.util.HashMap<java.lang.String,java.lang.Byte>(); } this.badTServers.put(key, val); } - public Map<String,Byte> getBadTServers() { + public java.util.Map<java.lang.String,java.lang.Byte> getBadTServers() { return this.badTServers; } - public MasterMonitorInfo setBadTServers(Map<String,Byte> badTServers) { + public MasterMonitorInfo setBadTServers(java.util.Map<java.lang.String,java.lang.Byte> badTServers) { this.badTServers = badTServers; return this; } @@ -501,38 +471,38 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI } public void unsetUnassignedTablets() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UNASSIGNEDTABLETS_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __UNASSIGNEDTABLETS_ISSET_ID); } /** Returns true if field unassignedTablets is set (has been assigned a value) and false otherwise */ public boolean isSetUnassignedTablets() { - return EncodingUtils.testBit(__isset_bitfield, __UNASSIGNEDTABLETS_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __UNASSIGNEDTABLETS_ISSET_ID); } public void setUnassignedTabletsIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UNASSIGNEDTABLETS_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __UNASSIGNEDTABLETS_ISSET_ID, value); } public int getServersShuttingDownSize() { return (this.serversShuttingDown == null) ? 0 : this.serversShuttingDown.size(); } - public java.util.Iterator<String> getServersShuttingDownIterator() { + public java.util.Iterator<java.lang.String> getServersShuttingDownIterator() { return (this.serversShuttingDown == null) ? null : this.serversShuttingDown.iterator(); } - public void addToServersShuttingDown(String elem) { + public void addToServersShuttingDown(java.lang.String elem) { if (this.serversShuttingDown == null) { - this.serversShuttingDown = new HashSet<String>(); + this.serversShuttingDown = new java.util.HashSet<java.lang.String>(); } this.serversShuttingDown.add(elem); } - public Set<String> getServersShuttingDown() { + public java.util.Set<java.lang.String> getServersShuttingDown() { return this.serversShuttingDown; } - public MasterMonitorInfo setServersShuttingDown(Set<String> serversShuttingDown) { + public MasterMonitorInfo setServersShuttingDown(java.util.Set<java.lang.String> serversShuttingDown) { this.serversShuttingDown = serversShuttingDown; return this; } @@ -562,16 +532,16 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI public void addToDeadTabletServers(DeadServer elem) { if (this.deadTabletServers == null) { - this.deadTabletServers = new ArrayList<DeadServer>(); + this.deadTabletServers = new java.util.ArrayList<DeadServer>(); } this.deadTabletServers.add(elem); } - public List<DeadServer> getDeadTabletServers() { + public java.util.List<DeadServer> getDeadTabletServers() { return this.deadTabletServers; } - public MasterMonitorInfo setDeadTabletServers(List<DeadServer> deadTabletServers) { + public MasterMonitorInfo setDeadTabletServers(java.util.List<DeadServer> deadTabletServers) { this.deadTabletServers = deadTabletServers; return this; } @@ -601,16 +571,16 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI public void addToBulkImports(BulkImportStatus elem) { if (this.bulkImports == null) { - this.bulkImports = new ArrayList<BulkImportStatus>(); + this.bulkImports = new java.util.ArrayList<BulkImportStatus>(); } this.bulkImports.add(elem); } - public List<BulkImportStatus> getBulkImports() { + public java.util.List<BulkImportStatus> getBulkImports() { return this.bulkImports; } - public MasterMonitorInfo setBulkImports(List<BulkImportStatus> bulkImports) { + public MasterMonitorInfo setBulkImports(java.util.List<BulkImportStatus> bulkImports) { this.bulkImports = bulkImports; return this; } @@ -630,13 +600,13 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI } } - public void setFieldValue(_Fields field, Object value) { + public void setFieldValue(_Fields field, java.lang.Object value) { switch (field) { case TABLE_MAP: if (value == null) { unsetTableMap(); } else { - setTableMap((Map<String,TableInfo>)value); + setTableMap((java.util.Map<java.lang.String,TableInfo>)value); } break; @@ -644,7 +614,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI if (value == null) { unsetTServerInfo(); } else { - setTServerInfo((List<TabletServerStatus>)value); + setTServerInfo((java.util.List<TabletServerStatus>)value); } break; @@ -652,7 +622,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI if (value == null) { unsetBadTServers(); } else { - setBadTServers((Map<String,Byte>)value); + setBadTServers((java.util.Map<java.lang.String,java.lang.Byte>)value); } break; @@ -676,7 +646,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI if (value == null) { unsetUnassignedTablets(); } else { - setUnassignedTablets((Integer)value); + setUnassignedTablets((java.lang.Integer)value); } break; @@ -684,7 +654,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI if (value == null) { unsetServersShuttingDown(); } else { - setServersShuttingDown((Set<String>)value); + setServersShuttingDown((java.util.Set<java.lang.String>)value); } break; @@ -692,7 +662,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI if (value == null) { unsetDeadTabletServers(); } else { - setDeadTabletServers((List<DeadServer>)value); + setDeadTabletServers((java.util.List<DeadServer>)value); } break; @@ -700,14 +670,14 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI if (value == null) { unsetBulkImports(); } else { - setBulkImports((List<BulkImportStatus>)value); + setBulkImports((java.util.List<BulkImportStatus>)value); } break; } } - public Object getFieldValue(_Fields field) { + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case TABLE_MAP: return getTableMap(); @@ -737,13 +707,13 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI return getBulkImports(); } - throw new IllegalStateException(); + throw new java.lang.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(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -766,11 +736,11 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI case BULK_IMPORTS: return isSetBulkImports(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { + public boolean equals(java.lang.Object that) { if (that == null) return false; if (that instanceof MasterMonitorInfo) @@ -781,6 +751,8 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI public boolean equals(MasterMonitorInfo that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_tableMap = true && this.isSetTableMap(); boolean that_present_tableMap = true && that.isSetTableMap(); @@ -868,54 +840,43 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI @Override public int hashCode() { - List<Object> list = new ArrayList<Object>(); + int hashCode = 1; - boolean present_tableMap = true && (isSetTableMap()); - list.add(present_tableMap); - if (present_tableMap) - list.add(tableMap); + hashCode = hashCode * 8191 + ((isSetTableMap()) ? 131071 : 524287); + if (isSetTableMap()) + hashCode = hashCode * 8191 + tableMap.hashCode(); - boolean present_tServerInfo = true && (isSetTServerInfo()); - list.add(present_tServerInfo); - if (present_tServerInfo) - list.add(tServerInfo); + hashCode = hashCode * 8191 + ((isSetTServerInfo()) ? 131071 : 524287); + if (isSetTServerInfo()) + hashCode = hashCode * 8191 + tServerInfo.hashCode(); - boolean present_badTServers = true && (isSetBadTServers()); - list.add(present_badTServers); - if (present_badTServers) - list.add(badTServers); + hashCode = hashCode * 8191 + ((isSetBadTServers()) ? 131071 : 524287); + if (isSetBadTServers()) + hashCode = hashCode * 8191 + badTServers.hashCode(); - boolean present_state = true && (isSetState()); - list.add(present_state); - if (present_state) - list.add(state.getValue()); + hashCode = hashCode * 8191 + ((isSetState()) ? 131071 : 524287); + if (isSetState()) + hashCode = hashCode * 8191 + state.getValue(); - boolean present_goalState = true && (isSetGoalState()); - list.add(present_goalState); - if (present_goalState) - list.add(goalState.getValue()); + hashCode = hashCode * 8191 + ((isSetGoalState()) ? 131071 : 524287); + if (isSetGoalState()) + hashCode = hashCode * 8191 + goalState.getValue(); - boolean present_unassignedTablets = true; - list.add(present_unassignedTablets); - if (present_unassignedTablets) - list.add(unassignedTablets); + hashCode = hashCode * 8191 + unassignedTablets; - boolean present_serversShuttingDown = true && (isSetServersShuttingDown()); - list.add(present_serversShuttingDown); - if (present_serversShuttingDown) - list.add(serversShuttingDown); + hashCode = hashCode * 8191 + ((isSetServersShuttingDown()) ? 131071 : 524287); + if (isSetServersShuttingDown()) + hashCode = hashCode * 8191 + serversShuttingDown.hashCode(); - boolean present_deadTabletServers = true && (isSetDeadTabletServers()); - list.add(present_deadTabletServers); - if (present_deadTabletServers) - list.add(deadTabletServers); + hashCode = hashCode * 8191 + ((isSetDeadTabletServers()) ? 131071 : 524287); + if (isSetDeadTabletServers()) + hashCode = hashCode * 8191 + deadTabletServers.hashCode(); - boolean present_bulkImports = true && (isSetBulkImports()); - list.add(present_bulkImports); - if (present_bulkImports) - list.add(bulkImports); + hashCode = hashCode * 8191 + ((isSetBulkImports()) ? 131071 : 524287); + if (isSetBulkImports()) + hashCode = hashCode * 8191 + bulkImports.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -926,7 +887,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetTableMap()).compareTo(other.isSetTableMap()); + lastComparison = java.lang.Boolean.valueOf(isSetTableMap()).compareTo(other.isSetTableMap()); if (lastComparison != 0) { return lastComparison; } @@ -936,7 +897,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI return lastComparison; } } - lastComparison = Boolean.valueOf(isSetTServerInfo()).compareTo(other.isSetTServerInfo()); + lastComparison = java.lang.Boolean.valueOf(isSetTServerInfo()).compareTo(other.isSetTServerInfo()); if (lastComparison != 0) { return lastComparison; } @@ -946,7 +907,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI return lastComparison; } } - lastComparison = Boolean.valueOf(isSetBadTServers()).compareTo(other.isSetBadTServers()); + lastComparison = java.lang.Boolean.valueOf(isSetBadTServers()).compareTo(other.isSetBadTServers()); if (lastComparison != 0) { return lastComparison; } @@ -956,7 +917,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI return lastComparison; } } - lastComparison = Boolean.valueOf(isSetState()).compareTo(other.isSetState()); + lastComparison = java.lang.Boolean.valueOf(isSetState()).compareTo(other.isSetState()); if (lastComparison != 0) { return lastComparison; } @@ -966,7 +927,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI return lastComparison; } } - lastComparison = Boolean.valueOf(isSetGoalState()).compareTo(other.isSetGoalState()); + lastComparison = java.lang.Boolean.valueOf(isSetGoalState()).compareTo(other.isSetGoalState()); if (lastComparison != 0) { return lastComparison; } @@ -976,7 +937,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI return lastComparison; } } - lastComparison = Boolean.valueOf(isSetUnassignedTablets()).compareTo(other.isSetUnassignedTablets()); + lastComparison = java.lang.Boolean.valueOf(isSetUnassignedTablets()).compareTo(other.isSetUnassignedTablets()); if (lastComparison != 0) { return lastComparison; } @@ -986,7 +947,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI return lastComparison; } } - lastComparison = Boolean.valueOf(isSetServersShuttingDown()).compareTo(other.isSetServersShuttingDown()); + lastComparison = java.lang.Boolean.valueOf(isSetServersShuttingDown()).compareTo(other.isSetServersShuttingDown()); if (lastComparison != 0) { return lastComparison; } @@ -996,7 +957,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI return lastComparison; } } - lastComparison = Boolean.valueOf(isSetDeadTabletServers()).compareTo(other.isSetDeadTabletServers()); + lastComparison = java.lang.Boolean.valueOf(isSetDeadTabletServers()).compareTo(other.isSetDeadTabletServers()); if (lastComparison != 0) { return lastComparison; } @@ -1006,7 +967,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI return lastComparison; } } - lastComparison = Boolean.valueOf(isSetBulkImports()).compareTo(other.isSetBulkImports()); + lastComparison = java.lang.Boolean.valueOf(isSetBulkImports()).compareTo(other.isSetBulkImports()); if (lastComparison != 0) { return lastComparison; } @@ -1024,16 +985,16 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).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); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("MasterMonitorInfo("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("MasterMonitorInfo("); boolean first = true; sb.append("tableMap:"); @@ -1120,7 +1081,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; @@ -1130,13 +1091,13 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI } } - private static class MasterMonitorInfoStandardSchemeFactory implements SchemeFactory { + private static class MasterMonitorInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public MasterMonitorInfoStandardScheme getScheme() { return new MasterMonitorInfoStandardScheme(); } } - private static class MasterMonitorInfoStandardScheme extends StandardScheme<MasterMonitorInfo> { + private static class MasterMonitorInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme<MasterMonitorInfo> { public void read(org.apache.thrift.protocol.TProtocol iprot, MasterMonitorInfo struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; @@ -1152,8 +1113,8 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map26 = iprot.readMapBegin(); - struct.tableMap = new HashMap<String,TableInfo>(2*_map26.size); - String _key27; + struct.tableMap = new java.util.HashMap<java.lang.String,TableInfo>(2*_map26.size); + java.lang.String _key27; TableInfo _val28; for (int _i29 = 0; _i29 < _map26.size; ++_i29) { @@ -1173,7 +1134,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list30 = iprot.readListBegin(); - struct.tServerInfo = new ArrayList<TabletServerStatus>(_list30.size); + struct.tServerInfo = new java.util.ArrayList<TabletServerStatus>(_list30.size); TabletServerStatus _elem31; for (int _i32 = 0; _i32 < _list30.size; ++_i32) { @@ -1192,8 +1153,8 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map33 = iprot.readMapBegin(); - struct.badTServers = new HashMap<String,Byte>(2*_map33.size); - String _key34; + struct.badTServers = new java.util.HashMap<java.lang.String,java.lang.Byte>(2*_map33.size); + java.lang.String _key34; byte _val35; for (int _i36 = 0; _i36 < _map33.size; ++_i36) { @@ -1236,8 +1197,8 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI if (schemeField.type == org.apache.thrift.protocol.TType.SET) { { org.apache.thrift.protocol.TSet _set37 = iprot.readSetBegin(); - struct.serversShuttingDown = new HashSet<String>(2*_set37.size); - String _elem38; + struct.serversShuttingDown = new java.util.HashSet<java.lang.String>(2*_set37.size); + java.lang.String _elem38; for (int _i39 = 0; _i39 < _set37.size; ++_i39) { _elem38 = iprot.readString(); @@ -1254,7 +1215,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list40 = iprot.readListBegin(); - struct.deadTabletServers = new ArrayList<DeadServer>(_list40.size); + struct.deadTabletServers = new java.util.ArrayList<DeadServer>(_list40.size); DeadServer _elem41; for (int _i42 = 0; _i42 < _list40.size; ++_i42) { @@ -1273,7 +1234,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list43 = iprot.readListBegin(); - struct.bulkImports = new ArrayList<BulkImportStatus>(_list43.size); + struct.bulkImports = new java.util.ArrayList<BulkImportStatus>(_list43.size); BulkImportStatus _elem44; for (int _i45 = 0; _i45 < _list43.size; ++_i45) { @@ -1307,7 +1268,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI oprot.writeFieldBegin(TABLE_MAP_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.tableMap.size())); - for (Map.Entry<String, TableInfo> _iter46 : struct.tableMap.entrySet()) + for (java.util.Map.Entry<java.lang.String, TableInfo> _iter46 : struct.tableMap.entrySet()) { oprot.writeString(_iter46.getKey()); _iter46.getValue().write(oprot); @@ -1332,7 +1293,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI oprot.writeFieldBegin(BAD_TSERVERS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.BYTE, struct.badTServers.size())); - for (Map.Entry<String, Byte> _iter48 : struct.badTServers.entrySet()) + for (java.util.Map.Entry<java.lang.String, java.lang.Byte> _iter48 : struct.badTServers.entrySet()) { oprot.writeString(_iter48.getKey()); oprot.writeByte(_iter48.getValue()); @@ -1358,7 +1319,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI oprot.writeFieldBegin(SERVERS_SHUTTING_DOWN_FIELD_DESC); { oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, struct.serversShuttingDown.size())); - for (String _iter49 : struct.serversShuttingDown) + for (java.lang.String _iter49 : struct.serversShuttingDown) { oprot.writeString(_iter49); } @@ -1396,18 +1357,18 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI } - private static class MasterMonitorInfoTupleSchemeFactory implements SchemeFactory { + private static class MasterMonitorInfoTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public MasterMonitorInfoTupleScheme getScheme() { return new MasterMonitorInfoTupleScheme(); } } - private static class MasterMonitorInfoTupleScheme extends TupleScheme<MasterMonitorInfo> { + private static class MasterMonitorInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme<MasterMonitorInfo> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, MasterMonitorInfo struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetTableMap()) { optionals.set(0); } @@ -1439,7 +1400,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI if (struct.isSetTableMap()) { { oprot.writeI32(struct.tableMap.size()); - for (Map.Entry<String, TableInfo> _iter52 : struct.tableMap.entrySet()) + for (java.util.Map.Entry<java.lang.String, TableInfo> _iter52 : struct.tableMap.entrySet()) { oprot.writeString(_iter52.getKey()); _iter52.getValue().write(oprot); @@ -1458,7 +1419,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI if (struct.isSetBadTServers()) { { oprot.writeI32(struct.badTServers.size()); - for (Map.Entry<String, Byte> _iter54 : struct.badTServers.entrySet()) + for (java.util.Map.Entry<java.lang.String, java.lang.Byte> _iter54 : struct.badTServers.entrySet()) { oprot.writeString(_iter54.getKey()); oprot.writeByte(_iter54.getValue()); @@ -1477,7 +1438,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI if (struct.isSetServersShuttingDown()) { { oprot.writeI32(struct.serversShuttingDown.size()); - for (String _iter55 : struct.serversShuttingDown) + for (java.lang.String _iter55 : struct.serversShuttingDown) { oprot.writeString(_iter55); } @@ -1505,13 +1466,13 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI @Override public void read(org.apache.thrift.protocol.TProtocol prot, MasterMonitorInfo struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(9); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(9); if (incoming.get(0)) { { org.apache.thrift.protocol.TMap _map58 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.tableMap = new HashMap<String,TableInfo>(2*_map58.size); - String _key59; + struct.tableMap = new java.util.HashMap<java.lang.String,TableInfo>(2*_map58.size); + java.lang.String _key59; TableInfo _val60; for (int _i61 = 0; _i61 < _map58.size; ++_i61) { @@ -1526,7 +1487,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI if (incoming.get(1)) { { org.apache.thrift.protocol.TList _list62 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.tServerInfo = new ArrayList<TabletServerStatus>(_list62.size); + struct.tServerInfo = new java.util.ArrayList<TabletServerStatus>(_list62.size); TabletServerStatus _elem63; for (int _i64 = 0; _i64 < _list62.size; ++_i64) { @@ -1540,8 +1501,8 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI if (incoming.get(2)) { { org.apache.thrift.protocol.TMap _map65 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.BYTE, iprot.readI32()); - struct.badTServers = new HashMap<String,Byte>(2*_map65.size); - String _key66; + struct.badTServers = new java.util.HashMap<java.lang.String,java.lang.Byte>(2*_map65.size); + java.lang.String _key66; byte _val67; for (int _i68 = 0; _i68 < _map65.size; ++_i68) { @@ -1567,8 +1528,8 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI if (incoming.get(6)) { { org.apache.thrift.protocol.TSet _set69 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.serversShuttingDown = new HashSet<String>(2*_set69.size); - String _elem70; + struct.serversShuttingDown = new java.util.HashSet<java.lang.String>(2*_set69.size); + java.lang.String _elem70; for (int _i71 = 0; _i71 < _set69.size; ++_i71) { _elem70 = iprot.readString(); @@ -1580,7 +1541,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI if (incoming.get(7)) { { org.apache.thrift.protocol.TList _list72 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.deadTabletServers = new ArrayList<DeadServer>(_list72.size); + struct.deadTabletServers = new java.util.ArrayList<DeadServer>(_list72.size); DeadServer _elem73; for (int _i74 = 0; _i74 < _list72.size; ++_i74) { @@ -1594,7 +1555,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI if (incoming.get(8)) { { org.apache.thrift.protocol.TList _list75 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.bulkImports = new ArrayList<BulkImportStatus>(_list75.size); + struct.bulkImports = new java.util.ArrayList<BulkImportStatus>(_list75.size); BulkImportStatus _elem76; for (int _i77 = 0; _i77 < _list75.size; ++_i77) { @@ -1608,5 +1569,9 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI } } + private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + private static void unusedMethod() {} } http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterState.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterState.java b/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterState.java index 29548d3..28fa329 100644 --- a/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterState.java +++ b/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterState.java @@ -15,7 +15,7 @@ * limitations under the License. */ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.10.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -23,11 +23,8 @@ package org.apache.accumulo.core.master.thrift; -import java.util.Map; -import java.util.HashMap; -import org.apache.thrift.TEnum; -@SuppressWarnings({"unused"}) public enum MasterState implements org.apache.thrift.TEnum { +public enum MasterState implements org.apache.thrift.TEnum { INITIAL(0), HAVE_LOCK(1), SAFE_MODE(2), http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/master/thrift/RecoveryException.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/accumulo/core/master/thrift/RecoveryException.java b/core/src/main/java/org/apache/accumulo/core/master/thrift/RecoveryException.java index 641345c..7b1c9a1 100644 --- a/core/src/main/java/org/apache/accumulo/core/master/thrift/RecoveryException.java +++ b/core/src/main/java/org/apache/accumulo/core/master/thrift/RecoveryException.java @@ -15,63 +15,33 @@ * limitations under the License. */ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.10.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package org.apache.accumulo.core.master.thrift; -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import 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", "unused"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class RecoveryException extends TException implements org.apache.thrift.TBase<RecoveryException, RecoveryException._Fields>, java.io.Serializable, Cloneable, Comparable<RecoveryException> { +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)") +public class RecoveryException extends org.apache.thrift.TException implements org.apache.thrift.TBase<RecoveryException, RecoveryException._Fields>, java.io.Serializable, Cloneable, Comparable<RecoveryException> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RecoveryException"); private static final org.apache.thrift.protocol.TField WHY_FIELD_DESC = new org.apache.thrift.protocol.TField("why", 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 RecoveryExceptionStandardSchemeFactory()); - schemes.put(TupleScheme.class, new RecoveryExceptionTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new RecoveryExceptionStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new RecoveryExceptionTupleSchemeFactory(); - public String why; // required + public java.lang.String why; // 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 { WHY((short)1, "why"); - private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -94,21 +64,21 @@ public class RecoveryException extends TException implements org.apache.thrift.T */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.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) { + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @@ -117,18 +87,18 @@ public class RecoveryException extends TException implements org.apache.thrift.T return _thriftId; } - public String getFieldName() { + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.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); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.WHY, new org.apache.thrift.meta_data.FieldMetaData("why", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RecoveryException.class, metaDataMap); } @@ -136,7 +106,7 @@ public class RecoveryException extends TException implements org.apache.thrift.T } public RecoveryException( - String why) + java.lang.String why) { this(); this.why = why; @@ -160,11 +130,11 @@ public class RecoveryException extends TException implements org.apache.thrift.T this.why = null; } - public String getWhy() { + public java.lang.String getWhy() { return this.why; } - public RecoveryException setWhy(String why) { + public RecoveryException setWhy(java.lang.String why) { this.why = why; return this; } @@ -184,43 +154,43 @@ public class RecoveryException extends TException implements org.apache.thrift.T } } - public void setFieldValue(_Fields field, Object value) { + public void setFieldValue(_Fields field, java.lang.Object value) { switch (field) { case WHY: if (value == null) { unsetWhy(); } else { - setWhy((String)value); + setWhy((java.lang.String)value); } break; } } - public Object getFieldValue(_Fields field) { + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case WHY: return getWhy(); } - throw new IllegalStateException(); + throw new java.lang.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(); + throw new java.lang.IllegalArgumentException(); } switch (field) { case WHY: return isSetWhy(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { + public boolean equals(java.lang.Object that) { if (that == null) return false; if (that instanceof RecoveryException) @@ -231,6 +201,8 @@ public class RecoveryException extends TException implements org.apache.thrift.T public boolean equals(RecoveryException that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_why = true && this.isSetWhy(); boolean that_present_why = true && that.isSetWhy(); @@ -246,14 +218,13 @@ public class RecoveryException extends TException implements org.apache.thrift.T @Override public int hashCode() { - List<Object> list = new ArrayList<Object>(); + int hashCode = 1; - boolean present_why = true && (isSetWhy()); - list.add(present_why); - if (present_why) - list.add(why); + hashCode = hashCode * 8191 + ((isSetWhy()) ? 131071 : 524287); + if (isSetWhy()) + hashCode = hashCode * 8191 + why.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -264,7 +235,7 @@ public class RecoveryException extends TException implements org.apache.thrift.T int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetWhy()).compareTo(other.isSetWhy()); + lastComparison = java.lang.Boolean.valueOf(isSetWhy()).compareTo(other.isSetWhy()); if (lastComparison != 0) { return lastComparison; } @@ -282,16 +253,16 @@ public class RecoveryException extends TException implements org.apache.thrift.T } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).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); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("RecoveryException("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("RecoveryException("); boolean first = true; sb.append("why:"); @@ -318,7 +289,7 @@ public class RecoveryException extends TException implements org.apache.thrift.T } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -326,13 +297,13 @@ public class RecoveryException extends TException implements org.apache.thrift.T } } - private static class RecoveryExceptionStandardSchemeFactory implements SchemeFactory { + private static class RecoveryExceptionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public RecoveryExceptionStandardScheme getScheme() { return new RecoveryExceptionStandardScheme(); } } - private static class RecoveryExceptionStandardScheme extends StandardScheme<RecoveryException> { + private static class RecoveryExceptionStandardScheme extends org.apache.thrift.scheme.StandardScheme<RecoveryException> { public void read(org.apache.thrift.protocol.TProtocol iprot, RecoveryException struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; @@ -378,18 +349,18 @@ public class RecoveryException extends TException implements org.apache.thrift.T } - private static class RecoveryExceptionTupleSchemeFactory implements SchemeFactory { + private static class RecoveryExceptionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public RecoveryExceptionTupleScheme getScheme() { return new RecoveryExceptionTupleScheme(); } } - private static class RecoveryExceptionTupleScheme extends TupleScheme<RecoveryException> { + private static class RecoveryExceptionTupleScheme extends org.apache.thrift.scheme.TupleScheme<RecoveryException> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, RecoveryException struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetWhy()) { optionals.set(0); } @@ -401,8 +372,8 @@ public class RecoveryException extends TException implements org.apache.thrift.T @Override public void read(org.apache.thrift.protocol.TProtocol prot, RecoveryException struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.why = iprot.readString(); struct.setWhyIsSet(true); @@ -410,5 +381,9 @@ public class RecoveryException extends TException implements org.apache.thrift.T } } + private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + private static void unusedMethod() {} } http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/master/thrift/RecoveryStatus.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/accumulo/core/master/thrift/RecoveryStatus.java b/core/src/main/java/org/apache/accumulo/core/master/thrift/RecoveryStatus.java index 44a27df..5275897 100644 --- a/core/src/main/java/org/apache/accumulo/core/master/thrift/RecoveryStatus.java +++ b/core/src/main/java/org/apache/accumulo/core/master/thrift/RecoveryStatus.java @@ -15,42 +15,15 @@ * limitations under the License. */ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.10.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package org.apache.accumulo.core.master.thrift; -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import 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", "unused"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)") public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, RecoveryStatus._Fields>, java.io.Serializable, Cloneable, Comparable<RecoveryStatus> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RecoveryStatus"); @@ -58,13 +31,10 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R private static final org.apache.thrift.protocol.TField RUNTIME_FIELD_DESC = new org.apache.thrift.protocol.TField("runtime", org.apache.thrift.protocol.TType.I32, (short)5); private static final org.apache.thrift.protocol.TField PROGRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("progress", org.apache.thrift.protocol.TType.DOUBLE, (short)6); - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new RecoveryStatusStandardSchemeFactory()); - schemes.put(TupleScheme.class, new RecoveryStatusTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new RecoveryStatusStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new RecoveryStatusTupleSchemeFactory(); - public String name; // required + public java.lang.String name; // required public int runtime; // required public double progress; // required @@ -74,10 +44,10 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R RUNTIME((short)5, "runtime"), PROGRESS((short)6, "progress"); - private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -104,21 +74,21 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.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) { + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @@ -127,7 +97,7 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R return _thriftId; } - public String getFieldName() { + public java.lang.String getFieldName() { return _fieldName; } } @@ -136,16 +106,16 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R private static final int __RUNTIME_ISSET_ID = 0; private static final int __PROGRESS_ISSET_ID = 1; private byte __isset_bitfield = 0; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.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); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.RUNTIME, new org.apache.thrift.meta_data.FieldMetaData("runtime", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.PROGRESS, new org.apache.thrift.meta_data.FieldMetaData("progress", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RecoveryStatus.class, metaDataMap); } @@ -153,7 +123,7 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R } public RecoveryStatus( - String name, + java.lang.String name, int runtime, double progress) { @@ -190,11 +160,11 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R this.progress = 0.0; } - public String getName() { + public java.lang.String getName() { return this.name; } - public RecoveryStatus setName(String name) { + public RecoveryStatus setName(java.lang.String name) { this.name = name; return this; } @@ -225,16 +195,16 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R } public void unsetRuntime() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RUNTIME_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __RUNTIME_ISSET_ID); } /** Returns true if field runtime is set (has been assigned a value) and false otherwise */ public boolean isSetRuntime() { - return EncodingUtils.testBit(__isset_bitfield, __RUNTIME_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __RUNTIME_ISSET_ID); } public void setRuntimeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RUNTIME_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __RUNTIME_ISSET_ID, value); } public double getProgress() { @@ -248,25 +218,25 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R } public void unsetProgress() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PROGRESS_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PROGRESS_ISSET_ID); } /** Returns true if field progress is set (has been assigned a value) and false otherwise */ public boolean isSetProgress() { - return EncodingUtils.testBit(__isset_bitfield, __PROGRESS_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PROGRESS_ISSET_ID); } public void setProgressIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PROGRESS_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PROGRESS_ISSET_ID, value); } - public void setFieldValue(_Fields field, Object value) { + public void setFieldValue(_Fields field, java.lang.Object value) { switch (field) { case NAME: if (value == null) { unsetName(); } else { - setName((String)value); + setName((java.lang.String)value); } break; @@ -274,7 +244,7 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R if (value == null) { unsetRuntime(); } else { - setRuntime((Integer)value); + setRuntime((java.lang.Integer)value); } break; @@ -282,14 +252,14 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R if (value == null) { unsetProgress(); } else { - setProgress((Double)value); + setProgress((java.lang.Double)value); } break; } } - public Object getFieldValue(_Fields field) { + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case NAME: return getName(); @@ -301,13 +271,13 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R return getProgress(); } - throw new IllegalStateException(); + throw new java.lang.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(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -318,11 +288,11 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R case PROGRESS: return isSetProgress(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { + public boolean equals(java.lang.Object that) { if (that == null) return false; if (that instanceof RecoveryStatus) @@ -333,6 +303,8 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R public boolean equals(RecoveryStatus that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_name = true && this.isSetName(); boolean that_present_name = true && that.isSetName(); @@ -366,24 +338,17 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R @Override public int hashCode() { - List<Object> list = new ArrayList<Object>(); + int hashCode = 1; - boolean present_name = true && (isSetName()); - list.add(present_name); - if (present_name) - list.add(name); + hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287); + if (isSetName()) + hashCode = hashCode * 8191 + name.hashCode(); - boolean present_runtime = true; - list.add(present_runtime); - if (present_runtime) - list.add(runtime); + hashCode = hashCode * 8191 + runtime; - boolean present_progress = true; - list.add(present_progress); - if (present_progress) - list.add(progress); + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(progress); - return list.hashCode(); + return hashCode; } @Override @@ -394,7 +359,7 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); + lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName()); if (lastComparison != 0) { return lastComparison; } @@ -404,7 +369,7 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R return lastComparison; } } - lastComparison = Boolean.valueOf(isSetRuntime()).compareTo(other.isSetRuntime()); + lastComparison = java.lang.Boolean.valueOf(isSetRuntime()).compareTo(other.isSetRuntime()); if (lastComparison != 0) { return lastComparison; } @@ -414,7 +379,7 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R return lastComparison; } } - lastComparison = Boolean.valueOf(isSetProgress()).compareTo(other.isSetProgress()); + lastComparison = java.lang.Boolean.valueOf(isSetProgress()).compareTo(other.isSetProgress()); if (lastComparison != 0) { return lastComparison; } @@ -432,16 +397,16 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).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); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("RecoveryStatus("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("RecoveryStatus("); boolean first = true; sb.append("name:"); @@ -476,7 +441,7 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; @@ -486,13 +451,13 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R } } - private static class RecoveryStatusStandardSchemeFactory implements SchemeFactory { + private static class RecoveryStatusStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public RecoveryStatusStandardScheme getScheme() { return new RecoveryStatusStandardScheme(); } } - private static class RecoveryStatusStandardScheme extends StandardScheme<RecoveryStatus> { + private static class RecoveryStatusStandardScheme extends org.apache.thrift.scheme.StandardScheme<RecoveryStatus> { public void read(org.apache.thrift.protocol.TProtocol iprot, RecoveryStatus struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; @@ -560,18 +525,18 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R } - private static class RecoveryStatusTupleSchemeFactory implements SchemeFactory { + private static class RecoveryStatusTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public RecoveryStatusTupleScheme getScheme() { return new RecoveryStatusTupleScheme(); } } - private static class RecoveryStatusTupleScheme extends TupleScheme<RecoveryStatus> { + private static class RecoveryStatusTupleScheme extends org.apache.thrift.scheme.TupleScheme<RecoveryStatus> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, RecoveryStatus struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetName()) { optionals.set(0); } @@ -595,8 +560,8 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R @Override public void read(org.apache.thrift.protocol.TProtocol prot, RecoveryStatus struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.name = iprot.readString(); struct.setNameIsSet(true); @@ -612,5 +577,9 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R } } + private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + private static void unusedMethod() {} }