diff --git a/pom.xml b/pom.xml
index ceb91674d..16c1e7a37 100644
--- a/pom.xml
+++ b/pom.xml
@@ -11,22 +11,27 @@
${thrift.executable.property}
-
-
-
- nhn.release.repository
- nhncorp.release
- dav:http://repo.nhncorp.com/maven2
-
-
- nhn.snapshot.repository
- nhncorp.snapshot
- dav:http://repo.nhncorp.com/m2-snapshot-repository
- true
-
-
-
+
+ com.springsource.repository.bundles.release
+ SpringSource Enterprise Bundle Repository - SpringSource Bundle Releases
+ http://repository.springsource.com/maven/bundles/release
+
+
+ com.springsource.repository.bundles.external
+ SpringSource Enterprise Bundle Repository - External Bundle Releases
+ http://repository.springsource.com/maven/bundles/external
+
+
+ spring-milestone
+ Spring Maven MILESTONE Repository
+ http://maven.springframework.org/milestone
+
+
+ jboss-public-repository-group
+ JBoss Public Maven Repository Group
+ https://repository.jboss.org/nexus/content/groups/public/
+
nhn.release.repository
http://repo.nhncorp.com/maven2
diff --git a/src/main/java/com/profiler/common/dto/thrift/AgentInfo.java b/src/main/java/com/profiler/common/dto/thrift/AgentInfo.java
new file mode 100644
index 000000000..673657712
--- /dev/null
+++ b/src/main/java/com/profiler/common/dto/thrift/AgentInfo.java
@@ -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, 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, SchemeFactory> schemes = new HashMap, 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 byName = new HashMap();
+
+ 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 other.
+ */
+ 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 {
+
+ 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 {
+
+ @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);
+ }
+ }
+ }
+
+}
+
diff --git a/src/main/java/com/profiler/common/dto/thrift/JVMInfoThriftDTO.java b/src/main/java/com/profiler/common/dto/thrift/JVMInfoThriftDTO.java
index 419dcae85..e716b7063 100644
--- a/src/main/java/com/profiler/common/dto/thrift/JVMInfoThriftDTO.java
+++ b/src/main/java/com/profiler/common/dto/thrift/JVMInfoThriftDTO.java
@@ -30,7 +30,7 @@ import org.slf4j.LoggerFactory;
public class JVMInfoThriftDTO implements org.apache.thrift.TBase, 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 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, 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 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 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 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 __this__requestDataList = new ArrayList();
@@ -165,33 +165,33 @@ public class RequestDataListThriftDTO implements org.apache.thrift.TBase, 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 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 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");
}
}
diff --git a/src/main/thrift/Hippo.thrift b/src/main/thrift/Hippo.thrift
index 1f9b0818d..37cdac4b0 100644
--- a/src/main/thrift/Hippo.thrift
+++ b/src/main/thrift/Hippo.thrift
@@ -1,7 +1,15 @@
namespace java com.profiler.common.dto.thrift
+struct AgentInfo {
+ 1: string hostname
+ 2: string ports
+ 3: string agentId
+ 4: bool isAlive
+ 5: i64 timestamp
+}
+
struct JVMInfoThriftDTO {
- 1: i32 agentHashCode,
+ 1: string agentId,
2: i64 dataTime,
3: i32 activeThreadCount,
4: optional i64 gc1Count,
@@ -32,13 +40,13 @@ struct RequestDataThriftDTO {
}
struct RequestDataListThriftDTO {
- 1: i32 hostHashCode,
+ 1: string agentId,
2: i32 requestHashCode,
3: list requestDataList
}
struct RequestThriftDTO {
- 1: i32 hostHashCode,
+ 1: string agentId,
2: i32 requestHashCode,
3: i32 dataType,
4: i64 dataTime,