mirror of
https://github.com/wahyd4/pinpoint.git
synced 2026-08-25 20:55:59 +10:00
[유치수] [NOBTS] agenthashcode -> agentid
git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-commons/trunk@685 84d0f5b1-2673-498c-a247-62c4ff18d310
This commit is contained in:
@@ -0,0 +1,768 @@
|
||||
/**
|
||||
* Autogenerated by Thrift Compiler (0.8.0)
|
||||
*
|
||||
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
||||
* @generated
|
||||
*/
|
||||
package com.profiler.common.dto.thrift;
|
||||
|
||||
import org.apache.thrift.scheme.IScheme;
|
||||
import org.apache.thrift.scheme.SchemeFactory;
|
||||
import org.apache.thrift.scheme.StandardScheme;
|
||||
|
||||
import org.apache.thrift.scheme.TupleScheme;
|
||||
import org.apache.thrift.protocol.TTupleProtocol;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.EnumMap;
|
||||
import java.util.Set;
|
||||
import java.util.HashSet;
|
||||
import java.util.EnumSet;
|
||||
import java.util.Collections;
|
||||
import java.util.BitSet;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.Arrays;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class AgentInfo implements org.apache.thrift.TBase<AgentInfo, AgentInfo._Fields>, java.io.Serializable, Cloneable {
|
||||
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AgentInfo");
|
||||
|
||||
private static final org.apache.thrift.protocol.TField HOSTNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("hostname", org.apache.thrift.protocol.TType.STRING, (short)1);
|
||||
private static final org.apache.thrift.protocol.TField PORTS_FIELD_DESC = new org.apache.thrift.protocol.TField("ports", org.apache.thrift.protocol.TType.STRING, (short)2);
|
||||
private static final org.apache.thrift.protocol.TField AGENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("agentId", org.apache.thrift.protocol.TType.STRING, (short)3);
|
||||
private static final org.apache.thrift.protocol.TField IS_ALIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("isAlive", org.apache.thrift.protocol.TType.BOOL, (short)4);
|
||||
private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)5);
|
||||
|
||||
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
|
||||
static {
|
||||
schemes.put(StandardScheme.class, new AgentInfoStandardSchemeFactory());
|
||||
schemes.put(TupleScheme.class, new AgentInfoTupleSchemeFactory());
|
||||
}
|
||||
|
||||
private String hostname; // required
|
||||
private String ports; // required
|
||||
private String agentId; // required
|
||||
private boolean isAlive; // required
|
||||
private long timestamp; // 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 {
|
||||
HOSTNAME((short)1, "hostname"),
|
||||
PORTS((short)2, "ports"),
|
||||
AGENT_ID((short)3, "agentId"),
|
||||
IS_ALIVE((short)4, "isAlive"),
|
||||
TIMESTAMP((short)5, "timestamp");
|
||||
|
||||
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: // HOSTNAME
|
||||
return HOSTNAME;
|
||||
case 2: // PORTS
|
||||
return PORTS;
|
||||
case 3: // AGENT_ID
|
||||
return AGENT_ID;
|
||||
case 4: // IS_ALIVE
|
||||
return IS_ALIVE;
|
||||
case 5: // TIMESTAMP
|
||||
return TIMESTAMP;
|
||||
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
|
||||
private static final int __ISALIVE_ISSET_ID = 0;
|
||||
private static final int __TIMESTAMP_ISSET_ID = 1;
|
||||
private BitSet __isset_bit_vector = new BitSet(2);
|
||||
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
||||
static {
|
||||
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
||||
tmpMap.put(_Fields.HOSTNAME, new org.apache.thrift.meta_data.FieldMetaData("hostname", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
||||
tmpMap.put(_Fields.PORTS, new org.apache.thrift.meta_data.FieldMetaData("ports", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
||||
tmpMap.put(_Fields.AGENT_ID, new org.apache.thrift.meta_data.FieldMetaData("agentId", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
||||
tmpMap.put(_Fields.IS_ALIVE, new org.apache.thrift.meta_data.FieldMetaData("isAlive", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
|
||||
tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
||||
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
||||
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AgentInfo.class, metaDataMap);
|
||||
}
|
||||
|
||||
public AgentInfo() {
|
||||
}
|
||||
|
||||
public AgentInfo(
|
||||
String hostname,
|
||||
String ports,
|
||||
String agentId,
|
||||
boolean isAlive,
|
||||
long timestamp)
|
||||
{
|
||||
this();
|
||||
this.hostname = hostname;
|
||||
this.ports = ports;
|
||||
this.agentId = agentId;
|
||||
this.isAlive = isAlive;
|
||||
setIsAliveIsSet(true);
|
||||
this.timestamp = timestamp;
|
||||
setTimestampIsSet(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a deep copy on <i>other</i>.
|
||||
*/
|
||||
public AgentInfo(AgentInfo other) {
|
||||
__isset_bit_vector.clear();
|
||||
__isset_bit_vector.or(other.__isset_bit_vector);
|
||||
if (other.isSetHostname()) {
|
||||
this.hostname = other.hostname;
|
||||
}
|
||||
if (other.isSetPorts()) {
|
||||
this.ports = other.ports;
|
||||
}
|
||||
if (other.isSetAgentId()) {
|
||||
this.agentId = other.agentId;
|
||||
}
|
||||
this.isAlive = other.isAlive;
|
||||
this.timestamp = other.timestamp;
|
||||
}
|
||||
|
||||
public AgentInfo deepCopy() {
|
||||
return new AgentInfo(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clear() {
|
||||
this.hostname = null;
|
||||
this.ports = null;
|
||||
this.agentId = null;
|
||||
setIsAliveIsSet(false);
|
||||
this.isAlive = false;
|
||||
setTimestampIsSet(false);
|
||||
this.timestamp = 0;
|
||||
}
|
||||
|
||||
public String getHostname() {
|
||||
return this.hostname;
|
||||
}
|
||||
|
||||
public void setHostname(String hostname) {
|
||||
this.hostname = hostname;
|
||||
}
|
||||
|
||||
public void unsetHostname() {
|
||||
this.hostname = null;
|
||||
}
|
||||
|
||||
/** Returns true if field hostname is set (has been assigned a value) and false otherwise */
|
||||
public boolean isSetHostname() {
|
||||
return this.hostname != null;
|
||||
}
|
||||
|
||||
public void setHostnameIsSet(boolean value) {
|
||||
if (!value) {
|
||||
this.hostname = null;
|
||||
}
|
||||
}
|
||||
|
||||
public String getPorts() {
|
||||
return this.ports;
|
||||
}
|
||||
|
||||
public void setPorts(String ports) {
|
||||
this.ports = ports;
|
||||
}
|
||||
|
||||
public void unsetPorts() {
|
||||
this.ports = null;
|
||||
}
|
||||
|
||||
/** Returns true if field ports is set (has been assigned a value) and false otherwise */
|
||||
public boolean isSetPorts() {
|
||||
return this.ports != null;
|
||||
}
|
||||
|
||||
public void setPortsIsSet(boolean value) {
|
||||
if (!value) {
|
||||
this.ports = null;
|
||||
}
|
||||
}
|
||||
|
||||
public String getAgentId() {
|
||||
return this.agentId;
|
||||
}
|
||||
|
||||
public void setAgentId(String agentId) {
|
||||
this.agentId = agentId;
|
||||
}
|
||||
|
||||
public void unsetAgentId() {
|
||||
this.agentId = null;
|
||||
}
|
||||
|
||||
/** Returns true if field agentId is set (has been assigned a value) and false otherwise */
|
||||
public boolean isSetAgentId() {
|
||||
return this.agentId != null;
|
||||
}
|
||||
|
||||
public void setAgentIdIsSet(boolean value) {
|
||||
if (!value) {
|
||||
this.agentId = null;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isIsAlive() {
|
||||
return this.isAlive;
|
||||
}
|
||||
|
||||
public void setIsAlive(boolean isAlive) {
|
||||
this.isAlive = isAlive;
|
||||
setIsAliveIsSet(true);
|
||||
}
|
||||
|
||||
public void unsetIsAlive() {
|
||||
__isset_bit_vector.clear(__ISALIVE_ISSET_ID);
|
||||
}
|
||||
|
||||
/** Returns true if field isAlive is set (has been assigned a value) and false otherwise */
|
||||
public boolean isSetIsAlive() {
|
||||
return __isset_bit_vector.get(__ISALIVE_ISSET_ID);
|
||||
}
|
||||
|
||||
public void setIsAliveIsSet(boolean value) {
|
||||
__isset_bit_vector.set(__ISALIVE_ISSET_ID, value);
|
||||
}
|
||||
|
||||
public long getTimestamp() {
|
||||
return this.timestamp;
|
||||
}
|
||||
|
||||
public void setTimestamp(long timestamp) {
|
||||
this.timestamp = timestamp;
|
||||
setTimestampIsSet(true);
|
||||
}
|
||||
|
||||
public void unsetTimestamp() {
|
||||
__isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
|
||||
}
|
||||
|
||||
/** Returns true if field timestamp is set (has been assigned a value) and false otherwise */
|
||||
public boolean isSetTimestamp() {
|
||||
return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
|
||||
}
|
||||
|
||||
public void setTimestampIsSet(boolean value) {
|
||||
__isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
|
||||
}
|
||||
|
||||
public void setFieldValue(_Fields field, Object value) {
|
||||
switch (field) {
|
||||
case HOSTNAME:
|
||||
if (value == null) {
|
||||
unsetHostname();
|
||||
} else {
|
||||
setHostname((String)value);
|
||||
}
|
||||
break;
|
||||
|
||||
case PORTS:
|
||||
if (value == null) {
|
||||
unsetPorts();
|
||||
} else {
|
||||
setPorts((String)value);
|
||||
}
|
||||
break;
|
||||
|
||||
case AGENT_ID:
|
||||
if (value == null) {
|
||||
unsetAgentId();
|
||||
} else {
|
||||
setAgentId((String)value);
|
||||
}
|
||||
break;
|
||||
|
||||
case IS_ALIVE:
|
||||
if (value == null) {
|
||||
unsetIsAlive();
|
||||
} else {
|
||||
setIsAlive((Boolean)value);
|
||||
}
|
||||
break;
|
||||
|
||||
case TIMESTAMP:
|
||||
if (value == null) {
|
||||
unsetTimestamp();
|
||||
} else {
|
||||
setTimestamp((Long)value);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public Object getFieldValue(_Fields field) {
|
||||
switch (field) {
|
||||
case HOSTNAME:
|
||||
return getHostname();
|
||||
|
||||
case PORTS:
|
||||
return getPorts();
|
||||
|
||||
case AGENT_ID:
|
||||
return getAgentId();
|
||||
|
||||
case IS_ALIVE:
|
||||
return Boolean.valueOf(isIsAlive());
|
||||
|
||||
case TIMESTAMP:
|
||||
return Long.valueOf(getTimestamp());
|
||||
|
||||
}
|
||||
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 HOSTNAME:
|
||||
return isSetHostname();
|
||||
case PORTS:
|
||||
return isSetPorts();
|
||||
case AGENT_ID:
|
||||
return isSetAgentId();
|
||||
case IS_ALIVE:
|
||||
return isSetIsAlive();
|
||||
case TIMESTAMP:
|
||||
return isSetTimestamp();
|
||||
}
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (that == null)
|
||||
return false;
|
||||
if (that instanceof AgentInfo)
|
||||
return this.equals((AgentInfo)that);
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean equals(AgentInfo that) {
|
||||
if (that == null)
|
||||
return false;
|
||||
|
||||
boolean this_present_hostname = true && this.isSetHostname();
|
||||
boolean that_present_hostname = true && that.isSetHostname();
|
||||
if (this_present_hostname || that_present_hostname) {
|
||||
if (!(this_present_hostname && that_present_hostname))
|
||||
return false;
|
||||
if (!this.hostname.equals(that.hostname))
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean this_present_ports = true && this.isSetPorts();
|
||||
boolean that_present_ports = true && that.isSetPorts();
|
||||
if (this_present_ports || that_present_ports) {
|
||||
if (!(this_present_ports && that_present_ports))
|
||||
return false;
|
||||
if (!this.ports.equals(that.ports))
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean this_present_agentId = true && this.isSetAgentId();
|
||||
boolean that_present_agentId = true && that.isSetAgentId();
|
||||
if (this_present_agentId || that_present_agentId) {
|
||||
if (!(this_present_agentId && that_present_agentId))
|
||||
return false;
|
||||
if (!this.agentId.equals(that.agentId))
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean this_present_isAlive = true;
|
||||
boolean that_present_isAlive = true;
|
||||
if (this_present_isAlive || that_present_isAlive) {
|
||||
if (!(this_present_isAlive && that_present_isAlive))
|
||||
return false;
|
||||
if (this.isAlive != that.isAlive)
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean this_present_timestamp = true;
|
||||
boolean that_present_timestamp = true;
|
||||
if (this_present_timestamp || that_present_timestamp) {
|
||||
if (!(this_present_timestamp && that_present_timestamp))
|
||||
return false;
|
||||
if (this.timestamp != that.timestamp)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int compareTo(AgentInfo other) {
|
||||
if (!getClass().equals(other.getClass())) {
|
||||
return getClass().getName().compareTo(other.getClass().getName());
|
||||
}
|
||||
|
||||
int lastComparison = 0;
|
||||
AgentInfo typedOther = (AgentInfo)other;
|
||||
|
||||
lastComparison = Boolean.valueOf(isSetHostname()).compareTo(typedOther.isSetHostname());
|
||||
if (lastComparison != 0) {
|
||||
return lastComparison;
|
||||
}
|
||||
if (isSetHostname()) {
|
||||
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hostname, typedOther.hostname);
|
||||
if (lastComparison != 0) {
|
||||
return lastComparison;
|
||||
}
|
||||
}
|
||||
lastComparison = Boolean.valueOf(isSetPorts()).compareTo(typedOther.isSetPorts());
|
||||
if (lastComparison != 0) {
|
||||
return lastComparison;
|
||||
}
|
||||
if (isSetPorts()) {
|
||||
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ports, typedOther.ports);
|
||||
if (lastComparison != 0) {
|
||||
return lastComparison;
|
||||
}
|
||||
}
|
||||
lastComparison = Boolean.valueOf(isSetAgentId()).compareTo(typedOther.isSetAgentId());
|
||||
if (lastComparison != 0) {
|
||||
return lastComparison;
|
||||
}
|
||||
if (isSetAgentId()) {
|
||||
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentId, typedOther.agentId);
|
||||
if (lastComparison != 0) {
|
||||
return lastComparison;
|
||||
}
|
||||
}
|
||||
lastComparison = Boolean.valueOf(isSetIsAlive()).compareTo(typedOther.isSetIsAlive());
|
||||
if (lastComparison != 0) {
|
||||
return lastComparison;
|
||||
}
|
||||
if (isSetIsAlive()) {
|
||||
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isAlive, typedOther.isAlive);
|
||||
if (lastComparison != 0) {
|
||||
return lastComparison;
|
||||
}
|
||||
}
|
||||
lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp());
|
||||
if (lastComparison != 0) {
|
||||
return lastComparison;
|
||||
}
|
||||
if (isSetTimestamp()) {
|
||||
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp);
|
||||
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("AgentInfo(");
|
||||
boolean first = true;
|
||||
|
||||
sb.append("hostname:");
|
||||
if (this.hostname == null) {
|
||||
sb.append("null");
|
||||
} else {
|
||||
sb.append(this.hostname);
|
||||
}
|
||||
first = false;
|
||||
if (!first) sb.append(", ");
|
||||
sb.append("ports:");
|
||||
if (this.ports == null) {
|
||||
sb.append("null");
|
||||
} else {
|
||||
sb.append(this.ports);
|
||||
}
|
||||
first = false;
|
||||
if (!first) sb.append(", ");
|
||||
sb.append("agentId:");
|
||||
if (this.agentId == null) {
|
||||
sb.append("null");
|
||||
} else {
|
||||
sb.append(this.agentId);
|
||||
}
|
||||
first = false;
|
||||
if (!first) sb.append(", ");
|
||||
sb.append("isAlive:");
|
||||
sb.append(this.isAlive);
|
||||
first = false;
|
||||
if (!first) sb.append(", ");
|
||||
sb.append("timestamp:");
|
||||
sb.append(this.timestamp);
|
||||
first = false;
|
||||
sb.append(")");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public void validate() throws org.apache.thrift.TException {
|
||||
// check for required fields
|
||||
}
|
||||
|
||||
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 {
|
||||
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
|
||||
__isset_bit_vector = new BitSet(1);
|
||||
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 AgentInfoStandardSchemeFactory implements SchemeFactory {
|
||||
public AgentInfoStandardScheme getScheme() {
|
||||
return new AgentInfoStandardScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class AgentInfoStandardScheme extends StandardScheme<AgentInfo> {
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot, AgentInfo 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: // HOSTNAME
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.hostname = iprot.readString();
|
||||
struct.setHostnameIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 2: // PORTS
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.ports = iprot.readString();
|
||||
struct.setPortsIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 3: // AGENT_ID
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.agentId = iprot.readString();
|
||||
struct.setAgentIdIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 4: // IS_ALIVE
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
|
||||
struct.isAlive = iprot.readBool();
|
||||
struct.setIsAliveIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 5: // TIMESTAMP
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
|
||||
struct.timestamp = iprot.readI64();
|
||||
struct.setTimestampIsSet(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, AgentInfo struct) throws org.apache.thrift.TException {
|
||||
struct.validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
if (struct.hostname != null) {
|
||||
oprot.writeFieldBegin(HOSTNAME_FIELD_DESC);
|
||||
oprot.writeString(struct.hostname);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (struct.ports != null) {
|
||||
oprot.writeFieldBegin(PORTS_FIELD_DESC);
|
||||
oprot.writeString(struct.ports);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (struct.agentId != null) {
|
||||
oprot.writeFieldBegin(AGENT_ID_FIELD_DESC);
|
||||
oprot.writeString(struct.agentId);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldBegin(IS_ALIVE_FIELD_DESC);
|
||||
oprot.writeBool(struct.isAlive);
|
||||
oprot.writeFieldEnd();
|
||||
oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
|
||||
oprot.writeI64(struct.timestamp);
|
||||
oprot.writeFieldEnd();
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class AgentInfoTupleSchemeFactory implements SchemeFactory {
|
||||
public AgentInfoTupleScheme getScheme() {
|
||||
return new AgentInfoTupleScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class AgentInfoTupleScheme extends TupleScheme<AgentInfo> {
|
||||
|
||||
@Override
|
||||
public void write(org.apache.thrift.protocol.TProtocol prot, AgentInfo struct) throws org.apache.thrift.TException {
|
||||
TTupleProtocol oprot = (TTupleProtocol) prot;
|
||||
BitSet optionals = new BitSet();
|
||||
if (struct.isSetHostname()) {
|
||||
optionals.set(0);
|
||||
}
|
||||
if (struct.isSetPorts()) {
|
||||
optionals.set(1);
|
||||
}
|
||||
if (struct.isSetAgentId()) {
|
||||
optionals.set(2);
|
||||
}
|
||||
if (struct.isSetIsAlive()) {
|
||||
optionals.set(3);
|
||||
}
|
||||
if (struct.isSetTimestamp()) {
|
||||
optionals.set(4);
|
||||
}
|
||||
oprot.writeBitSet(optionals, 5);
|
||||
if (struct.isSetHostname()) {
|
||||
oprot.writeString(struct.hostname);
|
||||
}
|
||||
if (struct.isSetPorts()) {
|
||||
oprot.writeString(struct.ports);
|
||||
}
|
||||
if (struct.isSetAgentId()) {
|
||||
oprot.writeString(struct.agentId);
|
||||
}
|
||||
if (struct.isSetIsAlive()) {
|
||||
oprot.writeBool(struct.isAlive);
|
||||
}
|
||||
if (struct.isSetTimestamp()) {
|
||||
oprot.writeI64(struct.timestamp);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(org.apache.thrift.protocol.TProtocol prot, AgentInfo struct) throws org.apache.thrift.TException {
|
||||
TTupleProtocol iprot = (TTupleProtocol) prot;
|
||||
BitSet incoming = iprot.readBitSet(5);
|
||||
if (incoming.get(0)) {
|
||||
struct.hostname = iprot.readString();
|
||||
struct.setHostnameIsSet(true);
|
||||
}
|
||||
if (incoming.get(1)) {
|
||||
struct.ports = iprot.readString();
|
||||
struct.setPortsIsSet(true);
|
||||
}
|
||||
if (incoming.get(2)) {
|
||||
struct.agentId = iprot.readString();
|
||||
struct.setAgentIdIsSet(true);
|
||||
}
|
||||
if (incoming.get(3)) {
|
||||
struct.isAlive = iprot.readBool();
|
||||
struct.setIsAliveIsSet(true);
|
||||
}
|
||||
if (incoming.get(4)) {
|
||||
struct.timestamp = iprot.readI64();
|
||||
struct.setTimestampIsSet(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ import org.slf4j.LoggerFactory;
|
||||
public class JVMInfoThriftDTO implements org.apache.thrift.TBase<JVMInfoThriftDTO, JVMInfoThriftDTO._Fields>, java.io.Serializable, Cloneable {
|
||||
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("JVMInfoThriftDTO");
|
||||
|
||||
private static final org.apache.thrift.protocol.TField AGENT_HASH_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("agentHashCode", org.apache.thrift.protocol.TType.I32, (short)1);
|
||||
private static final org.apache.thrift.protocol.TField AGENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("agentId", org.apache.thrift.protocol.TType.STRING, (short)1);
|
||||
private static final org.apache.thrift.protocol.TField DATA_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("dataTime", org.apache.thrift.protocol.TType.I64, (short)2);
|
||||
private static final org.apache.thrift.protocol.TField ACTIVE_THREAD_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("activeThreadCount", org.apache.thrift.protocol.TType.I32, (short)3);
|
||||
private static final org.apache.thrift.protocol.TField GC1_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("gc1Count", org.apache.thrift.protocol.TType.I64, (short)4);
|
||||
@@ -49,7 +49,7 @@ public class JVMInfoThriftDTO implements org.apache.thrift.TBase<JVMInfoThriftDT
|
||||
schemes.put(TupleScheme.class, new JVMInfoThriftDTOTupleSchemeFactory());
|
||||
}
|
||||
|
||||
private int agentHashCode; // required
|
||||
private String agentId; // required
|
||||
private long dataTime; // required
|
||||
private int activeThreadCount; // required
|
||||
private long gc1Count; // optional
|
||||
@@ -64,7 +64,7 @@ public class JVMInfoThriftDTO implements org.apache.thrift.TBase<JVMInfoThriftDT
|
||||
|
||||
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
||||
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
||||
AGENT_HASH_CODE((short)1, "agentHashCode"),
|
||||
AGENT_ID((short)1, "agentId"),
|
||||
DATA_TIME((short)2, "dataTime"),
|
||||
ACTIVE_THREAD_COUNT((short)3, "activeThreadCount"),
|
||||
GC1_COUNT((short)4, "gc1Count"),
|
||||
@@ -90,8 +90,8 @@ public class JVMInfoThriftDTO implements org.apache.thrift.TBase<JVMInfoThriftDT
|
||||
*/
|
||||
public static _Fields findByThriftId(int fieldId) {
|
||||
switch(fieldId) {
|
||||
case 1: // AGENT_HASH_CODE
|
||||
return AGENT_HASH_CODE;
|
||||
case 1: // AGENT_ID
|
||||
return AGENT_ID;
|
||||
case 2: // DATA_TIME
|
||||
return DATA_TIME;
|
||||
case 3: // ACTIVE_THREAD_COUNT
|
||||
@@ -154,25 +154,24 @@ public class JVMInfoThriftDTO implements org.apache.thrift.TBase<JVMInfoThriftDT
|
||||
}
|
||||
|
||||
// isset id assignments
|
||||
private static final int __AGENTHASHCODE_ISSET_ID = 0;
|
||||
private static final int __DATATIME_ISSET_ID = 1;
|
||||
private static final int __ACTIVETHREADCOUNT_ISSET_ID = 2;
|
||||
private static final int __GC1COUNT_ISSET_ID = 3;
|
||||
private static final int __GC1TIME_ISSET_ID = 4;
|
||||
private static final int __GC2COUNT_ISSET_ID = 5;
|
||||
private static final int __GC2TIME_ISSET_ID = 6;
|
||||
private static final int __HEAPUSED_ISSET_ID = 7;
|
||||
private static final int __HEAPCOMMITTED_ISSET_ID = 8;
|
||||
private static final int __NONHEAPUSED_ISSET_ID = 9;
|
||||
private static final int __NONHEAPCOMMITTED_ISSET_ID = 10;
|
||||
private static final int __PROCESSCPUTIME_ISSET_ID = 11;
|
||||
private BitSet __isset_bit_vector = new BitSet(12);
|
||||
private static final int __DATATIME_ISSET_ID = 0;
|
||||
private static final int __ACTIVETHREADCOUNT_ISSET_ID = 1;
|
||||
private static final int __GC1COUNT_ISSET_ID = 2;
|
||||
private static final int __GC1TIME_ISSET_ID = 3;
|
||||
private static final int __GC2COUNT_ISSET_ID = 4;
|
||||
private static final int __GC2TIME_ISSET_ID = 5;
|
||||
private static final int __HEAPUSED_ISSET_ID = 6;
|
||||
private static final int __HEAPCOMMITTED_ISSET_ID = 7;
|
||||
private static final int __NONHEAPUSED_ISSET_ID = 8;
|
||||
private static final int __NONHEAPCOMMITTED_ISSET_ID = 9;
|
||||
private static final int __PROCESSCPUTIME_ISSET_ID = 10;
|
||||
private BitSet __isset_bit_vector = new BitSet(11);
|
||||
private _Fields optionals[] = {_Fields.GC1_COUNT,_Fields.GC1_TIME,_Fields.GC2_COUNT,_Fields.GC2_TIME,_Fields.PROCESS_CPUTIME};
|
||||
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.AGENT_HASH_CODE, new org.apache.thrift.meta_data.FieldMetaData("agentHashCode", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
|
||||
tmpMap.put(_Fields.AGENT_ID, new org.apache.thrift.meta_data.FieldMetaData("agentId", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
||||
tmpMap.put(_Fields.DATA_TIME, new org.apache.thrift.meta_data.FieldMetaData("dataTime", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
||||
tmpMap.put(_Fields.ACTIVE_THREAD_COUNT, new org.apache.thrift.meta_data.FieldMetaData("activeThreadCount", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
||||
@@ -203,7 +202,7 @@ public class JVMInfoThriftDTO implements org.apache.thrift.TBase<JVMInfoThriftDT
|
||||
}
|
||||
|
||||
public JVMInfoThriftDTO(
|
||||
int agentHashCode,
|
||||
String agentId,
|
||||
long dataTime,
|
||||
int activeThreadCount,
|
||||
long heapUsed,
|
||||
@@ -212,8 +211,7 @@ public class JVMInfoThriftDTO implements org.apache.thrift.TBase<JVMInfoThriftDT
|
||||
long nonHeapCommitted)
|
||||
{
|
||||
this();
|
||||
this.agentHashCode = agentHashCode;
|
||||
setAgentHashCodeIsSet(true);
|
||||
this.agentId = agentId;
|
||||
this.dataTime = dataTime;
|
||||
setDataTimeIsSet(true);
|
||||
this.activeThreadCount = activeThreadCount;
|
||||
@@ -234,7 +232,9 @@ public class JVMInfoThriftDTO implements org.apache.thrift.TBase<JVMInfoThriftDT
|
||||
public JVMInfoThriftDTO(JVMInfoThriftDTO other) {
|
||||
__isset_bit_vector.clear();
|
||||
__isset_bit_vector.or(other.__isset_bit_vector);
|
||||
this.agentHashCode = other.agentHashCode;
|
||||
if (other.isSetAgentId()) {
|
||||
this.agentId = other.agentId;
|
||||
}
|
||||
this.dataTime = other.dataTime;
|
||||
this.activeThreadCount = other.activeThreadCount;
|
||||
this.gc1Count = other.gc1Count;
|
||||
@@ -254,8 +254,7 @@ public class JVMInfoThriftDTO implements org.apache.thrift.TBase<JVMInfoThriftDT
|
||||
|
||||
@Override
|
||||
public void clear() {
|
||||
setAgentHashCodeIsSet(false);
|
||||
this.agentHashCode = 0;
|
||||
this.agentId = null;
|
||||
setDataTimeIsSet(false);
|
||||
this.dataTime = 0;
|
||||
setActiveThreadCountIsSet(false);
|
||||
@@ -280,26 +279,27 @@ public class JVMInfoThriftDTO implements org.apache.thrift.TBase<JVMInfoThriftDT
|
||||
this.processCPUTime = 0.0;
|
||||
}
|
||||
|
||||
public int getAgentHashCode() {
|
||||
return this.agentHashCode;
|
||||
public String getAgentId() {
|
||||
return this.agentId;
|
||||
}
|
||||
|
||||
public void setAgentHashCode(int agentHashCode) {
|
||||
this.agentHashCode = agentHashCode;
|
||||
setAgentHashCodeIsSet(true);
|
||||
public void setAgentId(String agentId) {
|
||||
this.agentId = agentId;
|
||||
}
|
||||
|
||||
public void unsetAgentHashCode() {
|
||||
__isset_bit_vector.clear(__AGENTHASHCODE_ISSET_ID);
|
||||
public void unsetAgentId() {
|
||||
this.agentId = null;
|
||||
}
|
||||
|
||||
/** Returns true if field agentHashCode is set (has been assigned a value) and false otherwise */
|
||||
public boolean isSetAgentHashCode() {
|
||||
return __isset_bit_vector.get(__AGENTHASHCODE_ISSET_ID);
|
||||
/** Returns true if field agentId is set (has been assigned a value) and false otherwise */
|
||||
public boolean isSetAgentId() {
|
||||
return this.agentId != null;
|
||||
}
|
||||
|
||||
public void setAgentHashCodeIsSet(boolean value) {
|
||||
__isset_bit_vector.set(__AGENTHASHCODE_ISSET_ID, value);
|
||||
public void setAgentIdIsSet(boolean value) {
|
||||
if (!value) {
|
||||
this.agentId = null;
|
||||
}
|
||||
}
|
||||
|
||||
public long getDataTime() {
|
||||
@@ -546,11 +546,11 @@ public class JVMInfoThriftDTO implements org.apache.thrift.TBase<JVMInfoThriftDT
|
||||
|
||||
public void setFieldValue(_Fields field, Object value) {
|
||||
switch (field) {
|
||||
case AGENT_HASH_CODE:
|
||||
case AGENT_ID:
|
||||
if (value == null) {
|
||||
unsetAgentHashCode();
|
||||
unsetAgentId();
|
||||
} else {
|
||||
setAgentHashCode((Integer)value);
|
||||
setAgentId((String)value);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -647,8 +647,8 @@ public class JVMInfoThriftDTO implements org.apache.thrift.TBase<JVMInfoThriftDT
|
||||
|
||||
public Object getFieldValue(_Fields field) {
|
||||
switch (field) {
|
||||
case AGENT_HASH_CODE:
|
||||
return Integer.valueOf(getAgentHashCode());
|
||||
case AGENT_ID:
|
||||
return getAgentId();
|
||||
|
||||
case DATA_TIME:
|
||||
return Long.valueOf(getDataTime());
|
||||
@@ -694,8 +694,8 @@ public class JVMInfoThriftDTO implements org.apache.thrift.TBase<JVMInfoThriftDT
|
||||
}
|
||||
|
||||
switch (field) {
|
||||
case AGENT_HASH_CODE:
|
||||
return isSetAgentHashCode();
|
||||
case AGENT_ID:
|
||||
return isSetAgentId();
|
||||
case DATA_TIME:
|
||||
return isSetDataTime();
|
||||
case ACTIVE_THREAD_COUNT:
|
||||
@@ -735,12 +735,12 @@ public class JVMInfoThriftDTO implements org.apache.thrift.TBase<JVMInfoThriftDT
|
||||
if (that == null)
|
||||
return false;
|
||||
|
||||
boolean this_present_agentHashCode = true;
|
||||
boolean that_present_agentHashCode = true;
|
||||
if (this_present_agentHashCode || that_present_agentHashCode) {
|
||||
if (!(this_present_agentHashCode && that_present_agentHashCode))
|
||||
boolean this_present_agentId = true && this.isSetAgentId();
|
||||
boolean that_present_agentId = true && that.isSetAgentId();
|
||||
if (this_present_agentId || that_present_agentId) {
|
||||
if (!(this_present_agentId && that_present_agentId))
|
||||
return false;
|
||||
if (this.agentHashCode != that.agentHashCode)
|
||||
if (!this.agentId.equals(that.agentId))
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -859,12 +859,12 @@ public class JVMInfoThriftDTO implements org.apache.thrift.TBase<JVMInfoThriftDT
|
||||
int lastComparison = 0;
|
||||
JVMInfoThriftDTO typedOther = (JVMInfoThriftDTO)other;
|
||||
|
||||
lastComparison = Boolean.valueOf(isSetAgentHashCode()).compareTo(typedOther.isSetAgentHashCode());
|
||||
lastComparison = Boolean.valueOf(isSetAgentId()).compareTo(typedOther.isSetAgentId());
|
||||
if (lastComparison != 0) {
|
||||
return lastComparison;
|
||||
}
|
||||
if (isSetAgentHashCode()) {
|
||||
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentHashCode, typedOther.agentHashCode);
|
||||
if (isSetAgentId()) {
|
||||
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentId, typedOther.agentId);
|
||||
if (lastComparison != 0) {
|
||||
return lastComparison;
|
||||
}
|
||||
@@ -999,8 +999,12 @@ public class JVMInfoThriftDTO implements org.apache.thrift.TBase<JVMInfoThriftDT
|
||||
StringBuilder sb = new StringBuilder("JVMInfoThriftDTO(");
|
||||
boolean first = true;
|
||||
|
||||
sb.append("agentHashCode:");
|
||||
sb.append(this.agentHashCode);
|
||||
sb.append("agentId:");
|
||||
if (this.agentId == null) {
|
||||
sb.append("null");
|
||||
} else {
|
||||
sb.append(this.agentId);
|
||||
}
|
||||
first = false;
|
||||
if (!first) sb.append(", ");
|
||||
sb.append("dataTime:");
|
||||
@@ -1100,10 +1104,10 @@ public class JVMInfoThriftDTO implements org.apache.thrift.TBase<JVMInfoThriftDT
|
||||
break;
|
||||
}
|
||||
switch (schemeField.id) {
|
||||
case 1: // AGENT_HASH_CODE
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
|
||||
struct.agentHashCode = iprot.readI32();
|
||||
struct.setAgentHashCodeIsSet(true);
|
||||
case 1: // AGENT_ID
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.agentId = iprot.readString();
|
||||
struct.setAgentIdIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
@@ -1209,9 +1213,11 @@ public class JVMInfoThriftDTO implements org.apache.thrift.TBase<JVMInfoThriftDT
|
||||
struct.validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
oprot.writeFieldBegin(AGENT_HASH_CODE_FIELD_DESC);
|
||||
oprot.writeI32(struct.agentHashCode);
|
||||
oprot.writeFieldEnd();
|
||||
if (struct.agentId != null) {
|
||||
oprot.writeFieldBegin(AGENT_ID_FIELD_DESC);
|
||||
oprot.writeString(struct.agentId);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldBegin(DATA_TIME_FIELD_DESC);
|
||||
oprot.writeI64(struct.dataTime);
|
||||
oprot.writeFieldEnd();
|
||||
@@ -1273,7 +1279,7 @@ public class JVMInfoThriftDTO implements org.apache.thrift.TBase<JVMInfoThriftDT
|
||||
public void write(org.apache.thrift.protocol.TProtocol prot, JVMInfoThriftDTO struct) throws org.apache.thrift.TException {
|
||||
TTupleProtocol oprot = (TTupleProtocol) prot;
|
||||
BitSet optionals = new BitSet();
|
||||
if (struct.isSetAgentHashCode()) {
|
||||
if (struct.isSetAgentId()) {
|
||||
optionals.set(0);
|
||||
}
|
||||
if (struct.isSetDataTime()) {
|
||||
@@ -1310,8 +1316,8 @@ public class JVMInfoThriftDTO implements org.apache.thrift.TBase<JVMInfoThriftDT
|
||||
optionals.set(11);
|
||||
}
|
||||
oprot.writeBitSet(optionals, 12);
|
||||
if (struct.isSetAgentHashCode()) {
|
||||
oprot.writeI32(struct.agentHashCode);
|
||||
if (struct.isSetAgentId()) {
|
||||
oprot.writeString(struct.agentId);
|
||||
}
|
||||
if (struct.isSetDataTime()) {
|
||||
oprot.writeI64(struct.dataTime);
|
||||
@@ -1353,8 +1359,8 @@ public class JVMInfoThriftDTO implements org.apache.thrift.TBase<JVMInfoThriftDT
|
||||
TTupleProtocol iprot = (TTupleProtocol) prot;
|
||||
BitSet incoming = iprot.readBitSet(12);
|
||||
if (incoming.get(0)) {
|
||||
struct.agentHashCode = iprot.readI32();
|
||||
struct.setAgentHashCodeIsSet(true);
|
||||
struct.agentId = iprot.readString();
|
||||
struct.setAgentIdIsSet(true);
|
||||
}
|
||||
if (incoming.get(1)) {
|
||||
struct.dataTime = iprot.readI64();
|
||||
|
||||
@@ -30,7 +30,7 @@ import org.slf4j.LoggerFactory;
|
||||
public class RequestDataListThriftDTO implements org.apache.thrift.TBase<RequestDataListThriftDTO, RequestDataListThriftDTO._Fields>, java.io.Serializable, Cloneable {
|
||||
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RequestDataListThriftDTO");
|
||||
|
||||
private static final org.apache.thrift.protocol.TField HOST_HASH_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("hostHashCode", org.apache.thrift.protocol.TType.I32, (short)1);
|
||||
private static final org.apache.thrift.protocol.TField AGENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("agentId", org.apache.thrift.protocol.TType.STRING, (short)1);
|
||||
private static final org.apache.thrift.protocol.TField REQUEST_HASH_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("requestHashCode", org.apache.thrift.protocol.TType.I32, (short)2);
|
||||
private static final org.apache.thrift.protocol.TField REQUEST_DATA_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("requestDataList", org.apache.thrift.protocol.TType.LIST, (short)3);
|
||||
|
||||
@@ -40,13 +40,13 @@ public class RequestDataListThriftDTO implements org.apache.thrift.TBase<Request
|
||||
schemes.put(TupleScheme.class, new RequestDataListThriftDTOTupleSchemeFactory());
|
||||
}
|
||||
|
||||
private int hostHashCode; // required
|
||||
private String agentId; // required
|
||||
private int requestHashCode; // required
|
||||
private List<RequestDataThriftDTO> requestDataList; // 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 {
|
||||
HOST_HASH_CODE((short)1, "hostHashCode"),
|
||||
AGENT_ID((short)1, "agentId"),
|
||||
REQUEST_HASH_CODE((short)2, "requestHashCode"),
|
||||
REQUEST_DATA_LIST((short)3, "requestDataList");
|
||||
|
||||
@@ -63,8 +63,8 @@ public class RequestDataListThriftDTO implements org.apache.thrift.TBase<Request
|
||||
*/
|
||||
public static _Fields findByThriftId(int fieldId) {
|
||||
switch(fieldId) {
|
||||
case 1: // HOST_HASH_CODE
|
||||
return HOST_HASH_CODE;
|
||||
case 1: // AGENT_ID
|
||||
return AGENT_ID;
|
||||
case 2: // REQUEST_HASH_CODE
|
||||
return REQUEST_HASH_CODE;
|
||||
case 3: // REQUEST_DATA_LIST
|
||||
@@ -109,14 +109,13 @@ public class RequestDataListThriftDTO implements org.apache.thrift.TBase<Request
|
||||
}
|
||||
|
||||
// isset id assignments
|
||||
private static final int __HOSTHASHCODE_ISSET_ID = 0;
|
||||
private static final int __REQUESTHASHCODE_ISSET_ID = 1;
|
||||
private BitSet __isset_bit_vector = new BitSet(2);
|
||||
private static final int __REQUESTHASHCODE_ISSET_ID = 0;
|
||||
private BitSet __isset_bit_vector = new BitSet(1);
|
||||
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
||||
static {
|
||||
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
||||
tmpMap.put(_Fields.HOST_HASH_CODE, new org.apache.thrift.meta_data.FieldMetaData("hostHashCode", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
|
||||
tmpMap.put(_Fields.AGENT_ID, new org.apache.thrift.meta_data.FieldMetaData("agentId", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
||||
tmpMap.put(_Fields.REQUEST_HASH_CODE, new org.apache.thrift.meta_data.FieldMetaData("requestHashCode", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
|
||||
tmpMap.put(_Fields.REQUEST_DATA_LIST, new org.apache.thrift.meta_data.FieldMetaData("requestDataList", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
||||
@@ -130,13 +129,12 @@ public class RequestDataListThriftDTO implements org.apache.thrift.TBase<Request
|
||||
}
|
||||
|
||||
public RequestDataListThriftDTO(
|
||||
int hostHashCode,
|
||||
String agentId,
|
||||
int requestHashCode,
|
||||
List<RequestDataThriftDTO> requestDataList)
|
||||
{
|
||||
this();
|
||||
this.hostHashCode = hostHashCode;
|
||||
setHostHashCodeIsSet(true);
|
||||
this.agentId = agentId;
|
||||
this.requestHashCode = requestHashCode;
|
||||
setRequestHashCodeIsSet(true);
|
||||
this.requestDataList = requestDataList;
|
||||
@@ -148,7 +146,9 @@ public class RequestDataListThriftDTO implements org.apache.thrift.TBase<Request
|
||||
public RequestDataListThriftDTO(RequestDataListThriftDTO other) {
|
||||
__isset_bit_vector.clear();
|
||||
__isset_bit_vector.or(other.__isset_bit_vector);
|
||||
this.hostHashCode = other.hostHashCode;
|
||||
if (other.isSetAgentId()) {
|
||||
this.agentId = other.agentId;
|
||||
}
|
||||
this.requestHashCode = other.requestHashCode;
|
||||
if (other.isSetRequestDataList()) {
|
||||
List<RequestDataThriftDTO> __this__requestDataList = new ArrayList<RequestDataThriftDTO>();
|
||||
@@ -165,33 +165,33 @@ public class RequestDataListThriftDTO implements org.apache.thrift.TBase<Request
|
||||
|
||||
@Override
|
||||
public void clear() {
|
||||
setHostHashCodeIsSet(false);
|
||||
this.hostHashCode = 0;
|
||||
this.agentId = null;
|
||||
setRequestHashCodeIsSet(false);
|
||||
this.requestHashCode = 0;
|
||||
this.requestDataList = null;
|
||||
}
|
||||
|
||||
public int getHostHashCode() {
|
||||
return this.hostHashCode;
|
||||
public String getAgentId() {
|
||||
return this.agentId;
|
||||
}
|
||||
|
||||
public void setHostHashCode(int hostHashCode) {
|
||||
this.hostHashCode = hostHashCode;
|
||||
setHostHashCodeIsSet(true);
|
||||
public void setAgentId(String agentId) {
|
||||
this.agentId = agentId;
|
||||
}
|
||||
|
||||
public void unsetHostHashCode() {
|
||||
__isset_bit_vector.clear(__HOSTHASHCODE_ISSET_ID);
|
||||
public void unsetAgentId() {
|
||||
this.agentId = null;
|
||||
}
|
||||
|
||||
/** Returns true if field hostHashCode is set (has been assigned a value) and false otherwise */
|
||||
public boolean isSetHostHashCode() {
|
||||
return __isset_bit_vector.get(__HOSTHASHCODE_ISSET_ID);
|
||||
/** Returns true if field agentId is set (has been assigned a value) and false otherwise */
|
||||
public boolean isSetAgentId() {
|
||||
return this.agentId != null;
|
||||
}
|
||||
|
||||
public void setHostHashCodeIsSet(boolean value) {
|
||||
__isset_bit_vector.set(__HOSTHASHCODE_ISSET_ID, value);
|
||||
public void setAgentIdIsSet(boolean value) {
|
||||
if (!value) {
|
||||
this.agentId = null;
|
||||
}
|
||||
}
|
||||
|
||||
public int getRequestHashCode() {
|
||||
@@ -256,11 +256,11 @@ public class RequestDataListThriftDTO implements org.apache.thrift.TBase<Request
|
||||
|
||||
public void setFieldValue(_Fields field, Object value) {
|
||||
switch (field) {
|
||||
case HOST_HASH_CODE:
|
||||
case AGENT_ID:
|
||||
if (value == null) {
|
||||
unsetHostHashCode();
|
||||
unsetAgentId();
|
||||
} else {
|
||||
setHostHashCode((Integer)value);
|
||||
setAgentId((String)value);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -285,8 +285,8 @@ public class RequestDataListThriftDTO implements org.apache.thrift.TBase<Request
|
||||
|
||||
public Object getFieldValue(_Fields field) {
|
||||
switch (field) {
|
||||
case HOST_HASH_CODE:
|
||||
return Integer.valueOf(getHostHashCode());
|
||||
case AGENT_ID:
|
||||
return getAgentId();
|
||||
|
||||
case REQUEST_HASH_CODE:
|
||||
return Integer.valueOf(getRequestHashCode());
|
||||
@@ -305,8 +305,8 @@ public class RequestDataListThriftDTO implements org.apache.thrift.TBase<Request
|
||||
}
|
||||
|
||||
switch (field) {
|
||||
case HOST_HASH_CODE:
|
||||
return isSetHostHashCode();
|
||||
case AGENT_ID:
|
||||
return isSetAgentId();
|
||||
case REQUEST_HASH_CODE:
|
||||
return isSetRequestHashCode();
|
||||
case REQUEST_DATA_LIST:
|
||||
@@ -328,12 +328,12 @@ public class RequestDataListThriftDTO implements org.apache.thrift.TBase<Request
|
||||
if (that == null)
|
||||
return false;
|
||||
|
||||
boolean this_present_hostHashCode = true;
|
||||
boolean that_present_hostHashCode = true;
|
||||
if (this_present_hostHashCode || that_present_hostHashCode) {
|
||||
if (!(this_present_hostHashCode && that_present_hostHashCode))
|
||||
boolean this_present_agentId = true && this.isSetAgentId();
|
||||
boolean that_present_agentId = true && that.isSetAgentId();
|
||||
if (this_present_agentId || that_present_agentId) {
|
||||
if (!(this_present_agentId && that_present_agentId))
|
||||
return false;
|
||||
if (this.hostHashCode != that.hostHashCode)
|
||||
if (!this.agentId.equals(that.agentId))
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -371,12 +371,12 @@ public class RequestDataListThriftDTO implements org.apache.thrift.TBase<Request
|
||||
int lastComparison = 0;
|
||||
RequestDataListThriftDTO typedOther = (RequestDataListThriftDTO)other;
|
||||
|
||||
lastComparison = Boolean.valueOf(isSetHostHashCode()).compareTo(typedOther.isSetHostHashCode());
|
||||
lastComparison = Boolean.valueOf(isSetAgentId()).compareTo(typedOther.isSetAgentId());
|
||||
if (lastComparison != 0) {
|
||||
return lastComparison;
|
||||
}
|
||||
if (isSetHostHashCode()) {
|
||||
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hostHashCode, typedOther.hostHashCode);
|
||||
if (isSetAgentId()) {
|
||||
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentId, typedOther.agentId);
|
||||
if (lastComparison != 0) {
|
||||
return lastComparison;
|
||||
}
|
||||
@@ -421,8 +421,12 @@ public class RequestDataListThriftDTO implements org.apache.thrift.TBase<Request
|
||||
StringBuilder sb = new StringBuilder("RequestDataListThriftDTO(");
|
||||
boolean first = true;
|
||||
|
||||
sb.append("hostHashCode:");
|
||||
sb.append(this.hostHashCode);
|
||||
sb.append("agentId:");
|
||||
if (this.agentId == null) {
|
||||
sb.append("null");
|
||||
} else {
|
||||
sb.append(this.agentId);
|
||||
}
|
||||
first = false;
|
||||
if (!first) sb.append(", ");
|
||||
sb.append("requestHashCode:");
|
||||
@@ -480,10 +484,10 @@ public class RequestDataListThriftDTO implements org.apache.thrift.TBase<Request
|
||||
break;
|
||||
}
|
||||
switch (schemeField.id) {
|
||||
case 1: // HOST_HASH_CODE
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
|
||||
struct.hostHashCode = iprot.readI32();
|
||||
struct.setHostHashCodeIsSet(true);
|
||||
case 1: // AGENT_ID
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.agentId = iprot.readString();
|
||||
struct.setAgentIdIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
@@ -528,9 +532,11 @@ public class RequestDataListThriftDTO implements org.apache.thrift.TBase<Request
|
||||
struct.validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
oprot.writeFieldBegin(HOST_HASH_CODE_FIELD_DESC);
|
||||
oprot.writeI32(struct.hostHashCode);
|
||||
oprot.writeFieldEnd();
|
||||
if (struct.agentId != null) {
|
||||
oprot.writeFieldBegin(AGENT_ID_FIELD_DESC);
|
||||
oprot.writeString(struct.agentId);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldBegin(REQUEST_HASH_CODE_FIELD_DESC);
|
||||
oprot.writeI32(struct.requestHashCode);
|
||||
oprot.writeFieldEnd();
|
||||
@@ -564,7 +570,7 @@ public class RequestDataListThriftDTO implements org.apache.thrift.TBase<Request
|
||||
public void write(org.apache.thrift.protocol.TProtocol prot, RequestDataListThriftDTO struct) throws org.apache.thrift.TException {
|
||||
TTupleProtocol oprot = (TTupleProtocol) prot;
|
||||
BitSet optionals = new BitSet();
|
||||
if (struct.isSetHostHashCode()) {
|
||||
if (struct.isSetAgentId()) {
|
||||
optionals.set(0);
|
||||
}
|
||||
if (struct.isSetRequestHashCode()) {
|
||||
@@ -574,8 +580,8 @@ public class RequestDataListThriftDTO implements org.apache.thrift.TBase<Request
|
||||
optionals.set(2);
|
||||
}
|
||||
oprot.writeBitSet(optionals, 3);
|
||||
if (struct.isSetHostHashCode()) {
|
||||
oprot.writeI32(struct.hostHashCode);
|
||||
if (struct.isSetAgentId()) {
|
||||
oprot.writeString(struct.agentId);
|
||||
}
|
||||
if (struct.isSetRequestHashCode()) {
|
||||
oprot.writeI32(struct.requestHashCode);
|
||||
@@ -596,8 +602,8 @@ public class RequestDataListThriftDTO implements org.apache.thrift.TBase<Request
|
||||
TTupleProtocol iprot = (TTupleProtocol) prot;
|
||||
BitSet incoming = iprot.readBitSet(3);
|
||||
if (incoming.get(0)) {
|
||||
struct.hostHashCode = iprot.readI32();
|
||||
struct.setHostHashCodeIsSet(true);
|
||||
struct.agentId = iprot.readString();
|
||||
struct.setAgentIdIsSet(true);
|
||||
}
|
||||
if (incoming.get(1)) {
|
||||
struct.requestHashCode = iprot.readI32();
|
||||
|
||||
@@ -30,7 +30,7 @@ import org.slf4j.LoggerFactory;
|
||||
public class RequestThriftDTO implements org.apache.thrift.TBase<RequestThriftDTO, RequestThriftDTO._Fields>, java.io.Serializable, Cloneable {
|
||||
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RequestThriftDTO");
|
||||
|
||||
private static final org.apache.thrift.protocol.TField HOST_HASH_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("hostHashCode", org.apache.thrift.protocol.TType.I32, (short)1);
|
||||
private static final org.apache.thrift.protocol.TField AGENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("agentId", org.apache.thrift.protocol.TType.STRING, (short)1);
|
||||
private static final org.apache.thrift.protocol.TField REQUEST_HASH_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("requestHashCode", org.apache.thrift.protocol.TType.I32, (short)2);
|
||||
private static final org.apache.thrift.protocol.TField DATA_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("dataType", org.apache.thrift.protocol.TType.I32, (short)3);
|
||||
private static final org.apache.thrift.protocol.TField DATA_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("dataTime", org.apache.thrift.protocol.TType.I64, (short)4);
|
||||
@@ -55,7 +55,7 @@ public class RequestThriftDTO implements org.apache.thrift.TBase<RequestThriftDT
|
||||
schemes.put(TupleScheme.class, new RequestThriftDTOTupleSchemeFactory());
|
||||
}
|
||||
|
||||
private int hostHashCode; // required
|
||||
private String agentId; // required
|
||||
private int requestHashCode; // required
|
||||
private int dataType; // required
|
||||
private long dataTime; // required
|
||||
@@ -76,7 +76,7 @@ public class RequestThriftDTO implements org.apache.thrift.TBase<RequestThriftDT
|
||||
|
||||
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
||||
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
||||
HOST_HASH_CODE((short)1, "hostHashCode"),
|
||||
AGENT_ID((short)1, "agentId"),
|
||||
REQUEST_HASH_CODE((short)2, "requestHashCode"),
|
||||
DATA_TYPE((short)3, "dataType"),
|
||||
DATA_TIME((short)4, "dataTime"),
|
||||
@@ -108,8 +108,8 @@ public class RequestThriftDTO implements org.apache.thrift.TBase<RequestThriftDT
|
||||
*/
|
||||
public static _Fields findByThriftId(int fieldId) {
|
||||
switch(fieldId) {
|
||||
case 1: // HOST_HASH_CODE
|
||||
return HOST_HASH_CODE;
|
||||
case 1: // AGENT_ID
|
||||
return AGENT_ID;
|
||||
case 2: // REQUEST_HASH_CODE
|
||||
return REQUEST_HASH_CODE;
|
||||
case 3: // DATA_TYPE
|
||||
@@ -184,25 +184,24 @@ public class RequestThriftDTO implements org.apache.thrift.TBase<RequestThriftDT
|
||||
}
|
||||
|
||||
// isset id assignments
|
||||
private static final int __HOSTHASHCODE_ISSET_ID = 0;
|
||||
private static final int __REQUESTHASHCODE_ISSET_ID = 1;
|
||||
private static final int __DATATYPE_ISSET_ID = 2;
|
||||
private static final int __DATATIME_ISSET_ID = 3;
|
||||
private static final int __THREADCPUTIME_ISSET_ID = 4;
|
||||
private static final int __THREADUSERTIME_ISSET_ID = 5;
|
||||
private static final int __EXTRAINT1_ISSET_ID = 6;
|
||||
private static final int __EXTRAINT2_ISSET_ID = 7;
|
||||
private static final int __EXTRAINT3_ISSET_ID = 8;
|
||||
private static final int __EXTRALONG1_ISSET_ID = 9;
|
||||
private static final int __EXTRALONG2_ISSET_ID = 10;
|
||||
private static final int __EXTRALONG3_ISSET_ID = 11;
|
||||
private BitSet __isset_bit_vector = new BitSet(12);
|
||||
private static final int __REQUESTHASHCODE_ISSET_ID = 0;
|
||||
private static final int __DATATYPE_ISSET_ID = 1;
|
||||
private static final int __DATATIME_ISSET_ID = 2;
|
||||
private static final int __THREADCPUTIME_ISSET_ID = 3;
|
||||
private static final int __THREADUSERTIME_ISSET_ID = 4;
|
||||
private static final int __EXTRAINT1_ISSET_ID = 5;
|
||||
private static final int __EXTRAINT2_ISSET_ID = 6;
|
||||
private static final int __EXTRAINT3_ISSET_ID = 7;
|
||||
private static final int __EXTRALONG1_ISSET_ID = 8;
|
||||
private static final int __EXTRALONG2_ISSET_ID = 9;
|
||||
private static final int __EXTRALONG3_ISSET_ID = 10;
|
||||
private BitSet __isset_bit_vector = new BitSet(11);
|
||||
private _Fields optionals[] = {_Fields.REQUEST_ID,_Fields.REQUEST_URL,_Fields.CLIENT_IP,_Fields.EXTRA_DATA1,_Fields.EXTRA_DATA2,_Fields.EXTRA_DATA3,_Fields.EXTRA_INT1,_Fields.EXTRA_INT2,_Fields.EXTRA_INT3,_Fields.EXTRA_LONG1,_Fields.EXTRA_LONG2,_Fields.EXTRA_LONG3};
|
||||
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.HOST_HASH_CODE, new org.apache.thrift.meta_data.FieldMetaData("hostHashCode", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
|
||||
tmpMap.put(_Fields.AGENT_ID, new org.apache.thrift.meta_data.FieldMetaData("agentId", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
|
||||
tmpMap.put(_Fields.REQUEST_HASH_CODE, new org.apache.thrift.meta_data.FieldMetaData("requestHashCode", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
||||
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
|
||||
tmpMap.put(_Fields.DATA_TYPE, new org.apache.thrift.meta_data.FieldMetaData("dataType", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
||||
@@ -245,7 +244,7 @@ public class RequestThriftDTO implements org.apache.thrift.TBase<RequestThriftDT
|
||||
}
|
||||
|
||||
public RequestThriftDTO(
|
||||
int hostHashCode,
|
||||
String agentId,
|
||||
int requestHashCode,
|
||||
int dataType,
|
||||
long dataTime,
|
||||
@@ -253,8 +252,7 @@ public class RequestThriftDTO implements org.apache.thrift.TBase<RequestThriftDT
|
||||
long threadUserTime)
|
||||
{
|
||||
this();
|
||||
this.hostHashCode = hostHashCode;
|
||||
setHostHashCodeIsSet(true);
|
||||
this.agentId = agentId;
|
||||
this.requestHashCode = requestHashCode;
|
||||
setRequestHashCodeIsSet(true);
|
||||
this.dataType = dataType;
|
||||
@@ -273,7 +271,9 @@ public class RequestThriftDTO implements org.apache.thrift.TBase<RequestThriftDT
|
||||
public RequestThriftDTO(RequestThriftDTO other) {
|
||||
__isset_bit_vector.clear();
|
||||
__isset_bit_vector.or(other.__isset_bit_vector);
|
||||
this.hostHashCode = other.hostHashCode;
|
||||
if (other.isSetAgentId()) {
|
||||
this.agentId = other.agentId;
|
||||
}
|
||||
this.requestHashCode = other.requestHashCode;
|
||||
this.dataType = other.dataType;
|
||||
this.dataTime = other.dataTime;
|
||||
@@ -311,8 +311,7 @@ public class RequestThriftDTO implements org.apache.thrift.TBase<RequestThriftDT
|
||||
|
||||
@Override
|
||||
public void clear() {
|
||||
setHostHashCodeIsSet(false);
|
||||
this.hostHashCode = 0;
|
||||
this.agentId = null;
|
||||
setRequestHashCodeIsSet(false);
|
||||
this.requestHashCode = 0;
|
||||
setDataTypeIsSet(false);
|
||||
@@ -343,26 +342,27 @@ public class RequestThriftDTO implements org.apache.thrift.TBase<RequestThriftDT
|
||||
this.extraLong3 = 0;
|
||||
}
|
||||
|
||||
public int getHostHashCode() {
|
||||
return this.hostHashCode;
|
||||
public String getAgentId() {
|
||||
return this.agentId;
|
||||
}
|
||||
|
||||
public void setHostHashCode(int hostHashCode) {
|
||||
this.hostHashCode = hostHashCode;
|
||||
setHostHashCodeIsSet(true);
|
||||
public void setAgentId(String agentId) {
|
||||
this.agentId = agentId;
|
||||
}
|
||||
|
||||
public void unsetHostHashCode() {
|
||||
__isset_bit_vector.clear(__HOSTHASHCODE_ISSET_ID);
|
||||
public void unsetAgentId() {
|
||||
this.agentId = null;
|
||||
}
|
||||
|
||||
/** Returns true if field hostHashCode is set (has been assigned a value) and false otherwise */
|
||||
public boolean isSetHostHashCode() {
|
||||
return __isset_bit_vector.get(__HOSTHASHCODE_ISSET_ID);
|
||||
/** Returns true if field agentId is set (has been assigned a value) and false otherwise */
|
||||
public boolean isSetAgentId() {
|
||||
return this.agentId != null;
|
||||
}
|
||||
|
||||
public void setHostHashCodeIsSet(boolean value) {
|
||||
__isset_bit_vector.set(__HOSTHASHCODE_ISSET_ID, value);
|
||||
public void setAgentIdIsSet(boolean value) {
|
||||
if (!value) {
|
||||
this.agentId = null;
|
||||
}
|
||||
}
|
||||
|
||||
public int getRequestHashCode() {
|
||||
@@ -747,11 +747,11 @@ public class RequestThriftDTO implements org.apache.thrift.TBase<RequestThriftDT
|
||||
|
||||
public void setFieldValue(_Fields field, Object value) {
|
||||
switch (field) {
|
||||
case HOST_HASH_CODE:
|
||||
case AGENT_ID:
|
||||
if (value == null) {
|
||||
unsetHostHashCode();
|
||||
unsetAgentId();
|
||||
} else {
|
||||
setHostHashCode((Integer)value);
|
||||
setAgentId((String)value);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -896,8 +896,8 @@ public class RequestThriftDTO implements org.apache.thrift.TBase<RequestThriftDT
|
||||
|
||||
public Object getFieldValue(_Fields field) {
|
||||
switch (field) {
|
||||
case HOST_HASH_CODE:
|
||||
return Integer.valueOf(getHostHashCode());
|
||||
case AGENT_ID:
|
||||
return getAgentId();
|
||||
|
||||
case REQUEST_HASH_CODE:
|
||||
return Integer.valueOf(getRequestHashCode());
|
||||
@@ -961,8 +961,8 @@ public class RequestThriftDTO implements org.apache.thrift.TBase<RequestThriftDT
|
||||
}
|
||||
|
||||
switch (field) {
|
||||
case HOST_HASH_CODE:
|
||||
return isSetHostHashCode();
|
||||
case AGENT_ID:
|
||||
return isSetAgentId();
|
||||
case REQUEST_HASH_CODE:
|
||||
return isSetRequestHashCode();
|
||||
case DATA_TYPE:
|
||||
@@ -1014,12 +1014,12 @@ public class RequestThriftDTO implements org.apache.thrift.TBase<RequestThriftDT
|
||||
if (that == null)
|
||||
return false;
|
||||
|
||||
boolean this_present_hostHashCode = true;
|
||||
boolean that_present_hostHashCode = true;
|
||||
if (this_present_hostHashCode || that_present_hostHashCode) {
|
||||
if (!(this_present_hostHashCode && that_present_hostHashCode))
|
||||
boolean this_present_agentId = true && this.isSetAgentId();
|
||||
boolean that_present_agentId = true && that.isSetAgentId();
|
||||
if (this_present_agentId || that_present_agentId) {
|
||||
if (!(this_present_agentId && that_present_agentId))
|
||||
return false;
|
||||
if (this.hostHashCode != that.hostHashCode)
|
||||
if (!this.agentId.equals(that.agentId))
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1192,12 +1192,12 @@ public class RequestThriftDTO implements org.apache.thrift.TBase<RequestThriftDT
|
||||
int lastComparison = 0;
|
||||
RequestThriftDTO typedOther = (RequestThriftDTO)other;
|
||||
|
||||
lastComparison = Boolean.valueOf(isSetHostHashCode()).compareTo(typedOther.isSetHostHashCode());
|
||||
lastComparison = Boolean.valueOf(isSetAgentId()).compareTo(typedOther.isSetAgentId());
|
||||
if (lastComparison != 0) {
|
||||
return lastComparison;
|
||||
}
|
||||
if (isSetHostHashCode()) {
|
||||
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hostHashCode, typedOther.hostHashCode);
|
||||
if (isSetAgentId()) {
|
||||
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentId, typedOther.agentId);
|
||||
if (lastComparison != 0) {
|
||||
return lastComparison;
|
||||
}
|
||||
@@ -1392,8 +1392,12 @@ public class RequestThriftDTO implements org.apache.thrift.TBase<RequestThriftDT
|
||||
StringBuilder sb = new StringBuilder("RequestThriftDTO(");
|
||||
boolean first = true;
|
||||
|
||||
sb.append("hostHashCode:");
|
||||
sb.append(this.hostHashCode);
|
||||
sb.append("agentId:");
|
||||
if (this.agentId == null) {
|
||||
sb.append("null");
|
||||
} else {
|
||||
sb.append(this.agentId);
|
||||
}
|
||||
first = false;
|
||||
if (!first) sb.append(", ");
|
||||
sb.append("requestHashCode:");
|
||||
@@ -1555,10 +1559,10 @@ public class RequestThriftDTO implements org.apache.thrift.TBase<RequestThriftDT
|
||||
break;
|
||||
}
|
||||
switch (schemeField.id) {
|
||||
case 1: // HOST_HASH_CODE
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
|
||||
struct.hostHashCode = iprot.readI32();
|
||||
struct.setHostHashCodeIsSet(true);
|
||||
case 1: // AGENT_ID
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.agentId = iprot.readString();
|
||||
struct.setAgentIdIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
@@ -1712,9 +1716,11 @@ public class RequestThriftDTO implements org.apache.thrift.TBase<RequestThriftDT
|
||||
struct.validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
oprot.writeFieldBegin(HOST_HASH_CODE_FIELD_DESC);
|
||||
oprot.writeI32(struct.hostHashCode);
|
||||
oprot.writeFieldEnd();
|
||||
if (struct.agentId != null) {
|
||||
oprot.writeFieldBegin(AGENT_ID_FIELD_DESC);
|
||||
oprot.writeString(struct.agentId);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldBegin(REQUEST_HASH_CODE_FIELD_DESC);
|
||||
oprot.writeI32(struct.requestHashCode);
|
||||
oprot.writeFieldEnd();
|
||||
@@ -1820,7 +1826,7 @@ public class RequestThriftDTO implements org.apache.thrift.TBase<RequestThriftDT
|
||||
public void write(org.apache.thrift.protocol.TProtocol prot, RequestThriftDTO struct) throws org.apache.thrift.TException {
|
||||
TTupleProtocol oprot = (TTupleProtocol) prot;
|
||||
BitSet optionals = new BitSet();
|
||||
if (struct.isSetHostHashCode()) {
|
||||
if (struct.isSetAgentId()) {
|
||||
optionals.set(0);
|
||||
}
|
||||
if (struct.isSetRequestHashCode()) {
|
||||
@@ -1875,8 +1881,8 @@ public class RequestThriftDTO implements org.apache.thrift.TBase<RequestThriftDT
|
||||
optionals.set(17);
|
||||
}
|
||||
oprot.writeBitSet(optionals, 18);
|
||||
if (struct.isSetHostHashCode()) {
|
||||
oprot.writeI32(struct.hostHashCode);
|
||||
if (struct.isSetAgentId()) {
|
||||
oprot.writeString(struct.agentId);
|
||||
}
|
||||
if (struct.isSetRequestHashCode()) {
|
||||
oprot.writeI32(struct.requestHashCode);
|
||||
@@ -1936,8 +1942,8 @@ public class RequestThriftDTO implements org.apache.thrift.TBase<RequestThriftDT
|
||||
TTupleProtocol iprot = (TTupleProtocol) prot;
|
||||
BitSet incoming = iprot.readBitSet(18);
|
||||
if (incoming.get(0)) {
|
||||
struct.hostHashCode = iprot.readI32();
|
||||
struct.setHostHashCodeIsSet(true);
|
||||
struct.agentId = iprot.readString();
|
||||
struct.setAgentIdIsSet(true);
|
||||
}
|
||||
if (incoming.get(1)) {
|
||||
struct.requestHashCode = iprot.readI32();
|
||||
|
||||
@@ -5,4 +5,6 @@ public class HBaseTables {
|
||||
public static final String TRACE_INDEX = "TraceIndex";
|
||||
|
||||
public static final String TRACES = "Traces";
|
||||
|
||||
public static final String SERVERS = "Servers";
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.profiler.common.util;
|
||||
|
||||
import org.apache.thrift.TBase;
|
||||
|
||||
import com.profiler.common.dto.thrift.AgentInfo;
|
||||
import com.profiler.common.dto.thrift.JVMInfoThriftDTO;
|
||||
import com.profiler.common.dto.thrift.RequestDataListThriftDTO;
|
||||
import com.profiler.common.dto.thrift.RequestThriftDTO;
|
||||
@@ -13,6 +14,7 @@ public class DefaultTBaseLocator implements TBaseLocator {
|
||||
private static final short REQUEST_DATA_LIST_THRIFT_DTO = 20;
|
||||
private static final short REQUEST_THRIFT_DTO = 30;
|
||||
private static final short SPAN = 40;
|
||||
private static final short AGENT_INFO = 50;
|
||||
|
||||
@Override
|
||||
public TBase<?, ?> tBaseLookup(short type) {
|
||||
@@ -25,10 +27,13 @@ public class DefaultTBaseLocator implements TBaseLocator {
|
||||
return new RequestThriftDTO();
|
||||
case SPAN:
|
||||
return new Span();
|
||||
case AGENT_INFO:
|
||||
return new AgentInfo();
|
||||
}
|
||||
throw new IllegalArgumentException("Unsupported type:" + type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public short typeLookup(TBase<?, ?> tbase) {
|
||||
if (tbase instanceof JVMInfoThriftDTO) {
|
||||
return JVM_INFO_THRIFT_DTO;
|
||||
@@ -42,6 +47,9 @@ public class DefaultTBaseLocator implements TBaseLocator {
|
||||
if (tbase instanceof Span) {
|
||||
return SPAN;
|
||||
}
|
||||
if (tbase instanceof AgentInfo) {
|
||||
return AGENT_INFO;
|
||||
}
|
||||
throw new UnsupportedOperationException("Unsupported Type");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user