OneSizeFitsQuorum commented on code in PR #9155:
URL: https://github.com/apache/iotdb/pull/9155#discussion_r1119517611
##########
confignode/src/main/java/org/apache/iotdb/confignode/consensus/request/write/datanode/UpdateDataNodePlan.java:
##########
@@ -30,42 +31,49 @@
public class UpdateDataNodePlan extends ConfigPhysicalPlan {
- private TDataNodeLocation dataNodeLocation;
+ private TDataNodeConfiguration dataNodeConfiguration;
public UpdateDataNodePlan() {
super(ConfigPhysicalPlanType.UpdateDataNodeConfiguration);
}
- public UpdateDataNodePlan(TDataNodeLocation datanodeLocation) {
+ public UpdateDataNodePlan(TDataNodeConfiguration dataNodeConfiguration) {
this();
- this.dataNodeLocation = datanodeLocation;
+ this.dataNodeConfiguration = dataNodeConfiguration;
}
- public TDataNodeLocation getDataNodeLocation() {
- return dataNodeLocation;
+ public TDataNodeConfiguration getDataNodeConfiguration() {
+ return dataNodeConfiguration;
}
@Override
protected void serializeImpl(DataOutputStream stream) throws IOException {
stream.writeShort(getType().getPlanType());
- ThriftCommonsSerDeUtils.serializeTDataNodeLocation(dataNodeLocation,
stream);
+
ThriftCommonsSerDeUtils.serializeTDataNodeConfiguration(dataNodeConfiguration,
stream);
}
@Override
protected void deserializeImpl(ByteBuffer buffer) {
- dataNodeLocation =
ThriftCommonsSerDeUtils.deserializeTDataNodeLocation(buffer);
+ dataNodeConfiguration =
ThriftCommonsSerDeUtils.deserializeTDataNodeConfiguration(buffer);
}
@Override
public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ if (!super.equals(o)) {
Review Comment:
What about removing this line and compare `type` directly...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]