You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@submarine.apache.org by pi...@apache.org on 2022/06/21 04:10:39 UTC

[submarine] branch master updated: SUBMARINE-1284. Remove old cluster server document and codes

This is an automated email from the ASF dual-hosted git repository.

pingsutw pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/submarine.git


The following commit(s) were added to refs/heads/master by this push:
     new 37fb8423 SUBMARINE-1284. Remove old cluster server document and codes
37fb8423 is described below

commit 37fb84235461494d9813c9a72a8719b878083fa9
Author: cdmikechen <cd...@hotmail.com>
AuthorDate: Sat Jun 18 20:48:08 2022 +0800

    SUBMARINE-1284. Remove old cluster server document and codes
    
    ### What is this PR for?
    Current document about cluster server design has been deprecated. We have deployed submarine server in k8s cloud. So that we should remove this document, relevant codes and pom references.
    
    ### What type of PR is it?
    Refactoring
    
    ### Todos
    * [x] - Remove `Cluster Server Design - High-Availability` document.
    * [x] - Remove `submarine-commons-cluster` package and related dependencies.
    
    ### What is the Jira issue?
    https://issues.apache.org/jira/browse/SUBMARINE-1284
    
    ### How should this be tested?
    Deleted code should not require unit tests.
    
    ### Screenshots (if appropriate)
    No
    
    ### Questions:
    * Do the license files need updating? No
    * Are there breaking changes for older versions? No (but we have deleted `submarine-commons-cluster`, and we should no longer need to import this package)
    * Does this need new documentation? No
    
    Author: cdmikechen <cd...@hotmail.com>
    
    Signed-off-by: Kevin <pi...@apache.org>
    
    Closes #968 from cdmikechen/SUBMARINE-1284 and squashes the following commits:
    
    ddbe855d [cdmikechen] remove submarine-clusterServer dependence
    bd4084cf [cdmikechen] Fix ci error
    861bb262 [cdmikechen] SUBMARINE-1284. Remove old cluster server document and codes
---
 .github/workflows/master.yml                       |  37 --
 submarine-commons/commons-cluster/pom.xml          | 250 ---------
 .../commons/cluster/BroadcastServiceAdapter.java   |  44 --
 .../submarine/commons/cluster/ClusterClient.java   |  86 ----
 .../submarine/commons/cluster/ClusterManager.java  | 558 ---------------------
 .../submarine/commons/cluster/ClusterMonitor.java  | 265 ----------
 .../commons/cluster/ClusterPrimitiveType.java      |  57 ---
 .../submarine/commons/cluster/ClusterServer.java   | 322 ------------
 .../commons/cluster/ClusterStateMachine.java       | 179 -------
 .../commons/cluster/UnicastServiceAdapter.java     |  42 --
 .../commons/cluster/meta/ClusterMeta.java          | 148 ------
 .../commons/cluster/meta/ClusterMetaEntity.java    |  57 ---
 .../commons/cluster/meta/ClusterMetaOperation.java |  26 -
 .../commons/cluster/meta/ClusterMetaType.java      |  25 -
 .../cluster/protocol/LocalRaftClientProtocol.java  | 163 ------
 .../cluster/protocol/LocalRaftProtocol.java        |  58 ---
 .../cluster/protocol/LocalRaftProtocolFactory.java |  57 ---
 .../cluster/protocol/LocalRaftServerProtocol.java  | 527 -------------------
 .../protocol/RaftClientMessagingProtocol.java      | 123 -----
 .../cluster/protocol/RaftMessagingProtocol.java    |  83 ---
 .../protocol/RaftServerMessagingProtocol.java      | 346 -------------
 .../commons/cluster/ClusterMultiNodeTest.java      | 186 -------
 .../src/test/resources/log4j.properties            |  24 -
 submarine-commons/pom.xml                          |   1 -
 submarine-dist/src/assembly/distribution.xml       |  11 -
 submarine-server/server-core/pom.xml               |  11 -
 .../apache/submarine/server/SubmarineServer.java   |   8 -
 .../server/manager/ExperimentTemplateManager.java  |   9 +-
 .../submarine/server/rest/ClusterRestApi.java      | 238 ---------
 .../server/SubmarineServerClusterTest.java         | 203 --------
 .../submarine/server/rest/ClusterRestApiTest.java  | 181 -------
 .../apache/submarine/rest/ClusterRestApiTest.java  |  52 --
 .../interpreter/interpreter-core/pom.xml           |   6 -
 website/docs/designDocs/implementation-notes.md    |   1 -
 .../wip-designs/submarine-clusterServer.md         | 179 -------
 website/sidebars.js                                |   1 -
 36 files changed, 4 insertions(+), 4560 deletions(-)

diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml
index 006dde47..edbb12bc 100644
--- a/.github/workflows/master.yml
+++ b/.github/workflows/master.yml
@@ -261,42 +261,6 @@ jobs:
           #Never cache local artifacts
           rm -rf ~/.m2/repository/org/apache/submarine
         if: always()
-  submarine-commons-cluster:
-    runs-on: ubuntu-latest
-    timeout-minutes: 30
-    steps:
-      - uses: actions/checkout@v2
-        with:
-          fetch-depth: 50
-      - name: Cache jacoco.exec
-        uses: actions/cache@v2
-        with:
-          path: ./submarine-commons/commons-cluster/target/jacoco.exec
-          key: ${{ runner.os }}-docker-${{ github.sha }}
-      - name: Set up JDK 1.8
-        uses: actions/setup-java@v1
-        with:
-          java-version: "1.8"
-      - name: Set up Maven 3.6.3
-        uses: stCarolas/setup-maven@v4
-        with:
-          maven-version: 3.6.3
-      - name: Check version
-        run: |
-          mvn --version
-          java -version
-      - name: Build
-        env:
-          MODULES: "-pl :submarine-commons-cluster"
-        run: |
-          echo ">>> mvn $BUILD_FLAG $MODULES -B"
-          mvn $BUILD_FLAG $MODULES -B
-      - name: Test
-        env:
-          TEST_MODULES: "-pl :submarine-commons-cluster"
-        run: |
-          echo ">>> mvn $TEST_FLAG $TEST_MODULES -B"
-          mvn $TEST_FLAG $TEST_MODULES -B
   submarine-commons-runtime:
     runs-on: ubuntu-latest
     timeout-minutes: 30
@@ -600,7 +564,6 @@ jobs:
       - submarine-server
       - submarine-client
       - submarine-commons-runtime
-      - submarine-commons-cluster
     steps:
       - uses: actions/checkout@v2
         with:
diff --git a/submarine-commons/commons-cluster/pom.xml b/submarine-commons/commons-cluster/pom.xml
deleted file mode 100644
index 04e1f066..00000000
--- a/submarine-commons/commons-cluster/pom.xml
+++ /dev/null
@@ -1,250 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
-  -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <parent>
-    <groupId>org.apache.submarine</groupId>
-    <artifactId>submarine-commons</artifactId>
-    <version>0.8.0-SNAPSHOT</version>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-  <artifactId>submarine-commons-cluster</artifactId>
-  <version>0.8.0-SNAPSHOT</version>
-  <name>Submarine: Commons Cluster</name>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.submarine</groupId>
-      <artifactId>submarine-commons-utils</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>io.atomix</groupId>
-      <artifactId>atomix</artifactId>
-      <version>${atomix.version}</version>
-      <exclusions>
-        <exclusion>
-          <groupId>org.slf4j</groupId>
-          <artifactId>slf4j-api</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-
-    <dependency>
-      <groupId>io.atomix</groupId>
-      <artifactId>atomix-raft</artifactId>
-      <version>${atomix.version}</version>
-      <exclusions>
-        <exclusion>
-          <groupId>org.slf4j</groupId>
-          <artifactId>slf4j-api</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-
-    <dependency>
-      <groupId>io.atomix</groupId>
-      <artifactId>atomix-primary-backup</artifactId>
-      <version>${atomix.version}</version>
-      <exclusions>
-        <exclusion>
-          <groupId>org.slf4j</groupId>
-          <artifactId>slf4j-api</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.commons</groupId>
-      <artifactId>commons-lang3</artifactId>
-      <version>${commons-lang3.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>commons-lang</groupId>
-      <artifactId>commons-lang</artifactId>
-      <version>${commons-lang.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>commons-configuration</groupId>
-      <artifactId>commons-configuration</artifactId>
-      <version>${commons-configuration.version}</version>
-      <exclusions>
-        <exclusion>
-          <groupId>commons-lang</groupId>
-          <artifactId>commons-lang</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>commons-logging</groupId>
-          <artifactId>commons-logging</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-api</artifactId>
-      <version>${slf4j.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-log4j12</artifactId>
-      <version>${slf4j.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>com.google.code.gson</groupId>
-      <artifactId>gson</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>commons-logging</groupId>
-      <artifactId>commons-logging</artifactId>
-    </dependency>
-
-    <!-- Test libraries -->
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>${junit.version}</version>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>org.mockito</groupId>
-      <artifactId>mockito-core</artifactId>
-      <version>${mockito.version}</version>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-shade-plugin</artifactId>
-        <version>${plugin.shade.version}</version>
-        <executions>
-          <execution>
-            <phase>package</phase>
-            <goals>
-              <goal>shade</goal>
-            </goals>
-            <configuration>
-              <outputFile>target/${project.artifactId}-${project.version}-shade.jar</outputFile>
-              <filters>
-                <filter>
-                  <artifact>*:*</artifact>
-                  <excludes>
-                    <exclude>META-INF/*.SF</exclude>
-                    <exclude>META-INF/*.DSA</exclude>
-                    <exclude>META-INF/*.RSA</exclude>
-                  </excludes>
-                </filter>
-              </filters>
-              <artifactSet>
-                <excludes>
-                  <exclude>commons-logging:commons-logging</exclude>
-                  <exclude>org.slf4j:*</exclude>
-                  <exclude>log4j:log4j</exclude>
-                </excludes>
-              </artifactSet>
-              <transformers>
-                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
-                  <mainClass>org.apache.submarine.interpreter.AbstractInterpreter</mainClass>
-                </transformer>
-                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
-              </transformers>
-              <relocations>
-                <relocation>
-                  <pattern>org</pattern>
-                  <shadedPattern>${shaded.dependency.prefix}.cluster.org</shadedPattern>
-                  <excludes>
-                    <exclude>org/apache/submarine/*</exclude>
-                    <exclude>org/apache/submarine/**/*</exclude>
-                    <exclude>org/apache/thrift/*</exclude>
-                    <exclude>org/apache/thrift/**/*</exclude>
-                    <exclude>org/slf4j/*</exclude>
-                    <exclude>org/slf4j/**/*</exclude>
-                    <exclude>org/apache/commons/logging/*</exclude>
-                    <exclude>org/apache/commons/logging/**/*</exclude>
-                    <exclude>org/apache/commons/exec/*</exclude>
-                    <exclude>org/apache/commons/exec/**/*</exclude>
-                    <exclude>org/apache/commons/collections/*</exclude>
-                    <exclude>org/apache/commons/collections/**/*</exclude>
-                    <exclude>org/apache/log4j/*</exclude>
-                    <exclude>org/apache/log4j/**/*</exclude>
-                    <exclude>org/sonatype/*</exclude>
-                    <exclude>org/sonatype/**/*</exclude>
-                    <exclude>**/pom.xml</exclude>
-
-                    <!-- Not the org/ packages that are a part of the jdk -->
-                    <exclude>org/ietf/jgss/*</exclude>
-                    <exclude>org/omg/**/*</exclude>
-                    <exclude>org/w3c/dom/*</exclude>
-                    <exclude>org/w3c/dom/**/*</exclude>
-                    <exclude>org/xml/sax/*</exclude>
-                    <exclude>org/xml/sax/**/*</exclude>
-                  </excludes>
-                </relocation>
-                <relocation>
-                  <pattern>com.google</pattern>
-                  <shadedPattern>${shaded.dependency.prefix}.cluster.com.google</shadedPattern>
-                </relocation>
-                <relocation>
-                  <pattern>io</pattern>
-                  <shadedPattern>${shaded.dependency.prefix}.cluster.io</shadedPattern>
-                </relocation>
-                <relocation>
-                  <pattern>com.esotericsoftware</pattern>
-                  <shadedPattern>${shaded.dependency.prefix}.cluster.com.esotericsoftware</shadedPattern>
-                </relocation>
-              </relocations>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-dependency-plugin</artifactId>
-      </plugin>
-
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-checkstyle-plugin</artifactId>
-        <configuration>
-          <skip>false</skip>
-        </configuration>
-      </plugin>
-
-      <plugin>
-        <artifactId>maven-enforcer-plugin</artifactId>
-        <configuration>
-          <skip>false</skip>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-</project>
diff --git a/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/BroadcastServiceAdapter.java b/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/BroadcastServiceAdapter.java
deleted file mode 100644
index 1d95cffe..00000000
--- a/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/BroadcastServiceAdapter.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.submarine.commons.cluster;
-
-import io.atomix.cluster.messaging.BroadcastService;
-
-import java.util.function.Consumer;
-
-/**
- * Broadcast Service Adapter
- * Service for broadcast messaging between nodes.
- * The broadcast service is an unreliable broadcast messaging service backed by multicast.
- * This service provides no guaranteed regarding reliability or order of messages.
- */
-public class BroadcastServiceAdapter implements BroadcastService {
-  @Override
-  public void broadcast(String subject, byte[] message) {
-
-  }
-
-  @Override
-  public void addListener(String subject, Consumer<byte[]> listener) {
-
-  }
-
-  @Override
-  public void removeListener(String subject, Consumer<byte[]> listener) {
-
-  }
-}
diff --git a/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/ClusterClient.java b/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/ClusterClient.java
deleted file mode 100644
index 189b043c..00000000
--- a/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/ClusterClient.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.submarine.commons.cluster;
-
-import io.atomix.primitive.PrimitiveState;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import static org.apache.submarine.commons.cluster.meta.ClusterMetaType.INTP_PROCESS_META;
-
-/**
- * Cluster management client class instantiated in submarine-interpreter
- */
-public class ClusterClient extends ClusterManager {
-  private static Logger LOG = LoggerFactory.getLogger(ClusterClient.class);
-
-  private static ClusterClient instance = null;
-
-  // Do not use the getInstance function in the test case,
-  // which will result in an inability to update the instance according to the configuration.
-  public static ClusterClient getInstance() {
-    synchronized (ClusterClient.class) {
-      if (instance == null) {
-        instance = new ClusterClient();
-      }
-    }
-    return instance;
-  }
-
-  private ClusterClient() {
-    super();
-  }
-
-  @Override
-  public boolean raftInitialized() {
-    if (null != raftClient && null != raftSessionClient
-        && raftSessionClient.getState() == PrimitiveState.CONNECTED) {
-      return true;
-    }
-
-    return false;
-  }
-
-  @Override
-  public boolean isClusterLeader() {
-    return false;
-  }
-
-  // In the ClusterClient metaKey equal interpreterGroupId
-  public void start(String metaKey) {
-    LOG.info("ClusterClient::start({})", metaKey);
-    if (!sconf.isClusterMode()) {
-      return;
-    }
-    super.start();
-
-    // Instantiated cluster monitoring class
-    clusterMonitor = new ClusterMonitor(this);
-    clusterMonitor.start(INTP_PROCESS_META, metaKey);
-  }
-
-  public void shutdown() {
-    if (!sconf.isClusterMode()) {
-      return;
-    }
-    if (null != clusterMonitor) {
-      clusterMonitor.shutdown();
-    }
-
-    super.shutdown();
-  }
-}
diff --git a/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/ClusterManager.java b/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/ClusterManager.java
deleted file mode 100644
index 2d05f1b2..00000000
--- a/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/ClusterManager.java
+++ /dev/null
@@ -1,558 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.submarine.commons.cluster;
-
-import com.google.common.collect.Maps;
-import io.atomix.cluster.MemberId;
-import io.atomix.cluster.Node;
-import io.atomix.cluster.messaging.MessagingConfig;
-import io.atomix.cluster.messaging.MessagingService;
-import io.atomix.cluster.messaging.impl.NettyMessagingService;
-import io.atomix.primitive.operation.OperationType;
-import io.atomix.primitive.operation.PrimitiveOperation;
-import io.atomix.primitive.operation.impl.DefaultOperationId;
-import io.atomix.primitive.partition.PartitionId;
-import io.atomix.primitive.service.ServiceConfig;
-import io.atomix.primitive.session.SessionClient;
-import io.atomix.primitive.session.SessionId;
-import io.atomix.protocols.raft.RaftClient;
-import io.atomix.protocols.raft.RaftError;
-import io.atomix.protocols.raft.ReadConsistency;
-import io.atomix.protocols.raft.cluster.RaftMember;
-import io.atomix.protocols.raft.cluster.impl.DefaultRaftMember;
-import io.atomix.protocols.raft.protocol.CloseSessionRequest;
-import io.atomix.protocols.raft.protocol.CloseSessionResponse;
-import io.atomix.protocols.raft.protocol.KeepAliveRequest;
-import io.atomix.protocols.raft.protocol.KeepAliveResponse;
-import io.atomix.protocols.raft.protocol.QueryRequest;
-import io.atomix.protocols.raft.protocol.QueryResponse;
-import io.atomix.protocols.raft.protocol.CommandRequest;
-import io.atomix.protocols.raft.protocol.CommandResponse;
-import io.atomix.protocols.raft.protocol.MetadataRequest;
-import io.atomix.protocols.raft.protocol.MetadataResponse;
-import io.atomix.protocols.raft.protocol.JoinRequest;
-import io.atomix.protocols.raft.protocol.JoinResponse;
-import io.atomix.protocols.raft.protocol.LeaveRequest;
-import io.atomix.protocols.raft.protocol.LeaveResponse;
-import io.atomix.protocols.raft.protocol.ConfigureRequest;
-import io.atomix.protocols.raft.protocol.ConfigureResponse;
-import io.atomix.protocols.raft.protocol.ReconfigureRequest;
-import io.atomix.protocols.raft.protocol.ReconfigureResponse;
-import io.atomix.protocols.raft.protocol.InstallRequest;
-import io.atomix.protocols.raft.protocol.InstallResponse;
-import io.atomix.protocols.raft.protocol.PollRequest;
-import io.atomix.protocols.raft.protocol.PollResponse;
-import io.atomix.protocols.raft.protocol.VoteRequest;
-import io.atomix.protocols.raft.protocol.VoteResponse;
-import io.atomix.protocols.raft.protocol.AppendRequest;
-import io.atomix.protocols.raft.protocol.AppendResponse;
-import io.atomix.protocols.raft.protocol.PublishRequest;
-import io.atomix.protocols.raft.protocol.ResetRequest;
-import io.atomix.protocols.raft.protocol.RaftResponse;
-import io.atomix.protocols.raft.storage.log.entry.CloseSessionEntry;
-import io.atomix.protocols.raft.storage.log.entry.CommandEntry;
-import io.atomix.protocols.raft.storage.log.entry.ConfigurationEntry;
-import io.atomix.protocols.raft.storage.log.entry.InitializeEntry;
-import io.atomix.protocols.raft.storage.log.entry.KeepAliveEntry;
-import io.atomix.protocols.raft.storage.log.entry.MetadataEntry;
-import io.atomix.protocols.raft.storage.log.entry.OpenSessionEntry;
-import io.atomix.protocols.raft.storage.log.entry.QueryEntry;
-import io.atomix.protocols.raft.protocol.OpenSessionRequest;
-import io.atomix.protocols.raft.protocol.OpenSessionResponse;
-import io.atomix.protocols.raft.protocol.RaftClientProtocol;
-import io.atomix.protocols.raft.session.CommunicationStrategy;
-import io.atomix.protocols.raft.storage.system.Configuration;
-import io.atomix.utils.net.Address;
-import io.atomix.utils.serializer.Namespace;
-import io.atomix.utils.serializer.Serializer;
-import org.apache.commons.lang.StringUtils;
-import org.apache.submarine.commons.cluster.meta.ClusterMeta;
-import org.apache.submarine.commons.cluster.meta.ClusterMetaEntity;
-import org.apache.submarine.commons.cluster.meta.ClusterMetaOperation;
-import org.apache.submarine.commons.cluster.meta.ClusterMetaType;
-import org.apache.submarine.commons.cluster.protocol.LocalRaftProtocolFactory;
-import org.apache.submarine.commons.cluster.protocol.RaftClientMessagingProtocol;
-import org.apache.submarine.commons.utils.NetworkUtils;
-import org.apache.submarine.commons.utils.SubmarineConfiguration;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.SocketException;
-import java.net.UnknownHostException;
-import java.time.Instant;
-
-import java.time.LocalDateTime;
-import java.util.Collections;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentLinkedQueue;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.TimeoutException;
-
-import static io.atomix.primitive.operation.PrimitiveOperation.operation;
-import static org.apache.submarine.commons.cluster.meta.ClusterMetaOperation.DELETE_OPERATION;
-import static org.apache.submarine.commons.cluster.meta.ClusterMetaOperation.PUT_OPERATION;
-import static org.apache.submarine.commons.cluster.meta.ClusterMetaOperation.GET_OPERATION;
-
-/**
- * The base class for cluster management, including the following implementations
- * 1. RaftClient as the raft client
- * 2. Threading to provide retry after cluster metadata submission failure
- * 3. Cluster monitoring
- */
-public abstract class ClusterManager {
-  private static Logger LOG = LoggerFactory.getLogger(ClusterManager.class);
-
-  public final SubmarineConfiguration sconf = SubmarineConfiguration.getInstance();
-
-  protected Collection<Node> clusterNodes = new ArrayList<>();
-
-  protected int raftServerPort = 0;
-
-  protected RaftClient raftClient = null;
-  protected SessionClient raftSessionClient = null;
-  protected Map<MemberId, Address> raftAddressMap = new ConcurrentHashMap<>();
-  protected LocalRaftProtocolFactory protocolFactory
-      = new LocalRaftProtocolFactory(protocolSerializer);
-  protected List<MemberId> clusterMemberIds = new ArrayList<MemberId>();
-
-  protected AtomicBoolean running = new AtomicBoolean(true);
-
-  // Write data through the queue to prevent failure due to network exceptions
-  private ConcurrentLinkedQueue<ClusterMetaEntity> clusterMetaQueue
-      = new ConcurrentLinkedQueue<>();
-
-  // submarine server host & port
-  protected String serverHost = "";
-
-  protected ClusterMonitor clusterMonitor = null;
-
-  protected String MESSAGING_SERVICE_NAME = "SubmarineCluster";
-
-  protected boolean isTest = false;
-
-  protected ClusterManager() {
-    try {
-      this.serverHost = NetworkUtils.findAvailableHostAddress();
-      String clusterAddr = sconf.getClusterAddress();
-      LOG.info("clusterAddr = {}", clusterAddr);
-      if (!StringUtils.isEmpty(clusterAddr)) {
-        String cluster[] = clusterAddr.split(",");
-
-        for (int i = 0; i < cluster.length; i++) {
-          String[] parts = cluster[i].split(":");
-          String clusterHost = parts[0];
-          int clusterPort = Integer.valueOf(parts[1]);
-          if (this.serverHost.equalsIgnoreCase(clusterHost)) {
-            raftServerPort = clusterPort;
-          }
-
-          String memberId = clusterHost + ":" + clusterPort;
-          Address address = Address.from(clusterHost, clusterPort);
-          Node node = Node.builder().withId(memberId).withAddress(address).build();
-          clusterNodes.add(node);
-          raftAddressMap.put(MemberId.from(memberId), address);
-          clusterMemberIds.add(MemberId.from(memberId));
-        }
-      }
-    } catch (UnknownHostException | SocketException e) {
-      LOG.error(e.getMessage(), e);
-    }
-  }
-
-  // Check if the raft environment is initialized
-  public abstract boolean raftInitialized();
-  // Is it a cluster leader
-  public abstract boolean isClusterLeader();
-
-  public AtomicBoolean getRunning() {
-    return running;
-  }
-
-  private SessionClient createProxy(RaftClient client) {
-    return client.sessionBuilder(ClusterPrimitiveType.PRIMITIVE_NAME,
-        ClusterPrimitiveType.INSTANCE, new ServiceConfig())
-        .withReadConsistency(ReadConsistency.SEQUENTIAL)
-        .withCommunicationStrategy(CommunicationStrategy.LEADER)
-        .build()
-        .connect()
-        .join();
-  }
-
-  public void start() {
-    if (!sconf.isClusterMode()) {
-      return;
-    }
-
-    LOG.info("ClusterManager::start()");
-
-    // RaftClient Thread
-    new Thread(new Runnable() {
-      @Override
-      public void run() {
-        LOG.info("RaftClientThread run() >>>");
-
-        int raftClientPort = 0;
-        try {
-          raftClientPort = NetworkUtils.findRandomAvailablePortOnAllLocalInterfaces();
-        } catch (IOException e) {
-          LOG.error(e.getMessage(), e);
-        }
-
-        LOG.info("RaftClientThread {}:{}", serverHost, raftClientPort);
-        MemberId memberId = MemberId.from(serverHost + ":" + raftClientPort);
-        Address address = Address.from(serverHost, raftClientPort);
-        raftAddressMap.put(memberId, address);
-
-        MessagingService messagingManager = new NettyMessagingService(
-            MESSAGING_SERVICE_NAME, address, new MessagingConfig()).start().join();
-        RaftClientProtocol protocol = new RaftClientMessagingProtocol(
-            messagingManager, protocolSerializer, raftAddressMap::get);
-
-        raftClient = RaftClient.builder()
-            .withMemberId(memberId)
-            .withPartitionId(PartitionId.from("partition", 1))
-            .withProtocol(protocol)
-            .build();
-
-        raftClient.connect(clusterMemberIds).join();
-
-        raftSessionClient = createProxy(raftClient);
-
-        LOG.info("RaftClientThread run() <<<");
-      }
-    }).start();
-
-    // Cluster Meta Consume Thread
-    new Thread(new Runnable() {
-      @Override
-      public void run() {
-        try {
-          while (getRunning().get()) {
-            ClusterMetaEntity metaEntity = clusterMetaQueue.peek();
-            if (null != metaEntity) {
-              // Determine whether the client is connected
-              int retry = 0;
-              while (!raftInitialized()) {
-                retry++;
-                if (0 == retry % 30) {
-                  LOG.warn("Raft incomplete initialization! retry[{}]", retry);
-                }
-                Thread.sleep(100);
-              }
-              boolean success = false;
-              switch (metaEntity.getOperation()) {
-                case DELETE_OPERATION:
-                  success = deleteClusterMeta(metaEntity);
-                  break;
-                case PUT_OPERATION:
-                  success = putClusterMeta(metaEntity);
-                  break;
-              }
-              if (true == success) {
-                // The operation was successfully deleted
-                clusterMetaQueue.remove(metaEntity);
-                LOG.info("Cluster Meta Consume success! {}", metaEntity);
-              } else {
-                LOG.error("Cluster Meta Consume failed!");
-              }
-            } else {
-              Thread.sleep(100);
-            }
-          }
-        } catch (InterruptedException e) {
-          LOG.error(e.getMessage(), e);
-        }
-      }
-    }).start();
-  }
-
-  // cluster shutdown
-  public void shutdown() {
-    if (!sconf.isClusterMode()) {
-      return;
-    }
-
-    running.set(false);
-
-    try {
-      if (null != raftSessionClient) {
-        LOG.info("ClusterManager::shutdown(raftSessionClient)");
-        raftSessionClient.close().get(5, TimeUnit.SECONDS);
-      }
-      if (null != raftClient) {
-        LOG.info("ClusterManager::shutdown(raftClient)");
-        raftClient.close().get(5, TimeUnit.SECONDS);
-      }
-    } catch (InterruptedException | ExecutionException | TimeoutException e) {
-      LOG.error(e.getMessage(), e);
-    }
-    LOG.info("ClusterManager::shutdown()");
-  }
-
-  public String getClusterNodeName() {
-    if (isTest) {
-      // Start three cluster servers in the test case at the same time,
-      // need to avoid duplicate names
-      return this.serverHost + ":" + this.raftServerPort;
-    }
-
-    String hostName = "";
-    try {
-      InetAddress addr = InetAddress.getLocalHost();
-      hostName = addr.getHostName().toString();
-    } catch (IOException e) {
-      LOG.error(e.getMessage(), e);
-    }
-    return hostName;
-  }
-
-  // put metadata into cluster metadata
-  private boolean putClusterMeta(ClusterMetaEntity entity) {
-    if (!raftInitialized()) {
-      LOG.error(this.getClass().toString() + "::Raft incomplete initialization!");
-      return false;
-    }
-
-    ClusterMetaType metaType = entity.getMetaType();
-    String metaKey = entity.getKey();
-    HashMap<String, Object> newMetaValue = entity.getValues();
-
-    if (LOG.isDebugEnabled()) {
-      LOG.debug(this.getClass().toString() + "::putClusterMeta {} {}", metaType, metaKey);
-    }
-
-    // add cluster name
-    newMetaValue.put(ClusterMeta.SERVER_HOST, serverHost);
-    newMetaValue.put(ClusterMeta.SERVER_PORT, raftServerPort);
-
-    raftSessionClient.execute(operation(ClusterStateMachine.PUT,
-        clientSerializer.encode(entity)))
-        .<Long>thenApply(clientSerializer::decode);
-    return true;
-  }
-
-  // put metadata into cluster metadata
-  public void putClusterMeta(ClusterMetaType type, String key, HashMap<String, Object> values) {
-    ClusterMetaEntity metaEntity = new ClusterMetaEntity(PUT_OPERATION, type, key, values);
-
-    boolean result = putClusterMeta(metaEntity);
-    if (false == result) {
-      LOG.warn(this.getClass().toString() + "::putClusterMeta failure, Cache metadata to queue.");
-      clusterMetaQueue.add(metaEntity);
-    }
-  }
-
-  // delete metadata by cluster metadata
-  private boolean deleteClusterMeta(ClusterMetaEntity entity) {
-    ClusterMetaType metaType = entity.getMetaType();
-    String metaKey = entity.getKey();
-
-    // Need to pay attention to delete metadata operations
-    LOG.info(this.getClass().toString() + "::deleteClusterMeta {} {}", metaType, metaKey);
-
-    if (!raftInitialized()) {
-      LOG.error(this.getClass().toString() + "::Raft incomplete initialization!");
-      return false;
-    }
-
-    raftSessionClient.execute(operation(
-        ClusterStateMachine.REMOVE,
-        clientSerializer.encode(entity)))
-        .<Long>thenApply(clientSerializer::decode)
-        .thenAccept(result -> {
-          LOG.info(this.getClass().toString() + "::deleteClusterMeta {}", result);
-        });
-
-    return true;
-  }
-
-  // delete metadata from cluster metadata
-  public void deleteClusterMeta(ClusterMetaType type, String key) {
-    ClusterMetaEntity metaEntity = new ClusterMetaEntity(DELETE_OPERATION, type, key, null);
-
-    boolean result = deleteClusterMeta(metaEntity);
-    if (false == result) {
-      LOG.warn(this.getClass().toString() + "::deleteClusterMeta failed, Cache data to queue.");
-      clusterMetaQueue.add(metaEntity);
-    }
-  }
-
-  // get metadata by cluster metadata
-  public HashMap<String, HashMap<String, Object>> getClusterMeta(
-      ClusterMetaType metaType, String metaKey) {
-    HashMap<String, HashMap<String, Object>> clusterMeta = new HashMap<>();
-    if (!raftInitialized()) {
-      LOG.error(this.getClass().toString() + "::Raft incomplete initialization!");
-      return clusterMeta;
-    }
-
-    ClusterMetaEntity entity = new ClusterMetaEntity(GET_OPERATION, metaType, metaKey, null);
-
-    byte[] mateData = null;
-    try {
-      mateData = raftSessionClient.execute(operation(ClusterStateMachine.GET,
-          clientSerializer.encode(entity))).get(3, TimeUnit.SECONDS);
-    } catch (InterruptedException | ExecutionException | TimeoutException e) {
-      LOG.error(e.getMessage(), e);
-    }
-
-    if (null != mateData) {
-      clusterMeta = clientSerializer.decode(mateData);
-    }
-
-    if (LOG.isDebugEnabled()) {
-      LOG.debug("getClusterMeta >>> {}", clusterMeta.toString());
-    }
-
-    return clusterMeta;
-  }
-
-  protected static final Namespace storageNamespace = Namespace.builder()
-      .register(CloseSessionEntry.class)
-      .register(CommandEntry.class)
-      .register(ConfigurationEntry.class)
-      .register(InitializeEntry.class)
-      .register(KeepAliveEntry.class)
-      .register(MetadataEntry.class)
-      .register(OpenSessionEntry.class)
-      .register(QueryEntry.class)
-      .register(PrimitiveOperation.class)
-      .register(DefaultOperationId.class)
-      .register(OperationType.class)
-      .register(ReadConsistency.class)
-      .register(ArrayList.class)
-      .register(HashSet.class)
-      .register(DefaultRaftMember.class)
-      .register(MemberId.class)
-      .register(RaftMember.Type.class)
-      .register(Instant.class)
-      .register(Configuration.class)
-      .register(byte[].class)
-      .register(long[].class)
-      .build();
-
-  protected static final Serializer protocolSerializer = Serializer.using(Namespace.builder()
-      .register(OpenSessionRequest.class)
-      .register(OpenSessionResponse.class)
-      .register(CloseSessionRequest.class)
-      .register(CloseSessionResponse.class)
-      .register(KeepAliveRequest.class)
-      .register(KeepAliveResponse.class)
-      .register(QueryRequest.class)
-      .register(QueryResponse.class)
-      .register(CommandRequest.class)
-      .register(CommandResponse.class)
-      .register(MetadataRequest.class)
-      .register(MetadataResponse.class)
-      .register(JoinRequest.class)
-      .register(JoinResponse.class)
-      .register(LeaveRequest.class)
-      .register(LeaveResponse.class)
-      .register(ConfigureRequest.class)
-      .register(ConfigureResponse.class)
-      .register(ReconfigureRequest.class)
-      .register(ReconfigureResponse.class)
-      .register(InstallRequest.class)
-      .register(InstallResponse.class)
-      .register(PollRequest.class)
-      .register(PollResponse.class)
-      .register(VoteRequest.class)
-      .register(VoteResponse.class)
-      .register(AppendRequest.class)
-      .register(AppendResponse.class)
-      .register(PublishRequest.class)
-      .register(ResetRequest.class)
-      .register(RaftResponse.Status.class)
-      .register(RaftError.class)
-      .register(RaftError.Type.class)
-      .register(PrimitiveOperation.class)
-      .register(ReadConsistency.class)
-      .register(byte[].class)
-      .register(long[].class)
-      .register(CloseSessionEntry.class)
-      .register(CommandEntry.class)
-      .register(ConfigurationEntry.class)
-      .register(InitializeEntry.class)
-      .register(KeepAliveEntry.class)
-      .register(MetadataEntry.class)
-      .register(OpenSessionEntry.class)
-      .register(QueryEntry.class)
-      .register(PrimitiveOperation.class)
-      .register(DefaultOperationId.class)
-      .register(OperationType.class)
-      .register(ReadConsistency.class)
-      .register(ArrayList.class)
-      .register(HashMap.class)
-      .register(ClusterMetaEntity.class)
-      .register(LocalDateTime.class)
-      .register(Collections.emptyList().getClass())
-      .register(HashSet.class)
-      .register(DefaultRaftMember.class)
-      .register(MemberId.class)
-      .register(SessionId.class)
-      .register(RaftMember.Type.class)
-      .register(Instant.class)
-      .register(Configuration.class)
-      .build());
-
-  protected static final Serializer storageSerializer = Serializer.using(Namespace.builder()
-      .register(CloseSessionEntry.class)
-      .register(CommandEntry.class)
-      .register(ConfigurationEntry.class)
-      .register(InitializeEntry.class)
-      .register(KeepAliveEntry.class)
-      .register(MetadataEntry.class)
-      .register(OpenSessionEntry.class)
-      .register(QueryEntry.class)
-      .register(PrimitiveOperation.class)
-      .register(DefaultOperationId.class)
-      .register(OperationType.class)
-      .register(ReadConsistency.class)
-      .register(ArrayList.class)
-      .register(ClusterMetaEntity.class)
-      .register(HashMap.class)
-      .register(HashSet.class)
-      .register(LocalDateTime.class)
-      .register(DefaultRaftMember.class)
-      .register(MemberId.class)
-      .register(RaftMember.Type.class)
-      .register(Instant.class)
-      .register(Configuration.class)
-      .register(byte[].class)
-      .register(long[].class)
-      .build());
-
-  protected static final Serializer clientSerializer = Serializer.using(Namespace.builder()
-      .register(ReadConsistency.class)
-      .register(ClusterMetaEntity.class)
-      .register(ClusterMetaOperation.class)
-      .register(ClusterMetaType.class)
-      .register(HashMap.class)
-      .register(LocalDateTime.class)
-      .register(Maps.immutableEntry(new String(), new Object()).getClass())
-      .build());
-}
diff --git a/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/ClusterMonitor.java b/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/ClusterMonitor.java
deleted file mode 100644
index 7230ee2b..00000000
--- a/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/ClusterMonitor.java
+++ /dev/null
@@ -1,265 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.submarine.commons.cluster;
-
-import com.sun.management.OperatingSystemMXBean;
-import org.apache.commons.lang.StringUtils;
-import org.apache.submarine.commons.cluster.meta.ClusterMeta;
-import org.apache.submarine.commons.cluster.meta.ClusterMetaType;
-import org.apache.submarine.commons.utils.SubmarineConfiguration;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.lang.management.ManagementFactory;
-import java.time.Duration;
-import java.time.LocalDateTime;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.Map;
-import java.util.Queue;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import static org.apache.submarine.commons.cluster.meta.ClusterMetaType.INTP_PROCESS_META;
-import static org.apache.submarine.commons.cluster.meta.ClusterMetaType.SERVER_META;
-
-/**
- * cluster monitoring
- * 1. cluster monitoring is also used for submarine-Server and submarine Interpreter,
- *    distinguish by member variable ClusterMetaType
- * 2. Report the average of the server resource CPU and MEMORY usage in the
- *    last few minutes to smooth the server's instantaneous peak
- * 3. checks the heartbeat timeout of the submarine-server and interpreter processes
- */
-public class ClusterMonitor {
-  private static Logger LOG = LoggerFactory.getLogger(ClusterMonitor.class);
-
-  // Whether the thread has started
-  private static AtomicBoolean running = new AtomicBoolean(true);
-
-  private ClusterManager clusterManager = null;
-
-  // Save the CPU resource and MEmory usage of the server resources
-  // in the last few minutes through the queue, and then average them through the queue.
-  private Queue<UsageUtil> monitorUsageQueues = new LinkedList<>();
-  private final int USAGE_QUEUE_LIMIT = 100; // queue length
-  private int heartbeatInterval = 3000; // Heartbeat reporting interval(milliseconds)
-
-  // The submarine-server leader checks the heartbeat timeout of
-  // the submarine-server and submarine-interpreter processes in the cluster metadata.
-  // If this time is exceeded, the submarine-server and interpreter processes
-  // can have an exception and no heartbeat is reported.
-  private int heartbeatTimeout = 9000;
-
-  // Type of cluster monitoring object
-  private ClusterMetaType clusterMetaType;
-
-  // The key of the cluster monitoring object,
-  // the name of the cluster when monitoring the submarine-server,
-  // and the interpreterGroupID when monitoring the interpreter processes
-  private String metaKey;
-
-  public ClusterMonitor(ClusterManager clusterManager) {
-    this.clusterManager = clusterManager;
-
-    SubmarineConfiguration sconf = SubmarineConfiguration.getInstance();
-    heartbeatInterval = sconf.getClusterHeartbeatInterval();
-    heartbeatTimeout = sconf.getClusterHeartbeatTimeout();
-
-    if (heartbeatTimeout < heartbeatInterval) {
-      LOG.error("Heartbeat timeout must be greater than heartbeat period.");
-      heartbeatTimeout = heartbeatInterval * 3;
-      LOG.info("Heartbeat timeout is modified to 3 times the heartbeat period.");
-    }
-
-    if (heartbeatTimeout < heartbeatInterval * 3) {
-      LOG.warn("Heartbeat timeout recommended than 3 times the heartbeat period.");
-    }
-  }
-
-  // start cluster monitor
-  public void start(ClusterMetaType clusterMetaType, String metaKey) {
-    this.clusterMetaType = clusterMetaType;
-    this.metaKey = metaKey;
-
-    new Thread(new Runnable() {
-      @Override
-      public void run() {
-        while (running.get()) {
-          switch (clusterMetaType) {
-            case SERVER_META:
-              sendMachineUsage();
-              checkHealthy();
-              break;
-            case INTP_PROCESS_META:
-              sendHeartbeat();
-              break;
-            default:
-              LOG.error("unknown cluster meta type:{}", clusterMetaType);
-              break;
-          }
-
-          try {
-            Thread.sleep(heartbeatInterval);
-          } catch (InterruptedException e) {
-            e.printStackTrace();
-          }
-        }
-      }
-    }).start();
-  }
-
-  public void shutdown() {
-    running.set(false);
-  }
-
-  // Check the healthy of each service and interpreter instance
-  private void checkHealthy() {
-    // only leader check cluster healthy
-    if (!clusterManager.isClusterLeader()) {
-      return;
-    }
-
-    if (LOG.isDebugEnabled()) {
-      LOG.debug("checkHealthy()");
-    }
-
-    LocalDateTime now = LocalDateTime.now();
-    // check machine mate
-    for (ClusterMetaType metaType : ClusterMetaType.values()) {
-      Map<String, HashMap<String, Object>> clusterMeta
-          = clusterManager.getClusterMeta(metaType, "");
-
-      if (LOG.isDebugEnabled()) {
-        LOG.debug("clusterMeta : {}", clusterMeta);
-      }
-
-      for (Map.Entry<String, HashMap<String, Object>> entry : clusterMeta.entrySet()) {
-        String key = entry.getKey();
-        Map<String, Object> meta = entry.getValue();
-        if (null == meta) {
-          continue;
-        }
-
-        // Metadata that has been offline is not processed
-        String status = (String) meta.get(ClusterMeta.STATUS);
-        if (StringUtils.equals(status, ClusterMeta.OFFLINE_STATUS)) {
-          continue;
-        }
-
-        Object heartbeat = meta.get(ClusterMeta.LATEST_HEARTBEAT);
-        if (heartbeat instanceof LocalDateTime) {
-          LocalDateTime dHeartbeat = (LocalDateTime) heartbeat;
-          Duration duration = Duration.between(dHeartbeat, now);
-          long timeInterval = duration.getSeconds() * 1000; // Convert to milliseconds
-          if (timeInterval > heartbeatTimeout) {
-            // Set the metadata for the heartbeat timeout to offline
-            // Cannot delete metadata
-            HashMap<String, Object> mapValues = new HashMap<>();
-            mapValues.put(ClusterMeta.STATUS, ClusterMeta.OFFLINE_STATUS);
-            clusterManager.putClusterMeta(metaType, key, mapValues);
-            LOG.warn("offline heartbeat timeout[{}] meta[{}]", dHeartbeat, key);
-          }
-        } else {
-          LOG.error("wrong data type");
-        }
-      }
-    }
-  }
-
-  // The interpreter process sends a heartbeat to the cluster,
-  // indicating that the process is still active.
-  private void sendHeartbeat() {
-    HashMap<String, Object> mapMonitorUtil = new HashMap<>();
-    mapMonitorUtil.put(ClusterMeta.NODE_NAME, clusterManager.getClusterNodeName());
-    mapMonitorUtil.put(ClusterMeta.INTP_PROCESS_NAME, metaKey);
-    mapMonitorUtil.put(ClusterMeta.LATEST_HEARTBEAT, LocalDateTime.now());
-    mapMonitorUtil.put(ClusterMeta.STATUS, ClusterMeta.ONLINE_STATUS);
-
-    clusterManager.putClusterMeta(INTP_PROCESS_META, metaKey, mapMonitorUtil);
-  }
-
-  // send the usage of each service
-  private void sendMachineUsage() {
-    if (LOG.isDebugEnabled()) {
-      LOG.debug("sendMachineUsage >>>");
-    }
-
-    // Limit queue size
-    while (monitorUsageQueues.size() > USAGE_QUEUE_LIMIT) {
-      monitorUsageQueues.poll();
-    }
-    UsageUtil monitorUtil = getMachineUsage();
-    monitorUsageQueues.add(monitorUtil);
-
-    UsageUtil avgMonitorUtil = new UsageUtil();
-    for (UsageUtil monitor : monitorUsageQueues){
-      avgMonitorUtil.memoryUsed += monitor.memoryUsed;
-      avgMonitorUtil.memoryCapacity += monitor.memoryCapacity;
-      avgMonitorUtil.cpuUsed += monitor.cpuUsed;
-      avgMonitorUtil.cpuCapacity += monitor.cpuCapacity;
-    }
-
-    // Resource consumption average
-    int queueSize = monitorUsageQueues.size();
-    avgMonitorUtil.memoryUsed = avgMonitorUtil.memoryUsed / queueSize;
-    avgMonitorUtil.memoryCapacity = avgMonitorUtil.memoryCapacity / queueSize;
-    avgMonitorUtil.cpuUsed = avgMonitorUtil.cpuUsed / queueSize;
-    avgMonitorUtil.cpuCapacity = avgMonitorUtil.cpuCapacity / queueSize;
-
-    HashMap<String, Object> mapMonitorUtil = new HashMap<>();
-    mapMonitorUtil.put(ClusterMeta.MEMORY_USED, avgMonitorUtil.memoryUsed);
-    mapMonitorUtil.put(ClusterMeta.MEMORY_CAPACITY, avgMonitorUtil.memoryCapacity);
-    mapMonitorUtil.put(ClusterMeta.CPU_USED, avgMonitorUtil.cpuUsed);
-    mapMonitorUtil.put(ClusterMeta.CPU_CAPACITY, avgMonitorUtil.cpuCapacity);
-    mapMonitorUtil.put(ClusterMeta.LATEST_HEARTBEAT, LocalDateTime.now());
-    mapMonitorUtil.put(ClusterMeta.STATUS, ClusterMeta.ONLINE_STATUS);
-
-    String clusterName = clusterManager.getClusterNodeName();
-    clusterManager.putClusterMeta(SERVER_META, clusterName, mapMonitorUtil);
-  }
-
-  private UsageUtil getMachineUsage() {
-    OperatingSystemMXBean operatingSystemMXBean
-        = ManagementFactory.getPlatformMXBean(OperatingSystemMXBean.class);
-
-    // Returns the amount of free physical memory in bytes.
-    long freePhysicalMemorySize = operatingSystemMXBean.getFreePhysicalMemorySize();
-
-    // Returns the total amount of physical memory in bytes.
-    long totalPhysicalMemorySize = operatingSystemMXBean.getTotalPhysicalMemorySize();
-
-    // Returns the "recent cpu usage" for the whole system.
-    double systemCpuLoad = operatingSystemMXBean.getSystemCpuLoad();
-
-    int process = Runtime.getRuntime().availableProcessors();
-
-    UsageUtil monitorUtil = new UsageUtil();
-    monitorUtil.memoryUsed = totalPhysicalMemorySize - freePhysicalMemorySize;
-    monitorUtil.memoryCapacity = totalPhysicalMemorySize;
-    monitorUtil.cpuUsed = (long) (process * systemCpuLoad * 100);
-    monitorUtil.cpuCapacity = process * 100;
-
-    return monitorUtil;
-  }
-
-  private class UsageUtil {
-    private long memoryUsed = 0;
-    private long memoryCapacity = 0;
-    private long cpuUsed = 0;
-    private long cpuCapacity = 0;
-  }
-}
diff --git a/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/ClusterPrimitiveType.java b/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/ClusterPrimitiveType.java
deleted file mode 100644
index f5750aff..00000000
--- a/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/ClusterPrimitiveType.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.submarine.commons.cluster;
-
-import io.atomix.primitive.PrimitiveBuilder;
-import io.atomix.primitive.PrimitiveManagementService;
-import io.atomix.primitive.PrimitiveType;
-import io.atomix.primitive.config.PrimitiveConfig;
-import io.atomix.primitive.service.PrimitiveService;
-import io.atomix.primitive.service.ServiceConfig;
-
-/**
- * Cluster primitive type
- * Creating a custom distributed primitive is defining the primitive type.
- * To create a new type, implement the PrimitiveType interface
- */
-public class ClusterPrimitiveType implements PrimitiveType {
-  public static final ClusterPrimitiveType INSTANCE = new ClusterPrimitiveType();
-
-  public static final String PRIMITIVE_NAME = "CLUSTER_PRIMITIVE";
-
-  @Override
-  public String name() {
-    return PRIMITIVE_NAME;
-  }
-
-  @Override
-  public PrimitiveConfig newConfig() {
-    throw new UnsupportedOperationException();
-  }
-
-  @Override
-  public PrimitiveBuilder newBuilder(String primitiveName,
-                                     PrimitiveConfig config,
-                                     PrimitiveManagementService managementService) {
-    throw new UnsupportedOperationException();
-  }
-
-  @Override
-  public PrimitiveService newService(ServiceConfig config) {
-    return new ClusterStateMachine();
-  }
-}
diff --git a/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/ClusterServer.java b/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/ClusterServer.java
deleted file mode 100644
index d622f0c1..00000000
--- a/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/ClusterServer.java
+++ /dev/null
@@ -1,322 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.submarine.commons.cluster;
-
-import com.google.common.annotations.VisibleForTesting;
-import io.atomix.cluster.BootstrapService;
-import io.atomix.cluster.ManagedClusterMembershipService;
-import io.atomix.cluster.Member;
-import io.atomix.cluster.MemberId;
-import io.atomix.cluster.Node;
-import io.atomix.cluster.discovery.BootstrapDiscoveryProvider;
-import io.atomix.cluster.impl.DefaultClusterMembershipService;
-import io.atomix.cluster.impl.DefaultNodeDiscoveryService;
-import io.atomix.cluster.messaging.BroadcastService;
-import io.atomix.cluster.messaging.MessagingConfig;
-import io.atomix.cluster.messaging.MessagingService;
-import io.atomix.cluster.messaging.UnicastService;
-import io.atomix.cluster.messaging.impl.NettyMessagingService;
-import io.atomix.cluster.protocol.HeartbeatMembershipProtocol;
-import io.atomix.cluster.protocol.HeartbeatMembershipProtocolConfig;
-import io.atomix.primitive.PrimitiveState;
-import io.atomix.protocols.raft.RaftServer;
-import io.atomix.protocols.raft.protocol.RaftServerProtocol;
-import io.atomix.protocols.raft.storage.RaftStorage;
-import io.atomix.storage.StorageLevel;
-import io.atomix.utils.Version;
-import io.atomix.utils.net.Address;
-import org.apache.commons.lang.StringUtils;
-import org.apache.submarine.commons.cluster.meta.ClusterMeta;
-import org.apache.submarine.commons.cluster.protocol.RaftServerMessagingProtocol;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.File;
-import java.time.Duration;
-import java.time.LocalDateTime;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.concurrent.CompletableFuture;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
-
-import static org.apache.submarine.commons.cluster.meta.ClusterMetaType.SERVER_META;
-
-/**
- * Cluster management server class instantiated in submarine-server
- * 1. Create a raft server
- * 2. Remotely create interpreter's thrift service
- */
-public class ClusterServer extends ClusterManager {
-  private static Logger LOG = LoggerFactory.getLogger(ClusterServer.class);
-
-  private static ClusterServer instance = null;
-
-  // raft server
-  protected RaftServer raftServer = null;
-
-  protected MessagingService messagingService = null;
-
-  private ClusterServer() {
-    super();
-  }
-
-  // Do not use the getInstance function in the test case,
-  // which will result in an inability to update the instance according to the configuration.
-  public static ClusterServer getInstance() {
-    synchronized (ClusterServer.class) {
-      if (instance == null) {
-        instance = new ClusterServer();
-      }
-    }
-    return instance;
-  }
-
-  public void start() {
-    if (!sconf.isClusterMode()) {
-      return;
-    }
-
-    initThread();
-
-    // Instantiated raftServer monitoring class
-    String clusterName = getClusterNodeName();
-    clusterMonitor = new ClusterMonitor(this);
-    clusterMonitor.start(SERVER_META, clusterName);
-
-    super.start();
-  }
-
-  @VisibleForTesting
-  void initTestCluster(String clusterAddrList, String host, int port) {
-    isTest = true;
-    this.serverHost = host;
-    this.raftServerPort = port;
-
-    // clear
-    clusterNodes.clear();
-    raftAddressMap.clear();
-    clusterMemberIds.clear();
-
-    String cluster[] = clusterAddrList.split(",");
-    for (int i = 0; i < cluster.length; i++) {
-      String[] parts = cluster[i].split(":");
-      String clusterHost = parts[0];
-      int clusterPort = Integer.valueOf(parts[1]);
-
-      String memberId = clusterHost + ":" + clusterPort;
-      Address address = Address.from(clusterHost, clusterPort);
-      Node node = Node.builder().withId(memberId).withAddress(address).build();
-      clusterNodes.add(node);
-      raftAddressMap.put(MemberId.from(memberId), address);
-      clusterMemberIds.add(MemberId.from(memberId));
-    }
-  }
-
-  @Override
-  public boolean raftInitialized() {
-    if (null != raftServer && raftServer.isRunning()
-        && null != raftClient && null != raftSessionClient
-        && raftSessionClient.getState() == PrimitiveState.CONNECTED) {
-      return true;
-    }
-
-    return false;
-  }
-
-  @Override
-  public boolean isClusterLeader() {
-    if (null == raftServer
-        || !raftServer.isRunning()
-        || !raftServer.isLeader()) {
-      return false;
-    }
-
-    return true;
-  }
-
-  private void initThread() {
-    // RaftServer Thread
-    new Thread(new Runnable() {
-      @Override
-      public void run() {
-        LOG.info("RaftServer run({}:{}) >>>", serverHost, raftServerPort);
-
-        Address address = Address.from(serverHost, raftServerPort);
-        Member member = Member.builder(MemberId.from(serverHost + ":" + raftServerPort))
-            .withAddress(address)
-            .build();
-        messagingService = new NettyMessagingService(
-            MESSAGING_SERVICE_NAME, member.address(), new MessagingConfig()).start().join();
-
-        RaftServerProtocol protocol = new RaftServerMessagingProtocol(
-            messagingService, ClusterManager.protocolSerializer, raftAddressMap::get);
-
-        BootstrapService bootstrapService = new BootstrapService() {
-          @Override
-          public MessagingService getMessagingService() {
-            return messagingService;
-          }
-
-          @Override
-          public UnicastService getUnicastService() {
-            return new UnicastServiceAdapter();
-          }
-
-          @Override
-          public BroadcastService getBroadcastService() {
-            return new BroadcastServiceAdapter();
-          }
-        };
-
-        ManagedClusterMembershipService clusterService = new DefaultClusterMembershipService(
-            member,
-            Version.from("1.0.0"),
-            new DefaultNodeDiscoveryService(
-                bootstrapService, member, new BootstrapDiscoveryProvider(clusterNodes)),
-            bootstrapService,
-            new HeartbeatMembershipProtocol(new HeartbeatMembershipProtocolConfig()));
-
-        File atomixDateDir = com.google.common.io.Files.createTempDir();
-        atomixDateDir.deleteOnExit();
-
-        RaftServer.Builder builder = RaftServer.builder(member.id())
-            .withMembershipService(clusterService)
-            .withProtocol(protocol)
-            .withStorage(RaftStorage.builder()
-                .withStorageLevel(StorageLevel.MEMORY)
-                .withDirectory(atomixDateDir)
-                .withNamespace(storageNamespace)
-                .withMaxSegmentSize(1024 * 1024)
-                .build());
-
-        raftServer = builder.build();
-        raftServer.bootstrap(clusterMemberIds);
-
-        HashMap<String, Object> meta = new HashMap<String, Object>();
-        String nodeName = getClusterNodeName();
-        meta.put(ClusterMeta.NODE_NAME, nodeName);
-        meta.put(ClusterMeta.SERVER_HOST, serverHost);
-        meta.put(ClusterMeta.SERVER_PORT, raftServerPort);
-        meta.put(ClusterMeta.SERVER_START_TIME, LocalDateTime.now());
-        putClusterMeta(SERVER_META, nodeName, meta);
-
-        LOG.info("RaftServer run() <<<");
-      }
-    }).start();
-  }
-
-  @Override
-  public void shutdown() {
-    if (!sconf.isClusterMode()) {
-      return;
-    }
-    LOG.info("ClusterServer::shutdown()");
-
-    try {
-      // delete local machine meta
-      deleteClusterMeta(SERVER_META, getClusterNodeName());
-      Thread.sleep(500);
-      if (null != clusterMonitor) {
-        clusterMonitor.shutdown();
-      }
-      // wait raft commit metadata
-      Thread.sleep(500);
-    } catch (InterruptedException e) {
-      LOG.error(e.getMessage(), e);
-    }
-
-    // close raft client
-    super.shutdown();
-
-    if (null != raftServer && raftServer.isRunning()) {
-      try {
-        LOG.info("ClusterServer::raftServer.shutdown()");
-        raftServer.shutdown().get(5, TimeUnit.SECONDS);
-      } catch (InterruptedException | ExecutionException | TimeoutException e) {
-        LOG.error(e.getMessage(), e);
-      }
-    }
-
-    LOG.info("ClusterServer::super.shutdown()");
-  }
-
-  // Obtain the server node whose resources are idle in the cluster
-  public HashMap<String, Object> getIdleNodeMeta() {
-    HashMap<String, Object> idleNodeMeta = null;
-    HashMap<String, HashMap<String, Object>> clusterMeta = getClusterMeta(SERVER_META, "");
-
-    long memoryIdle = 0;
-    for (Map.Entry<String, HashMap<String, Object>> entry : clusterMeta.entrySet()) {
-      HashMap<String, Object> meta = entry.getValue();
-      // Check if the service or process is offline
-      String status = (String) meta.get(ClusterMeta.STATUS);
-      if (null == status || StringUtils.isEmpty(status)
-          || status.equals(ClusterMeta.OFFLINE_STATUS)) {
-        continue;
-      }
-
-      long memoryCapacity  = (long) meta.get(ClusterMeta.MEMORY_CAPACITY);
-      long memoryUsed      = (long) meta.get(ClusterMeta.MEMORY_USED);
-      long idle = memoryCapacity - memoryUsed;
-      if (idle > memoryIdle) {
-        memoryIdle = idle;
-        idleNodeMeta = meta;
-      }
-    }
-
-    return idleNodeMeta;
-  }
-
-  public void unicastClusterEvent(String host, int port, String topic, String msg) {
-    LOG.info("send unicastClusterEvent host:{} port:{} topic:{} message:{}",
-        host, port, topic, msg);
-
-    Address address = Address.from(host, port);
-    CompletableFuture<byte[]> response = messagingService.sendAndReceive(address,
-        topic, msg.getBytes(), Duration.ofSeconds(2));
-    response.whenComplete((r, e) -> {
-      if (null == e) {
-        LOG.error(e.getMessage(), e);
-      }
-    });
-  }
-
-  public void broadcastClusterEvent(String topic, String msg) {
-    if (LOG.isDebugEnabled()) {
-      LOG.debug("send broadcastClusterEvent message {}", msg);
-    }
-    for (Node node : clusterNodes) {
-      if (StringUtils.equals(node.address().host(), serverHost)
-          && node.address().port() == raftServerPort) {
-        // skip myself
-        continue;
-      }
-
-      CompletableFuture<byte[]> response = messagingService.sendAndReceive(node.address(),
-          topic, msg.getBytes(), Duration.ofSeconds(2));
-      response.whenComplete((r, e) -> {
-        if (null == e) {
-          LOG.error(e.getMessage(), e);
-        } else {
-          LOG.info("broadcastClusterNoteEvent success! {}", msg);
-        }
-      });
-    }
-  }
-}
diff --git a/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/ClusterStateMachine.java b/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/ClusterStateMachine.java
deleted file mode 100644
index 62f24dea..00000000
--- a/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/ClusterStateMachine.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.submarine.commons.cluster;
-
-import com.google.common.collect.Maps;
-import io.atomix.primitive.operation.OperationId;
-import io.atomix.primitive.service.AbstractPrimitiveService;
-import io.atomix.primitive.service.BackupOutput;
-import io.atomix.primitive.service.BackupInput;
-import io.atomix.primitive.service.Commit;
-import io.atomix.primitive.service.ServiceExecutor;
-import io.atomix.utils.serializer.Serializer;
-import org.apache.submarine.commons.cluster.meta.ClusterMeta;
-import org.apache.submarine.commons.cluster.meta.ClusterMetaEntity;
-import org.apache.submarine.commons.cluster.meta.ClusterMetaType;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.Map;
-
-/**
- * Cluster State Machine for submarine
- * The cluster state is implemented as a snapshot state machine.
- * The state machine stores the service and process metadata information of the cluster.
- * Metadata information can be manipulated by put, get, remove, index, and snapshot.
- */
-public class ClusterStateMachine extends AbstractPrimitiveService {
-  private static Logger LOG = LoggerFactory.getLogger(ClusterStateMachine.class);
-  private ClusterMeta clusterMeta = new ClusterMeta();
-
-  // Command to operation a variable in cluster state machine
-  public static final OperationId PUT = OperationId.command("put");
-  public static final OperationId GET = OperationId.query("get");
-  public static final OperationId REMOVE = OperationId.command("remove");
-  public static final OperationId INDEX = OperationId.command("index");
-
-  public ClusterStateMachine() {
-    super(ClusterPrimitiveType.INSTANCE);
-  }
-
-  @Override
-  public Serializer serializer() {
-    return ClusterManager.clientSerializer;
-  }
-
-  @Override
-  protected void configure(ServiceExecutor executor) {
-    executor.register(PUT, this::put);
-    executor.register(GET, this::get);
-    executor.register(REMOVE, this::remove);
-    executor.register(INDEX, this::index);
-  }
-
-  protected long put(Commit<ClusterMetaEntity> commit) {
-    clusterMeta.put(commit.value().getMetaType(),
-        commit.value().getKey(), commit.value().getValues());
-    return commit.index();
-  }
-
-  protected Map<String, Map<String, Object>> get(Commit<ClusterMetaEntity> commit) {
-    return clusterMeta.get(commit.value().getMetaType(), commit.value().getKey());
-  }
-
-  protected long remove(Commit<ClusterMetaEntity> commit) {
-    clusterMeta.remove(commit.value().getMetaType(), commit.value().getKey());
-    return commit.index();
-  }
-
-  protected long index(Commit<Void> commit) {
-    return commit.index();
-  }
-
-  @Override
-  public void backup(BackupOutput writer) {
-    if (LOG.isDebugEnabled()) {
-      LOG.debug("ClusterStateMachine.backup()");
-    }
-
-    // backup SERVER_META
-    // cluster meta map struct
-    // cluster_name -> {server_tserver_host,server_tserver_port,cpu_capacity,...}
-    Map<String, Map<String, Object>> mapServerMeta
-        = clusterMeta.get(ClusterMetaType.SERVER_META, "");
-    // write all SERVER_META size
-    writer.writeInt(mapServerMeta.size());
-    for (Map.Entry<String, Map<String, Object>> entry : mapServerMeta.entrySet()) {
-      // write cluster_name
-      writer.writeString(entry.getKey());
-
-      Map<String, Object> kvPairs = entry.getValue();
-      // write cluster mate kv pairs size
-      writer.writeInt(kvPairs.size());
-      for (Map.Entry<String, Object> entryValue : kvPairs.entrySet()) {
-        // write cluster mate kv pairs
-        writer.writeString(entryValue.getKey());
-        writer.writeObject(entryValue.getValue());
-      }
-    }
-
-    // backup INTP_PROCESS_META
-    // Interpreter meta map struct
-    // IntpGroupId -> {server_tserver_host,server_tserver_port,...}
-    Map<String, Map<String, Object>> mapIntpProcMeta
-        = clusterMeta.get(ClusterMetaType.INTP_PROCESS_META, "");
-    // write interpreter size
-    writer.writeInt(mapIntpProcMeta.size());
-    for (Map.Entry<String, Map<String, Object>> entry : mapIntpProcMeta.entrySet()) {
-      // write IntpGroupId
-      writer.writeString(entry.getKey());
-
-      Map<String, Object> kvPairs = entry.getValue();
-      // write interpreter mate kv pairs size
-      writer.writeInt(kvPairs.size());
-      for (Map.Entry<String, Object> entryValue : kvPairs.entrySet()) {
-        // write interpreter mate kv pairs
-        writer.writeString(entryValue.getKey());
-        writer.writeObject(entryValue.getValue());
-      }
-    }
-  }
-
-  @Override
-  public void restore(BackupInput reader) {
-    if (LOG.isDebugEnabled()) {
-      LOG.debug("ClusterStateMachine.restore()");
-    }
-
-    clusterMeta = new ClusterMeta();
-    // read all SERVER_META size
-    int nServerMeta = reader.readInt();
-    for (int i = 0; i < nServerMeta; i++) {
-      // read cluster_name
-      String clusterName = reader.readString();
-
-      // read cluster mate kv pairs size
-      int nKVpairs = reader.readInt();
-      for (int j = 0; j < nKVpairs; i++) {
-        // read cluster mate kv pairs
-        String key = reader.readString();
-        Object value = reader.readObject();
-
-        clusterMeta.put(ClusterMetaType.SERVER_META,
-            clusterName, Maps.immutableEntry(key, value));
-      }
-    }
-
-    // read all INTP_PROCESS_META size
-    int nIntpMeta = reader.readInt();
-    for (int i = 0; i < nIntpMeta; i++) {
-      // read interpreter name
-      String intpName = reader.readString();
-
-      // read interpreter mate kv pairs size
-      int nKVpairs = reader.readInt();
-      for (int j = 0; j < nKVpairs; i++) {
-        // read interpreter mate kv pairs
-        String key = reader.readString();
-        Object value = reader.readObject();
-
-        clusterMeta.put(ClusterMetaType.INTP_PROCESS_META,
-            intpName, Maps.immutableEntry(key, value));
-      }
-    }
-  }
-}
diff --git a/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/UnicastServiceAdapter.java b/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/UnicastServiceAdapter.java
deleted file mode 100644
index ec3db268..00000000
--- a/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/UnicastServiceAdapter.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.submarine.commons.cluster;
-
-import io.atomix.cluster.messaging.UnicastService;
-import io.atomix.utils.net.Address;
-
-import java.util.concurrent.Executor;
-import java.util.function.BiConsumer;
-
-public class UnicastServiceAdapter implements UnicastService {
-  @Override
-  public void unicast(Address address, String subject, byte[] message) {
-
-  }
-
-  @Override
-  public void addListener(String subject, BiConsumer<Address, byte[]> listener, Executor executor) {
-
-  }
-
-  @Override
-  public void removeListener(String subject, BiConsumer<Address, byte[]> listener) {
-
-  }
-}
diff --git a/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/meta/ClusterMeta.java b/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/meta/ClusterMeta.java
deleted file mode 100644
index 11b851e7..00000000
--- a/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/meta/ClusterMeta.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.submarine.commons.cluster.meta;
-
-import org.apache.commons.lang.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Metadata stores metadata information in a KV key-value pair
- */
-public class ClusterMeta implements Serializable {
-  private static Logger LOG = LoggerFactory.getLogger(ClusterMeta.class);
-
-  // The name of each server node in the cluster
-  public static String NODE_NAME            = "NODE_NAME";
-
-  // submarine-server meta
-  public static String SERVER_HOST          = "SERVER_HOST";
-  public static String SERVER_PORT          = "SERVER_PORT";
-  public static String SERVER_START_TIME    = "SERVER_START_TIME";
-
-  // interpreter-process meta
-  public static String INTP_PROCESS_NAME    = "INTP_PROCESS_NAME";
-  public static String INTP_TSERVER_HOST    = "INTP_TSERVER_HOST";
-  public static String INTP_TSERVER_PORT    = "INTP_TSERVER_PORT";
-  public static String INTP_START_TIME      = "INTP_START_TIME";
-
-  // submarine-server resource usage
-  public static String CPU_CAPACITY         = "CPU_CAPACITY";
-  public static String CPU_USED             = "CPU_USED";
-  public static String MEMORY_CAPACITY      = "MEMORY_CAPACITY";
-  public static String MEMORY_USED          = "MEMORY_USED";
-
-  public static String LATEST_HEARTBEAT     = "LATEST_HEARTBEAT";
-
-  // submarine-server or interpreter-process status
-  public static String STATUS               = "STATUS";
-  public static String ONLINE_STATUS        = "ONLINE";
-  public static String OFFLINE_STATUS       = "OFFLINE";
-
-  public static String INTP_PROCESS_COUNT   = "INTP_PROCESS_COUNT";
-  public static String INTP_PROCESS_LIST    = "INTP_PROCESS_LIST";
-
-  public static String PROPERTIES = "properties";
-
-  // cluster_name = host:port
-  // Map:cluster_name -> {server_tserver_host,server_tserver_port,cpu_capacity,...}
-  private Map<String, Map<String, Object>> mapServerMeta = new HashMap<>();
-
-  // Map:InterpreterGroupId -> {cluster_name,intp_tserver_host,...}
-  private Map<String, Map<String, Object>> mapInterpreterMeta = new HashMap<>();
-
-  public void put(ClusterMetaType type, String key, Object value) {
-    Map<String, Object> mapValue = (Map<String, Object>) value;
-
-    switch (type) {
-      case SERVER_META:
-        // Because it may be partially updated metadata information
-        if (mapServerMeta.containsKey(key)) {
-          Map<String, Object> values = mapServerMeta.get(key);
-          values.putAll(mapValue);
-        } else {
-          mapServerMeta.put(key, mapValue);
-        }
-        break;
-      case INTP_PROCESS_META:
-        if (mapInterpreterMeta.containsKey(key)) {
-          Map<String, Object> values = mapInterpreterMeta.get(key);
-          values.putAll(mapValue);
-        } else {
-          mapInterpreterMeta.put(key, mapValue);
-        }
-        break;
-    }
-  }
-
-  public Map<String, Map<String, Object>> get(ClusterMetaType type, String key) {
-    Map<String, Object> values = null;
-
-    switch (type) {
-      case SERVER_META:
-        if (null == key || StringUtils.isEmpty(key)) {
-          return mapServerMeta;
-        }
-        if (mapServerMeta.containsKey(key)) {
-          values = mapServerMeta.get(key);
-        } else {
-          LOG.warn("can not find key : {}", key);
-        }
-        break;
-      case INTP_PROCESS_META:
-        if (null == key || StringUtils.isEmpty(key)) {
-          return mapInterpreterMeta;
-        }
-        if (mapInterpreterMeta.containsKey(key)) {
-          values = mapInterpreterMeta.get(key);
-        } else {
-          LOG.warn("can not find key : {}", key);
-        }
-        break;
-    }
-
-    Map<String, Map<String, Object>> result = new HashMap<>();
-    result.put(key, values);
-
-    return result;
-  }
-
-  public Map<String, Object> remove(ClusterMetaType type, String key) {
-    switch (type) {
-      case SERVER_META:
-        if (mapServerMeta.containsKey(key)) {
-          return mapServerMeta.remove(key);
-        } else {
-          LOG.warn("can not find key : {}", key);
-        }
-        break;
-      case INTP_PROCESS_META:
-        if (mapInterpreterMeta.containsKey(key)) {
-          return mapInterpreterMeta.remove(key);
-        } else {
-          LOG.warn("can not find key : {}", key);
-        }
-        break;
-    }
-
-    return null;
-  }
-}
diff --git a/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/meta/ClusterMetaEntity.java b/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/meta/ClusterMetaEntity.java
deleted file mode 100644
index 1a4efa82..00000000
--- a/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/meta/ClusterMetaEntity.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.submarine.commons.cluster.meta;
-
-import java.io.Serializable;
-import java.util.HashMap;
-
-/**
- * Cluster operations, cluster types, encapsulation objects for keys and values
- */
-public class ClusterMetaEntity implements Serializable {
-  private ClusterMetaOperation operation;
-  private ClusterMetaType type;
-  private String key;
-  private HashMap<String, Object> values = new HashMap<>();
-
-  public ClusterMetaEntity(ClusterMetaOperation operation, ClusterMetaType type,
-                           String key, HashMap<String, Object> values) {
-    this.operation = operation;
-    this.type = type;
-    this.key = key;
-
-    if (null != values) {
-      this.values.putAll(values);
-    }
-  }
-
-  public ClusterMetaOperation getOperation() {
-    return operation;
-  }
-
-  public ClusterMetaType getMetaType() {
-    return type;
-  }
-
-  public String getKey() {
-    return key;
-  }
-
-  public HashMap<String, Object> getValues() {
-    return values;
-  }
-}
diff --git a/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/meta/ClusterMetaOperation.java b/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/meta/ClusterMetaOperation.java
deleted file mode 100644
index 674c9247..00000000
--- a/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/meta/ClusterMetaOperation.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.submarine.commons.cluster.meta;
-
-/**
- * Type of cluster metadata operation
- */
-public enum ClusterMetaOperation {
-  GET_OPERATION,
-  PUT_OPERATION,
-  DELETE_OPERATION
-}
diff --git a/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/meta/ClusterMetaType.java b/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/meta/ClusterMetaType.java
deleted file mode 100644
index b464b267..00000000
--- a/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/meta/ClusterMetaType.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.submarine.commons.cluster.meta;
-
-/**
- * Type of cluster metadata
- */
-public enum ClusterMetaType {
-  SERVER_META,
-  INTP_PROCESS_META
-}
diff --git a/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/protocol/LocalRaftClientProtocol.java b/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/protocol/LocalRaftClientProtocol.java
deleted file mode 100644
index b26bdf75..00000000
--- a/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/protocol/LocalRaftClientProtocol.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * Copyright 2017-present Open Networking Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.submarine.commons.cluster.protocol;
-
-import com.google.common.collect.Maps;
-import io.atomix.cluster.MemberId;
-import io.atomix.primitive.session.SessionId;
-
-import io.atomix.protocols.raft.protocol.HeartbeatRequest;
-import io.atomix.protocols.raft.protocol.PublishRequest;
-import io.atomix.protocols.raft.protocol.RaftClientProtocol;
-import io.atomix.protocols.raft.protocol.HeartbeatResponse;
-import io.atomix.protocols.raft.protocol.OpenSessionResponse;
-import io.atomix.protocols.raft.protocol.OpenSessionRequest;
-import io.atomix.protocols.raft.protocol.CloseSessionResponse;
-import io.atomix.protocols.raft.protocol.CloseSessionRequest;
-import io.atomix.protocols.raft.protocol.KeepAliveResponse;
-import io.atomix.protocols.raft.protocol.KeepAliveRequest;
-import io.atomix.protocols.raft.protocol.QueryResponse;
-import io.atomix.protocols.raft.protocol.QueryRequest;
-import io.atomix.protocols.raft.protocol.CommandResponse;
-import io.atomix.protocols.raft.protocol.CommandRequest;
-import io.atomix.protocols.raft.protocol.MetadataResponse;
-import io.atomix.protocols.raft.protocol.MetadataRequest;
-import io.atomix.protocols.raft.protocol.ResetRequest;
-import io.atomix.utils.concurrent.Futures;
-import io.atomix.utils.serializer.Serializer;
-
-import java.net.ConnectException;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.CompletableFuture;
-import java.util.concurrent.Executor;
-import java.util.function.Consumer;
-import java.util.function.Function;
-
-/**
- * Protocol for intercommunication between Raft clients for each server in the cluster.
- * Communication protocol for handling sessions, queries, commands, and services within the cluster.
- */
-public class LocalRaftClientProtocol extends LocalRaftProtocol implements RaftClientProtocol {
-  private Function<HeartbeatRequest, CompletableFuture<HeartbeatResponse>> heartbeatHandler;
-  private final Map<Long, Consumer<PublishRequest>> publishListeners = Maps.newConcurrentMap();
-
-  public LocalRaftClientProtocol(MemberId memberId,
-                                 Serializer serializer,
-                                 Map<MemberId, LocalRaftServerProtocol> servers,
-                                 Map<MemberId, LocalRaftClientProtocol> clients) {
-    super(serializer, servers, clients);
-    clients.put(memberId, this);
-  }
-
-  private CompletableFuture<LocalRaftServerProtocol> getServer(MemberId memberId) {
-    LocalRaftServerProtocol server = server(memberId);
-    if (server != null) {
-      return Futures.completedFuture(server);
-    } else {
-      return Futures.exceptionalFuture(new ConnectException());
-    }
-  }
-
-  @Override
-  public CompletableFuture<OpenSessionResponse> openSession(MemberId memberId,
-                                                            OpenSessionRequest request) {
-    return getServer(memberId).thenCompose(protocol ->
-        protocol.openSession(encode(request))).thenApply(this::decode);
-  }
-
-  @Override
-  public CompletableFuture<CloseSessionResponse> closeSession(MemberId memberId,
-                                                              CloseSessionRequest request) {
-    return getServer(memberId).thenCompose(protocol ->
-        protocol.closeSession(encode(request))).thenApply(this::decode);
-  }
-
-  @Override
-  public CompletableFuture<KeepAliveResponse> keepAlive(MemberId memberId,
-                                                        KeepAliveRequest request) {
-    return getServer(memberId).thenCompose(protocol ->
-        protocol.keepAlive(encode(request))).thenApply(this::decode);
-  }
-
-  @Override
-  public CompletableFuture<QueryResponse> query(MemberId memberId, QueryRequest request) {
-    return getServer(memberId).thenCompose(protocol ->
-        protocol.query(encode(request))).thenApply(this::decode);
-  }
-
-  @Override
-  public CompletableFuture<CommandResponse> command(MemberId memberId,
-                                                    CommandRequest request) {
-    return getServer(memberId).thenCompose(protocol ->
-        protocol.command(encode(request))).thenApply(this::decode);
-  }
-
-  @Override
-  public CompletableFuture<MetadataResponse> metadata(MemberId memberId,
-                                                      MetadataRequest request) {
-    return getServer(memberId).thenCompose(protocol ->
-        protocol.metadata(encode(request))).thenApply(this::decode);
-  }
-
-  CompletableFuture<byte[]> heartbeat(byte[] request) {
-    if (heartbeatHandler != null) {
-      return heartbeatHandler.apply(decode(request)).thenApply(this::encode);
-    } else {
-      return Futures.exceptionalFuture(new ConnectException());
-    }
-  }
-
-  @Override
-  public void registerHeartbeatHandler(Function<HeartbeatRequest,
-      CompletableFuture<HeartbeatResponse>> handler) {
-    this.heartbeatHandler = handler;
-  }
-
-  @Override
-  public void unregisterHeartbeatHandler() {
-    this.heartbeatHandler = null;
-  }
-
-  @Override
-  public void reset(Set<MemberId> members, ResetRequest request) {
-    members.forEach(nodeId -> {
-      LocalRaftServerProtocol server = server(nodeId);
-      if (server != null) {
-        server.reset(request.session(), encode(request));
-      }
-    });
-  }
-
-  void publish(long sessionId, byte[] request) {
-    Consumer<PublishRequest> listener = publishListeners.get(sessionId);
-    if (listener != null) {
-      listener.accept(decode(request));
-    }
-  }
-
-  @Override
-  public void registerPublishListener(SessionId sessionId,
-                                      Consumer<PublishRequest> listener, Executor executor) {
-    publishListeners.put(sessionId.id(), request ->
-        executor.execute(() -> listener.accept(request)));
-  }
-
-  @Override
-  public void unregisterPublishListener(SessionId sessionId) {
-    publishListeners.remove(sessionId.id());
-  }
-}
diff --git a/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/protocol/LocalRaftProtocol.java b/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/protocol/LocalRaftProtocol.java
deleted file mode 100644
index ccadcc4f..00000000
--- a/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/protocol/LocalRaftProtocol.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright 2017-present Open Networking Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.submarine.commons.cluster.protocol;
-
-import io.atomix.cluster.MemberId;
-import io.atomix.utils.serializer.Serializer;
-
-import java.util.Map;
-
-/**
- * Base class for Raft protocol.
- */
-public abstract class LocalRaftProtocol {
-  private final Serializer serializer;
-  private final Map<MemberId, LocalRaftServerProtocol> servers;
-  private final Map<MemberId, LocalRaftClientProtocol> clients;
-
-  public LocalRaftProtocol(Serializer serializer,
-                           Map<MemberId, LocalRaftServerProtocol> servers,
-                           Map<MemberId, LocalRaftClientProtocol> clients) {
-    this.serializer = serializer;
-    this.servers = servers;
-    this.clients = clients;
-  }
-
-  <T> T copy(T value) {
-    return serializer.decode(serializer.encode(value));
-  }
-
-  byte[] encode(Object value) {
-    return serializer.encode(value);
-  }
-
-  <T> T decode(byte[] bytes) {
-    return serializer.decode(bytes);
-  }
-
-  LocalRaftServerProtocol server(MemberId memberId) {
-    return servers.get(memberId);
-  }
-
-  LocalRaftClientProtocol client(MemberId memberId) {
-    return clients.get(memberId);
-  }
-}
diff --git a/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/protocol/LocalRaftProtocolFactory.java b/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/protocol/LocalRaftProtocolFactory.java
deleted file mode 100644
index 077f2c19..00000000
--- a/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/protocol/LocalRaftProtocolFactory.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright 2017-present Open Networking Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.submarine.commons.cluster.protocol;
-
-import com.google.common.collect.Maps;
-import io.atomix.cluster.MemberId;
-import io.atomix.protocols.raft.protocol.RaftClientProtocol;
-import io.atomix.protocols.raft.protocol.RaftServerProtocol;
-import io.atomix.utils.serializer.Serializer;
-
-import java.util.Map;
-
-/**
- * Cluster Raft protocol factory.
- */
-public class LocalRaftProtocolFactory {
-  private final Serializer serializer;
-  private final Map<MemberId, LocalRaftServerProtocol> servers = Maps.newConcurrentMap();
-  private final Map<MemberId, LocalRaftClientProtocol> clients = Maps.newConcurrentMap();
-
-  public LocalRaftProtocolFactory(Serializer serializer) {
-    this.serializer = serializer;
-  }
-
-  /**
-   * Returns a new test client protocol.
-   *
-   * @param memberId the client member identifier
-   * @return a new test client protocol
-   */
-  public RaftClientProtocol newClientProtocol(MemberId memberId) {
-    return new LocalRaftClientProtocol(memberId, serializer, servers, clients);
-  }
-
-  /**
-   * Returns a new test server protocol.
-   *
-   * @param memberId the server member identifier
-   * @return a new test server protocol
-   */
-  public RaftServerProtocol newServerProtocol(MemberId memberId) {
-    return new LocalRaftServerProtocol(memberId, serializer, servers, clients);
-  }
-}
diff --git a/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/protocol/LocalRaftServerProtocol.java b/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/protocol/LocalRaftServerProtocol.java
deleted file mode 100644
index 7ae9d33d..00000000
--- a/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/protocol/LocalRaftServerProtocol.java
+++ /dev/null
@@ -1,527 +0,0 @@
-/*
- * Copyright 2017-present Open Networking Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.submarine.commons.cluster.protocol;
-
-import com.google.common.collect.Maps;
-import io.atomix.cluster.MemberId;
-import io.atomix.primitive.session.SessionId;
-import io.atomix.protocols.raft.protocol.RaftServerProtocol;
-import io.atomix.protocols.raft.protocol.OpenSessionRequest;
-import io.atomix.protocols.raft.protocol.OpenSessionResponse;
-import io.atomix.protocols.raft.protocol.CloseSessionRequest;
-import io.atomix.protocols.raft.protocol.CloseSessionResponse;
-import io.atomix.protocols.raft.protocol.KeepAliveRequest;
-import io.atomix.protocols.raft.protocol.KeepAliveResponse;
-import io.atomix.protocols.raft.protocol.QueryRequest;
-import io.atomix.protocols.raft.protocol.QueryResponse;
-import io.atomix.protocols.raft.protocol.CommandRequest;
-import io.atomix.protocols.raft.protocol.CommandResponse;
-import io.atomix.protocols.raft.protocol.MetadataRequest;
-import io.atomix.protocols.raft.protocol.MetadataResponse;
-import io.atomix.protocols.raft.protocol.JoinRequest;
-import io.atomix.protocols.raft.protocol.JoinResponse;
-import io.atomix.protocols.raft.protocol.LeaveRequest;
-import io.atomix.protocols.raft.protocol.LeaveResponse;
-import io.atomix.protocols.raft.protocol.ConfigureRequest;
-import io.atomix.protocols.raft.protocol.ConfigureResponse;
-import io.atomix.protocols.raft.protocol.ReconfigureRequest;
-import io.atomix.protocols.raft.protocol.ReconfigureResponse;
-import io.atomix.protocols.raft.protocol.InstallRequest;
-import io.atomix.protocols.raft.protocol.InstallResponse;
-import io.atomix.protocols.raft.protocol.PollRequest;
-import io.atomix.protocols.raft.protocol.PollResponse;
-import io.atomix.protocols.raft.protocol.VoteRequest;
-import io.atomix.protocols.raft.protocol.VoteResponse;
-import io.atomix.protocols.raft.protocol.TransferRequest;
-import io.atomix.protocols.raft.protocol.TransferResponse;
-import io.atomix.protocols.raft.protocol.AppendRequest;
-import io.atomix.protocols.raft.protocol.AppendResponse;
-import io.atomix.protocols.raft.protocol.ResetRequest;
-import io.atomix.protocols.raft.protocol.PublishRequest;
-import io.atomix.protocols.raft.protocol.HeartbeatResponse;
-import io.atomix.protocols.raft.protocol.HeartbeatRequest;
-
-import io.atomix.utils.concurrent.Futures;
-import io.atomix.utils.serializer.Serializer;
-
-import java.net.ConnectException;
-import java.util.Map;
-import java.util.concurrent.CompletableFuture;
-import java.util.concurrent.Executor;
-import java.util.function.Consumer;
-import java.util.function.Function;
-
-/**
- * Cluster server protocol.
- */
-public class LocalRaftServerProtocol extends LocalRaftProtocol implements RaftServerProtocol {
-  private Function<OpenSessionRequest, CompletableFuture<OpenSessionResponse>> openSessionHandler;
-  private Function<CloseSessionRequest, CompletableFuture<CloseSessionResponse>>
-      closeSessionHandler;
-  private Function<KeepAliveRequest, CompletableFuture<KeepAliveResponse>> keepAliveHandler;
-  private Function<QueryRequest, CompletableFuture<QueryResponse>> queryHandler;
-  private Function<CommandRequest, CompletableFuture<CommandResponse>> commandHandler;
-  private Function<MetadataRequest, CompletableFuture<MetadataResponse>> metadataHandler;
-  private Function<JoinRequest, CompletableFuture<JoinResponse>> joinHandler;
-  private Function<LeaveRequest, CompletableFuture<LeaveResponse>> leaveHandler;
-  private Function<ConfigureRequest, CompletableFuture<ConfigureResponse>> configureHandler;
-  private Function<ReconfigureRequest, CompletableFuture<ReconfigureResponse>> reconfigureHandler;
-  private Function<InstallRequest, CompletableFuture<InstallResponse>> installHandler;
-  private Function<PollRequest, CompletableFuture<PollResponse>> pollHandler;
-  private Function<VoteRequest, CompletableFuture<VoteResponse>> voteHandler;
-  private Function<TransferRequest, CompletableFuture<TransferResponse>> transferHandler;
-  private Function<AppendRequest, CompletableFuture<AppendResponse>> appendHandler;
-  private final Map<Long, Consumer<ResetRequest>> resetListeners = Maps.newConcurrentMap();
-
-  public LocalRaftServerProtocol(MemberId memberId, Serializer serializer,
-                                 Map<MemberId, LocalRaftServerProtocol> servers,
-                                 Map<MemberId, LocalRaftClientProtocol> clients) {
-    super(serializer, servers, clients);
-    servers.put(memberId, this);
-  }
-
-  private CompletableFuture<LocalRaftServerProtocol> getServer(MemberId memberId) {
-    LocalRaftServerProtocol server = server(memberId);
-    if (server != null) {
-      return Futures.completedFuture(server);
-    } else {
-      return Futures.exceptionalFuture(new ConnectException());
-    }
-  }
-
-  private CompletableFuture<LocalRaftClientProtocol> getClient(MemberId memberId) {
-    LocalRaftClientProtocol client = client(memberId);
-    if (client != null) {
-      return Futures.completedFuture(client);
-    } else {
-      return Futures.exceptionalFuture(new ConnectException());
-    }
-  }
-
-  @Override
-  public CompletableFuture<OpenSessionResponse> openSession(MemberId memberId,
-                                                            OpenSessionRequest request) {
-    return getServer(memberId).thenCompose(listener ->
-        listener.openSession(encode(request))).thenApply(this::decode);
-  }
-
-  @Override
-  public CompletableFuture<CloseSessionResponse> closeSession(MemberId memberId,
-                                                              CloseSessionRequest request) {
-    return getServer(memberId).thenCompose(listener ->
-        listener.closeSession(encode(request))).thenApply(this::decode);
-  }
-
-  @Override
-  public CompletableFuture<KeepAliveResponse> keepAlive(MemberId memberId,
-                                                        KeepAliveRequest request) {
-    return getServer(memberId).thenCompose(listener ->
-        listener.keepAlive(encode(request))).thenApply(this::decode);
-  }
-
-  @Override
-  public CompletableFuture<QueryResponse> query(MemberId memberId, QueryRequest request) {
-    return getServer(memberId).thenCompose(listener ->
-        listener.query(encode(request))).thenApply(this::decode);
-  }
-
-  @Override
-  public CompletableFuture<CommandResponse> command(MemberId memberId,
-                                                    CommandRequest request) {
-    return getServer(memberId).thenCompose(listener ->
-        listener.command(encode(request))).thenApply(this::decode);
-  }
-
-  @Override
-  public CompletableFuture<MetadataResponse> metadata(MemberId memberId,
-                                                      MetadataRequest request) {
-    return getServer(memberId).thenCompose(listener ->
-        listener.metadata(encode(request))).thenApply(this::decode);
-  }
-
-  @Override
-  public CompletableFuture<JoinResponse> join(MemberId memberId, JoinRequest request) {
-    return getServer(memberId).thenCompose(listener ->
-        listener.join(encode(request))).thenApply(this::decode);
-  }
-
-  @Override
-  public CompletableFuture<LeaveResponse> leave(MemberId memberId, LeaveRequest request) {
-    return getServer(memberId).thenCompose(listener ->
-        listener.leave(encode(request))).thenApply(this::decode);
-  }
-
-  @Override
-  public CompletableFuture<ConfigureResponse> configure(MemberId memberId,
-                                                        ConfigureRequest request) {
-    return getServer(memberId).thenCompose(listener ->
-        listener.configure(encode(request))).thenApply(this::decode);
-  }
-
-  @Override
-  public CompletableFuture<ReconfigureResponse> reconfigure(MemberId memberId,
-                                                            ReconfigureRequest request) {
-    return getServer(memberId).thenCompose(listener ->
-        listener.reconfigure(encode(request))).thenApply(this::decode);
-  }
-
-  @Override
-  public CompletableFuture<InstallResponse> install(MemberId memberId, InstallRequest request) {
-    return getServer(memberId).thenCompose(listener ->
-        listener.install(encode(request))).thenApply(this::decode);
-  }
-
-  @Override
-  public CompletableFuture<TransferResponse> transfer(MemberId memberId, TransferRequest request) {
-    return getServer(memberId).thenCompose(listener ->
-        listener.install(encode(request))).thenApply(this::decode);
-  }
-
-  @Override
-  public CompletableFuture<PollResponse> poll(MemberId memberId, PollRequest request) {
-    return getServer(memberId).thenCompose(listener ->
-        listener.poll(encode(request))).thenApply(this::decode);
-  }
-
-  @Override
-  public CompletableFuture<VoteResponse> vote(MemberId memberId, VoteRequest request) {
-    return getServer(memberId).thenCompose(listener ->
-        listener.vote(encode(request))).thenApply(this::decode);
-  }
-
-  @Override
-  public CompletableFuture<AppendResponse> append(MemberId memberId, AppendRequest request) {
-    return getServer(memberId).thenCompose(listener ->
-        listener.append(encode(request))).thenApply(this::decode);
-  }
-
-  @Override
-  public void publish(MemberId memberId, PublishRequest request) {
-    getClient(memberId).thenAccept(protocol ->
-        protocol.publish(request.session(), encode(request)));
-  }
-
-  @Override
-  public CompletableFuture<HeartbeatResponse> heartbeat(MemberId memberId,
-                                                        HeartbeatRequest request) {
-    return getClient(memberId).thenCompose(protocol ->
-        protocol.heartbeat(encode(request))).thenApply(this::decode);
-  }
-
-  CompletableFuture<byte[]> openSession(byte[] request) {
-    if (openSessionHandler != null) {
-      return openSessionHandler.apply(decode(request)).thenApply(this::encode);
-    } else {
-      return Futures.exceptionalFuture(new ConnectException());
-    }
-  }
-
-  @Override
-  public void registerOpenSessionHandler(Function<OpenSessionRequest,
-      CompletableFuture<OpenSessionResponse>> handler) {
-    this.openSessionHandler = handler;
-  }
-
-  @Override
-  public void unregisterOpenSessionHandler() {
-    this.openSessionHandler = null;
-  }
-
-  CompletableFuture<byte[]> closeSession(byte[] request) {
-    if (closeSessionHandler != null) {
-      return closeSessionHandler.apply(decode(request)).thenApply(this::encode);
-    } else {
-      return Futures.exceptionalFuture(new ConnectException());
-    }
-  }
-
-  @Override
-  public void registerCloseSessionHandler(Function<CloseSessionRequest,
-      CompletableFuture<CloseSessionResponse>> handler) {
-    this.closeSessionHandler = handler;
-  }
-
-  @Override
-  public void unregisterCloseSessionHandler() {
-    this.closeSessionHandler = null;
-  }
-
-  CompletableFuture<byte[]> keepAlive(byte[] request) {
-    if (keepAliveHandler != null) {
-      return keepAliveHandler.apply(decode(request)).thenApply(this::encode);
-    } else {
-      return Futures.exceptionalFuture(new ConnectException());
-    }
-  }
-
-  @Override
-  public void registerKeepAliveHandler(Function<KeepAliveRequest,
-      CompletableFuture<KeepAliveResponse>> handler) {
-    this.keepAliveHandler = handler;
-  }
-
-  @Override
-  public void unregisterKeepAliveHandler() {
-    this.keepAliveHandler = null;
-  }
-
-  CompletableFuture<byte[]> query(byte[] request) {
-    if (queryHandler != null) {
-      return queryHandler.apply(decode(request)).thenApply(this::encode);
-    } else {
-      return Futures.exceptionalFuture(new ConnectException());
-    }
-  }
-
-  @Override
-  public void registerQueryHandler(Function<QueryRequest,
-      CompletableFuture<QueryResponse>> handler) {
-    this.queryHandler = handler;
-  }
-
-  @Override
-  public void unregisterQueryHandler() {
-    this.queryHandler = null;
-  }
-
-  CompletableFuture<byte[]> command(byte[] request) {
-    if (commandHandler != null) {
-      return commandHandler.apply(decode(request)).thenApply(this::encode);
-    } else {
-      return Futures.exceptionalFuture(new ConnectException());
-    }
-  }
-
-  @Override
-  public void registerCommandHandler(Function<CommandRequest,
-      CompletableFuture<CommandResponse>> handler) {
-    this.commandHandler = handler;
-  }
-
-  @Override
-  public void unregisterCommandHandler() {
-    this.commandHandler = null;
-  }
-
-  CompletableFuture<byte[]> metadata(byte[] request) {
-    if (metadataHandler != null) {
-      return metadataHandler.apply(decode(request)).thenApply(this::encode);
-    } else {
-      return Futures.exceptionalFuture(new ConnectException());
-    }
-  }
-
-  @Override
-  public void registerMetadataHandler(Function<MetadataRequest,
-      CompletableFuture<MetadataResponse>> handler) {
-    this.metadataHandler = handler;
-  }
-
-  @Override
-  public void unregisterMetadataHandler() {
-    this.metadataHandler = null;
-  }
-
-  CompletableFuture<byte[]> join(byte[] request) {
-    if (joinHandler != null) {
-      return joinHandler.apply(decode(request)).thenApply(this::encode);
-    } else {
-      return Futures.exceptionalFuture(new ConnectException());
-    }
-  }
-
-  @Override
-  public void registerJoinHandler(Function<JoinRequest,
-      CompletableFuture<JoinResponse>> handler) {
-    this.joinHandler = handler;
-  }
-
-  @Override
-  public void unregisterJoinHandler() {
-    this.joinHandler = null;
-  }
-
-  CompletableFuture<byte[]> leave(byte[] request) {
-    if (leaveHandler != null) {
-      return leaveHandler.apply(decode(request)).thenApply(this::encode);
-    } else {
-      return Futures.exceptionalFuture(new ConnectException());
-    }
-  }
-
-  @Override
-  public void registerLeaveHandler(Function<LeaveRequest,
-      CompletableFuture<LeaveResponse>> handler) {
-    this.leaveHandler = handler;
-  }
-
-  @Override
-  public void unregisterLeaveHandler() {
-    this.leaveHandler = null;
-  }
-
-  CompletableFuture<byte[]> configure(byte[] request) {
-    if (configureHandler != null) {
-      return configureHandler.apply(decode(request)).thenApply(this::encode);
-    } else {
-      return Futures.exceptionalFuture(new ConnectException());
-    }
-  }
-
-  @Override
-  public void registerConfigureHandler(Function<ConfigureRequest,
-      CompletableFuture<ConfigureResponse>> handler) {
-    this.configureHandler = handler;
-  }
-
-  @Override
-  public void unregisterConfigureHandler() {
-    this.configureHandler = null;
-  }
-
-  CompletableFuture<byte[]> reconfigure(byte[] request) {
-    if (reconfigureHandler != null) {
-      return reconfigureHandler.apply(decode(request)).thenApply(this::encode);
-    } else {
-      return Futures.exceptionalFuture(new ConnectException());
-    }
-  }
-
-  @Override
-  public void registerReconfigureHandler(Function<ReconfigureRequest,
-      CompletableFuture<ReconfigureResponse>> handler) {
-    this.reconfigureHandler = handler;
-  }
-
-  @Override
-  public void unregisterReconfigureHandler() {
-    this.reconfigureHandler = null;
-  }
-
-  CompletableFuture<byte[]> install(byte[] request) {
-    if (installHandler != null) {
-      return installHandler.apply(decode(request)).thenApply(this::encode);
-    } else {
-      return Futures.exceptionalFuture(new ConnectException());
-    }
-  }
-
-  @Override
-  public void registerInstallHandler(Function<InstallRequest,
-      CompletableFuture<InstallResponse>> handler) {
-    this.installHandler = handler;
-  }
-
-  @Override
-  public void unregisterInstallHandler() {
-    this.installHandler = null;
-  }
-
-  CompletableFuture<byte[]> poll(byte[] request) {
-    if (pollHandler != null) {
-      return pollHandler.apply(decode(request)).thenApply(this::encode);
-    } else {
-      return Futures.exceptionalFuture(new ConnectException());
-    }
-  }
-
-  @Override
-  public void registerPollHandler(Function<PollRequest,
-      CompletableFuture<PollResponse>> handler) {
-    this.pollHandler = handler;
-  }
-
-  @Override
-  public void unregisterPollHandler() {
-    this.pollHandler = null;
-  }
-
-  CompletableFuture<byte[]> vote(byte[] request) {
-    if (voteHandler != null) {
-      return voteHandler.apply(decode(request)).thenApply(this::encode);
-    } else {
-      return Futures.exceptionalFuture(new ConnectException());
-    }
-  }
-
-  @Override
-  public void registerVoteHandler(Function<VoteRequest,
-      CompletableFuture<VoteResponse>> handler) {
-    this.voteHandler = handler;
-  }
-
-  @Override
-  public void unregisterVoteHandler() {
-    this.voteHandler = null;
-  }
-
-  @Override
-  public void registerTransferHandler(Function<TransferRequest,
-      CompletableFuture<TransferResponse>> handler) {
-    this.transferHandler = handler;
-  }
-
-  @Override
-  public void unregisterTransferHandler() {
-    this.transferHandler = null;
-  }
-
-  CompletableFuture<byte[]> transfer(byte[] request) {
-    if (transferHandler != null) {
-      return transferHandler.apply(decode(request)).thenApply(this::encode);
-    } else {
-      return Futures.exceptionalFuture(new ConnectException());
-    }
-  }
-
-  CompletableFuture<byte[]> append(byte[] request) {
-    if (appendHandler != null) {
-      return appendHandler.apply(decode(request)).thenApply(this::encode);
-    } else {
-      return Futures.exceptionalFuture(new ConnectException());
-    }
-  }
-
-  @Override
-  public void registerAppendHandler(Function<AppendRequest,
-      CompletableFuture<AppendResponse>> handler) {
-    this.appendHandler = handler;
-  }
-
-  @Override
-  public void unregisterAppendHandler() {
-    this.appendHandler = null;
-  }
-
-  void reset(long sessionId, byte[] request) {
-    Consumer<ResetRequest> listener = resetListeners.get(sessionId);
-    if (listener != null) {
-      listener.accept(decode(request));
-    }
-  }
-
-  @Override
-  public void registerResetListener(SessionId sessionId,
-                                    Consumer<ResetRequest> listener, Executor executor) {
-    resetListeners.put(sessionId.id(), request -> executor.execute(()
-        -> listener.accept(request)));
-  }
-
-  @Override
-  public void unregisterResetListener(SessionId sessionId) {
-    resetListeners.remove(sessionId.id());
-  }
-}
diff --git a/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/protocol/RaftClientMessagingProtocol.java b/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/protocol/RaftClientMessagingProtocol.java
deleted file mode 100644
index 7ef0f328..00000000
--- a/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/protocol/RaftClientMessagingProtocol.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright 2017-present Open Networking Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.submarine.commons.cluster.protocol;
-
-import io.atomix.cluster.MemberId;
-import io.atomix.cluster.messaging.MessagingService;
-import io.atomix.primitive.session.SessionId;
-import io.atomix.protocols.raft.protocol.OpenSessionRequest;
-import io.atomix.protocols.raft.protocol.OpenSessionResponse;
-import io.atomix.protocols.raft.protocol.RaftClientProtocol;
-import io.atomix.protocols.raft.protocol.HeartbeatRequest;
-import io.atomix.protocols.raft.protocol.PublishRequest;
-import io.atomix.protocols.raft.protocol.HeartbeatResponse;
-import io.atomix.protocols.raft.protocol.CloseSessionResponse;
-import io.atomix.protocols.raft.protocol.CloseSessionRequest;
-import io.atomix.protocols.raft.protocol.KeepAliveResponse;
-import io.atomix.protocols.raft.protocol.KeepAliveRequest;
-import io.atomix.protocols.raft.protocol.QueryResponse;
-import io.atomix.protocols.raft.protocol.QueryRequest;
-import io.atomix.protocols.raft.protocol.CommandResponse;
-import io.atomix.protocols.raft.protocol.CommandRequest;
-import io.atomix.protocols.raft.protocol.MetadataResponse;
-import io.atomix.protocols.raft.protocol.MetadataRequest;
-import io.atomix.protocols.raft.protocol.ResetRequest;
-import io.atomix.utils.net.Address;
-import io.atomix.utils.serializer.Serializer;
-
-import java.util.Set;
-import java.util.concurrent.CompletableFuture;
-import java.util.concurrent.Executor;
-import java.util.function.Consumer;
-import java.util.function.Function;
-
-/**
- * Raft client messaging service protocol.
- */
-public class RaftClientMessagingProtocol extends RaftMessagingProtocol
-    implements RaftClientProtocol {
-  public RaftClientMessagingProtocol(MessagingService messagingService,
-                                     Serializer serializer,
-                                     Function<MemberId, Address> addressProvider) {
-    super(messagingService, serializer, addressProvider);
-  }
-
-  @Override
-  public CompletableFuture<OpenSessionResponse> openSession(MemberId memberId,
-                                                            OpenSessionRequest request) {
-    return sendAndReceive(memberId, "open-session", request);
-  }
-
-  @Override
-  public CompletableFuture<CloseSessionResponse> closeSession(MemberId memberId,
-                                                              CloseSessionRequest request) {
-    return sendAndReceive(memberId, "close-session", request);
-  }
-
-  @Override
-  public CompletableFuture<KeepAliveResponse> keepAlive(MemberId memberId,
-                                                        KeepAliveRequest request) {
-    return sendAndReceive(memberId, "keep-alive", request);
-  }
-
-  @Override
-  public CompletableFuture<QueryResponse> query(MemberId memberId, QueryRequest request) {
-    return sendAndReceive(memberId, "query", request);
-  }
-
-  @Override
-  public CompletableFuture<CommandResponse> command(MemberId memberId,
-                                                    CommandRequest request) {
-    return sendAndReceive(memberId, "command", request);
-  }
-
-  @Override
-  public CompletableFuture<MetadataResponse> metadata(MemberId memberId,
-                                                      MetadataRequest request) {
-    return sendAndReceive(memberId, "metadata", request);
-  }
-
-  @Override
-  public void registerHeartbeatHandler(Function<HeartbeatRequest,
-      CompletableFuture<HeartbeatResponse>> handler) {
-    registerHandler("heartbeat", handler);
-  }
-
-  @Override
-  public void unregisterHeartbeatHandler() {
-    unregisterHandler("heartbeat");
-  }
-
-  @Override
-  public void reset(Set<MemberId> members, ResetRequest request) {
-    for (MemberId memberId : members) {
-      sendAsync(memberId, String.format("reset-%d", request.session()), request);
-    }
-  }
-
-  @Override
-  public void registerPublishListener(SessionId sessionId, Consumer<PublishRequest> listener,
-                                      Executor executor) {
-    messagingService.registerHandler(String.format("publish-%d", sessionId.id()), (e, p) -> {
-      listener.accept(serializer.decode(p));
-    }, executor);
-  }
-
-  @Override
-  public void unregisterPublishListener(SessionId sessionId) {
-    messagingService.unregisterHandler(String.format("publish-%d", sessionId.id()));
-  }
-}
diff --git a/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/protocol/RaftMessagingProtocol.java b/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/protocol/RaftMessagingProtocol.java
deleted file mode 100644
index 8cdecc54..00000000
--- a/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/protocol/RaftMessagingProtocol.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright 2017-present Open Networking Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.submarine.commons.cluster.protocol;
-
-import io.atomix.cluster.MemberId;
-import io.atomix.cluster.messaging.MessagingService;
-import io.atomix.utils.concurrent.Futures;
-import io.atomix.utils.net.Address;
-import io.atomix.utils.serializer.Serializer;
-
-import java.net.ConnectException;
-import java.util.concurrent.CompletableFuture;
-import java.util.function.Function;
-
-/**
- * Messaging service based Raft protocol.
- */
-public abstract class RaftMessagingProtocol {
-  protected final MessagingService messagingService;
-  protected final Serializer serializer;
-  private final Function<MemberId, Address> addressProvider;
-
-  public RaftMessagingProtocol(MessagingService messagingService,
-                               Serializer serializer,
-                               Function<MemberId, Address> addressProvider) {
-    this.messagingService = messagingService;
-    this.serializer = serializer;
-    this.addressProvider = addressProvider;
-  }
-
-  protected Address address(MemberId memberId) {
-    return addressProvider.apply(memberId);
-  }
-
-  protected <T, U> CompletableFuture<U> sendAndReceive(MemberId memberId,
-                                                       String type, T request) {
-    Address address = address(memberId);
-    if (address == null) {
-      return Futures.exceptionalFuture(new ConnectException());
-    }
-    return messagingService.sendAndReceive(address, type, serializer.encode(request))
-        .thenApply(serializer::decode);
-  }
-
-  protected CompletableFuture<Void> sendAsync(MemberId memberId, String type, Object request) {
-    Address address = address(memberId);
-    if (address != null) {
-      return messagingService.sendAsync(address(memberId), type, serializer.encode(request));
-    }
-    return CompletableFuture.completedFuture(null);
-  }
-
-  protected <T, U> void registerHandler(String type, Function<T, CompletableFuture<U>> handler) {
-    messagingService.registerHandler(type, (e, p) -> {
-      CompletableFuture<byte[]> future = new CompletableFuture<>();
-      handler.apply(serializer.decode(p)).whenComplete((result, error) -> {
-        if (error == null) {
-          future.complete(serializer.encode(result));
-        } else {
-          future.completeExceptionally(error);
-        }
-      });
-      return future;
-    });
-  }
-
-  protected void unregisterHandler(String type) {
-    messagingService.unregisterHandler(type);
-  }
-}
diff --git a/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/protocol/RaftServerMessagingProtocol.java b/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/protocol/RaftServerMessagingProtocol.java
deleted file mode 100644
index e29614b5..00000000
--- a/submarine-commons/commons-cluster/src/main/java/org/apache/submarine/commons/cluster/protocol/RaftServerMessagingProtocol.java
+++ /dev/null
@@ -1,346 +0,0 @@
-/*
- * Copyright 2017-present Open Networking Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.submarine.commons.cluster.protocol;
-
-import io.atomix.cluster.MemberId;
-import io.atomix.cluster.messaging.MessagingService;
-import io.atomix.primitive.session.SessionId;
-import io.atomix.protocols.raft.protocol.RaftServerProtocol;
-import io.atomix.protocols.raft.protocol.OpenSessionRequest;
-import io.atomix.protocols.raft.protocol.OpenSessionResponse;
-import io.atomix.protocols.raft.protocol.CloseSessionRequest;
-import io.atomix.protocols.raft.protocol.CloseSessionResponse;
-import io.atomix.protocols.raft.protocol.KeepAliveRequest;
-import io.atomix.protocols.raft.protocol.KeepAliveResponse;
-import io.atomix.protocols.raft.protocol.QueryRequest;
-import io.atomix.protocols.raft.protocol.QueryResponse;
-import io.atomix.protocols.raft.protocol.CommandRequest;
-import io.atomix.protocols.raft.protocol.CommandResponse;
-import io.atomix.protocols.raft.protocol.MetadataRequest;
-import io.atomix.protocols.raft.protocol.MetadataResponse;
-import io.atomix.protocols.raft.protocol.JoinRequest;
-import io.atomix.protocols.raft.protocol.JoinResponse;
-import io.atomix.protocols.raft.protocol.LeaveRequest;
-import io.atomix.protocols.raft.protocol.LeaveResponse;
-import io.atomix.protocols.raft.protocol.ConfigureRequest;
-import io.atomix.protocols.raft.protocol.ConfigureResponse;
-import io.atomix.protocols.raft.protocol.ReconfigureRequest;
-import io.atomix.protocols.raft.protocol.ReconfigureResponse;
-import io.atomix.protocols.raft.protocol.InstallRequest;
-import io.atomix.protocols.raft.protocol.InstallResponse;
-import io.atomix.protocols.raft.protocol.PollRequest;
-import io.atomix.protocols.raft.protocol.PollResponse;
-import io.atomix.protocols.raft.protocol.VoteRequest;
-import io.atomix.protocols.raft.protocol.VoteResponse;
-import io.atomix.protocols.raft.protocol.TransferRequest;
-import io.atomix.protocols.raft.protocol.TransferResponse;
-import io.atomix.protocols.raft.protocol.AppendRequest;
-import io.atomix.protocols.raft.protocol.AppendResponse;
-import io.atomix.protocols.raft.protocol.ResetRequest;
-import io.atomix.protocols.raft.protocol.PublishRequest;
-import io.atomix.protocols.raft.protocol.HeartbeatResponse;
-import io.atomix.protocols.raft.protocol.HeartbeatRequest;
-import io.atomix.utils.net.Address;
-import io.atomix.utils.serializer.Serializer;
-
-import java.util.concurrent.CompletableFuture;
-import java.util.concurrent.Executor;
-import java.util.function.Consumer;
-import java.util.function.Function;
-
-/**
- * Raft server messaging protocol between Raft Servers for each server in the cluster.
- */
-public class RaftServerMessagingProtocol extends RaftMessagingProtocol
-    implements RaftServerProtocol {
-  public RaftServerMessagingProtocol(MessagingService messagingService,
-                                     Serializer serializer,
-                                     Function<MemberId, Address> addressProvider) {
-    super(messagingService, serializer, addressProvider);
-  }
-
-  @Override
-  public CompletableFuture<OpenSessionResponse> openSession(MemberId memberId,
-                                                            OpenSessionRequest request) {
-    return sendAndReceive(memberId, "open-session", request);
-  }
-
-  @Override
-  public CompletableFuture<CloseSessionResponse> closeSession(MemberId memberId,
-                                                              CloseSessionRequest request) {
-    return sendAndReceive(memberId, "close-session", request);
-  }
-
-  @Override
-  public CompletableFuture<KeepAliveResponse> keepAlive(MemberId memberId,
-                                                        KeepAliveRequest request) {
-    return sendAndReceive(memberId, "keep-alive", request);
-  }
-
-  @Override
-  public CompletableFuture<QueryResponse> query(MemberId memberId, QueryRequest request) {
-    return sendAndReceive(memberId, "query", request);
-  }
-
-  @Override
-  public CompletableFuture<CommandResponse> command(MemberId memberId,
-                                                    CommandRequest request) {
-    return sendAndReceive(memberId, "command", request);
-  }
-
-  @Override
-  public CompletableFuture<MetadataResponse> metadata(MemberId memberId,
-                                                      MetadataRequest request) {
-    return sendAndReceive(memberId, "metadata", request);
-  }
-
-  @Override
-  public CompletableFuture<JoinResponse> join(MemberId memberId, JoinRequest request) {
-    return sendAndReceive(memberId, "join", request);
-  }
-
-  @Override
-  public CompletableFuture<LeaveResponse> leave(MemberId memberId, LeaveRequest request) {
-    return sendAndReceive(memberId, "leave", request);
-  }
-
-  @Override
-  public CompletableFuture<ConfigureResponse> configure(MemberId memberId,
-                                                        ConfigureRequest request) {
-    return sendAndReceive(memberId, "configure", request);
-  }
-
-  @Override
-  public CompletableFuture<ReconfigureResponse> reconfigure(MemberId memberId,
-                                                            ReconfigureRequest request) {
-    return sendAndReceive(memberId, "reconfigure", request);
-  }
-
-  @Override
-  public CompletableFuture<InstallResponse> install(MemberId memberId, InstallRequest request) {
-    return sendAndReceive(memberId, "install", request);
-  }
-
-  @Override
-  public CompletableFuture<TransferResponse> transfer(MemberId memberId,
-                                                      TransferRequest request) {
-    return sendAndReceive(memberId, "transfer", request);
-  }
-
-  @Override
-  public CompletableFuture<PollResponse> poll(MemberId memberId, PollRequest request) {
-    return sendAndReceive(memberId, "poll", request);
-  }
-
-  @Override
-  public CompletableFuture<VoteResponse> vote(MemberId memberId, VoteRequest request) {
-    return sendAndReceive(memberId, "vote", request);
-  }
-
-  @Override
-  public CompletableFuture<AppendResponse> append(MemberId memberId, AppendRequest request) {
-    return sendAndReceive(memberId, "append", request);
-  }
-
-  @Override
-  public void publish(MemberId memberId, PublishRequest request) {
-    sendAsync(memberId, String.format("publish-%d", request.session()), request);
-  }
-
-  @Override
-  public CompletableFuture<HeartbeatResponse> heartbeat(MemberId memberId,
-                                                        HeartbeatRequest request) {
-    return sendAndReceive(memberId, "heartbeat", request);
-  }
-
-  @Override
-  public void registerOpenSessionHandler(Function<OpenSessionRequest,
-      CompletableFuture<OpenSessionResponse>> handler) {
-    registerHandler("open-session", handler);
-  }
-
-  @Override
-  public void unregisterOpenSessionHandler() {
-    unregisterHandler("open-session");
-  }
-
-  @Override
-  public void registerCloseSessionHandler(Function<CloseSessionRequest,
-      CompletableFuture<CloseSessionResponse>> handler) {
-    registerHandler("close-session", handler);
-  }
-
-  @Override
-  public void unregisterCloseSessionHandler() {
-    unregisterHandler("close-session");
-  }
-
-  @Override
-  public void registerKeepAliveHandler(Function<KeepAliveRequest,
-      CompletableFuture<KeepAliveResponse>> handler) {
-    registerHandler("keep-alive", handler);
-  }
-
-  @Override
-  public void unregisterKeepAliveHandler() {
-    unregisterHandler("keep-alive");
-  }
-
-  @Override
-  public void registerQueryHandler(Function<QueryRequest,
-      CompletableFuture<QueryResponse>> handler) {
-    registerHandler("query", handler);
-  }
-
-  @Override
-  public void unregisterQueryHandler() {
-    unregisterHandler("query");
-  }
-
-  @Override
-  public void registerCommandHandler(Function<CommandRequest,
-      CompletableFuture<CommandResponse>> handler) {
-    registerHandler("command", handler);
-  }
-
-  @Override
-  public void unregisterCommandHandler() {
-    unregisterHandler("command");
-  }
-
-  @Override
-  public void registerMetadataHandler(Function<MetadataRequest,
-      CompletableFuture<MetadataResponse>> handler) {
-    registerHandler("metadata", handler);
-  }
-
-  @Override
-  public void unregisterMetadataHandler() {
-    unregisterHandler("metadata");
-  }
-
-  @Override
-  public void registerJoinHandler(Function<JoinRequest,
-      CompletableFuture<JoinResponse>> handler) {
-    registerHandler("join", handler);
-  }
-
-  @Override
-  public void unregisterJoinHandler() {
-    unregisterHandler("join");
-  }
-
-  @Override
-  public void registerLeaveHandler(Function<LeaveRequest,
-      CompletableFuture<LeaveResponse>> handler) {
-    registerHandler("leave", handler);
-  }
-
-  @Override
-  public void unregisterLeaveHandler() {
-    unregisterHandler("leave");
-  }
-
-  @Override
-  public void registerConfigureHandler(Function<ConfigureRequest,
-      CompletableFuture<ConfigureResponse>> handler) {
-    registerHandler("configure", handler);
-  }
-
-  @Override
-  public void unregisterConfigureHandler() {
-    unregisterHandler("configure");
-  }
-
-  @Override
-  public void registerReconfigureHandler(Function<ReconfigureRequest,
-      CompletableFuture<ReconfigureResponse>> handler) {
-    registerHandler("reconfigure", handler);
-  }
-
-  @Override
-  public void unregisterReconfigureHandler() {
-    unregisterHandler("reconfigure");
-  }
-
-  @Override
-  public void registerInstallHandler(Function<InstallRequest,
-      CompletableFuture<InstallResponse>> handler) {
-    registerHandler("install", handler);
-  }
-
-  @Override
-  public void unregisterInstallHandler() {
-    unregisterHandler("install");
-  }
-
-  @Override
-  public void registerTransferHandler(Function<TransferRequest,
-      CompletableFuture<TransferResponse>> handler) {
-    registerHandler("transfer", handler);
-  }
-
-  @Override
-  public void unregisterTransferHandler() {
-    unregisterHandler("transfer");
-  }
-
-  @Override
-  public void registerPollHandler(Function<PollRequest,
-      CompletableFuture<PollResponse>> handler) {
-    registerHandler("poll", handler);
-  }
-
-  @Override
-  public void unregisterPollHandler() {
-    unregisterHandler("poll");
-  }
-
-  @Override
-  public void registerVoteHandler(Function<VoteRequest,
-      CompletableFuture<VoteResponse>> handler) {
-    registerHandler("vote", handler);
-  }
-
-  @Override
-  public void unregisterVoteHandler() {
-    unregisterHandler("vote");
-  }
-
-  @Override
-  public void registerAppendHandler(Function<AppendRequest,
-      CompletableFuture<AppendResponse>> handler) {
-    registerHandler("append", handler);
-  }
-
-  @Override
-  public void unregisterAppendHandler() {
-    unregisterHandler("append");
-  }
-
-  @Override
-  public void registerResetListener(SessionId sessionId,
-                                    Consumer<ResetRequest> listener, Executor executor) {
-    messagingService.registerHandler(String.format("reset-%d", sessionId.id()), (e, p) -> {
-      listener.accept(serializer.decode(p));
-    }, executor);
-  }
-
-  @Override
-  public void unregisterResetListener(SessionId sessionId) {
-    messagingService.unregisterHandler(String.format("reset-%d", sessionId.id()));
-  }
-}
diff --git a/submarine-commons/commons-cluster/src/test/java/org/apache/submarine/commons/cluster/ClusterMultiNodeTest.java b/submarine-commons/commons-cluster/src/test/java/org/apache/submarine/commons/cluster/ClusterMultiNodeTest.java
deleted file mode 100644
index 15aa24fd..00000000
--- a/submarine-commons/commons-cluster/src/test/java/org/apache/submarine/commons/cluster/ClusterMultiNodeTest.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.submarine.commons.cluster;
-
-import org.apache.submarine.commons.cluster.meta.ClusterMetaType;
-import org.apache.submarine.commons.utils.SubmarineConfiguration;
-import org.apache.submarine.commons.utils.NetworkUtils;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-public class ClusterMultiNodeTest {
-  private static Logger LOG = LoggerFactory.getLogger(ClusterMultiNodeTest.class);
-
-  private static List<ClusterServer> clusterServers = new ArrayList<>();
-  private static ClusterClient clusterClient = null;
-
-  static final String metaKey = "ClusterMultiNodeTestKey";
-
-  @BeforeClass
-  public static void startCluster() throws IOException, InterruptedException {
-    LOG.info("ClusterMultiNodeTest::startCluster >>>");
-
-    String clusterAddrList = "";
-    String serverHost = NetworkUtils.findAvailableHostAddress();
-    for (int i = 0; i < 3; i++) {
-      // Set the cluster IP and port
-      int serverPort = NetworkUtils.findRandomAvailablePortOnAllLocalInterfaces();
-      clusterAddrList += serverHost + ":" + serverPort;
-      if (i != 2) {
-        clusterAddrList += ",";
-      }
-    }
-    LOG.info("clusterAddrList = {}", clusterAddrList);
-    SubmarineConfiguration sconf = SubmarineConfiguration.getInstance();
-    sconf.setClusterAddress(clusterAddrList);
-
-    // mock cluster manager server
-    String cluster[] = clusterAddrList.split(",");
-    try {
-      for (int i = 0; i < 3; i++) {
-        String[] parts = cluster[i].split(":");
-        String clusterHost = parts[0];
-        int clusterPort = Integer.valueOf(parts[1]);
-
-        Class clazz = ClusterServer.class;
-        Constructor constructor = clazz.getDeclaredConstructor();
-        constructor.setAccessible(true);
-        ClusterServer clusterServer = (ClusterServer) constructor.newInstance();
-        clusterServer.initTestCluster(clusterAddrList, clusterHost, clusterPort);
-
-        clusterServers.add(clusterServer);
-      }
-    } catch (Exception e) {
-      LOG.error(e.getMessage(), e);
-    }
-
-    for (ClusterServer clusterServer : clusterServers) {
-      clusterServer.start();
-    }
-
-    // mock cluster manager client
-    try {
-      Class clazz = ClusterClient.class;
-      Constructor constructor = null;
-      constructor = clazz.getDeclaredConstructor();
-      constructor.setAccessible(true);
-      clusterClient = (ClusterClient) constructor.newInstance();
-      clusterClient.start(metaKey);
-    } catch (NoSuchMethodException | InstantiationException
-        | IllegalAccessException | InvocationTargetException e) {
-      LOG.error(e.getMessage(), e);
-    }
-
-    // Waiting for cluster startup
-    boolean clusterIsStartup = false;
-    int wait = 0;
-    while (wait++ < 100) {
-      if (clusterIsStartup() && clusterClient.raftInitialized()) {
-        LOG.info("ClusterMultiNodeTest::wait {}(ms) found cluster leader", wait * 3000);
-        clusterIsStartup = true;
-        break;
-      }
-      try {
-        Thread.sleep(3000);
-      } catch (InterruptedException e) {
-        LOG.error(e.getMessage(), e);
-      }
-    }
-
-    assertEquals(clusterIsStartup, true);
-
-    Thread.sleep(5000);
-    assertEquals(true, clusterIsStartup());
-    LOG.info("ClusterMultiNodeTest::startCluster <<<");
-  }
-
-  @AfterClass
-  public static void stopCluster() {
-    LOG.info("ClusterMultiNodeTest::stopCluster >>>");
-    if (null != clusterClient) {
-      clusterClient.shutdown();
-    }
-    for (ClusterServer clusterServer : clusterServers) {
-      clusterServer.shutdown();
-    }
-    LOG.info("ClusterMultiNodeTest::stopCluster <<<");
-  }
-
-  static boolean clusterIsStartup() {
-    boolean foundLeader = false;
-    for (ClusterServer clusterServer : clusterServers) {
-      if (!clusterServer.raftInitialized()) {
-        LOG.warn("clusterServer not Initialized!");
-        return false;
-      }
-      if (clusterServer.isClusterLeader()) {
-        foundLeader = true;
-      }
-    }
-
-    if (!foundLeader) {
-      LOG.warn("Can not found leader!");
-      return false;
-    }
-
-    LOG.info("cluster startup!");
-    return true;
-  }
-
-  @Test
-  public void testClusterServerMeta() {
-    LOG.info("ClusterMultiNodeTest::testClusterServerMeta >>>");
-    // Get metadata for all services
-    Object srvMeta = clusterClient.getClusterMeta(ClusterMetaType.SERVER_META, "");
-    LOG.info(srvMeta.toString());
-
-    assertNotNull(srvMeta);
-    assertEquals(true, (srvMeta instanceof HashMap));
-    HashMap hashMap = (HashMap) srvMeta;
-
-    assertEquals(hashMap.size(), 3);
-    LOG.info("ClusterMultiNodeTest::testClusterServerMeta <<<");
-  }
-
-  @Test
-  public void testClusterClientMeta() {
-    LOG.info("ClusterMultiNodeTest::testClusterClientMeta >>>");
-    // Get metadata for all services
-    Object srvMeta = clusterClient.getClusterMeta(ClusterMetaType.INTP_PROCESS_META, "");
-    LOG.info(srvMeta.toString());
-
-    assertNotNull(srvMeta);
-    assertEquals(true, (srvMeta instanceof HashMap));
-    HashMap hashMap = (HashMap) srvMeta;
-
-    assertEquals(hashMap.size(), 1);
-    LOG.info("ClusterMultiNodeTest::testClusterClientMeta <<<");
-  }
-}
diff --git a/submarine-commons/commons-cluster/src/test/resources/log4j.properties b/submarine-commons/commons-cluster/src/test/resources/log4j.properties
deleted file mode 100644
index 47256155..00000000
--- a/submarine-commons/commons-cluster/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-# Root logger option
-log4j.rootLogger=INFO, stdout
-
-# Direct log messages to stdout
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%5p [%d] ({%t} %F[%M]:%L) - %m%n
diff --git a/submarine-commons/pom.xml b/submarine-commons/pom.xml
index a6ad3897..80724fe3 100644
--- a/submarine-commons/pom.xml
+++ b/submarine-commons/pom.xml
@@ -37,7 +37,6 @@
   <modules>
     <module>commons-utils</module>
     <module>commons-runtime</module>
-    <module>commons-cluster</module>
   </modules>
 
 </project>
diff --git a/submarine-dist/src/assembly/distribution.xml b/submarine-dist/src/assembly/distribution.xml
index 9a983f7d..edbe8f83 100644
--- a/submarine-dist/src/assembly/distribution.xml
+++ b/submarine-dist/src/assembly/distribution.xml
@@ -95,13 +95,6 @@
         <include>submarine-commons-runtime-${project.version}.jar</include>
       </includes>
     </fileSet>
-    <fileSet>
-      <directory>../submarine-commons/commons-cluster/target</directory>
-      <outputDirectory>/lib</outputDirectory>
-      <includes>
-        <include>submarine-commons-cluster-${project.version}-shade.jar</include>
-      </includes>
-    </fileSet>
     <fileSet>
       <directory>../submarine-commons/commons-metastore/target</directory>
       <outputDirectory>/lib</outputDirectory>
@@ -156,14 +149,10 @@
       <outputDirectory>/lib</outputDirectory>
       <excludes>
         <!-- exclude rename to submarine-commons-*.jar -->
-        <exclude>submarine-commons-cluster-${project.version}.jar</exclude>
         <exclude>submarine-commons-metastore-${project.version}.jar</exclude>
         <exclude>grpc-*.jar</exclude>
         <!-- mysql-connector-java uses the GPL license. So we need exclude mysql-connector-java jar -->
         <exclude>mysql-connector-java-*.jar</exclude>
-        <!-- atomix & netty-4.1.27.Final already shade in submarine-commons-cluster-${project.version}-shade.jar -->
-        <exclude>atomix-*.jar</exclude>
-        <exclude>netty-*-4.1.27.Final*.jar</exclude>
       </excludes>
     </fileSet>
 <!--    <fileSet>-->
diff --git a/submarine-server/server-core/pom.xml b/submarine-server/server-core/pom.xml
index a1a956e6..f891f5eb 100644
--- a/submarine-server/server-core/pom.xml
+++ b/submarine-server/server-core/pom.xml
@@ -32,17 +32,6 @@
   <name>Submarine: Server Core</name>
 
   <dependencies>
-    <dependency>
-      <groupId>org.apache.submarine</groupId>
-      <artifactId>submarine-commons-cluster</artifactId>
-      <version>${project.version}</version>
-      <exclusions>
-        <exclusion>
-          <groupId>org.ow2.asm</groupId>
-          <artifactId>asm</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
     <dependency>
       <groupId>org.apache.submarine</groupId>
       <artifactId>submarine-commons-runtime</artifactId>
diff --git a/submarine-server/server-core/src/main/java/org/apache/submarine/server/SubmarineServer.java b/submarine-server/server-core/src/main/java/org/apache/submarine/server/SubmarineServer.java
index 92ce425a..4eccbb52 100644
--- a/submarine-server/server-core/src/main/java/org/apache/submarine/server/SubmarineServer.java
+++ b/submarine-server/server-core/src/main/java/org/apache/submarine/server/SubmarineServer.java
@@ -22,7 +22,6 @@ import org.apache.log4j.PropertyConfigurator;
 import org.apache.submarine.server.rest.provider.YamlEntityProvider;
 import org.apache.submarine.server.workbench.websocket.NotebookServer;
 import org.apache.submarine.server.websocket.WebSocketServer;
-import org.apache.submarine.commons.cluster.ClusterServer;
 import org.eclipse.jetty.http.HttpVersion;
 import org.eclipse.jetty.server.Handler;
 import org.eclipse.jetty.server.HttpConfiguration;
@@ -285,13 +284,6 @@ public class SubmarineServer extends ResourceConfig {
     webapp.addServlet(environmentServletHolder, "/ws/environment/*");
   }
 
-  private static void setupClusterServer() {
-    if (conf.isClusterMode()) {
-      ClusterServer clusterServer = ClusterServer.getInstance();
-      clusterServer.start();
-    }
-  }
-
   private static SslContextFactory getSslContextFactory(SubmarineConfiguration conf) {
     SslContextFactory sslContextFactory = new SslContextFactory();
 
diff --git a/submarine-server/server-core/src/main/java/org/apache/submarine/server/manager/ExperimentTemplateManager.java b/submarine-server/server-core/src/main/java/org/apache/submarine/server/manager/ExperimentTemplateManager.java
index 1093ae3b..0cbea4a2 100644
--- a/submarine-server/server-core/src/main/java/org/apache/submarine/server/manager/ExperimentTemplateManager.java
+++ b/submarine-server/server-core/src/main/java/org/apache/submarine/server/manager/ExperimentTemplateManager.java
@@ -53,7 +53,6 @@ import org.apache.submarine.server.utils.gson.ExperimentIdSerializer;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.esotericsoftware.minlog.Log;
 import com.github.wnameless.json.flattener.JsonFlattener;
 import com.github.wnameless.json.unflattener.JsonUnflattener;
 import com.google.gson.Gson;
@@ -394,7 +393,7 @@ public class ExperimentTemplateManager {
     String spec = gson.toJson(tplspec.getExperimentSpec());
     Map<String, Object> flattenJson = JsonFlattener.flattenAsMap(spec);
 
-    Log.info(flattenJson.toString());
+    LOG.info(flattenJson.toString());
     // illegalParamList: The parameters not in template parameters should not be used
     // Check at submission
     Map<String, ExperimentTemplateParamSpec> tplparamMap = new HashMap<String, ExperimentTemplateParamSpec>();
@@ -498,15 +497,15 @@ public class ExperimentTemplateManager {
     }
 
     String json = flattenJson.toString();
-    Log.info("flattenJson    " + json);
+    LOG.info("flattenJson    " + json);
 
     String nestedJson = JsonUnflattener.unflatten(json);
-    Log.info("nestedJson    " + nestedJson);
+    LOG.info("nestedJson    " + nestedJson);
 
     ExperimentSpec returnExperimentSpec = null;
     try {
       returnExperimentSpec = gson.fromJson(nestedJson, ExperimentSpec.class);
-      Log.info("ExperimentSpec " + returnExperimentSpec.toString());
+      LOG.info("ExperimentSpec " + returnExperimentSpec.toString());
 
     } catch (Exception e) {
       throw new SubmarineRuntimeException(Status.BAD_REQUEST.getStatusCode(),
diff --git a/submarine-server/server-core/src/main/java/org/apache/submarine/server/rest/ClusterRestApi.java b/submarine-server/server-core/src/main/java/org/apache/submarine/server/rest/ClusterRestApi.java
deleted file mode 100644
index b85a453b..00000000
--- a/submarine-server/server-core/src/main/java/org/apache/submarine/server/rest/ClusterRestApi.java
+++ /dev/null
@@ -1,238 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.submarine.server.rest;
-
-import com.google.common.annotations.VisibleForTesting;
-import com.google.gson.Gson;
-import org.apache.submarine.commons.cluster.ClusterServer;
-import org.apache.submarine.commons.cluster.meta.ClusterMeta;
-import org.apache.submarine.commons.cluster.meta.ClusterMetaType;
-import org.apache.submarine.commons.utils.SubmarineConfiguration;
-import org.apache.submarine.server.utils.response.JsonResponse;
-import org.apache.submarine.server.rest.workbench.annotation.SubmarineApi;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.Response;
-import java.time.LocalDateTime;
-import java.time.format.DateTimeFormatter;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * clusters Rest api.
- */
-@Path(RestConstants.V1 + "/" + RestConstants.CLUSTER)
-@Produces("application/json")
-public class ClusterRestApi {
-  private static final Logger LOG = LoggerFactory.getLogger(ClusterRestApi.class);
-  Gson gson = new Gson();
-
-  private ClusterServer clusterServer = ClusterServer.getInstance();
-  @VisibleForTesting
-  public void setClusterServer(ClusterServer clusterServer) {
-    this.clusterServer = clusterServer;
-  }
-
-  @GET
-  @Path("/" + RestConstants.ADDRESS)
-  @SubmarineApi
-  public Response getClusterAddress() {
-    SubmarineConfiguration sConf = SubmarineConfiguration.getInstance();
-    String clusterAddr = sConf.getClusterAddress();
-    String[] arrAddr = clusterAddr.split(",");
-    List<String> listAddr = Arrays.asList(arrAddr);
-
-    return new JsonResponse.Builder<List<String>>(Response.Status.OK)
-        .success(true).result(listAddr).build();
-  }
-
-  /**
-   * get all nodes of clusters
-   */
-  @GET
-  @Path("/" + RestConstants.NODES)
-  @SubmarineApi
-  public Response getClusterNodes(){
-    ArrayList<HashMap<String, Object>> nodes = new ArrayList<>();
-
-    Map<String, HashMap<String, Object>> clusterMeta = null;
-    Map<String, HashMap<String, Object>> intpMeta = null;
-    clusterMeta = clusterServer.getClusterMeta(ClusterMetaType.SERVER_META, "");
-    intpMeta = clusterServer.getClusterMeta(ClusterMetaType.INTP_PROCESS_META, "");
-
-    // Number of interpreter processes
-    for (Map.Entry<String, HashMap<String, Object>> serverMetaEntity : clusterMeta.entrySet()) {
-      if (!serverMetaEntity.getValue().containsKey(ClusterMeta.NODE_NAME)) {
-        continue;
-      }
-      String serverNodeName = (String) serverMetaEntity.getValue().get(ClusterMeta.NODE_NAME);
-
-      ArrayList<String> arrIntpProcess = new ArrayList<>();
-      int intpProcCount = 0;
-      for (Map.Entry<String, HashMap<String, Object>> intpMetaEntity : intpMeta.entrySet()) {
-        if (!intpMetaEntity.getValue().containsKey(ClusterMeta.NODE_NAME)
-            && !intpMetaEntity.getValue().containsKey(ClusterMeta.INTP_PROCESS_NAME)) {
-          continue;
-        }
-        String intpNodeName = (String) intpMetaEntity.getValue().get(ClusterMeta.NODE_NAME);
-
-        if (serverNodeName.equals(intpNodeName)) {
-          intpProcCount++;
-          String intpName = (String) intpMetaEntity.getValue().get(ClusterMeta.INTP_PROCESS_NAME);
-          arrIntpProcess.add(intpName);
-        }
-      }
-      serverMetaEntity.getValue().put(ClusterMeta.INTP_PROCESS_COUNT, intpProcCount);
-      serverMetaEntity.getValue().put(ClusterMeta.INTP_PROCESS_LIST, arrIntpProcess);
-    }
-
-    for (Map.Entry<String, HashMap<String, Object>> entry : clusterMeta.entrySet()) {
-      String nodeName = entry.getKey();
-      Map<String, Object> properties = entry.getValue();
-
-      Map<String, Object> sortProperties = new HashMap<>();
-
-      if (properties.containsKey(ClusterMeta.CPU_USED)
-          && properties.containsKey(ClusterMeta.CPU_CAPACITY)) {
-        float cpuUsed = (long) properties.get(ClusterMeta.CPU_USED) / (float) 100.0;
-        float cpuCapacity = (long) properties.get(ClusterMeta.CPU_CAPACITY) / (float) 100.0;
-        float cpuRate = cpuUsed / cpuCapacity * 100;
-
-        String cpuInfo = String.format("%.2f / %.2f = %.2f", cpuUsed, cpuCapacity, cpuRate);
-        sortProperties.put(ClusterMeta.CPU_USED + " / " + ClusterMeta.CPU_CAPACITY, cpuInfo + "%");
-      }
-
-      if (properties.containsKey(ClusterMeta.MEMORY_USED)
-          && properties.containsKey(ClusterMeta.MEMORY_CAPACITY)) {
-        float memoryUsed = (long) properties.get(ClusterMeta.MEMORY_USED) / (float) (1024 * 1024 * 1024);
-        float memoryCapacity
-            = (long) properties.get(ClusterMeta.MEMORY_CAPACITY) / (float) (1024 * 1024 * 1024);
-        float memoryRate = memoryUsed / memoryCapacity * 100;
-
-        String memoryInfo = String.format("%.2fGB / %.2fGB = %.2f",
-            memoryUsed, memoryCapacity, memoryRate);
-        sortProperties.put(ClusterMeta.MEMORY_USED + " / " + ClusterMeta.MEMORY_CAPACITY, memoryInfo + "%");
-      }
-
-      if (properties.containsKey(ClusterMeta.SERVER_START_TIME)) {
-        // format LocalDateTime
-        Object serverStartTime = properties.get(ClusterMeta.SERVER_START_TIME);
-        if (serverStartTime instanceof LocalDateTime) {
-          LocalDateTime localDateTime = (LocalDateTime) serverStartTime;
-          String dateTime = formatLocalDateTime(localDateTime);
-          sortProperties.put(ClusterMeta.SERVER_START_TIME, dateTime);
-        } else {
-          sortProperties.put(ClusterMeta.SERVER_START_TIME, "Wrong time type!");
-        }
-      }
-      if (properties.containsKey(ClusterMeta.STATUS)) {
-        sortProperties.put(ClusterMeta.STATUS, properties.get(ClusterMeta.STATUS));
-      }
-      if (properties.containsKey(ClusterMeta.LATEST_HEARTBEAT)) {
-        // format LocalDateTime
-        Object latestHeartbeat = properties.get(ClusterMeta.LATEST_HEARTBEAT);
-        if (latestHeartbeat instanceof LocalDateTime) {
-          LocalDateTime localDateTime = (LocalDateTime) latestHeartbeat;
-          String dateTime = formatLocalDateTime(localDateTime);
-          sortProperties.put(ClusterMeta.LATEST_HEARTBEAT, dateTime);
-        } else {
-          sortProperties.put(ClusterMeta.LATEST_HEARTBEAT, "Wrong time type!");
-        }
-      }
-      if (properties.containsKey(ClusterMeta.INTP_PROCESS_LIST)) {
-        sortProperties.put(ClusterMeta.INTP_PROCESS_LIST, properties.get(ClusterMeta.INTP_PROCESS_LIST));
-      }
-
-      HashMap<String, Object> node = new HashMap<>();
-      node.put(ClusterMeta.NODE_NAME, nodeName);
-      node.put(ClusterMeta.PROPERTIES, sortProperties);
-
-      nodes.add(node);
-    }
-
-    return new JsonResponse.Builder<ArrayList<HashMap<String, Object>>>(Response.Status.OK)
-        .success(true).result(nodes).build();
-  }
-
-  /**
-   * get node info by id
-   */
-  @GET
-  @Path("/" + RestConstants.NODE + "/{nodeName}/{intpName}")
-  @SubmarineApi
-  public Response getClusterNode(@PathParam("nodeName") String nodeName,
-                                 @PathParam("intpName") String intpName){
-    ArrayList<HashMap<String, Object>> intpProcesses = new ArrayList<>();
-
-    Map<String, HashMap<String, Object>> intpMeta = null;
-    intpMeta = clusterServer.getClusterMeta(ClusterMetaType.INTP_PROCESS_META, "");
-
-    // Number of calculation processes
-    for (Map.Entry<String, HashMap<String, Object>> intpMetaEntity : intpMeta.entrySet()) {
-      String intpNodeName = (String) intpMetaEntity.getValue().get(ClusterMeta.NODE_NAME);
-
-      if (null != intpNodeName && intpNodeName.equals(nodeName)) {
-        HashMap<String, Object> node = new HashMap<String, Object>();
-        node.put(ClusterMeta.NODE_NAME, intpNodeName);
-        node.put(ClusterMeta.PROPERTIES, intpMetaEntity.getValue());
-
-        // format LocalDateTime
-        HashMap<String, Object> properties = intpMetaEntity.getValue();
-        if (properties.containsKey(ClusterMeta.INTP_START_TIME)) {
-          Object intpStartTime = properties.get(ClusterMeta.INTP_START_TIME);
-          if (intpStartTime instanceof LocalDateTime) {
-            LocalDateTime localDateTime = (LocalDateTime) intpStartTime;
-            String dateTime = formatLocalDateTime(localDateTime);
-            properties.put(ClusterMeta.INTP_START_TIME, dateTime);
-          } else {
-            properties.put(ClusterMeta.INTP_START_TIME, "Wrong time type!");
-          }
-        }
-        if (properties.containsKey(ClusterMeta.LATEST_HEARTBEAT)) {
-          Object latestHeartbeat = properties.get(ClusterMeta.LATEST_HEARTBEAT);
-          if (latestHeartbeat instanceof LocalDateTime) {
-            LocalDateTime localDateTime = (LocalDateTime) latestHeartbeat;
-            String dateTime = formatLocalDateTime(localDateTime);
-            properties.put(ClusterMeta.LATEST_HEARTBEAT, dateTime);
-          } else {
-            properties.put(ClusterMeta.LATEST_HEARTBEAT, "Wrong time type!");
-          }
-        }
-
-        intpProcesses.add(node);
-      }
-    }
-
-    return new JsonResponse.Builder<ArrayList<HashMap<String, Object>>>(Response.Status.OK)
-        .success(true).result(intpProcesses).build();
-  }
-
-  private String formatLocalDateTime(LocalDateTime localDateTime) {
-    DateTimeFormatter dtf = DateTimeFormatter.ISO_DATE_TIME;
-    String strDate = localDateTime.format(dtf);
-    return strDate;
-  }
-}
diff --git a/submarine-server/server-core/src/test/java/org/apache/submarine/server/SubmarineServerClusterTest.java b/submarine-server/server-core/src/test/java/org/apache/submarine/server/SubmarineServerClusterTest.java
deleted file mode 100644
index d55258d9..00000000
--- a/submarine-server/server-core/src/test/java/org/apache/submarine/server/SubmarineServerClusterTest.java
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.submarine.server;
-
-import com.google.common.reflect.TypeToken;
-import com.google.gson.Gson;
-import com.google.gson.internal.LinkedTreeMap;
-import org.apache.commons.httpclient.methods.GetMethod;
-import org.apache.submarine.commons.cluster.ClusterClient;
-import org.apache.submarine.commons.cluster.meta.ClusterMeta;
-import org.apache.submarine.commons.cluster.meta.ClusterMetaType;
-import org.apache.submarine.commons.utils.NetworkUtils;
-import org.apache.submarine.commons.utils.SubmarineConfiguration;
-import org.apache.submarine.server.rest.RestConstants;
-import org.apache.submarine.server.utils.response.JsonResponse;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.ws.rs.core.Response;
-import java.io.IOException;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Type;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import static java.lang.Thread.sleep;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-public class SubmarineServerClusterTest extends AbstractSubmarineServerTest {
-  private static final Logger LOG = LoggerFactory.getLogger(SubmarineServerClusterTest.class);
-
-  private static ClusterClient clusterClient = null;
-
-  @BeforeClass
-  public static void start() throws Exception {
-    LOG.info("SubmarineServerClusterTest:start()");
-
-    SubmarineConfiguration conf = SubmarineConfiguration.getInstance();
-    String serverHost = NetworkUtils.findAvailableHostAddress();
-    int serverPort = NetworkUtils.findRandomAvailablePortOnAllLocalInterfaces();
-    String clusterAdd = serverHost + ":" + serverPort;
-    conf.setClusterAddress(clusterAdd);
-
-    // Run the workbench service in a thread
-    startUp(SubmarineServerClusterTest.class.getSimpleName());
-
-    // Mock Cluster client
-    Class clazz = ClusterClient.class;
-    Constructor constructor = null;
-    constructor = clazz.getDeclaredConstructor();
-    constructor.setAccessible(true);
-    clusterClient = (ClusterClient) constructor.newInstance();
-    clusterClient.start(SubmarineServerClusterTest.class.getSimpleName());
-
-    // Waiting for cluster startup
-    int wait = 0;
-    while (wait++ < 100) {
-      if (clusterClient.raftInitialized()) {
-        LOG.info("SubmarineServerClusterTest::start {}(ms) found cluster leader", wait * 3000);
-        break;
-      }
-
-      sleep(3000);
-    }
-
-    assertTrue("Can not start Submarine server!", clusterClient.raftInitialized());
-
-    // Waiting for the submarine server to register in the cluster and client send heartbeat to cluster
-    sleep(10000);
-  }
-
-  @AfterClass
-  public static void stop() throws Exception {
-    LOG.info("SubmarineServerClusterTest::stop >>>");
-    shutDown();
-
-    if (null != clusterClient) {
-      clusterClient.shutdown();
-    }
-    LOG.info("SubmarineServerClusterTest::stop <<<");
-  }
-
-  @Ignore
-  @Test
-  public void testGetServerClusterMeta() {
-    LOG.info("SubmarineServerClusterTest::testGetServerClusterMeta >>>");
-    // Get metadata for workbench server
-    Object srvMeta = clusterClient.getClusterMeta(ClusterMetaType.SERVER_META, "");
-    LOG.info("testGetWorkbenchClusterMeta = {}", srvMeta.toString());
-
-    assertNotNull(srvMeta);
-    assertEquals(true, (srvMeta instanceof HashMap));
-    HashMap hashMap = (HashMap) srvMeta;
-
-    assertEquals(hashMap.size(), 1);
-    LOG.info("SubmarineServerClusterTest::testGetServerClusterMeta <<<");
-  }
-
-  @Ignore
-  @Test
-  public void testGetClusterAddress() throws IOException {
-    GetMethod response = httpGet("/api/" + RestConstants.V1 + "/"
-        + RestConstants.CLUSTER + "/" + RestConstants.ADDRESS);
-    LOG.info(response.toString());
-
-    String requestBody = response.getResponseBodyAsString();
-    LOG.info(requestBody);
-
-    Type type = new TypeToken<JsonResponse<List<String>>>() {}.getType();
-    Gson gson = new Gson();
-    JsonResponse<List<String>> jsonResponse = gson.fromJson(requestBody, type);
-    LOG.info(jsonResponse.getResult().toString());
-    assertEquals(jsonResponse.getCode(), Response.Status.OK.getStatusCode());
-
-    List<String> listAddr = jsonResponse.getResult();
-    LOG.info("listAddr.size = {}", listAddr.size());
-    assertEquals(listAddr.size(), 1);
-  }
-
-  private ArrayList<HashMap<String, Object>> getClusterNodes() throws IOException {
-    GetMethod response = httpGet("/api/" + RestConstants.V1 + "/"
-        + RestConstants.CLUSTER + "/" + RestConstants.NODES);
-    LOG.info(response.toString());
-
-    String requestBody = response.getResponseBodyAsString();
-    LOG.info(requestBody);
-
-    Type type = new TypeToken<JsonResponse<ArrayList<HashMap<String, Object>>>>() {}.getType();
-    Gson gson = new Gson();
-    JsonResponse<ArrayList<HashMap<String, Object>>> jsonResponse = gson.fromJson(requestBody, type);
-    LOG.info(jsonResponse.getResult().toString());
-    assertEquals(jsonResponse.getCode(), Response.Status.OK.getStatusCode());
-
-    ArrayList<HashMap<String, Object>> listNodes = jsonResponse.getResult();
-    LOG.info("listNodes.size = {}", listNodes.size());
-    assertEquals(listNodes.size(), 1);
-
-    return listNodes;
-  }
-
-  @Ignore
-  @Test
-  public void testGetClusterNodes() throws IOException {
-    getClusterNodes();
-  }
-
-  @Ignore
-  @Test
-  public void testGetClusterNode() throws IOException {
-    ArrayList<HashMap<String, Object>> listNodes = getClusterNodes();
-
-    Map<String, Object> properties
-        = (LinkedTreeMap<String, Object>) listNodes.get(0).get(ClusterMeta.PROPERTIES);
-    ArrayList<String> intpList = (ArrayList<String>) properties.get(ClusterMeta.INTP_PROCESS_LIST);
-    String nodeName = listNodes.get(0).get(ClusterMeta.NODE_NAME).toString();
-    String intpName = intpList.get(0);
-    LOG.info("properties = {}", properties);
-    LOG.info("intpList = {}", intpList);
-    LOG.info("nodeName = {}", nodeName);
-    LOG.info("intpName = {}", intpName);
-
-    GetMethod response = httpGet("/api/" + RestConstants.V1 + "/"
-        + RestConstants.CLUSTER + "/" + RestConstants.NODE + "/" + nodeName + "/" + intpName);
-    LOG.info(response.toString());
-
-    String requestBody = response.getResponseBodyAsString();
-    LOG.info(requestBody);
-
-    Type type = new TypeToken<JsonResponse<ArrayList<HashMap<String, Object>>>>() {}.getType();
-    Gson gson = new Gson();
-    JsonResponse<ArrayList<HashMap<String, Object>>> jsonResponse = gson.fromJson(requestBody, type);
-    LOG.info(jsonResponse.getResult().toString());
-    assertEquals(jsonResponse.getCode(), Response.Status.OK.getStatusCode());
-
-    ArrayList<HashMap<String, Object>> intpProcesses = jsonResponse.getResult();
-    LOG.info("intpProcesses = {}", intpProcesses);
-    assertEquals(intpProcesses.size(), 1);
-  }
-}
diff --git a/submarine-server/server-core/src/test/java/org/apache/submarine/server/rest/ClusterRestApiTest.java b/submarine-server/server-core/src/test/java/org/apache/submarine/server/rest/ClusterRestApiTest.java
deleted file mode 100644
index db26bd73..00000000
--- a/submarine-server/server-core/src/test/java/org/apache/submarine/server/rest/ClusterRestApiTest.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.submarine.server.rest;
-
-import com.google.gson.Gson;
-import com.google.gson.JsonElement;
-import com.google.gson.JsonArray;
-import com.google.gson.GsonBuilder;
-import com.google.gson.JsonObject;
-import com.google.gson.JsonParser;
-import com.google.gson.internal.LinkedTreeMap;
-import org.apache.submarine.commons.cluster.meta.ClusterMeta;
-import org.apache.submarine.commons.cluster.meta.ClusterMetaType;
-import org.apache.submarine.commons.utils.SubmarineConfiguration;
-import org.apache.submarine.commons.cluster.ClusterServer;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.junit.BeforeClass;
-
-import javax.ws.rs.core.Response;
-import java.time.LocalDateTime;
-import java.time.format.DateTimeFormatter;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import static org.apache.submarine.commons.cluster.meta.ClusterMetaType.SERVER_META;
-import static org.junit.Assert.assertEquals;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
-public class ClusterRestApiTest {
-  private static ClusterServer mockClusterServer;
-  private static ClusterRestApi clusterRestApi;
-
-  private static final GsonBuilder gsonBuilder = new GsonBuilder();
-
-  private static Gson gson = gsonBuilder.setDateFormat("yyyy-MM-dd HH:mm:ss").create();
-
-  private static HashMap<String, HashMap<String, Object>> clusterMetas = new HashMap<>();
-
-  private static HashMap<String, Object> meta1 = new HashMap<>();
-  private static HashMap<String, Object> meta2 = new HashMap<>();
-  private static String nodeName1 = "dummy";
-  private static LocalDateTime SERVER_START_TIME1 = LocalDateTime.now();
-  private static LocalDateTime INTP_START_TIME = LocalDateTime.now();
-  private static LocalDateTime LATEST_HEARTBEAT = LocalDateTime.now();
-  private static long cpuUsed1 = 20;
-  private static long cpuCapacity1 = 40;
-  private static long memoryUsed1 = 536870912;
-  private static long memoryCapacity1 = 1073741824;
-  private static LocalDateTime SERVER_START_TIME2 = LocalDateTime.now();
-  private static long cpuUsed2 = 25;
-  private static long cpuCapacity2 = 40;
-  private static long memoryUsed2 = 268435456;
-  private static long memoryCapacity2 = 1073741824;
-  private static String nodeName2 = "dummydummy";
-
-  @BeforeClass
-  public static void init() {
-    mockClusterServer = mock(ClusterServer.class);
-    clusterRestApi = new ClusterRestApi();
-    clusterRestApi.setClusterServer(mockClusterServer);
-
-    meta1.put(ClusterMeta.NODE_NAME, nodeName1);
-    meta1.put(ClusterMeta.SERVER_START_TIME, SERVER_START_TIME1);
-    meta1.put(ClusterMeta.CPU_USED, cpuUsed1);
-    meta1.put(ClusterMeta.CPU_CAPACITY, cpuCapacity1);
-    meta1.put(ClusterMeta.MEMORY_USED, memoryUsed1);
-    meta1.put(ClusterMeta.MEMORY_CAPACITY, memoryCapacity1);
-    meta1.put(ClusterMeta.INTP_START_TIME, INTP_START_TIME);
-    meta1.put(ClusterMeta.LATEST_HEARTBEAT, LATEST_HEARTBEAT);
-    meta1.put(ClusterMeta.STATUS, ClusterMeta.ONLINE_STATUS);
-
-    meta2.put(ClusterMeta.NODE_NAME, nodeName2);
-    meta2.put(ClusterMeta.SERVER_START_TIME, SERVER_START_TIME2);
-    meta2.put(ClusterMeta.CPU_USED, cpuUsed2);
-    meta2.put(ClusterMeta.CPU_CAPACITY, cpuCapacity2);
-    meta2.put(ClusterMeta.MEMORY_USED, memoryUsed2);
-    meta2.put(ClusterMeta.MEMORY_CAPACITY, memoryCapacity2);
-    meta2.put(ClusterMeta.STATUS, ClusterMeta.OFFLINE_STATUS);
-
-    clusterMetas.put(nodeName1, meta1);
-    clusterMetas.put(nodeName2, meta2);
-    mockClusterServer.putClusterMeta(SERVER_META, nodeName1, meta1);
-    mockClusterServer.putClusterMeta(SERVER_META, nodeName2, meta2);
-  }
-
-  @Ignore
-  @Test
-  public void testGetClusterAddress() {
-    SubmarineConfiguration conf = SubmarineConfiguration.getInstance();
-    String addr1 = "127.0.0.1:4569";
-    String addr2 = "127.0.0.1:8888";
-    conf.setClusterAddress(addr1 + "," + addr2);
-
-    Response response = clusterRestApi.getClusterAddress();
-    List<String> result = getResultListFromResponse(response, String.class);
-    assertEquals(addr1, result.get(0));
-    assertEquals(addr2, result.get(1));
-  }
-
-  @Ignore
-  @Test
-  public void testGetClusterNodes() {
-    when(mockClusterServer.getClusterMeta(ClusterMetaType.SERVER_META, "")).thenReturn(clusterMetas);
-    Response response = clusterRestApi.getClusterNodes();
-    ArrayList<HashMap<String, Object>> result = getResultListFromResponse(response);
-    Map<String, Object> properties1 = (LinkedTreeMap) result.get(0).get(ClusterMeta.PROPERTIES);
-    Map<String, Object> properties2 = (LinkedTreeMap) result.get(1).get(ClusterMeta.PROPERTIES);
-
-    assertEquals(nodeName1, result.get(0).get(ClusterMeta.NODE_NAME));
-    assertEquals("ONLINE", properties1.get("STATUS"));
-    assertEquals("0.50GB / 1.00GB = 50.00%", properties1.get("MEMORY_USED / MEMORY_CAPACITY"));
-    assertEquals("0.20 / 0.40 = 50.00%", properties1.get("CPU_USED / CPU_CAPACITY"));
-
-    assertEquals(nodeName2, result.get(1).get(ClusterMeta.NODE_NAME));
-    assertEquals("OFFLINE", properties2.get("STATUS"));
-    assertEquals("0.25GB / 1.00GB = 25.00%", properties2.get("MEMORY_USED / MEMORY_CAPACITY"));
-    assertEquals("0.25 / 0.40 = 62.50%", properties2.get("CPU_USED / CPU_CAPACITY"));
-  }
-
-  @Ignore
-  @Test
-  public void testGetClusterNode() {
-    when(mockClusterServer.getClusterMeta(ClusterMetaType.INTP_PROCESS_META, "")).thenReturn(clusterMetas);
-    Response response = clusterRestApi.getClusterNode(nodeName1, "");
-    ArrayList<HashMap<String, Object>> result = getResultListFromResponse(response);
-    Map<String, Object> properties = (LinkedTreeMap) result.get(0).get(ClusterMeta.PROPERTIES);
-
-    assertEquals(clusterMetas.get(nodeName1).get(ClusterMeta.NODE_NAME),
-        result.get(0).get(ClusterMeta.NODE_NAME));
-    assertEquals("ONLINE", properties.get("STATUS"));
-    assertEquals(INTP_START_TIME.format(DateTimeFormatter.ISO_DATE_TIME), properties.get("INTP_START_TIME"));
-    assertEquals(LATEST_HEARTBEAT.format(DateTimeFormatter.ISO_DATE_TIME),
-        properties.get("LATEST_HEARTBEAT"));
-  }
-
-  private <T> List<T> getResultListFromResponse(Response response, Class<T> typeT) {
-    String entity = (String) response.getEntity();
-    JsonObject object = new JsonParser().parse(entity).getAsJsonObject();
-    JsonElement result = object.get("result");
-    List<T> list = new ArrayList<T>();
-    JsonArray array = result.getAsJsonArray();
-    for (JsonElement jsonElement : array) {
-      list.add(gson.fromJson(jsonElement, typeT));
-    }
-    return list;
-  }
-
-  private ArrayList<HashMap<String, Object>> getResultListFromResponse(Response response) {
-    String entity = (String) response.getEntity();
-    JsonObject object = new JsonParser().parse(entity).getAsJsonObject();
-    JsonElement result = object.get("result");
-    ArrayList<HashMap<String, Object>> list = new ArrayList<>();
-    JsonArray array = result.getAsJsonArray();
-    for (JsonElement jsonElement : array) {
-      HashMap<String, Object> meta = new HashMap<>();
-      meta = gson.fromJson(jsonElement, meta.getClass());
-      list.add(meta);
-    }
-    return list;
-  }
-}
diff --git a/submarine-test/test-k8s/src/test/java/org/apache/submarine/rest/ClusterRestApiTest.java b/submarine-test/test-k8s/src/test/java/org/apache/submarine/rest/ClusterRestApiTest.java
deleted file mode 100644
index ff0039c7..00000000
--- a/submarine-test/test-k8s/src/test/java/org/apache/submarine/rest/ClusterRestApiTest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.submarine.rest;
-
-import org.apache.commons.httpclient.methods.GetMethod;
-import org.apache.submarine.server.AbstractSubmarineServerTest;
-
-import org.junit.Assert;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-public class ClusterRestApiTest extends AbstractSubmarineServerTest {
-  public final static Logger LOG = LoggerFactory.getLogger(ClusterRestApiTest.class);
-
-  @BeforeClass
-  public static void startUp(){
-    Assert.assertTrue(checkIfServerIsRunning());
-  }
-
-  @Test
-  public void getClusterAddress() throws Exception {
-    GetMethod get = httpGet("/api/v1/cluster/address");
-    Assert.assertEquals(200, get.getStatusCode());
-    String body = get.getResponseBodyAsString();
-    LOG.info("body = {}", body);
-  }
-
-  @Test
-  public void getClusterNodes() throws Exception {
-    GetMethod get = httpGet("/api/v1/cluster/nodes");
-    Assert.assertEquals(200, get.getStatusCode());
-    String body = get.getResponseBodyAsString();
-    LOG.info("body = {}", body);
-  }
-}
diff --git a/submarine-workbench/interpreter/interpreter-core/pom.xml b/submarine-workbench/interpreter/interpreter-core/pom.xml
index 61415367..15736110 100644
--- a/submarine-workbench/interpreter/interpreter-core/pom.xml
+++ b/submarine-workbench/interpreter/interpreter-core/pom.xml
@@ -42,12 +42,6 @@
       <version>${project.version}</version>
     </dependency>
 
-    <dependency>
-      <groupId>org.apache.submarine</groupId>
-      <artifactId>submarine-commons-cluster</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-
     <dependency>
       <groupId>org.apache.zeppelin</groupId>
       <artifactId>zeppelin-interpreter</artifactId>
diff --git a/website/docs/designDocs/implementation-notes.md b/website/docs/designDocs/implementation-notes.md
index ca226c4e..a40678c9 100644
--- a/website/docs/designDocs/implementation-notes.md
+++ b/website/docs/designDocs/implementation-notes.md
@@ -29,5 +29,4 @@ Here're sub topics of Submarine implementations:
 
 Working-in-progress designs, Below are designs which are working-in-progress, we will move them to the upper section once design & review is finished:
 
-- [Submarine HA Design](./wip-designs/submarine-clusterServer.md): How Submarine HA can be achieved, using RAFT, etc.
 - [Submarine services deployment module:](./wip-designs/submarine-launcher.md) How to deploy submarine services to k8s or cloud.
diff --git a/website/docs/designDocs/wip-designs/submarine-clusterServer.md b/website/docs/designDocs/wip-designs/submarine-clusterServer.md
deleted file mode 100644
index a9831066..00000000
--- a/website/docs/designDocs/wip-designs/submarine-clusterServer.md
+++ /dev/null
@@ -1,179 +0,0 @@
----
-title: Cluster Server Design - High-Availability
----
-<!--
-   Licensed to the Apache Software Foundation (ASF) under one or more
-   contributor license agreements.  See the NOTICE file distributed with
-   this work for additional information regarding copyright ownership.
-   The ASF licenses this file to You under the Apache License, Version 2.0
-   (the "License"); you may not use this file except in compliance with
-   the License.  You may obtain a copy of the License at
-   http://www.apache.org/licenses/LICENSE-2.0
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
--->
-
-:::warning
-Please note that this design doc is working-in-progress and need more works to complete. 
-:::
-
-
-## Below is existing proposal:
-
-## Introduction
-The Submarine system contains a total of two daemon services, Submarine Server and Workbench Server.
-
-Submarine Server mainly provides job submission, job scheduling, job status monitoring, and model online service for Submarine.
-
-Workbench Server is mainly for algorithm users to provide algorithm development, Python/Spark interpreter operation, and other services through Notebook.
-
-The goal of the Submarine project is to provide high availability and high-reliability services for big data processing, 
-algorithm development, job scheduling, model online services, model batch, and incremental updates. 
-
-In addition to the high availability of big data and machine learning frameworks, 
-the high availability of Submarine Server and Workbench Server itself is a key consideration.
-
-## Requirement
-
-### Cluster Metadata Center
-
-Multiple Submarine (or Workbench) Server processes create a Submarine Cluster through the RAFT algorithm library. 
-
-The cluster internally maintains a metadata center. All servers can operate the metadata. 
-
-The RAFT algorithm ensures that multiple processes are simultaneously co-located. 
-
-A data modification will not cause problems such as mutual coverage and dirty data.
-
-This metadata center stores data by means of key-value pairs. it can store/support a variety of data, 
-but it should be noted that metadata is only suitable for storing small amounts of data and cannot be used to replace data storage.
-
-### Service discovery
-
-By storing the information of the service or process in the metadata center, we can easily find the information of the service or process we need in any place, 
-for example, the IP address and port where the Python interpreter will be the process. Information is stored in metadata, 
-and other services can easily find process information through process IDs and connect to provide service discovery capabilities.
-
-### Cluster event
-
-In the entire Submarine cluster, the servers can communicate with each other and other child processes to send cluster events to each other. 
-
-The service or process processes the corresponding programs according to the cluster events. For example, 
-the Workbench Server can be managed to Python. The interpreter process sends a shutdown event that controls the operation of the services and individual subprocesses throughout the cluster.
-
-Cluster events support both broadcast and separate delivery capabilities.
-
-### Independence
-
-We implement Submarine's clustering capabilities through the RAFT algorithm library, without relying on any external services (e.g. Zookeeper, Etcd, etc.)
-
-### Disadvantages
-
-Because the RAFT algorithm requires more than half of the servers available to ensure the normality of the RAFT algorithm, 
-if we need to turn on the clustering capabilities of Submarine (Workbench) Server, when more than half of the servers are unavailable, 
-some programs may appear abnormal. Of course, we also detected this in the system, downgrading the system or refusing to provide service status.
-
-## System design
-
-### Universal design
-
-Modular design, Submarine (Workbench) Server exists in the Submarine system, these two services need to provide clustering capabilities, 
-so we abstract the cluster function into a separate module for development so that Submarine (Workbench) Server can reuse the cluster function module.
-
-### ClusterConfigure
-
-Add a `submarine.server.addr` and `workbench.server.addr` configuration items in `submarine-site.xml`, `submarine.server.addr=ip1, ip2, ip3`, 
-through the IP list, the RAFT algorithm module in the server process can Cluster with other server processes.
-
-### ClusterServer
-
-+ The ClusterServer module encapsulates the RAFT algorithm module, which can create a service cluster and read and write metadata based on the two configuration items submarine.server.addr or workbench.server.addr.
-
-+ The cluster management service runs in each submarine server;
-
-+ The cluster management service establishes a cluster by using the atomix RaftServer class of the Raft algorithm library, maintains the ClusterStateMachine, 
-and manages the service state metadata of each submarine server through the PutCommand, GetQuery, and DeleteCommand operation commands.
-
-### ClusterClient
-
-+ The ClusterClient module encapsulates the RAFT algorithm client module, which can communicate with the cluster according to the two configuration items `submarine.server.addr` or `workbench.server.addr`, 
-read and write metadata, and write the IP and port information of the client process. Into the cluster's metadata center.
-
-+ The cluster management client runs in each submarine server and submarine Interpreter process;
-
-+ The cluster management client manages the submarine server and submarine Interpreter process state (metadata information) 
-in the ClusterStateMachine by using the atomix RaftClient class of the Raft library to connect to the atomix RaftServer. 
-
-+ When the submarine server and Submarine Interpreter processes are started, they are added to the ClusterStateMachine and are removed from the ClusterStateMachine 
-
-+ when the Submarine Server and Submarine Interpreter processes are closed.
-
-### ClusterMetadata
-Metadata stores metadata information in a KV key-value pair。
-ServerMeta:key='host:port',value= {SERVER_HOST=...,SERVER_PORT=...,...}
-
-
-
-| Name                  | Description                     |
-| --------------------- | ------------------------------- |
-| SUBMARINE_SERVER_HOST | Submarine server IP             |
-| SUBMARINE_SERVER_PORT | Submarine server port           |
-| WORKBENCH_SERVER_HOST | Submarine workbench server IP   |
-| WORKBENCH_SERVER_PORT | Submarine workbench server port |
-
-InterpreterMeta:key=InterpreterGroupId,value={INTP_TSERVER_HOST=...,...}
-
-| Name              | Description                          |
-| ----------------- | ------------------------------------ |
-| INTP_TSERVER_HOST | Submarine Interpreter Thrift IP      |
-| INTP_TSERVER_PORT | Submarine Interpreter Thrift port    |
-| INTP_START_TIME   | Submarine Interpreter start time     |
-| HEARTBEAT         | Submarine Interpreter heartbeat time |
-
-### Network fault tolerance
-
-In a distributed environment, there may be network anomalies, network delays, or service exceptions. After submitting metadata to the cluster, 
-check whether the submission is successful. After the submission fails, save the metadata in the local message queue. A separate commit thread to retry;
-
-### Cluster monitoring
-
-The cluster needs to monitor whether the Submarine Server and Submarine-Interpreter processes are working properly.
-
-The Submarine Server and Submarine Interpreter processes periodically send heartbeats to update their own timestamps in the cluster metadata. 
-
-The Submarine Server with Leader identity periodically checks the timestamps of the Submarine Server and Submarine Interpreter processes to clear the timeout services and processes.
-
-1. The cluster monitoring module runs in each Submarine Server and Submarine Interpreter process, 
-periodically sending heartbeat data of the service or process to the cluster;
-
-2. When the cluster monitoring module runs in Submarine Server, it sends the heartbeat to the cluster's ClusterStateMachine. 
-If the cluster does not receive heartbeat information for a long time, Indicates that the service or process is abnormal and unavailable.
-
-3. Resource usage statistics strategy, in order to avoid the instantaneous high peak and low peak of the server, 
-the cluster monitoring will collect the average resource usage in the most recent period for reporting, and improve the reasonable line and effectiveness of the server resources as much as possible;
-
-4. When the cluster monitoring module runs in the Submarine Server, it checks the heartbeat data of each Submarine Server and Submarine Interpreter process. 
-If it times out, it considers that the service or process is abnormally unavailable and removes it from the cluster.
-
-### Atomix Raft algorithm library
-
-In order to reduce the deployment complexity of distributed mode, submarine server does not use Zookeeper to build a distributed cluster. 
-Multiple submarine server groups are built into distributed clusters by using the Raft algorithm in submarine server. 
-The Raft algorithm is involved by atomix lib of atomix that has passed Jepsen consistency verification.
-
-### Synchronize workbench notes
-
-In cluster mode, the user creates, modifies, and deletes the note on any of the servers. 
-All need to be notified to all the servers in the cluster to synchronize the update of Notebook. 
-Failure to do so will result in the user not being able to continue while switching to another server.
-
-### Listen for note update events
-
-Listen for the NEW_NOTE, DEL_NOTE, REMOVE_NOTE_TO_TRASH ... event of the notebook in the NotebookServer#onMessage() function.
-
-### Broadcast note update event
-
-The note is refreshed by notifying the event to all Submarine servers in the cluster via messaging Service.
diff --git a/website/sidebars.js b/website/sidebars.js
index 7cf683d2..4cadb339 100644
--- a/website/sidebars.js
+++ b/website/sidebars.js
@@ -77,7 +77,6 @@ module.exports = {
                 {
                     "WIP Design Docs": [
                         "designDocs/wip-designs/submarine-launcher",
-                        "designDocs/wip-designs/submarine-clusterServer",
                         "designDocs/wip-designs/security-implementation",
                     ],
                 },


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@submarine.apache.org
For additional commands, e-mail: dev-help@submarine.apache.org