Remove component name (#13)

* remove component name

* remove component name

* remove peer id

* remove peer id

* remove instance register verifier
diff --git a/mock-collector/pom.xml b/mock-collector/pom.xml
index 5fb84ba..95a36d0 100644
--- a/mock-collector/pom.xml
+++ b/mock-collector/pom.xml
@@ -34,7 +34,7 @@
     <url>http://maven.apache.org</url>
 
     <properties>
-        <protocol.version>16fafd53d427b42e80a6fa8fc6dee28569053ebe</protocol.version>
+        <protocol.version>7e563891f3cfaf5c19ad086434af93aaab996719</protocol.version>
         <protocol.workingDirectory>${project.basedir}/target/protocol</protocol.workingDirectory>
         <protocol.repos>https://github.com/apache/skywalking-data-collect-protocol.git</protocol.repos>
         <protobuf-maven-plugin.version>0.6.1</protobuf-maven-plugin.version>
diff --git a/mock-collector/src/main/java/org/apache/skywalking/plugin/test/mockcollector/Main.java b/mock-collector/src/main/java/org/apache/skywalking/plugin/test/mockcollector/Main.java
index 3c5f226..d42f3ae 100644
--- a/mock-collector/src/main/java/org/apache/skywalking/plugin/test/mockcollector/Main.java
+++ b/mock-collector/src/main/java/org/apache/skywalking/plugin/test/mockcollector/Main.java
@@ -32,7 +32,6 @@
 import org.apache.skywalking.plugin.test.mockcollector.service.GrpcAddressHttpService;
 import org.apache.skywalking.plugin.test.mockcollector.service.HealthCheckService;
 import org.apache.skywalking.plugin.test.mockcollector.service.ReceiveDataService;
-import org.apache.skywalking.plugin.test.mockcollector.service.StatusService;
 import org.eclipse.jetty.server.Server;
 import org.eclipse.jetty.servlet.ServletContextHandler;
 
@@ -56,7 +55,6 @@
 
         // Collector service
         servletContextHandler.addServlet(HealthCheckService.class, HealthCheckService.SERVLET_PATH);
-        servletContextHandler.addServlet(StatusService.class, StatusService.SERVLET_PATH);
         servletContextHandler.addServlet(GrpcAddressHttpService.class, GrpcAddressHttpService.SERVLET_PATH);
         servletContextHandler.addServlet(DataValidateService.class, DataValidateService.SERVLET_PATH);
         servletContextHandler.addServlet(ReceiveDataService.class, ReceiveDataService.SERVLET_PATH);
diff --git a/mock-collector/src/main/java/org/apache/skywalking/plugin/test/mockcollector/entity/Span.java b/mock-collector/src/main/java/org/apache/skywalking/plugin/test/mockcollector/entity/Span.java
index d58107c..13f67ba 100644
--- a/mock-collector/src/main/java/org/apache/skywalking/plugin/test/mockcollector/entity/Span.java
+++ b/mock-collector/src/main/java/org/apache/skywalking/plugin/test/mockcollector/entity/Span.java
@@ -55,11 +55,9 @@
     private long startTime;
     private long endTime;
     private int componentId;
-    private String componentName;
     private boolean isError;
     private String spanType;
     private String peer;
-    private int peerId;
     private boolean skipAnalysis;
     private List<KeyValuePair> tags = new ArrayList<>();
     private List<LogEvent> logs = new ArrayList<>();
diff --git a/mock-collector/src/main/java/org/apache/skywalking/plugin/test/mockcollector/entity/ValidateData.java b/mock-collector/src/main/java/org/apache/skywalking/plugin/test/mockcollector/entity/ValidateData.java
index 6993891..9e27823 100644
--- a/mock-collector/src/main/java/org/apache/skywalking/plugin/test/mockcollector/entity/ValidateData.java
+++ b/mock-collector/src/main/java/org/apache/skywalking/plugin/test/mockcollector/entity/ValidateData.java
@@ -21,8 +21,6 @@
     public static ValidateData INSTANCE = new ValidateData();
     private SegmentItems segmentItem;
 
-    private boolean registered = false;
-
     private  ValidateData() {
         segmentItem = new SegmentItems();
     }
@@ -31,12 +29,7 @@
         return segmentItem;
     }
 
-    public boolean isRegistered() {
-        return registered;
-    }
-
     public static void clearData() {
-        INSTANCE.registered = false;
         INSTANCE.segmentItem = new SegmentItems();
     }
 }
diff --git a/mock-collector/src/main/java/org/apache/skywalking/plugin/test/mockcollector/mock/MockManagementService.java b/mock-collector/src/main/java/org/apache/skywalking/plugin/test/mockcollector/mock/MockManagementService.java
index bb26184..dd3aa60 100644
--- a/mock-collector/src/main/java/org/apache/skywalking/plugin/test/mockcollector/mock/MockManagementService.java
+++ b/mock-collector/src/main/java/org/apache/skywalking/plugin/test/mockcollector/mock/MockManagementService.java
@@ -28,7 +28,6 @@
 
     @Override
     public void reportInstanceProperties(InstanceProperties request, StreamObserver<Commands> responseObserver) {
-
         responseObserver.onNext(Commands.newBuilder().build());
         responseObserver.onCompleted();
     }
diff --git a/mock-collector/src/main/java/org/apache/skywalking/plugin/test/mockcollector/mock/rest/MockManagementServiceKeepAliveHandler.java b/mock-collector/src/main/java/org/apache/skywalking/plugin/test/mockcollector/mock/rest/MockManagementServiceKeepAliveHandler.java
index 8e54691..e2e5c71 100644
--- a/mock-collector/src/main/java/org/apache/skywalking/plugin/test/mockcollector/mock/rest/MockManagementServiceKeepAliveHandler.java
+++ b/mock-collector/src/main/java/org/apache/skywalking/plugin/test/mockcollector/mock/rest/MockManagementServiceKeepAliveHandler.java
@@ -23,6 +23,7 @@
 import java.io.IOException;
 import javax.servlet.http.HttpServletRequest;
 import org.apache.skywalking.apm.network.common.v3.Commands;
+import org.apache.skywalking.apm.network.management.v3.InstanceProperties;
 import org.apache.skywalking.plugin.test.mockcollector.util.ProtoBufJsonUtils;
 
 public class MockManagementServiceKeepAliveHandler extends JettyJsonHandler {
@@ -36,6 +37,9 @@
 
     @Override
     protected JsonElement doPost(final HttpServletRequest req) throws IOException {
+        final InstanceProperties.Builder request = InstanceProperties.newBuilder();
+        ProtoBufJsonUtils.fromJSON(getJsonBody(req), request);
+        request.build();
         return gson.fromJson(ProtoBufJsonUtils.toJSON(Commands.newBuilder().build()), JsonElement.class);
     }
 }
diff --git a/mock-collector/src/main/java/org/apache/skywalking/plugin/test/mockcollector/mock/rest/MockManagementServiceReportPropertiesHandler.java b/mock-collector/src/main/java/org/apache/skywalking/plugin/test/mockcollector/mock/rest/MockManagementServiceReportPropertiesHandler.java
index 6411422..8770fc6 100644
--- a/mock-collector/src/main/java/org/apache/skywalking/plugin/test/mockcollector/mock/rest/MockManagementServiceReportPropertiesHandler.java
+++ b/mock-collector/src/main/java/org/apache/skywalking/plugin/test/mockcollector/mock/rest/MockManagementServiceReportPropertiesHandler.java
@@ -23,6 +23,7 @@
 import java.io.IOException;
 import javax.servlet.http.HttpServletRequest;
 import org.apache.skywalking.apm.network.common.v3.Commands;
+import org.apache.skywalking.apm.network.management.v3.InstanceProperties;
 import org.apache.skywalking.plugin.test.mockcollector.util.ProtoBufJsonUtils;
 
 public class MockManagementServiceReportPropertiesHandler extends JettyJsonHandler {
@@ -36,6 +37,9 @@
 
     @Override
     protected JsonElement doPost(final HttpServletRequest req) throws IOException {
+        final InstanceProperties.Builder request = InstanceProperties.newBuilder();
+        ProtoBufJsonUtils.fromJSON(getJsonBody(req), request);
+        request.build();
         return gson.fromJson(ProtoBufJsonUtils.toJSON(Commands.newBuilder().build()), JsonElement.class);
     }
 }
diff --git a/mock-collector/src/main/java/org/apache/skywalking/plugin/test/mockcollector/service/StatusService.java b/mock-collector/src/main/java/org/apache/skywalking/plugin/test/mockcollector/service/StatusService.java
deleted file mode 100644
index b31f988..0000000
--- a/mock-collector/src/main/java/org/apache/skywalking/plugin/test/mockcollector/service/StatusService.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.skywalking.plugin.test.mockcollector.service;
-
-import java.io.IOException;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import org.apache.skywalking.plugin.test.mockcollector.entity.ValidateData;
-
-public class StatusService extends HttpServlet {
-    public static final String SERVLET_PATH = "/status";
-
-    @Override
-    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
-        if (ValidateData.INSTANCE.isRegistered()) {
-            resp.setStatus(200);
-            resp.getWriter().write("Success");
-            resp.getWriter().flush();
-        } else {
-            resp.setStatus(500);
-            resp.getWriter().flush();
-        }
-    }
-}
diff --git a/mock-collector/src/main/java/org/apache/skywalking/plugin/test/mockcollector/util/Const.java b/mock-collector/src/main/java/org/apache/skywalking/plugin/test/mockcollector/util/Const.java
deleted file mode 100644
index 9e699cf..0000000
--- a/mock-collector/src/main/java/org/apache/skywalking/plugin/test/mockcollector/util/Const.java
+++ /dev/null
@@ -1,40 +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.skywalking.plugin.test.mockcollector.util;
-
-public class Const {
-    public static final int NONE = 0;
-    public static final String ID_SPLIT = "_";
-    public static final String ID_PARSER_SPLIT = "\\_";
-    public static final String LINE = "-";
-    public static final String SPACE = " ";
-    public static final String KEY_VALUE_SPLIT = ",";
-    public static final String ARRAY_SPLIT = "|";
-    public static final String ARRAY_PARSER_SPLIT = "\\|";
-    public static final String USER_SERVICE_NAME = "User";
-    public static final String USER_INSTANCE_NAME = "User";
-    public static final String USER_ENDPOINT_NAME = "User";
-    public static final int INEXISTENCE_ENDPOINT_ID = -1;
-    public static final String USER_CODE = "User";
-    public static final String SEGMENT_SPAN_SPLIT = "S";
-    public static final String UNKNOWN = "Unknown";
-    public static final String EMPTY_STRING = "";
-    public static final String EMPTY_JSON_OBJECT_STRING = "{}";
-    public static final String DOMAIN_OPERATION_NAME = "{domain}";
-}
diff --git a/mock-collector/src/main/java/org/apache/skywalking/plugin/test/mockcollector/util/TraceSegmentHandler.java b/mock-collector/src/main/java/org/apache/skywalking/plugin/test/mockcollector/util/TraceSegmentHandler.java
index 2ac304f..fe01630 100644
--- a/mock-collector/src/main/java/org/apache/skywalking/plugin/test/mockcollector/util/TraceSegmentHandler.java
+++ b/mock-collector/src/main/java/org/apache/skywalking/plugin/test/mockcollector/util/TraceSegmentHandler.java
@@ -44,7 +44,6 @@
                        .startTime(spanObject.getStartTime())
                        .endTime(spanObject.getEndTime())
                        .componentId(spanObject.getComponentId())
-                       .componentName(spanObject.getComponent())
                        .isError(spanObject.getIsError())
                        .spanType(spanObject.getSpanType().name())
                        .peer(spanObject.getPeer());
diff --git a/validator/src/main/java/org/apache/skywalking/plugin/test/agent/tool/validator/assertor/SegmentAssert.java b/validator/src/main/java/org/apache/skywalking/plugin/test/agent/tool/validator/assertor/SegmentAssert.java
index 57f6301..a7df4ae 100644
--- a/validator/src/main/java/org/apache/skywalking/plugin/test/agent/tool/validator/assertor/SegmentAssert.java
+++ b/validator/src/main/java/org/apache/skywalking/plugin/test/agent/tool/validator/assertor/SegmentAssert.java
@@ -97,7 +97,6 @@
     private static void spanEquals(Span excepted, Span actualSpan) {
         ExpressParser.parse(excepted.operationName()).assertValue("operation name", actualSpan.operationName());
         ExpressParser.parse(excepted.componentId()).assertValue("component id", actualSpan.componentId());
-        ExpressParser.parse(excepted.componentName()).assertValue("component name", actualSpan.componentName());
         ExpressParser.parse(excepted.startTime()).assertValue("start time", actualSpan.startTime());
         ExpressParser.parse(excepted.endTime()).assertValue("end time", actualSpan.endTime());
         ExpressParser.parse(excepted.parentSpanId()).assertValue("parent span id", actualSpan.parentSpanId());
@@ -105,9 +104,9 @@
         ExpressParser.parse(excepted.operationId()).assertValue("operation id", actualSpan.operationId());
         ExpressParser.parse(excepted.peer()).assertValue("peer", actualSpan.peer());
         ExpressParser.parse(excepted.spanLayer()).assertValue("span layer", actualSpan.spanLayer());
-        ExpressParser.parse(excepted.peerId()).assertValue("peer id", actualSpan.peerId());
         ExpressParser.parse(excepted.error()).assertValue("is error", actualSpan.error());
         ExpressParser.parse(excepted.spanType()).assertValue("span type", actualSpan.spanType());
+        ExpressParser.parse(excepted.skipAnalysis()).assertValue("skip analysis", actualSpan.skipAnalysis());
         tagsEquals(excepted.tags(), actualSpan.tags());
         logsEquals(excepted.logs(), actualSpan.logs());
         refEquals(excepted.refs(), actualSpan.refs());
diff --git a/validator/src/main/java/org/apache/skywalking/plugin/test/agent/tool/validator/entity/SegmentForRead.java b/validator/src/main/java/org/apache/skywalking/plugin/test/agent/tool/validator/entity/SegmentForRead.java
index 06d1840..79a3bf1 100644
--- a/validator/src/main/java/org/apache/skywalking/plugin/test/agent/tool/validator/entity/SegmentForRead.java
+++ b/validator/src/main/java/org/apache/skywalking/plugin/test/agent/tool/validator/entity/SegmentForRead.java
@@ -130,8 +130,7 @@
         private String isError;
         private String spanType;
         private String peer;
-        private String peerId;
-        private boolean skipAnalysis;
+        private String skipAnalysis;
 
         public void setOperationName(String operationName) {
             this.operationName = operationName;
@@ -189,15 +188,11 @@
             this.peer = peer;
         }
 
-        public void setPeerId(String peerId) {
-            this.peerId = peerId;
-        }
-
         public void setRefs(List<Map<String, Object>> refs) {
             this.refs = refs;
         }
 
-        public void setSkipAnalysis(boolean skipAnalysis) {
+        public void setSkipAnalysis(String skipAnalysis) {
             this.skipAnalysis = skipAnalysis;
         }
 
@@ -272,11 +267,6 @@
         }
 
         @Override
-        public String componentName() {
-            return componentName;
-        }
-
-        @Override
         public String error() {
             return isError;
         }
@@ -292,12 +282,7 @@
         }
 
         @Override
-        public String peerId() {
-            return peerId;
-        }
-
-        @Override
-        public boolean skipAnalysis() {
+        public String skipAnalysis() {
             return skipAnalysis;
         }
 
diff --git a/validator/src/main/java/org/apache/skywalking/plugin/test/agent/tool/validator/entity/Span.java b/validator/src/main/java/org/apache/skywalking/plugin/test/agent/tool/validator/entity/Span.java
index e193a97..00efa51 100644
--- a/validator/src/main/java/org/apache/skywalking/plugin/test/agent/tool/validator/entity/Span.java
+++ b/validator/src/main/java/org/apache/skywalking/plugin/test/agent/tool/validator/entity/Span.java
@@ -40,17 +40,13 @@
 
     String componentId();
 
-    String componentName();
-
     String error();
 
     String spanType();
 
     String peer();
 
-    String peerId();
-
-    boolean skipAnalysis();
+    String skipAnalysis();
 
     List<SegmentRef> refs();
 
diff --git a/validator/src/test/resources/actualData.yaml b/validator/src/test/resources/actualData.yaml
index d42a117..e2ececb 100644
--- a/validator/src/test/resources/actualData.yaml
+++ b/validator/src/test/resources/actualData.yaml
@@ -26,11 +26,9 @@
             startTime: 1586097228454
             endTime: 1586097230551
             componentId: 19
-            componentName: ''
             isError: false
             spanType: Entry
             peer: ''
-            peerId: 0
             skipAnalysis: false
             tags:
               - {key: url, value: 'http://localhost:18080/jettyserver-case/case/receiveContext-0'}
@@ -53,11 +51,9 @@
             startTime: 1586097226069
             endTime: 1586097226561
             componentId: 1
-            componentName: ''
             isError: false
             spanType: Entry
             peer: ''
-            peerId: 0
             skipAnalysis: false
             tags:
               - {key: url, value: 'http://localhost:8080/jettyclient-case/case/healthCheck'}
@@ -72,11 +68,9 @@
             startTime: 1586097226783
             endTime: 1586097230546
             componentId: 18
-            componentName: ''
             isError: false
             spanType: Exit
             peer: localhost:18080
-            peerId: 0
             skipAnalysis: false
             tags:
               - {key: http.method, value: GET}
@@ -89,11 +83,9 @@
             startTime: 1586097226661
             endTime: 1586097230548
             componentId: 1
-            componentName: ''
             isError: false
             spanType: Entry
             peer: ''
-            peerId: 0
             skipAnalysis: false
             tags:
               - {key: url, value: 'http://localhost:8080/jettyclient-case/case/jettyclient-case'}
diff --git a/validator/src/test/resources/expectedData.yaml b/validator/src/test/resources/expectedData.yaml
index 73e12d6..6a63e5a 100644
--- a/validator/src/test/resources/expectedData.yaml
+++ b/validator/src/test/resources/expectedData.yaml
@@ -26,11 +26,9 @@
             startTime: gt 0
             endTime: gt 0
             componentId: 19
-            componentName: ''
             isError: false
             spanType: Entry
             peer: ''
-            peerId: 0
             skipAnalysis: false
             tags:
               - {key: url, value: 'http://localhost:18080/jettyserver-case/case/receiveContext-0'}
@@ -53,11 +51,9 @@
             startTime: gt 0
             endTime: gt 0
             componentId: 1
-            componentName: ''
             isError: false
             spanType: Entry
             peer: ''
-            peerId: 0
             skipAnalysis: false
             tags:
               - {key: url, value: 'http://localhost:8080/jettyclient-case/case/healthCheck'}
@@ -72,11 +68,9 @@
             startTime: gt 0
             endTime: gt 0
             componentId: 18
-            componentName: ''
             isError: false
             spanType: Exit
             peer: localhost:18080
-            peerId: 0
             skipAnalysis: false
             tags:
               - {key: http.method, value: GET}
@@ -89,11 +83,9 @@
             startTime: gt 0
             endTime: gt 0
             componentId: 1
-            componentName: ''
             isError: false
             spanType: Entry
             peer: ''
-            peerId: 0
             skipAnalysis: false
             tags:
               - {key: url, value: 'http://localhost:8080/jettyclient-case/case/jettyclient-case'}