liyuheng55555 commented on code in PR #13194:
URL: https://github.com/apache/iotdb/pull/13194#discussion_r1730793076
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/IoTDBShutdownHook.java:
##########
@@ -120,7 +124,7 @@ public void run() {
try (ConfigNodeClient client =
ConfigNodeClientManager.getInstance().borrowClient(ConfigNodeInfo.CONFIG_REGION_ID))
{
isReportSuccess =
-
client.reportDataNodeShutdown(DataNode.generateDataNodeLocation()).getCode()
+ client.reportDataNodeShutdown(nodeLocation).getCode()
Review Comment:
What's the difference between "call DataNode.generateDataNodeLocation()
here" and "pass the nodeLocation in when constructing the IoTDBShutdownHook" ?
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/IoTDBShutdownHook.java:
##########
@@ -49,8 +50,11 @@ public class IoTDBShutdownHook extends Thread {
private static final Logger logger =
LoggerFactory.getLogger(IoTDBShutdownHook.class);
- public IoTDBShutdownHook() {
+ private final TDataNodeLocation nodeLocation;
+
+ public IoTDBShutdownHook(TDataNodeLocation nodeLocation) {
Review Comment:
How about rename this class to DataNodeShutDownHook? @OneSizeFitsQuorum what
do you think
--
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]