Repository: apache/shardingsphere-elasticjob-lite
Pull request #976 (2020-07-06 16:23:46)

Consider about rename monitor service
Fixes # #973




Patch:
diff --git a/README.md b/README.md
index 8265a4279..a04ec3bff 100644
--- a/README.md
+++ b/README.md
@@ -104,8 +104,8 @@ public class MyElasticJob implements SimpleJob {
     <!--configure registry center -->
     <elasticjob:zookeeper id="regCenter" server-lists="yourhost:2181" namespace="elastic-job" base-sleep-time-milliseconds="1000" max-sleep-time-milliseconds="3000" max-retries="3" />
 
-    <!--configure monitor -->
-    <elasticjob:monitor id="monitor1" registry-center-ref="regCenter" monitor-port="9999"/>
+    <!--configure job snapshot service -->
+    <elasticjob:snapshot id="jobSnapshot" registry-center-ref="regCenter" dump-port="9999"/>
     
     <!--configure job class -->
     <bean id="simpleJob" class="xxx.MyElasticJob" />
diff --git a/README_ZH.md b/README_ZH.md
index 186670870..20de4f439 100644
--- a/README_ZH.md
+++ b/README_ZH.md
@@ -96,8 +96,8 @@ public class MyElasticJob implements SimpleJob {
     <!--配置作业注册中心 -->
     <elasticjob:zookeeper id="regCenter" server-lists="yourhost:2181" namespace="elastic-job" base-sleep-time-milliseconds="1000" max-sleep-time-milliseconds="3000" max-retries="3" />
    
-    <!--配置任务监控 -->
-    <elasticjob:monitor id="monitor1" registry-center-ref="regCenter" monitor-port="9999"/>    
+    <!--配置任务快照服务 -->
+    <elasticjob:snapshot id="jobSnapshot" registry-center-ref="regCenter" dump-port="9999"/>
 
     <!--配置作业类 -->
     <bean id="simpleJob" class="xxx.MyElasticJob" />
diff --git a/docs/content/guide/dump.cn.md b/docs/content/guide/dump.cn.md
index 31ef10cf4..fb10caede 100644
--- a/docs/content/guide/dump.cn.md
+++ b/docs/content/guide/dump.cn.md
@@ -31,8 +31,8 @@ chapter = true
     <!--配置作业注册中心 -->
     <elasticjob:zookeeper id="regCenter" server-lists="yourhost:2181" namespace="dd-job" base-sleep-time-milliseconds="1000" max-sleep-time-milliseconds="3000" max-retries="3" />
     
-    <!--配置任务监控 -->
-    <elasticjob:monitor id="monitor1" registry-center-ref="regCenter" monitor-port="9999"/>    
+    <!--配置任务快照 -->
+    <elasticjob:snapshot id="jobSnapshot" registry-center-ref="regCenter" dump-port="9999"/>    
     
     <!--配置作业类 -->
     <bean id="simpleJob" class="xxx.MyElasticJob" />    
@@ -48,8 +48,8 @@ chapter = true
 public class JobMain {
     public static void main(final String[] args) {
         // ...
-        MonitorService monitorService = new MonitorService(regCenter, 9888);
-        monitorService.listen();
+        SnapshotService snapshotService = new SnapshotService(regCenter, 9888);
+        snapshotService.listen();
         // ...
     }
 }
diff --git a/docs/content/guide/dump.en.md b/docs/content/guide/dump.en.md
index 9d7cb6d5b..a824bbf04 100644
--- a/docs/content/guide/dump.en.md
+++ b/docs/content/guide/dump.en.md
@@ -31,8 +31,8 @@ chapter = true
     <!--配置作业注册中心 -->
     <elasticjob:zookeeper id="regCenter" server-lists="yourhost:2181" namespace="dd-job" base-sleep-time-milliseconds="1000" max-sleep-time-milliseconds="3000" max-retries="3" />
     
-    <!--配置任务监控 -->
-    <elasticjob:monitor id="monitor1" registry-center-ref="regCenter" monitor-port="9999"/>    
+    <!--配置任务快照 -->
+    <elasticjob:snapshot id="jobSnapshot" registry-center-ref="regCenter" dump-port="9999"/>    
     
     <!--配置作业类 -->
     <bean id="simpleJob" class="xxx.MyElasticJob" />    
@@ -48,8 +48,8 @@ chapter = true
 public class JobMain {
     public static void main(final String[] args) {
         // ...
-        MonitorService monitorService = new MonitorService(regCenter, 9888);
-        monitorService.listen();
+        SnapshotService snapshotService = new SnapshotService(regCenter, 9888);
+        snapshotService.listen();
         // ...
     }
 }
diff --git a/elastic-job-lite-core/src/main/java/org/apache/shardingsphere/elasticjob/lite/internal/monitor/MonitorService.java b/elastic-job-lite-core/src/main/java/org/apache/shardingsphere/elasticjob/lite/internal/snapshot/SnapshotService.java
similarity index 86%
rename from elastic-job-lite-core/src/main/java/org/apache/shardingsphere/elasticjob/lite/internal/monitor/MonitorService.java
rename to elastic-job-lite-core/src/main/java/org/apache/shardingsphere/elasticjob/lite/internal/snapshot/SnapshotService.java
index 9cac5c9d2..b3147ce4b 100644
--- a/elastic-job-lite-core/src/main/java/org/apache/shardingsphere/elasticjob/lite/internal/monitor/MonitorService.java
+++ b/elastic-job-lite-core/src/main/java/org/apache/shardingsphere/elasticjob/lite/internal/snapshot/SnapshotService.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.elasticjob.lite.internal.monitor;
+package org.apache.shardingsphere.elasticjob.lite.internal.snapshot;
 
 import com.google.common.base.Joiner;
 import org.apache.shardingsphere.elasticjob.lite.internal.util.SensitiveInfoUtils;
@@ -35,10 +35,10 @@ import java.util.ArrayList;
 import java.util.List;
 
 /**
- * Monitor service.
+ * Snapshot service.
  */
 @Slf4j
-public final class MonitorService {
+public final class SnapshotService {
     
     public static final String DUMP_COMMAND = "dump@";
 
@@ -50,34 +50,34 @@ public final class MonitorService {
     
     private volatile boolean closed;
     
-    public MonitorService(final CoordinatorRegistryCenter regCenter, final int port) {
+    public SnapshotService(final CoordinatorRegistryCenter regCenter, final int port) {
         this.regCenter = regCenter;
         this.port = port;
     }
     
     /**
-     * start to listen.
+     * Start to listen.
      */
     public void listen() {
         if (port < 0) {
             return;
         }
         try {
-            log.info("Elastic job: Monitor service is running, the port is '{}'", port);
-            openSocketForMonitor(port);
+            log.info("Elastic job: Snapshot service is running, the port is '{}'", port);
+            openSocket(port);
         } catch (final IOException ex) {
-            log.error("Elastic job: Monitor service listen failure, error is: ", ex);
+            log.error("Elastic job: Snapshot service listen failure, error is: ", ex);
         }
     }
     
-    private void openSocketForMonitor(final int port) throws IOException {
+    private void openSocket(final int port) throws IOException {
         serverSocket = new ServerSocket(port);
         new Thread(() -> {
             while (!closed) {
                 try {
                     process(serverSocket.accept());
                 } catch (final IOException ex) {
-                    log.error("Elastic job: Monitor service open socket for monitor failure, error is: ", ex);
+                    log.error("Elastic job: Snapshot service open socket failure, error is: ", ex);
                 }
             }
         }).start();
@@ -132,7 +132,7 @@ public final class MonitorService {
             try {
                 serverSocket.close();
             } catch (final IOException ex) {
-                log.error("Elastic job: Monitor service close failure, error is: ", ex);
+                log.error("Elastic job: Snapshot service close failure, error is: ", ex);
             }
         }
     }
diff --git a/elastic-job-lite-spring/src/main/java/org/apache/shardingsphere/elasticjob/lite/spring/ElasticJobNamespaceHandler.java b/elastic-job-lite-spring/src/main/java/org/apache/shardingsphere/elasticjob/lite/spring/ElasticJobNamespaceHandler.java
index 771f9a2eb..049227534 100644
--- a/elastic-job-lite-spring/src/main/java/org/apache/shardingsphere/elasticjob/lite/spring/ElasticJobNamespaceHandler.java
+++ b/elastic-job-lite-spring/src/main/java/org/apache/shardingsphere/elasticjob/lite/spring/ElasticJobNamespaceHandler.java
@@ -18,7 +18,7 @@
 package org.apache.shardingsphere.elasticjob.lite.spring;
 
 import org.apache.shardingsphere.elasticjob.lite.spring.job.parser.JobBeanDefinitionParser;
-import org.apache.shardingsphere.elasticjob.lite.spring.monitor.parser.MonitorBeanDefinitionParser;
+import org.apache.shardingsphere.elasticjob.lite.spring.snapshot.parser.SnapshotBeanDefinitionParser;
 import org.apache.shardingsphere.elasticjob.lite.spring.reg.parser.ZookeeperBeanDefinitionParser;
 import org.apache.shardingsphere.elasticjob.lite.spring.tracing.parser.TracingBeanDefinitionParser;
 import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
@@ -32,7 +32,7 @@ public final class ElasticJobNamespaceHandler extends NamespaceHandlerSupport {
     public void init() {
         registerBeanDefinitionParser("job", new JobBeanDefinitionParser());
         registerBeanDefinitionParser("zookeeper", new ZookeeperBeanDefinitionParser());
-        registerBeanDefinitionParser("monitor", new MonitorBeanDefinitionParser());
+        registerBeanDefinitionParser("snapshot", new SnapshotBeanDefinitionParser());
         registerBeanDefinitionParser("rdb-event-trace", new TracingBeanDefinitionParser());
     }
 }
diff --git a/elastic-job-lite-spring/src/main/java/org/apache/shardingsphere/elasticjob/lite/spring/monitor/parser/MonitorBeanDefinitionParser.java b/elastic-job-lite-spring/src/main/java/org/apache/shardingsphere/elasticjob/lite/spring/snapshot/parser/SnapshotBeanDefinitionParser.java
similarity index 69%
rename from elastic-job-lite-spring/src/main/java/org/apache/shardingsphere/elasticjob/lite/spring/monitor/parser/MonitorBeanDefinitionParser.java
rename to elastic-job-lite-spring/src/main/java/org/apache/shardingsphere/elasticjob/lite/spring/snapshot/parser/SnapshotBeanDefinitionParser.java
index 8db1ab0ba..1150e71be 100644
--- a/elastic-job-lite-spring/src/main/java/org/apache/shardingsphere/elasticjob/lite/spring/monitor/parser/MonitorBeanDefinitionParser.java
+++ b/elastic-job-lite-spring/src/main/java/org/apache/shardingsphere/elasticjob/lite/spring/snapshot/parser/SnapshotBeanDefinitionParser.java
@@ -15,10 +15,10 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.elasticjob.lite.spring.monitor.parser;
+package org.apache.shardingsphere.elasticjob.lite.spring.snapshot.parser;
 
-import org.apache.shardingsphere.elasticjob.lite.internal.monitor.MonitorService;
-import org.apache.shardingsphere.elasticjob.lite.spring.monitor.tag.MonitorBeanDefinitionTag;
+import org.apache.shardingsphere.elasticjob.lite.internal.snapshot.SnapshotService;
+import org.apache.shardingsphere.elasticjob.lite.spring.snapshot.tag.SnapshotBeanDefinitionTag;
 import org.springframework.beans.factory.support.AbstractBeanDefinition;
 import org.springframework.beans.factory.support.BeanDefinitionBuilder;
 import org.springframework.beans.factory.xml.AbstractBeanDefinitionParser;
@@ -26,15 +26,15 @@ import org.springframework.beans.factory.xml.ParserContext;
 import org.w3c.dom.Element;
 
 /**
- * Monitor bean definition parser.
+ * Snapshot bean definition parser.
  */
-public final class MonitorBeanDefinitionParser extends AbstractBeanDefinitionParser {
+public final class SnapshotBeanDefinitionParser extends AbstractBeanDefinitionParser {
     
     @Override
     protected AbstractBeanDefinition parseInternal(final Element element, final ParserContext parserContext) {
-        BeanDefinitionBuilder result = BeanDefinitionBuilder.rootBeanDefinition(MonitorService.class);
-        result.addConstructorArgReference(element.getAttribute(MonitorBeanDefinitionTag.REGISTRY_CENTER_REF_ATTRIBUTE));
-        result.addConstructorArgValue(element.getAttribute(MonitorBeanDefinitionTag.MONITOR_PORT_ATTRIBUTE));
+        BeanDefinitionBuilder result = BeanDefinitionBuilder.rootBeanDefinition(SnapshotService.class);
+        result.addConstructorArgReference(element.getAttribute(SnapshotBeanDefinitionTag.REGISTRY_CENTER_REF_ATTRIBUTE));
+        result.addConstructorArgValue(element.getAttribute(SnapshotBeanDefinitionTag.DUMP_PORT_ATTRIBUTE));
         result.setInitMethodName("listen");
         result.setDestroyMethodName("close");
         return result.getBeanDefinition();
diff --git a/elastic-job-lite-spring/src/main/java/org/apache/shardingsphere/elasticjob/lite/spring/monitor/tag/MonitorBeanDefinitionTag.java b/elastic-job-lite-spring/src/main/java/org/apache/shardingsphere/elasticjob/lite/spring/snapshot/tag/SnapshotBeanDefinitionTag.java
similarity index 82%
rename from elastic-job-lite-spring/src/main/java/org/apache/shardingsphere/elasticjob/lite/spring/monitor/tag/MonitorBeanDefinitionTag.java
rename to elastic-job-lite-spring/src/main/java/org/apache/shardingsphere/elasticjob/lite/spring/snapshot/tag/SnapshotBeanDefinitionTag.java
index fdcfbebb5..fdbffe0a9 100644
--- a/elastic-job-lite-spring/src/main/java/org/apache/shardingsphere/elasticjob/lite/spring/monitor/tag/MonitorBeanDefinitionTag.java
+++ b/elastic-job-lite-spring/src/main/java/org/apache/shardingsphere/elasticjob/lite/spring/snapshot/tag/SnapshotBeanDefinitionTag.java
@@ -15,18 +15,18 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.elasticjob.lite.spring.monitor.tag;
+package org.apache.shardingsphere.elasticjob.lite.spring.snapshot.tag;
 
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
 
 /**
- * Monitor bean definition tag.
+ * Snapshot bean definition tag.
  */
 @NoArgsConstructor(access = AccessLevel.PRIVATE)
-public final class MonitorBeanDefinitionTag {
+public final class SnapshotBeanDefinitionTag {
     
     public static final String REGISTRY_CENTER_REF_ATTRIBUTE = "registry-center-ref";
     
-    public static final String MONITOR_PORT_ATTRIBUTE = "monitor-port";
+    public static final String DUMP_PORT_ATTRIBUTE = "dump-port";
 }
diff --git a/elastic-job-lite-spring/src/main/resources/META-INF/namespace/elasticjob.xsd b/elastic-job-lite-spring/src/main/resources/META-INF/namespace/elasticjob.xsd
index 8e7f589b3..1e0886932 100644
--- a/elastic-job-lite-spring/src/main/resources/META-INF/namespace/elasticjob.xsd
+++ b/elastic-job-lite-spring/src/main/resources/META-INF/namespace/elasticjob.xsd
@@ -95,13 +95,13 @@
             </xsd:complexContent>
         </xsd:complexType>
     </xsd:element>
-    
-    <xsd:element name="monitor">
+
+    <xsd:element name="snapshot">
         <xsd:complexType>
             <xsd:complexContent>
                 <xsd:extension base="beans:identifiedType">
                     <xsd:attribute name="registry-center-ref" type="xsd:string" use="required" />
-                    <xsd:attribute name="monitor-port" type="xsd:string" default="-1" />
+                    <xsd:attribute name="dump-port" type="xsd:string" default="-1" />
                 </xsd:extension>
             </xsd:complexContent>
         </xsd:complexType>
diff --git a/examples/elastic-job-example-lite-spring/src/main/resources/META-INF/applicationContext.xml b/examples/elastic-job-example-lite-spring/src/main/resources/META-INF/applicationContext.xml
index 005555973..5f65d997a 100644
--- a/examples/elastic-job-example-lite-spring/src/main/resources/META-INF/applicationContext.xml
+++ b/examples/elastic-job-example-lite-spring/src/main/resources/META-INF/applicationContext.xml
@@ -31,7 +31,9 @@
     <context:property-placeholder location="classpath:conf/*.properties" />
     
     <elasticjob:zookeeper id="regCenter" server-lists="${serverLists}" namespace="${namespace}" base-sleep-time-milliseconds="${baseSleepTimeMilliseconds}" max-sleep-time-milliseconds="${maxSleepTimeMilliseconds}" max-retries="${maxRetries}" />
-    
+
+    <elasticjob:snapshot id="jobSnapshot" registry-center-ref="regCenter" dump-port="9999"/>
+
     <bean id="elasticJobTracingDataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
         <property name="driverClassName" value="${event.rdb.driver}" />
         <property name="url" value="${event.rdb.url}" />


Test patch:
diff --git a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/internal/monitor/BaseMonitorServiceTest.java b/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/internal/snapshot/BaseSnapshotServiceTest.java
similarity index 89%
rename from elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/internal/monitor/BaseMonitorServiceTest.java
rename to elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/internal/snapshot/BaseSnapshotServiceTest.java
index b2a181527..85f9744c2 100644
--- a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/internal/monitor/BaseMonitorServiceTest.java
+++ b/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/internal/snapshot/BaseSnapshotServiceTest.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.elasticjob.lite.internal.monitor;
+package org.apache.shardingsphere.elasticjob.lite.internal.snapshot;
 
 import lombok.AccessLevel;
 import lombok.Getter;
@@ -32,23 +32,23 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.BeforeClass;
 
-public abstract class BaseMonitorServiceTest {
+public abstract class BaseSnapshotServiceTest {
     
-    static final int MONITOR_PORT = 9000;
+    static final int DUMP_PORT = 9000;
     
     private static ZookeeperConfiguration zkConfig = new ZookeeperConfiguration(EmbedTestingServer.getConnectionString(), "zkRegTestCenter");
     
     private static CoordinatorRegistryCenter regCenter = new ZookeeperRegistryCenter(zkConfig);
     
     @Getter(value = AccessLevel.PROTECTED)
-    private static MonitorService monitorService = new MonitorService(regCenter, MONITOR_PORT);
+    private static SnapshotService snapshotService = new SnapshotService(regCenter, DUMP_PORT);
     
     private final ScheduleJobBootstrap bootstrap;
     
     @Getter(value = AccessLevel.PROTECTED)
     private final String jobName = System.nanoTime() + "_test_job";
     
-    public BaseMonitorServiceTest(final ElasticJob elasticJob) {
+    public BaseSnapshotServiceTest(final ElasticJob elasticJob) {
         bootstrap = new ScheduleJobBootstrap(regCenter, elasticJob, JobConfiguration.newBuilder(jobName, 3).cron("0/1 * * * * ?").overwrite(true).build());
     }
     
diff --git a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/internal/monitor/MonitorServiceDisableTest.java b/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/internal/snapshot/SnapshotServiceDisableTest.java
similarity index 80%
rename from elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/internal/monitor/MonitorServiceDisableTest.java
rename to elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/internal/snapshot/SnapshotServiceDisableTest.java
index 009900b3c..7f6e61803 100644
--- a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/internal/monitor/MonitorServiceDisableTest.java
+++ b/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/internal/snapshot/SnapshotServiceDisableTest.java
@@ -15,21 +15,21 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.elasticjob.lite.internal.monitor;
+package org.apache.shardingsphere.elasticjob.lite.internal.snapshot;
 
 import org.apache.shardingsphere.elasticjob.lite.fixture.job.DetailedFooJob;
 import org.junit.Test;
 
 import java.io.IOException;
 
-public final class MonitorServiceDisableTest extends BaseMonitorServiceTest {
+public final class SnapshotServiceDisableTest extends BaseSnapshotServiceTest {
     
-    public MonitorServiceDisableTest() {
+    public SnapshotServiceDisableTest() {
         super(new DetailedFooJob());
     }
     
     @Test(expected = IOException.class)
     public void assertMonitorWithDumpCommand() throws IOException {
-        SocketUtils.sendCommand(MonitorService.DUMP_COMMAND, MONITOR_PORT - 1);
+        SocketUtils.sendCommand(SnapshotService.DUMP_COMMAND, DUMP_PORT - 1);
     }
 }
diff --git a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/internal/monitor/MonitorServiceEnableTest.java b/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/internal/snapshot/SnapshotServiceEnableTest.java
similarity index 74%
rename from elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/internal/monitor/MonitorServiceEnableTest.java
rename to elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/internal/snapshot/SnapshotServiceEnableTest.java
index 7d12d0596..e1c66f6f5 100644
--- a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/internal/monitor/MonitorServiceEnableTest.java
+++ b/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/internal/snapshot/SnapshotServiceEnableTest.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.elasticjob.lite.internal.monitor;
+package org.apache.shardingsphere.elasticjob.lite.internal.snapshot;
 
 import org.apache.shardingsphere.elasticjob.lite.fixture.job.DetailedFooJob;
 import org.junit.After;
@@ -27,25 +27,25 @@ import java.io.IOException;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 
-public final class MonitorServiceEnableTest extends BaseMonitorServiceTest {
+public final class SnapshotServiceEnableTest extends BaseSnapshotServiceTest {
     
-    public MonitorServiceEnableTest() {
+    public SnapshotServiceEnableTest() {
         super(new DetailedFooJob());
     }
     
     @Before
     public void listenMonitor() {
-        getMonitorService().listen();
+        getSnapshotService().listen();
     }
     
     @After
     public void closeMonitor() {
-        getMonitorService().close();
+        getSnapshotService().close();
     }
     
     @Test
     public void assertMonitorWithCommand() throws IOException {
-        assertNotNull(SocketUtils.sendCommand(MonitorService.DUMP_COMMAND + getJobName(), MONITOR_PORT));
-        assertNull(SocketUtils.sendCommand("unknown_command", MONITOR_PORT));
+        assertNotNull(SocketUtils.sendCommand(SnapshotService.DUMP_COMMAND + getJobName(), DUMP_PORT));
+        assertNull(SocketUtils.sendCommand("unknown_command", DUMP_PORT));
     }
 }
diff --git a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/internal/monitor/SocketUtils.java b/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/internal/snapshot/SocketUtils.java
similarity index 88%
rename from elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/internal/monitor/SocketUtils.java
rename to elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/internal/snapshot/SocketUtils.java
index 1bc4abd6a..d71465671 100644
--- a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/internal/monitor/SocketUtils.java
+++ b/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/internal/snapshot/SocketUtils.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.elasticjob.lite.internal.monitor;
+package org.apache.shardingsphere.elasticjob.lite.internal.snapshot;
 
 import java.io.BufferedReader;
 import java.io.BufferedWriter;
@@ -34,13 +34,13 @@ public final class SocketUtils {
      * Send command.
      *
      * @param command command
-     * @param monitorPort the port for monitor
+     * @param dumpPort the port for dumping data
      * @return result of command
      * @throws IOException io exception
      */
-    public static String sendCommand(final String command, final int monitorPort) throws IOException {
+    public static String sendCommand(final String command, final int dumpPort) throws IOException {
         try (
-                Socket socket = new Socket("127.0.0.1", monitorPort);
+                Socket socket = new Socket("127.0.0.1", dumpPort);
                 BufferedReader reader = new BufferedReader(new InputStreamReader(socket.getInputStream()));
                 BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream()))
             ) {
diff --git a/elastic-job-lite-core/src/test/resources/logback-test.xml b/elastic-job-lite-core/src/test/resources/logback-test.xml
index 90cd2f2d2..9faa73f89 100644
--- a/elastic-job-lite-core/src/test/resources/logback-test.xml
+++ b/elastic-job-lite-core/src/test/resources/logback-test.xml
@@ -38,5 +38,5 @@
     
     <logger name="org.apache.curator.framework.recipes.leader.LeaderSelector" level="OFF" />
     <logger name="org.apache.shardingsphere.elasticjob.lite.handler.error.impl.LogJobErrorHandler" level="OFF" />
-    <logger name="org.apache.shardingsphere.elasticjob.lite.internal.monitor.MonitorService" level="OFF" />
+    <logger name="org.apache.shardingsphere.elasticjob.lite.internal.snapshot.SnapshotService" level="OFF" />
 </configuration>