chengjianyun commented on a change in pull request #4079:
URL: https://github.com/apache/iotdb/pull/4079#discussion_r737360401
##########
File path:
cluster/src/main/java/org/apache/iotdb/cluster/server/member/MetaGroupMember.java
##########
@@ -326,59 +294,31 @@ public void start() {
@Override
void startBackGroundThreads() {
super.startBackGroundThreads();
- reportThread =
- Executors.newSingleThreadScheduledExecutor(n -> new Thread(n,
"NodeReportThread"));
- hardLinkCleanerThread =
- Executors.newSingleThreadScheduledExecutor(n -> new Thread(n,
"HardLinkCleaner"));
}
/**
- * Stop the heartbeat and catch-up thread pool, DataClusterServer,
ClientServer and reportThread.
- * Calling the method twice does not induce side effects.
+ * Stop the heartbeat and catch-up thread pool, DataClusterServer,
ClusterTSServiceImpl and
+ * reportThread. Calling the method twice does not induce side effects.
*/
@Override
public void stop() {
super.stop();
- if (getDataClusterServer() != null) {
- getDataClusterServer().stop();
- }
- if (getDataHeartbeatServer() != null) {
- getDataHeartbeatServer().stop();
- }
- if (clientServer != null) {
- clientServer.stop();
- }
- if (reportThread != null) {
- reportThread.shutdownNow();
- try {
- reportThread.awaitTermination(THREAD_POLL_WAIT_TERMINATION_TIME_S,
TimeUnit.SECONDS);
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- logger.error("Unexpected interruption when waiting for reportThread to
end", e);
- }
- }
- if (hardLinkCleanerThread != null) {
- hardLinkCleanerThread.shutdownNow();
- try {
- hardLinkCleanerThread.awaitTermination(
- THREAD_POLL_WAIT_TERMINATION_TIME_S, TimeUnit.SECONDS);
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- logger.error("Unexpected interruption when waiting for hardlinkCleaner
to end", e);
- }
- }
logger.info("{}: stopped", name);
}
+ @Override
+ public ServiceType getID() {
+ return ServiceType.CLUSTER_META_ENGINE;
+ }
+
/**
- * Start DataClusterServer and ClientServer so this node will be able to
respond to other nodes
- * and clients.
+ * Start DataClusterServer and ClusterTSServiceImpl so this node will be
able to respond to other
+ * nodes and clients.
*/
protected void initSubServers() throws TTransportException, StartupException
{
- getDataClusterServer().start();
- getDataHeartbeatServer().start();
- clientServer.setCoordinator(this.coordinator);
- clientServer.start();
+ // getDataClusterServer().start();
+ // getDataHeartbeatServer().start();
+ // TODO FIXME
}
Review comment:
Removed the empty method.
--
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]