org.apache.iotdb.mpp.rpc.thrift.TDataNodeHeartbeatReq Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of timechodb-thrift Show documentation
Show all versions of timechodb-thrift Show documentation
RPC (Thrift) framework for client and DataNodes.
The newest version!
/**
* Autogenerated by Thrift Compiler (0.14.1)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.iotdb.mpp.rpc.thrift;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.14.1)", date = "2024-09-12")
public class TDataNodeHeartbeatReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TDataNodeHeartbeatReq");
private static final org.apache.thrift.protocol.TField HEARTBEAT_TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("heartbeatTimestamp", org.apache.thrift.protocol.TType.I64, (short)1);
private static final org.apache.thrift.protocol.TField NEED_JUDGE_LEADER_FIELD_DESC = new org.apache.thrift.protocol.TField("needJudgeLeader", org.apache.thrift.protocol.TType.BOOL, (short)2);
private static final org.apache.thrift.protocol.TField NEED_SAMPLING_LOAD_FIELD_DESC = new org.apache.thrift.protocol.TField("needSamplingLoad", org.apache.thrift.protocol.TType.BOOL, (short)3);
private static final org.apache.thrift.protocol.TField TIME_SERIES_QUOTA_REMAIN_FIELD_DESC = new org.apache.thrift.protocol.TField("timeSeriesQuotaRemain", org.apache.thrift.protocol.TType.I64, (short)4);
private static final org.apache.thrift.protocol.TField SCHEMA_REGION_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("schemaRegionIds", org.apache.thrift.protocol.TType.LIST, (short)5);
private static final org.apache.thrift.protocol.TField DATA_REGION_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("dataRegionIds", org.apache.thrift.protocol.TType.LIST, (short)6);
private static final org.apache.thrift.protocol.TField SPACE_QUOTA_USAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("spaceQuotaUsage", org.apache.thrift.protocol.TType.MAP, (short)7);
private static final org.apache.thrift.protocol.TField NEED_PIPE_META_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("needPipeMetaList", org.apache.thrift.protocol.TType.BOOL, (short)8);
private static final org.apache.thrift.protocol.TField DEVICE_QUOTA_REMAIN_FIELD_DESC = new org.apache.thrift.protocol.TField("deviceQuotaRemain", org.apache.thrift.protocol.TType.I64, (short)9);
private static final org.apache.thrift.protocol.TField ACTIVATION_FIELD_DESC = new org.apache.thrift.protocol.TField("activation", org.apache.thrift.protocol.TType.STRUCT, (short)10);
private static final org.apache.thrift.protocol.TField CONFIG_NODE_END_POINTS_FIELD_DESC = new org.apache.thrift.protocol.TField("configNodeEndPoints", org.apache.thrift.protocol.TType.SET, (short)11);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TDataNodeHeartbeatReqStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TDataNodeHeartbeatReqTupleSchemeFactory();
public long heartbeatTimestamp; // required
public boolean needJudgeLeader; // required
public boolean needSamplingLoad; // required
public long timeSeriesQuotaRemain; // required
public @org.apache.thrift.annotation.Nullable java.util.List schemaRegionIds; // optional
public @org.apache.thrift.annotation.Nullable java.util.List dataRegionIds; // optional
public @org.apache.thrift.annotation.Nullable java.util.Map spaceQuotaUsage; // optional
public boolean needPipeMetaList; // optional
public long deviceQuotaRemain; // optional
public @org.apache.thrift.annotation.Nullable TDataNodeActivation activation; // optional
public @org.apache.thrift.annotation.Nullable java.util.Set configNodeEndPoints; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
HEARTBEAT_TIMESTAMP((short)1, "heartbeatTimestamp"),
NEED_JUDGE_LEADER((short)2, "needJudgeLeader"),
NEED_SAMPLING_LOAD((short)3, "needSamplingLoad"),
TIME_SERIES_QUOTA_REMAIN((short)4, "timeSeriesQuotaRemain"),
SCHEMA_REGION_IDS((short)5, "schemaRegionIds"),
DATA_REGION_IDS((short)6, "dataRegionIds"),
SPACE_QUOTA_USAGE((short)7, "spaceQuotaUsage"),
NEED_PIPE_META_LIST((short)8, "needPipeMetaList"),
DEVICE_QUOTA_REMAIN((short)9, "deviceQuotaRemain"),
ACTIVATION((short)10, "activation"),
CONFIG_NODE_END_POINTS((short)11, "configNodeEndPoints");
private static final java.util.Map byName = new java.util.HashMap();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // HEARTBEAT_TIMESTAMP
return HEARTBEAT_TIMESTAMP;
case 2: // NEED_JUDGE_LEADER
return NEED_JUDGE_LEADER;
case 3: // NEED_SAMPLING_LOAD
return NEED_SAMPLING_LOAD;
case 4: // TIME_SERIES_QUOTA_REMAIN
return TIME_SERIES_QUOTA_REMAIN;
case 5: // SCHEMA_REGION_IDS
return SCHEMA_REGION_IDS;
case 6: // DATA_REGION_IDS
return DATA_REGION_IDS;
case 7: // SPACE_QUOTA_USAGE
return SPACE_QUOTA_USAGE;
case 8: // NEED_PIPE_META_LIST
return NEED_PIPE_META_LIST;
case 9: // DEVICE_QUOTA_REMAIN
return DEVICE_QUOTA_REMAIN;
case 10: // ACTIVATION
return ACTIVATION;
case 11: // CONFIG_NODE_END_POINTS
return CONFIG_NODE_END_POINTS;
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __HEARTBEATTIMESTAMP_ISSET_ID = 0;
private static final int __NEEDJUDGELEADER_ISSET_ID = 1;
private static final int __NEEDSAMPLINGLOAD_ISSET_ID = 2;
private static final int __TIMESERIESQUOTAREMAIN_ISSET_ID = 3;
private static final int __NEEDPIPEMETALIST_ISSET_ID = 4;
private static final int __DEVICEQUOTAREMAIN_ISSET_ID = 5;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.SCHEMA_REGION_IDS,_Fields.DATA_REGION_IDS,_Fields.SPACE_QUOTA_USAGE,_Fields.NEED_PIPE_META_LIST,_Fields.DEVICE_QUOTA_REMAIN,_Fields.ACTIVATION,_Fields.CONFIG_NODE_END_POINTS};
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.HEARTBEAT_TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("heartbeatTimestamp", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.NEED_JUDGE_LEADER, new org.apache.thrift.meta_data.FieldMetaData("needJudgeLeader", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.NEED_SAMPLING_LOAD, new org.apache.thrift.meta_data.FieldMetaData("needSamplingLoad", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.TIME_SERIES_QUOTA_REMAIN, new org.apache.thrift.meta_data.FieldMetaData("timeSeriesQuotaRemain", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.SCHEMA_REGION_IDS, new org.apache.thrift.meta_data.FieldMetaData("schemaRegionIds", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))));
tmpMap.put(_Fields.DATA_REGION_IDS, new org.apache.thrift.meta_data.FieldMetaData("dataRegionIds", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))));
tmpMap.put(_Fields.SPACE_QUOTA_USAGE, new org.apache.thrift.meta_data.FieldMetaData("spaceQuotaUsage", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TSpaceQuota.class))));
tmpMap.put(_Fields.NEED_PIPE_META_LIST, new org.apache.thrift.meta_data.FieldMetaData("needPipeMetaList", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.DEVICE_QUOTA_REMAIN, new org.apache.thrift.meta_data.FieldMetaData("deviceQuotaRemain", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.ACTIVATION, new org.apache.thrift.meta_data.FieldMetaData("activation", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT , "TDataNodeActivation")));
tmpMap.put(_Fields.CONFIG_NODE_END_POINTS, new org.apache.thrift.meta_data.FieldMetaData("configNodeEndPoints", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.iotdb.common.rpc.thrift.TEndPoint.class))));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TDataNodeHeartbeatReq.class, metaDataMap);
}
public TDataNodeHeartbeatReq() {
}
public TDataNodeHeartbeatReq(
long heartbeatTimestamp,
boolean needJudgeLeader,
boolean needSamplingLoad,
long timeSeriesQuotaRemain)
{
this();
this.heartbeatTimestamp = heartbeatTimestamp;
setHeartbeatTimestampIsSet(true);
this.needJudgeLeader = needJudgeLeader;
setNeedJudgeLeaderIsSet(true);
this.needSamplingLoad = needSamplingLoad;
setNeedSamplingLoadIsSet(true);
this.timeSeriesQuotaRemain = timeSeriesQuotaRemain;
setTimeSeriesQuotaRemainIsSet(true);
}
/**
* Performs a deep copy on other.
*/
public TDataNodeHeartbeatReq(TDataNodeHeartbeatReq other) {
__isset_bitfield = other.__isset_bitfield;
this.heartbeatTimestamp = other.heartbeatTimestamp;
this.needJudgeLeader = other.needJudgeLeader;
this.needSamplingLoad = other.needSamplingLoad;
this.timeSeriesQuotaRemain = other.timeSeriesQuotaRemain;
if (other.isSetSchemaRegionIds()) {
java.util.List __this__schemaRegionIds = new java.util.ArrayList(other.schemaRegionIds);
this.schemaRegionIds = __this__schemaRegionIds;
}
if (other.isSetDataRegionIds()) {
java.util.List __this__dataRegionIds = new java.util.ArrayList(other.dataRegionIds);
this.dataRegionIds = __this__dataRegionIds;
}
if (other.isSetSpaceQuotaUsage()) {
java.util.Map __this__spaceQuotaUsage = new java.util.HashMap(other.spaceQuotaUsage.size());
for (java.util.Map.Entry other_element : other.spaceQuotaUsage.entrySet()) {
java.lang.String other_element_key = other_element.getKey();
org.apache.iotdb.common.rpc.thrift.TSpaceQuota other_element_value = other_element.getValue();
java.lang.String __this__spaceQuotaUsage_copy_key = other_element_key;
org.apache.iotdb.common.rpc.thrift.TSpaceQuota __this__spaceQuotaUsage_copy_value = new org.apache.iotdb.common.rpc.thrift.TSpaceQuota(other_element_value);
__this__spaceQuotaUsage.put(__this__spaceQuotaUsage_copy_key, __this__spaceQuotaUsage_copy_value);
}
this.spaceQuotaUsage = __this__spaceQuotaUsage;
}
this.needPipeMetaList = other.needPipeMetaList;
this.deviceQuotaRemain = other.deviceQuotaRemain;
if (other.isSetActivation()) {
this.activation = new TDataNodeActivation(other.activation);
}
if (other.isSetConfigNodeEndPoints()) {
java.util.Set __this__configNodeEndPoints = new java.util.HashSet(other.configNodeEndPoints.size());
for (org.apache.iotdb.common.rpc.thrift.TEndPoint other_element : other.configNodeEndPoints) {
__this__configNodeEndPoints.add(new org.apache.iotdb.common.rpc.thrift.TEndPoint(other_element));
}
this.configNodeEndPoints = __this__configNodeEndPoints;
}
}
public TDataNodeHeartbeatReq deepCopy() {
return new TDataNodeHeartbeatReq(this);
}
@Override
public void clear() {
setHeartbeatTimestampIsSet(false);
this.heartbeatTimestamp = 0;
setNeedJudgeLeaderIsSet(false);
this.needJudgeLeader = false;
setNeedSamplingLoadIsSet(false);
this.needSamplingLoad = false;
setTimeSeriesQuotaRemainIsSet(false);
this.timeSeriesQuotaRemain = 0;
this.schemaRegionIds = null;
this.dataRegionIds = null;
this.spaceQuotaUsage = null;
setNeedPipeMetaListIsSet(false);
this.needPipeMetaList = false;
setDeviceQuotaRemainIsSet(false);
this.deviceQuotaRemain = 0;
this.activation = null;
this.configNodeEndPoints = null;
}
public long getHeartbeatTimestamp() {
return this.heartbeatTimestamp;
}
public TDataNodeHeartbeatReq setHeartbeatTimestamp(long heartbeatTimestamp) {
this.heartbeatTimestamp = heartbeatTimestamp;
setHeartbeatTimestampIsSet(true);
return this;
}
public void unsetHeartbeatTimestamp() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __HEARTBEATTIMESTAMP_ISSET_ID);
}
/** Returns true if field heartbeatTimestamp is set (has been assigned a value) and false otherwise */
public boolean isSetHeartbeatTimestamp() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __HEARTBEATTIMESTAMP_ISSET_ID);
}
public void setHeartbeatTimestampIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __HEARTBEATTIMESTAMP_ISSET_ID, value);
}
public boolean isNeedJudgeLeader() {
return this.needJudgeLeader;
}
public TDataNodeHeartbeatReq setNeedJudgeLeader(boolean needJudgeLeader) {
this.needJudgeLeader = needJudgeLeader;
setNeedJudgeLeaderIsSet(true);
return this;
}
public void unsetNeedJudgeLeader() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __NEEDJUDGELEADER_ISSET_ID);
}
/** Returns true if field needJudgeLeader is set (has been assigned a value) and false otherwise */
public boolean isSetNeedJudgeLeader() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __NEEDJUDGELEADER_ISSET_ID);
}
public void setNeedJudgeLeaderIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __NEEDJUDGELEADER_ISSET_ID, value);
}
public boolean isNeedSamplingLoad() {
return this.needSamplingLoad;
}
public TDataNodeHeartbeatReq setNeedSamplingLoad(boolean needSamplingLoad) {
this.needSamplingLoad = needSamplingLoad;
setNeedSamplingLoadIsSet(true);
return this;
}
public void unsetNeedSamplingLoad() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __NEEDSAMPLINGLOAD_ISSET_ID);
}
/** Returns true if field needSamplingLoad is set (has been assigned a value) and false otherwise */
public boolean isSetNeedSamplingLoad() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __NEEDSAMPLINGLOAD_ISSET_ID);
}
public void setNeedSamplingLoadIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __NEEDSAMPLINGLOAD_ISSET_ID, value);
}
public long getTimeSeriesQuotaRemain() {
return this.timeSeriesQuotaRemain;
}
public TDataNodeHeartbeatReq setTimeSeriesQuotaRemain(long timeSeriesQuotaRemain) {
this.timeSeriesQuotaRemain = timeSeriesQuotaRemain;
setTimeSeriesQuotaRemainIsSet(true);
return this;
}
public void unsetTimeSeriesQuotaRemain() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMESERIESQUOTAREMAIN_ISSET_ID);
}
/** Returns true if field timeSeriesQuotaRemain is set (has been assigned a value) and false otherwise */
public boolean isSetTimeSeriesQuotaRemain() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMESERIESQUOTAREMAIN_ISSET_ID);
}
public void setTimeSeriesQuotaRemainIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMESERIESQUOTAREMAIN_ISSET_ID, value);
}
public int getSchemaRegionIdsSize() {
return (this.schemaRegionIds == null) ? 0 : this.schemaRegionIds.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator getSchemaRegionIdsIterator() {
return (this.schemaRegionIds == null) ? null : this.schemaRegionIds.iterator();
}
public void addToSchemaRegionIds(int elem) {
if (this.schemaRegionIds == null) {
this.schemaRegionIds = new java.util.ArrayList();
}
this.schemaRegionIds.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List getSchemaRegionIds() {
return this.schemaRegionIds;
}
public TDataNodeHeartbeatReq setSchemaRegionIds(@org.apache.thrift.annotation.Nullable java.util.List schemaRegionIds) {
this.schemaRegionIds = schemaRegionIds;
return this;
}
public void unsetSchemaRegionIds() {
this.schemaRegionIds = null;
}
/** Returns true if field schemaRegionIds is set (has been assigned a value) and false otherwise */
public boolean isSetSchemaRegionIds() {
return this.schemaRegionIds != null;
}
public void setSchemaRegionIdsIsSet(boolean value) {
if (!value) {
this.schemaRegionIds = null;
}
}
public int getDataRegionIdsSize() {
return (this.dataRegionIds == null) ? 0 : this.dataRegionIds.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator getDataRegionIdsIterator() {
return (this.dataRegionIds == null) ? null : this.dataRegionIds.iterator();
}
public void addToDataRegionIds(int elem) {
if (this.dataRegionIds == null) {
this.dataRegionIds = new java.util.ArrayList();
}
this.dataRegionIds.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List getDataRegionIds() {
return this.dataRegionIds;
}
public TDataNodeHeartbeatReq setDataRegionIds(@org.apache.thrift.annotation.Nullable java.util.List dataRegionIds) {
this.dataRegionIds = dataRegionIds;
return this;
}
public void unsetDataRegionIds() {
this.dataRegionIds = null;
}
/** Returns true if field dataRegionIds is set (has been assigned a value) and false otherwise */
public boolean isSetDataRegionIds() {
return this.dataRegionIds != null;
}
public void setDataRegionIdsIsSet(boolean value) {
if (!value) {
this.dataRegionIds = null;
}
}
public int getSpaceQuotaUsageSize() {
return (this.spaceQuotaUsage == null) ? 0 : this.spaceQuotaUsage.size();
}
public void putToSpaceQuotaUsage(java.lang.String key, org.apache.iotdb.common.rpc.thrift.TSpaceQuota val) {
if (this.spaceQuotaUsage == null) {
this.spaceQuotaUsage = new java.util.HashMap();
}
this.spaceQuotaUsage.put(key, val);
}
@org.apache.thrift.annotation.Nullable
public java.util.Map getSpaceQuotaUsage() {
return this.spaceQuotaUsage;
}
public TDataNodeHeartbeatReq setSpaceQuotaUsage(@org.apache.thrift.annotation.Nullable java.util.Map spaceQuotaUsage) {
this.spaceQuotaUsage = spaceQuotaUsage;
return this;
}
public void unsetSpaceQuotaUsage() {
this.spaceQuotaUsage = null;
}
/** Returns true if field spaceQuotaUsage is set (has been assigned a value) and false otherwise */
public boolean isSetSpaceQuotaUsage() {
return this.spaceQuotaUsage != null;
}
public void setSpaceQuotaUsageIsSet(boolean value) {
if (!value) {
this.spaceQuotaUsage = null;
}
}
public boolean isNeedPipeMetaList() {
return this.needPipeMetaList;
}
public TDataNodeHeartbeatReq setNeedPipeMetaList(boolean needPipeMetaList) {
this.needPipeMetaList = needPipeMetaList;
setNeedPipeMetaListIsSet(true);
return this;
}
public void unsetNeedPipeMetaList() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __NEEDPIPEMETALIST_ISSET_ID);
}
/** Returns true if field needPipeMetaList is set (has been assigned a value) and false otherwise */
public boolean isSetNeedPipeMetaList() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __NEEDPIPEMETALIST_ISSET_ID);
}
public void setNeedPipeMetaListIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __NEEDPIPEMETALIST_ISSET_ID, value);
}
public long getDeviceQuotaRemain() {
return this.deviceQuotaRemain;
}
public TDataNodeHeartbeatReq setDeviceQuotaRemain(long deviceQuotaRemain) {
this.deviceQuotaRemain = deviceQuotaRemain;
setDeviceQuotaRemainIsSet(true);
return this;
}
public void unsetDeviceQuotaRemain() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __DEVICEQUOTAREMAIN_ISSET_ID);
}
/** Returns true if field deviceQuotaRemain is set (has been assigned a value) and false otherwise */
public boolean isSetDeviceQuotaRemain() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DEVICEQUOTAREMAIN_ISSET_ID);
}
public void setDeviceQuotaRemainIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DEVICEQUOTAREMAIN_ISSET_ID, value);
}
@org.apache.thrift.annotation.Nullable
public TDataNodeActivation getActivation() {
return this.activation;
}
public TDataNodeHeartbeatReq setActivation(@org.apache.thrift.annotation.Nullable TDataNodeActivation activation) {
this.activation = activation;
return this;
}
public void unsetActivation() {
this.activation = null;
}
/** Returns true if field activation is set (has been assigned a value) and false otherwise */
public boolean isSetActivation() {
return this.activation != null;
}
public void setActivationIsSet(boolean value) {
if (!value) {
this.activation = null;
}
}
public int getConfigNodeEndPointsSize() {
return (this.configNodeEndPoints == null) ? 0 : this.configNodeEndPoints.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator getConfigNodeEndPointsIterator() {
return (this.configNodeEndPoints == null) ? null : this.configNodeEndPoints.iterator();
}
public void addToConfigNodeEndPoints(org.apache.iotdb.common.rpc.thrift.TEndPoint elem) {
if (this.configNodeEndPoints == null) {
this.configNodeEndPoints = new java.util.HashSet();
}
this.configNodeEndPoints.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.Set getConfigNodeEndPoints() {
return this.configNodeEndPoints;
}
public TDataNodeHeartbeatReq setConfigNodeEndPoints(@org.apache.thrift.annotation.Nullable java.util.Set configNodeEndPoints) {
this.configNodeEndPoints = configNodeEndPoints;
return this;
}
public void unsetConfigNodeEndPoints() {
this.configNodeEndPoints = null;
}
/** Returns true if field configNodeEndPoints is set (has been assigned a value) and false otherwise */
public boolean isSetConfigNodeEndPoints() {
return this.configNodeEndPoints != null;
}
public void setConfigNodeEndPointsIsSet(boolean value) {
if (!value) {
this.configNodeEndPoints = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case HEARTBEAT_TIMESTAMP:
if (value == null) {
unsetHeartbeatTimestamp();
} else {
setHeartbeatTimestamp((java.lang.Long)value);
}
break;
case NEED_JUDGE_LEADER:
if (value == null) {
unsetNeedJudgeLeader();
} else {
setNeedJudgeLeader((java.lang.Boolean)value);
}
break;
case NEED_SAMPLING_LOAD:
if (value == null) {
unsetNeedSamplingLoad();
} else {
setNeedSamplingLoad((java.lang.Boolean)value);
}
break;
case TIME_SERIES_QUOTA_REMAIN:
if (value == null) {
unsetTimeSeriesQuotaRemain();
} else {
setTimeSeriesQuotaRemain((java.lang.Long)value);
}
break;
case SCHEMA_REGION_IDS:
if (value == null) {
unsetSchemaRegionIds();
} else {
setSchemaRegionIds((java.util.List)value);
}
break;
case DATA_REGION_IDS:
if (value == null) {
unsetDataRegionIds();
} else {
setDataRegionIds((java.util.List)value);
}
break;
case SPACE_QUOTA_USAGE:
if (value == null) {
unsetSpaceQuotaUsage();
} else {
setSpaceQuotaUsage((java.util.Map)value);
}
break;
case NEED_PIPE_META_LIST:
if (value == null) {
unsetNeedPipeMetaList();
} else {
setNeedPipeMetaList((java.lang.Boolean)value);
}
break;
case DEVICE_QUOTA_REMAIN:
if (value == null) {
unsetDeviceQuotaRemain();
} else {
setDeviceQuotaRemain((java.lang.Long)value);
}
break;
case ACTIVATION:
if (value == null) {
unsetActivation();
} else {
setActivation((TDataNodeActivation)value);
}
break;
case CONFIG_NODE_END_POINTS:
if (value == null) {
unsetConfigNodeEndPoints();
} else {
setConfigNodeEndPoints((java.util.Set)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case HEARTBEAT_TIMESTAMP:
return getHeartbeatTimestamp();
case NEED_JUDGE_LEADER:
return isNeedJudgeLeader();
case NEED_SAMPLING_LOAD:
return isNeedSamplingLoad();
case TIME_SERIES_QUOTA_REMAIN:
return getTimeSeriesQuotaRemain();
case SCHEMA_REGION_IDS:
return getSchemaRegionIds();
case DATA_REGION_IDS:
return getDataRegionIds();
case SPACE_QUOTA_USAGE:
return getSpaceQuotaUsage();
case NEED_PIPE_META_LIST:
return isNeedPipeMetaList();
case DEVICE_QUOTA_REMAIN:
return getDeviceQuotaRemain();
case ACTIVATION:
return getActivation();
case CONFIG_NODE_END_POINTS:
return getConfigNodeEndPoints();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case HEARTBEAT_TIMESTAMP:
return isSetHeartbeatTimestamp();
case NEED_JUDGE_LEADER:
return isSetNeedJudgeLeader();
case NEED_SAMPLING_LOAD:
return isSetNeedSamplingLoad();
case TIME_SERIES_QUOTA_REMAIN:
return isSetTimeSeriesQuotaRemain();
case SCHEMA_REGION_IDS:
return isSetSchemaRegionIds();
case DATA_REGION_IDS:
return isSetDataRegionIds();
case SPACE_QUOTA_USAGE:
return isSetSpaceQuotaUsage();
case NEED_PIPE_META_LIST:
return isSetNeedPipeMetaList();
case DEVICE_QUOTA_REMAIN:
return isSetDeviceQuotaRemain();
case ACTIVATION:
return isSetActivation();
case CONFIG_NODE_END_POINTS:
return isSetConfigNodeEndPoints();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TDataNodeHeartbeatReq)
return this.equals((TDataNodeHeartbeatReq)that);
return false;
}
public boolean equals(TDataNodeHeartbeatReq that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_heartbeatTimestamp = true;
boolean that_present_heartbeatTimestamp = true;
if (this_present_heartbeatTimestamp || that_present_heartbeatTimestamp) {
if (!(this_present_heartbeatTimestamp && that_present_heartbeatTimestamp))
return false;
if (this.heartbeatTimestamp != that.heartbeatTimestamp)
return false;
}
boolean this_present_needJudgeLeader = true;
boolean that_present_needJudgeLeader = true;
if (this_present_needJudgeLeader || that_present_needJudgeLeader) {
if (!(this_present_needJudgeLeader && that_present_needJudgeLeader))
return false;
if (this.needJudgeLeader != that.needJudgeLeader)
return false;
}
boolean this_present_needSamplingLoad = true;
boolean that_present_needSamplingLoad = true;
if (this_present_needSamplingLoad || that_present_needSamplingLoad) {
if (!(this_present_needSamplingLoad && that_present_needSamplingLoad))
return false;
if (this.needSamplingLoad != that.needSamplingLoad)
return false;
}
boolean this_present_timeSeriesQuotaRemain = true;
boolean that_present_timeSeriesQuotaRemain = true;
if (this_present_timeSeriesQuotaRemain || that_present_timeSeriesQuotaRemain) {
if (!(this_present_timeSeriesQuotaRemain && that_present_timeSeriesQuotaRemain))
return false;
if (this.timeSeriesQuotaRemain != that.timeSeriesQuotaRemain)
return false;
}
boolean this_present_schemaRegionIds = true && this.isSetSchemaRegionIds();
boolean that_present_schemaRegionIds = true && that.isSetSchemaRegionIds();
if (this_present_schemaRegionIds || that_present_schemaRegionIds) {
if (!(this_present_schemaRegionIds && that_present_schemaRegionIds))
return false;
if (!this.schemaRegionIds.equals(that.schemaRegionIds))
return false;
}
boolean this_present_dataRegionIds = true && this.isSetDataRegionIds();
boolean that_present_dataRegionIds = true && that.isSetDataRegionIds();
if (this_present_dataRegionIds || that_present_dataRegionIds) {
if (!(this_present_dataRegionIds && that_present_dataRegionIds))
return false;
if (!this.dataRegionIds.equals(that.dataRegionIds))
return false;
}
boolean this_present_spaceQuotaUsage = true && this.isSetSpaceQuotaUsage();
boolean that_present_spaceQuotaUsage = true && that.isSetSpaceQuotaUsage();
if (this_present_spaceQuotaUsage || that_present_spaceQuotaUsage) {
if (!(this_present_spaceQuotaUsage && that_present_spaceQuotaUsage))
return false;
if (!this.spaceQuotaUsage.equals(that.spaceQuotaUsage))
return false;
}
boolean this_present_needPipeMetaList = true && this.isSetNeedPipeMetaList();
boolean that_present_needPipeMetaList = true && that.isSetNeedPipeMetaList();
if (this_present_needPipeMetaList || that_present_needPipeMetaList) {
if (!(this_present_needPipeMetaList && that_present_needPipeMetaList))
return false;
if (this.needPipeMetaList != that.needPipeMetaList)
return false;
}
boolean this_present_deviceQuotaRemain = true && this.isSetDeviceQuotaRemain();
boolean that_present_deviceQuotaRemain = true && that.isSetDeviceQuotaRemain();
if (this_present_deviceQuotaRemain || that_present_deviceQuotaRemain) {
if (!(this_present_deviceQuotaRemain && that_present_deviceQuotaRemain))
return false;
if (this.deviceQuotaRemain != that.deviceQuotaRemain)
return false;
}
boolean this_present_activation = true && this.isSetActivation();
boolean that_present_activation = true && that.isSetActivation();
if (this_present_activation || that_present_activation) {
if (!(this_present_activation && that_present_activation))
return false;
if (!this.activation.equals(that.activation))
return false;
}
boolean this_present_configNodeEndPoints = true && this.isSetConfigNodeEndPoints();
boolean that_present_configNodeEndPoints = true && that.isSetConfigNodeEndPoints();
if (this_present_configNodeEndPoints || that_present_configNodeEndPoints) {
if (!(this_present_configNodeEndPoints && that_present_configNodeEndPoints))
return false;
if (!this.configNodeEndPoints.equals(that.configNodeEndPoints))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(heartbeatTimestamp);
hashCode = hashCode * 8191 + ((needJudgeLeader) ? 131071 : 524287);
hashCode = hashCode * 8191 + ((needSamplingLoad) ? 131071 : 524287);
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timeSeriesQuotaRemain);
hashCode = hashCode * 8191 + ((isSetSchemaRegionIds()) ? 131071 : 524287);
if (isSetSchemaRegionIds())
hashCode = hashCode * 8191 + schemaRegionIds.hashCode();
hashCode = hashCode * 8191 + ((isSetDataRegionIds()) ? 131071 : 524287);
if (isSetDataRegionIds())
hashCode = hashCode * 8191 + dataRegionIds.hashCode();
hashCode = hashCode * 8191 + ((isSetSpaceQuotaUsage()) ? 131071 : 524287);
if (isSetSpaceQuotaUsage())
hashCode = hashCode * 8191 + spaceQuotaUsage.hashCode();
hashCode = hashCode * 8191 + ((isSetNeedPipeMetaList()) ? 131071 : 524287);
if (isSetNeedPipeMetaList())
hashCode = hashCode * 8191 + ((needPipeMetaList) ? 131071 : 524287);
hashCode = hashCode * 8191 + ((isSetDeviceQuotaRemain()) ? 131071 : 524287);
if (isSetDeviceQuotaRemain())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(deviceQuotaRemain);
hashCode = hashCode * 8191 + ((isSetActivation()) ? 131071 : 524287);
if (isSetActivation())
hashCode = hashCode * 8191 + activation.hashCode();
hashCode = hashCode * 8191 + ((isSetConfigNodeEndPoints()) ? 131071 : 524287);
if (isSetConfigNodeEndPoints())
hashCode = hashCode * 8191 + configNodeEndPoints.hashCode();
return hashCode;
}
@Override
public int compareTo(TDataNodeHeartbeatReq other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetHeartbeatTimestamp(), other.isSetHeartbeatTimestamp());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetHeartbeatTimestamp()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.heartbeatTimestamp, other.heartbeatTimestamp);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetNeedJudgeLeader(), other.isSetNeedJudgeLeader());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetNeedJudgeLeader()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.needJudgeLeader, other.needJudgeLeader);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetNeedSamplingLoad(), other.isSetNeedSamplingLoad());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetNeedSamplingLoad()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.needSamplingLoad, other.needSamplingLoad);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetTimeSeriesQuotaRemain(), other.isSetTimeSeriesQuotaRemain());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTimeSeriesQuotaRemain()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeSeriesQuotaRemain, other.timeSeriesQuotaRemain);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetSchemaRegionIds(), other.isSetSchemaRegionIds());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSchemaRegionIds()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.schemaRegionIds, other.schemaRegionIds);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetDataRegionIds(), other.isSetDataRegionIds());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDataRegionIds()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataRegionIds, other.dataRegionIds);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetSpaceQuotaUsage(), other.isSetSpaceQuotaUsage());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSpaceQuotaUsage()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.spaceQuotaUsage, other.spaceQuotaUsage);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetNeedPipeMetaList(), other.isSetNeedPipeMetaList());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetNeedPipeMetaList()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.needPipeMetaList, other.needPipeMetaList);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetDeviceQuotaRemain(), other.isSetDeviceQuotaRemain());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDeviceQuotaRemain()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deviceQuotaRemain, other.deviceQuotaRemain);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetActivation(), other.isSetActivation());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetActivation()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.activation, other.activation);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetConfigNodeEndPoints(), other.isSetConfigNodeEndPoints());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetConfigNodeEndPoints()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.configNodeEndPoints, other.configNodeEndPoints);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("TDataNodeHeartbeatReq(");
boolean first = true;
sb.append("heartbeatTimestamp:");
sb.append(this.heartbeatTimestamp);
first = false;
if (!first) sb.append(", ");
sb.append("needJudgeLeader:");
sb.append(this.needJudgeLeader);
first = false;
if (!first) sb.append(", ");
sb.append("needSamplingLoad:");
sb.append(this.needSamplingLoad);
first = false;
if (!first) sb.append(", ");
sb.append("timeSeriesQuotaRemain:");
sb.append(this.timeSeriesQuotaRemain);
first = false;
if (isSetSchemaRegionIds()) {
if (!first) sb.append(", ");
sb.append("schemaRegionIds:");
if (this.schemaRegionIds == null) {
sb.append("null");
} else {
sb.append(this.schemaRegionIds);
}
first = false;
}
if (isSetDataRegionIds()) {
if (!first) sb.append(", ");
sb.append("dataRegionIds:");
if (this.dataRegionIds == null) {
sb.append("null");
} else {
sb.append(this.dataRegionIds);
}
first = false;
}
if (isSetSpaceQuotaUsage()) {
if (!first) sb.append(", ");
sb.append("spaceQuotaUsage:");
if (this.spaceQuotaUsage == null) {
sb.append("null");
} else {
sb.append(this.spaceQuotaUsage);
}
first = false;
}
if (isSetNeedPipeMetaList()) {
if (!first) sb.append(", ");
sb.append("needPipeMetaList:");
sb.append(this.needPipeMetaList);
first = false;
}
if (isSetDeviceQuotaRemain()) {
if (!first) sb.append(", ");
sb.append("deviceQuotaRemain:");
sb.append(this.deviceQuotaRemain);
first = false;
}
if (isSetActivation()) {
if (!first) sb.append(", ");
sb.append("activation:");
if (this.activation == null) {
sb.append("null");
} else {
sb.append(this.activation);
}
first = false;
}
if (isSetConfigNodeEndPoints()) {
if (!first) sb.append(", ");
sb.append("configNodeEndPoints:");
if (this.configNodeEndPoints == null) {
sb.append("null");
} else {
sb.append(this.configNodeEndPoints);
}
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// alas, we cannot check 'heartbeatTimestamp' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'needJudgeLeader' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'needSamplingLoad' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'timeSeriesQuotaRemain' because it's a primitive and you chose the non-beans generator.
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
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 TDataNodeHeartbeatReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TDataNodeHeartbeatReqStandardScheme getScheme() {
return new TDataNodeHeartbeatReqStandardScheme();
}
}
private static class TDataNodeHeartbeatReqStandardScheme extends org.apache.thrift.scheme.StandardScheme {
public void read(org.apache.thrift.protocol.TProtocol iprot, TDataNodeHeartbeatReq 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: // HEARTBEAT_TIMESTAMP
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.heartbeatTimestamp = iprot.readI64();
struct.setHeartbeatTimestampIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // NEED_JUDGE_LEADER
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.needJudgeLeader = iprot.readBool();
struct.setNeedJudgeLeaderIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // NEED_SAMPLING_LOAD
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.needSamplingLoad = iprot.readBool();
struct.setNeedSamplingLoadIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // TIME_SERIES_QUOTA_REMAIN
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.timeSeriesQuotaRemain = iprot.readI64();
struct.setTimeSeriesQuotaRemainIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // SCHEMA_REGION_IDS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list82 = iprot.readListBegin();
struct.schemaRegionIds = new java.util.ArrayList(_list82.size);
int _elem83;
for (int _i84 = 0; _i84 < _list82.size; ++_i84)
{
_elem83 = iprot.readI32();
struct.schemaRegionIds.add(_elem83);
}
iprot.readListEnd();
}
struct.setSchemaRegionIdsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // DATA_REGION_IDS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list85 = iprot.readListBegin();
struct.dataRegionIds = new java.util.ArrayList(_list85.size);
int _elem86;
for (int _i87 = 0; _i87 < _list85.size; ++_i87)
{
_elem86 = iprot.readI32();
struct.dataRegionIds.add(_elem86);
}
iprot.readListEnd();
}
struct.setDataRegionIdsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // SPACE_QUOTA_USAGE
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map88 = iprot.readMapBegin();
struct.spaceQuotaUsage = new java.util.HashMap(2*_map88.size);
@org.apache.thrift.annotation.Nullable java.lang.String _key89;
@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSpaceQuota _val90;
for (int _i91 = 0; _i91 < _map88.size; ++_i91)
{
_key89 = iprot.readString();
_val90 = new org.apache.iotdb.common.rpc.thrift.TSpaceQuota();
_val90.read(iprot);
struct.spaceQuotaUsage.put(_key89, _val90);
}
iprot.readMapEnd();
}
struct.setSpaceQuotaUsageIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 8: // NEED_PIPE_META_LIST
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.needPipeMetaList = iprot.readBool();
struct.setNeedPipeMetaListIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 9: // DEVICE_QUOTA_REMAIN
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.deviceQuotaRemain = iprot.readI64();
struct.setDeviceQuotaRemainIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 10: // ACTIVATION
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.activation = new TDataNodeActivation();
struct.activation.read(iprot);
struct.setActivationIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 11: // CONFIG_NODE_END_POINTS
if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
{
org.apache.thrift.protocol.TSet _set92 = iprot.readSetBegin();
struct.configNodeEndPoints = new java.util.HashSet(2*_set92.size);
@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TEndPoint _elem93;
for (int _i94 = 0; _i94 < _set92.size; ++_i94)
{
_elem93 = new org.apache.iotdb.common.rpc.thrift.TEndPoint();
_elem93.read(iprot);
struct.configNodeEndPoints.add(_elem93);
}
iprot.readSetEnd();
}
struct.setConfigNodeEndPointsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
if (!struct.isSetHeartbeatTimestamp()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'heartbeatTimestamp' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetNeedJudgeLeader()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'needJudgeLeader' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetNeedSamplingLoad()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'needSamplingLoad' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetTimeSeriesQuotaRemain()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'timeSeriesQuotaRemain' was not found in serialized data! Struct: " + toString());
}
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, TDataNodeHeartbeatReq struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(HEARTBEAT_TIMESTAMP_FIELD_DESC);
oprot.writeI64(struct.heartbeatTimestamp);
oprot.writeFieldEnd();
oprot.writeFieldBegin(NEED_JUDGE_LEADER_FIELD_DESC);
oprot.writeBool(struct.needJudgeLeader);
oprot.writeFieldEnd();
oprot.writeFieldBegin(NEED_SAMPLING_LOAD_FIELD_DESC);
oprot.writeBool(struct.needSamplingLoad);
oprot.writeFieldEnd();
oprot.writeFieldBegin(TIME_SERIES_QUOTA_REMAIN_FIELD_DESC);
oprot.writeI64(struct.timeSeriesQuotaRemain);
oprot.writeFieldEnd();
if (struct.schemaRegionIds != null) {
if (struct.isSetSchemaRegionIds()) {
oprot.writeFieldBegin(SCHEMA_REGION_IDS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.schemaRegionIds.size()));
for (int _iter95 : struct.schemaRegionIds)
{
oprot.writeI32(_iter95);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.dataRegionIds != null) {
if (struct.isSetDataRegionIds()) {
oprot.writeFieldBegin(DATA_REGION_IDS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.dataRegionIds.size()));
for (int _iter96 : struct.dataRegionIds)
{
oprot.writeI32(_iter96);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.spaceQuotaUsage != null) {
if (struct.isSetSpaceQuotaUsage()) {
oprot.writeFieldBegin(SPACE_QUOTA_USAGE_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.spaceQuotaUsage.size()));
for (java.util.Map.Entry _iter97 : struct.spaceQuotaUsage.entrySet())
{
oprot.writeString(_iter97.getKey());
_iter97.getValue().write(oprot);
}
oprot.writeMapEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.isSetNeedPipeMetaList()) {
oprot.writeFieldBegin(NEED_PIPE_META_LIST_FIELD_DESC);
oprot.writeBool(struct.needPipeMetaList);
oprot.writeFieldEnd();
}
if (struct.isSetDeviceQuotaRemain()) {
oprot.writeFieldBegin(DEVICE_QUOTA_REMAIN_FIELD_DESC);
oprot.writeI64(struct.deviceQuotaRemain);
oprot.writeFieldEnd();
}
if (struct.activation != null) {
if (struct.isSetActivation()) {
oprot.writeFieldBegin(ACTIVATION_FIELD_DESC);
struct.activation.write(oprot);
oprot.writeFieldEnd();
}
}
if (struct.configNodeEndPoints != null) {
if (struct.isSetConfigNodeEndPoints()) {
oprot.writeFieldBegin(CONFIG_NODE_END_POINTS_FIELD_DESC);
{
oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, struct.configNodeEndPoints.size()));
for (org.apache.iotdb.common.rpc.thrift.TEndPoint _iter98 : struct.configNodeEndPoints)
{
_iter98.write(oprot);
}
oprot.writeSetEnd();
}
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TDataNodeHeartbeatReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TDataNodeHeartbeatReqTupleScheme getScheme() {
return new TDataNodeHeartbeatReqTupleScheme();
}
}
private static class TDataNodeHeartbeatReqTupleScheme extends org.apache.thrift.scheme.TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TDataNodeHeartbeatReq struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI64(struct.heartbeatTimestamp);
oprot.writeBool(struct.needJudgeLeader);
oprot.writeBool(struct.needSamplingLoad);
oprot.writeI64(struct.timeSeriesQuotaRemain);
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSchemaRegionIds()) {
optionals.set(0);
}
if (struct.isSetDataRegionIds()) {
optionals.set(1);
}
if (struct.isSetSpaceQuotaUsage()) {
optionals.set(2);
}
if (struct.isSetNeedPipeMetaList()) {
optionals.set(3);
}
if (struct.isSetDeviceQuotaRemain()) {
optionals.set(4);
}
if (struct.isSetActivation()) {
optionals.set(5);
}
if (struct.isSetConfigNodeEndPoints()) {
optionals.set(6);
}
oprot.writeBitSet(optionals, 7);
if (struct.isSetSchemaRegionIds()) {
{
oprot.writeI32(struct.schemaRegionIds.size());
for (int _iter99 : struct.schemaRegionIds)
{
oprot.writeI32(_iter99);
}
}
}
if (struct.isSetDataRegionIds()) {
{
oprot.writeI32(struct.dataRegionIds.size());
for (int _iter100 : struct.dataRegionIds)
{
oprot.writeI32(_iter100);
}
}
}
if (struct.isSetSpaceQuotaUsage()) {
{
oprot.writeI32(struct.spaceQuotaUsage.size());
for (java.util.Map.Entry _iter101 : struct.spaceQuotaUsage.entrySet())
{
oprot.writeString(_iter101.getKey());
_iter101.getValue().write(oprot);
}
}
}
if (struct.isSetNeedPipeMetaList()) {
oprot.writeBool(struct.needPipeMetaList);
}
if (struct.isSetDeviceQuotaRemain()) {
oprot.writeI64(struct.deviceQuotaRemain);
}
if (struct.isSetActivation()) {
struct.activation.write(oprot);
}
if (struct.isSetConfigNodeEndPoints()) {
{
oprot.writeI32(struct.configNodeEndPoints.size());
for (org.apache.iotdb.common.rpc.thrift.TEndPoint _iter102 : struct.configNodeEndPoints)
{
_iter102.write(oprot);
}
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TDataNodeHeartbeatReq struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.heartbeatTimestamp = iprot.readI64();
struct.setHeartbeatTimestampIsSet(true);
struct.needJudgeLeader = iprot.readBool();
struct.setNeedJudgeLeaderIsSet(true);
struct.needSamplingLoad = iprot.readBool();
struct.setNeedSamplingLoadIsSet(true);
struct.timeSeriesQuotaRemain = iprot.readI64();
struct.setTimeSeriesQuotaRemainIsSet(true);
java.util.BitSet incoming = iprot.readBitSet(7);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list103 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32);
struct.schemaRegionIds = new java.util.ArrayList(_list103.size);
int _elem104;
for (int _i105 = 0; _i105 < _list103.size; ++_i105)
{
_elem104 = iprot.readI32();
struct.schemaRegionIds.add(_elem104);
}
}
struct.setSchemaRegionIdsIsSet(true);
}
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TList _list106 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32);
struct.dataRegionIds = new java.util.ArrayList(_list106.size);
int _elem107;
for (int _i108 = 0; _i108 < _list106.size; ++_i108)
{
_elem107 = iprot.readI32();
struct.dataRegionIds.add(_elem107);
}
}
struct.setDataRegionIdsIsSet(true);
}
if (incoming.get(2)) {
{
org.apache.thrift.protocol.TMap _map109 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT);
struct.spaceQuotaUsage = new java.util.HashMap(2*_map109.size);
@org.apache.thrift.annotation.Nullable java.lang.String _key110;
@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSpaceQuota _val111;
for (int _i112 = 0; _i112 < _map109.size; ++_i112)
{
_key110 = iprot.readString();
_val111 = new org.apache.iotdb.common.rpc.thrift.TSpaceQuota();
_val111.read(iprot);
struct.spaceQuotaUsage.put(_key110, _val111);
}
}
struct.setSpaceQuotaUsageIsSet(true);
}
if (incoming.get(3)) {
struct.needPipeMetaList = iprot.readBool();
struct.setNeedPipeMetaListIsSet(true);
}
if (incoming.get(4)) {
struct.deviceQuotaRemain = iprot.readI64();
struct.setDeviceQuotaRemainIsSet(true);
}
if (incoming.get(5)) {
struct.activation = new TDataNodeActivation();
struct.activation.read(iprot);
struct.setActivationIsSet(true);
}
if (incoming.get(6)) {
{
org.apache.thrift.protocol.TSet _set113 = iprot.readSetBegin(org.apache.thrift.protocol.TType.STRUCT);
struct.configNodeEndPoints = new java.util.HashSet(2*_set113.size);
@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TEndPoint _elem114;
for (int _i115 = 0; _i115 < _set113.size; ++_i115)
{
_elem114 = new org.apache.iotdb.common.rpc.thrift.TEndPoint();
_elem114.read(iprot);
struct.configNodeEndPoints.add(_elem114);
}
}
struct.setConfigNodeEndPointsIsSet(true);
}
}
}
private static S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}