wu-sheng closed pull request #818: Agent data aggregate test.
URL: https://github.com/apache/incubator-skywalking/pull/818
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/ApplicationRegisterServiceHandlerTestCase.java
 
b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/ApplicationRegisterServiceHandlerTestCase.java
deleted file mode 100644
index 50d9e82dc..000000000
--- 
a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/ApplicationRegisterServiceHandlerTestCase.java
+++ /dev/null
@@ -1,46 +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.apm.collector.agent.grpc.provider.handler;
-
-import io.grpc.ManagedChannel;
-import io.grpc.ManagedChannelBuilder;
-import org.apache.skywalking.apm.network.proto.Application;
-import org.apache.skywalking.apm.network.proto.ApplicationMapping;
-import org.apache.skywalking.apm.network.proto.ApplicationRegisterServiceGrpc;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author peng-yongsheng
- */
-public class ApplicationRegisterServiceHandlerTestCase {
-
-    private final Logger logger = 
LoggerFactory.getLogger(ApplicationRegisterServiceHandlerTestCase.class);
-
-    private 
ApplicationRegisterServiceGrpc.ApplicationRegisterServiceBlockingStub stub;
-
-    public void testRegister() {
-        ManagedChannel channel = ManagedChannelBuilder.forAddress("localhost", 
11800).usePlaintext(true).build();
-        stub = ApplicationRegisterServiceGrpc.newBlockingStub(channel);
-
-        Application application = 
Application.newBuilder().setApplicationCode("test141").build();
-        ApplicationMapping mapping = stub.applicationCodeRegister(application);
-        logger.debug(mapping.getApplication().getKey() + ", " + 
mapping.getApplication().getValue());
-    }
-}
diff --git 
a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/JVMMetricServiceHandlerTestCase.java
 
b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/JVMMetricServiceHandlerTestCase.java
deleted file mode 100644
index 7862fcaaf..000000000
--- 
a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/JVMMetricServiceHandlerTestCase.java
+++ /dev/null
@@ -1,94 +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.apm.collector.agent.grpc.provider.handler;
-
-import io.grpc.ManagedChannel;
-import io.grpc.ManagedChannelBuilder;
-import org.apache.skywalking.apm.network.proto.CPU;
-import org.apache.skywalking.apm.network.proto.GC;
-import org.apache.skywalking.apm.network.proto.GCPhrase;
-import org.apache.skywalking.apm.network.proto.JVMMetric;
-import org.apache.skywalking.apm.network.proto.JVMMetrics;
-import org.apache.skywalking.apm.network.proto.JVMMetricsServiceGrpc;
-import org.apache.skywalking.apm.network.proto.Memory;
-import org.apache.skywalking.apm.network.proto.MemoryPool;
-import org.apache.skywalking.apm.network.proto.PoolType;
-
-/**
- * @author peng-yongsheng
- */
-public class JVMMetricServiceHandlerTestCase {
-
-    public static void main(String[] args) {
-        ManagedChannel channel = ManagedChannelBuilder.forAddress("localhost", 
11800).usePlaintext(true).build();
-        JVMMetricsServiceGrpc.JVMMetricsServiceBlockingStub blockingStub = 
JVMMetricsServiceGrpc.newBlockingStub(channel);
-
-        JVMMetrics.Builder builder = JVMMetrics.newBuilder();
-        builder.setApplicationInstanceId(2);
-
-        JVMMetric.Builder metricBuilder = JVMMetric.newBuilder();
-        metricBuilder.setTime(System.currentTimeMillis());
-
-        buildCPUMetric(metricBuilder);
-        buildGCMetric(metricBuilder);
-        buildMemoryMetric(metricBuilder);
-        buildMemoryPoolMetric(metricBuilder);
-
-        builder.addMetrics(metricBuilder.build());
-
-        blockingStub.collect(builder.build());
-    }
-
-    private static void buildMemoryPoolMetric(JVMMetric.Builder metricBuilder) 
{
-        MemoryPool.Builder builder = MemoryPool.newBuilder();
-        builder.setInit(20);
-        builder.setMax(50);
-        builder.setCommited(20);
-        builder.setUsed(15);
-        builder.setType(PoolType.NEWGEN_USAGE);
-
-        metricBuilder.addMemoryPool(builder);
-    }
-
-    private static void buildMemoryMetric(JVMMetric.Builder metricBuilder) {
-        Memory.Builder builder = Memory.newBuilder();
-        builder.setInit(20);
-        builder.setMax(50);
-        builder.setCommitted(20);
-        builder.setUsed(15);
-        builder.setIsHeap(true);
-
-        metricBuilder.addMemory(builder);
-    }
-
-    private static void buildGCMetric(JVMMetric.Builder metricBuilder) {
-        GC.Builder builder = GC.newBuilder();
-        builder.setPhrase(GCPhrase.NEW);
-        builder.setCount(2);
-
-        metricBuilder.addGc(builder);
-    }
-
-    private static void buildCPUMetric(JVMMetric.Builder metricBuilder) {
-        CPU.Builder builder = CPU.newBuilder();
-        builder.setUsagePercent(20);
-
-        metricBuilder.setCpu(builder.build());
-    }
-}
diff --git 
a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/InstHeartBeatServiceTestCase.java
 
b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/mock/AgentDataMock.java
similarity index 60%
rename from 
apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/InstHeartBeatServiceTestCase.java
rename to 
apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/mock/AgentDataMock.java
index 56c74c568..182eb0030 100644
--- 
a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/InstHeartBeatServiceTestCase.java
+++ 
b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/mock/AgentDataMock.java
@@ -16,25 +16,35 @@
  *
  */
 
-package org.apache.skywalking.apm.collector.agent.grpc.provider.handler;
+package org.apache.skywalking.apm.collector.agent.grpc.provider.handler.mock;
 
 import io.grpc.ManagedChannel;
 import io.grpc.ManagedChannelBuilder;
-import org.apache.skywalking.apm.network.proto.ApplicationInstanceHeartbeat;
-import org.apache.skywalking.apm.network.proto.InstanceDiscoveryServiceGrpc;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * @author peng-yongsheng
  */
-public class InstHeartBeatServiceTestCase {
+public class AgentDataMock {
 
-    public static void main(String[] args) {
+    private static final Logger logger = 
LoggerFactory.getLogger(TraceSegmentMock.class);
+
+    public static void main(String[] args) throws InterruptedException {
         ManagedChannel channel = ManagedChannelBuilder.forAddress("localhost", 
11800).usePlaintext(true).build();
-        InstanceDiscoveryServiceGrpc.InstanceDiscoveryServiceBlockingStub 
blockingStub = InstanceDiscoveryServiceGrpc.newBlockingStub(channel);
 
-        ApplicationInstanceHeartbeat.Builder builder = 
ApplicationInstanceHeartbeat.newBuilder();
-        builder.setApplicationInstanceId(2);
-        builder.setHeartbeatTime(System.currentTimeMillis());
-        blockingStub.heartbeat(builder.build());
+        RegisterMock registerMock = new RegisterMock();
+        registerMock.mock(channel);
+
+        Long[] times = TimeBuilder.INSTANCE.generateTimes();
+        logger.info("times size: {}", times.length);
+
+        TraceSegmentMock segmentMock = new TraceSegmentMock();
+        segmentMock.mock(channel, times);
+
+        JVMMetricMock jvmMetricMock = new JVMMetricMock();
+        jvmMetricMock.mock(channel, times);
+
+        Thread.sleep(60);
     }
 }
diff --git 
a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/mock/JVMMetricMock.java
 
b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/mock/JVMMetricMock.java
new file mode 100644
index 000000000..98e97881e
--- /dev/null
+++ 
b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/mock/JVMMetricMock.java
@@ -0,0 +1,159 @@
+/*
+ * 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.apm.collector.agent.grpc.provider.handler.mock;
+
+import io.grpc.ManagedChannel;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicInteger;
+import org.apache.skywalking.apm.network.proto.CPU;
+import org.apache.skywalking.apm.network.proto.GC;
+import org.apache.skywalking.apm.network.proto.GCPhrase;
+import org.apache.skywalking.apm.network.proto.JVMMetric;
+import org.apache.skywalking.apm.network.proto.JVMMetrics;
+import org.apache.skywalking.apm.network.proto.JVMMetricsServiceGrpc;
+import org.apache.skywalking.apm.network.proto.Memory;
+import org.apache.skywalking.apm.network.proto.MemoryPool;
+import org.apache.skywalking.apm.network.proto.PoolType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author peng-yongsheng
+ */
+class JVMMetricMock {
+
+    private static final Logger logger = 
LoggerFactory.getLogger(JVMMetricMock.class);
+
+    void mock(ManagedChannel channel, Long[] times) {
+        JVMMetricsServiceGrpc.JVMMetricsServiceBlockingStub 
jvmMetricsServiceBlockingStub = JVMMetricsServiceGrpc.newBlockingStub(channel);
+
+        Set<Long> timeSet = new HashSet<>();
+        timeSet.addAll(Arrays.asList(times));
+
+        AtomicInteger increment = new AtomicInteger(0);
+        timeSet.forEach(timestamp -> {
+            JVMMetrics.Builder jvmMetrics = JVMMetrics.newBuilder();
+            jvmMetrics.setApplicationInstanceId(2);
+
+            JVMMetric.Builder jvmMetricBuilder = JVMMetric.newBuilder();
+            jvmMetricBuilder.setTime(timestamp);
+
+            buildCPUMetric(jvmMetricBuilder);
+            buildGCMetric(jvmMetricBuilder);
+            buildMemoryMetric(jvmMetricBuilder);
+            buildMemoryPoolMetric(jvmMetricBuilder);
+
+            jvmMetrics.addMetrics(jvmMetricBuilder.build());
+            jvmMetricsServiceBlockingStub.collect(jvmMetrics.build());
+
+            if (increment.incrementAndGet() % 100 == 0) {
+                logger.info("sending jvm metric number: {}", increment.get());
+            }
+        });
+        logger.info("sending jvm metric number: {}", increment.get());
+    }
+
+    private static void buildMemoryPoolMetric(JVMMetric.Builder metricBuilder) 
{
+        MemoryPool.Builder codeCache = MemoryPool.newBuilder();
+        codeCache.setInit(10);
+        codeCache.setMax(100);
+        codeCache.setCommited(10);
+        codeCache.setUsed(50);
+        codeCache.setType(PoolType.CODE_CACHE_USAGE);
+        metricBuilder.addMemoryPool(codeCache);
+
+        MemoryPool.Builder newGen = MemoryPool.newBuilder();
+        newGen.setInit(10);
+        newGen.setMax(100);
+        newGen.setCommited(10);
+        newGen.setUsed(50);
+        newGen.setType(PoolType.NEWGEN_USAGE);
+        metricBuilder.addMemoryPool(newGen);
+
+        MemoryPool.Builder oldGen = MemoryPool.newBuilder();
+        oldGen.setInit(10);
+        oldGen.setMax(100);
+        oldGen.setCommited(10);
+        oldGen.setUsed(50);
+        oldGen.setType(PoolType.OLDGEN_USAGE);
+        metricBuilder.addMemoryPool(oldGen);
+
+        MemoryPool.Builder survivor = MemoryPool.newBuilder();
+        survivor.setInit(10);
+        survivor.setMax(100);
+        survivor.setCommited(10);
+        survivor.setUsed(50);
+        survivor.setType(PoolType.SURVIVOR_USAGE);
+        metricBuilder.addMemoryPool(survivor);
+
+        MemoryPool.Builder permGen = MemoryPool.newBuilder();
+        permGen.setInit(10);
+        permGen.setMax(100);
+        permGen.setCommited(10);
+        permGen.setUsed(50);
+        permGen.setType(PoolType.PERMGEN_USAGE);
+        metricBuilder.addMemoryPool(permGen);
+
+        MemoryPool.Builder metaSpace = MemoryPool.newBuilder();
+        metaSpace.setInit(10);
+        metaSpace.setMax(100);
+        metaSpace.setCommited(10);
+        metaSpace.setUsed(50);
+        metaSpace.setType(PoolType.METASPACE_USAGE);
+        metricBuilder.addMemoryPool(metaSpace);
+    }
+
+    private static void buildMemoryMetric(JVMMetric.Builder metricBuilder) {
+        Memory.Builder isHeap = Memory.newBuilder();
+        isHeap.setInit(20);
+        isHeap.setMax(100);
+        isHeap.setCommitted(20);
+        isHeap.setUsed(60);
+        isHeap.setIsHeap(true);
+        metricBuilder.addMemory(isHeap);
+
+        Memory.Builder nonHeap = Memory.newBuilder();
+        nonHeap.setInit(20);
+        nonHeap.setMax(100);
+        nonHeap.setCommitted(20);
+        nonHeap.setUsed(60);
+        nonHeap.setIsHeap(false);
+        metricBuilder.addMemory(nonHeap);
+    }
+
+    private static void buildGCMetric(JVMMetric.Builder metricBuilder) {
+        GC.Builder newGC = GC.newBuilder();
+        newGC.setPhrase(GCPhrase.NEW);
+        newGC.setCount(2);
+        metricBuilder.addGc(newGC);
+
+        GC.Builder oldGC = GC.newBuilder();
+        oldGC.setPhrase(GCPhrase.OLD);
+        oldGC.setCount(4);
+        metricBuilder.addGc(oldGC);
+    }
+
+    private static void buildCPUMetric(JVMMetric.Builder metricBuilder) {
+        CPU.Builder cpu = CPU.newBuilder();
+        cpu.setUsagePercent(20);
+        metricBuilder.setCpu(cpu.build());
+    }
+}
diff --git 
a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/mock/TimeBuilder.java
 
b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/mock/TimeBuilder.java
index 78e246c87..5e4b4e121 100644
--- 
a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/mock/TimeBuilder.java
+++ 
b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/mock/TimeBuilder.java
@@ -38,7 +38,7 @@
         new Duration("2017-03-01T00:02:01.001", "2017-03-01T00:05:01.001", 2),
 
         new Duration("2017-04-01T00:02:01.001", "2017-04-01T00:05:01.001", 2),
-        new Duration("2017-04-02T00:03:01.001", "2017-04-02T00:05:01.001", 2),
+        new Duration("2017-04-02T00:02:01.001", "2017-04-02T00:05:01.001", 2),
         new Duration("2017-04-03T00:02:01.001", "2017-04-03T00:05:01.001", 2),
 
         new Duration("2017-05-01T08:02:01.001", "2017-05-01T08:05:01.001", 2),
diff --git 
a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/mock/TraceSegmentMock.java
 
b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/mock/TraceSegmentMock.java
index c290bd30a..3fdf97a92 100644
--- 
a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/mock/TraceSegmentMock.java
+++ 
b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/mock/TraceSegmentMock.java
@@ -19,7 +19,6 @@
 package org.apache.skywalking.apm.collector.agent.grpc.provider.handler.mock;
 
 import io.grpc.ManagedChannel;
-import io.grpc.ManagedChannelBuilder;
 import io.grpc.stub.StreamObserver;
 import org.apache.skywalking.apm.network.proto.Downstream;
 import org.apache.skywalking.apm.network.proto.TraceSegmentServiceGrpc;
@@ -31,18 +30,11 @@
 /**
  * @author peng-yongsheng
  */
-public class TraceSegmentMock {
+class TraceSegmentMock {
 
     private static final Logger logger = 
LoggerFactory.getLogger(TraceSegmentMock.class);
 
-    public static void main(String[] args) throws InterruptedException {
-        ManagedChannel channel = ManagedChannelBuilder.forAddress("localhost", 
11800).usePlaintext(true).build();
-
-        RegisterMock registerMock = new RegisterMock();
-        registerMock.mock(channel);
-
-        Sleeping sleeping = new Sleeping();
-
+    void mock(ManagedChannel channel, Long[] times) {
         TraceSegmentServiceGrpc.TraceSegmentServiceStub stub = 
TraceSegmentServiceGrpc.newStub(channel);
         StreamObserver<UpstreamSegment> segmentStreamObserver = 
stub.collect(new StreamObserver<Downstream>() {
             @Override public void onNext(Downstream downstream) {
@@ -52,13 +44,9 @@ public static void main(String[] args) throws 
InterruptedException {
             }
 
             @Override public void onCompleted() {
-                sleeping.setValue(Boolean.FALSE);
             }
         });
 
-        Long[] times = TimeBuilder.INSTANCE.generateTimes();
-        logger.info("times size: {}", times.length);
-
         for (int i = 0; i < times.length; i++) {
             long startTimestamp = times[i];
 
@@ -79,23 +67,5 @@ public static void main(String[] args) throws 
InterruptedException {
         logger.info("sending segment number: {}", times.length);
 
         segmentStreamObserver.onCompleted();
-
-        while (sleeping.getValue()) {
-            Thread.sleep(200);
-        }
-
-        Thread.sleep(200000);
-    }
-
-    static class Sleeping {
-        private Boolean value = Boolean.TRUE;
-
-        Boolean getValue() {
-            return value;
-        }
-
-        void setValue(Boolean value) {
-            this.value = value;
-        }
     }
 }
diff --git 
a/apm-collector/apm-collector-analysis/analysis-alarm/alarm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/alarm/provider/worker/AlarmAssertWorker.java
 
b/apm-collector/apm-collector-analysis/analysis-alarm/alarm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/alarm/provider/worker/AlarmAssertWorker.java
index b0d211f75..0aeabca1b 100644
--- 
a/apm-collector/apm-collector-analysis/analysis-alarm/alarm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/alarm/provider/worker/AlarmAssertWorker.java
+++ 
b/apm-collector/apm-collector-analysis/analysis-alarm/alarm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/alarm/provider/worker/AlarmAssertWorker.java
@@ -18,7 +18,6 @@
 
 package org.apache.skywalking.apm.collector.analysis.alarm.provider.worker;
 
-import org.apache.skywalking.apm.collector.storage.table.MetricSource;
 import 
org.apache.skywalking.apm.collector.analysis.worker.model.base.AbstractLocalAsyncWorker;
 import 
org.apache.skywalking.apm.collector.analysis.worker.model.base.WorkerException;
 import org.apache.skywalking.apm.collector.core.data.StreamData;
@@ -26,6 +25,7 @@
 import org.apache.skywalking.apm.collector.core.util.Const;
 import org.apache.skywalking.apm.collector.core.util.NumberFormatUtils;
 import org.apache.skywalking.apm.collector.storage.table.Metric;
+import org.apache.skywalking.apm.collector.storage.table.MetricSource;
 import org.apache.skywalking.apm.collector.storage.table.alarm.Alarm;
 import org.apache.skywalking.apm.collector.storage.table.alarm.AlarmType;
 import org.slf4j.Logger;
@@ -80,7 +80,7 @@ private void errorRateAlarmAssert(INPUT inputMetric) {
                 onNext(alarm);
             }
         } else {
-            logger.error("Please check the metric source, the value must be {} 
or {}", MetricSource.Caller.getValue(), MetricSource.Callee.getValue());
+            logger.error("Please check the metric source, the value must be {} 
or {}, but {}", MetricSource.Caller.getValue(), MetricSource.Callee.getValue(), 
inputMetric.getSourceValue());
         }
     }
 
@@ -94,7 +94,6 @@ private void averageResponseTimeAlarmAssert(INPUT 
inputMetric) {
         Double averageResponseTime = 
Double.valueOf(transactionSuccessDurationSum) / 
Double.valueOf(transactionSuccessCalls);
 
         if 
(inputMetric.getSourceValue().equals(MetricSource.Callee.getValue())) {
-
             if (averageResponseTime >= calleeAverageResponseTimeThreshold()) {
                 String id = String.valueOf(MetricSource.Callee.getValue()) + 
Const.ID_SPLIT + AlarmType.SLOW_RTT.getValue();
                 OUTPUT alarm = newAlarmObject(id, inputMetric);
@@ -104,20 +103,20 @@ private void averageResponseTimeAlarmAssert(INPUT 
inputMetric) {
                 alarm.setAlarmContent("");
 
                 onNext(alarm);
-            } else if 
(inputMetric.getSourceValue().equals(MetricSource.Caller.getValue())) {
-                if (averageResponseTime >= 
callerAverageResponseTimeThreshold()) {
-                    String id = String.valueOf(MetricSource.Caller.getValue()) 
+ Const.ID_SPLIT + AlarmType.SLOW_RTT.getValue();
-                    OUTPUT alarm = newAlarmObject(id, inputMetric);
-                    alarm.setAlarmType(AlarmType.SLOW_RTT.getValue());
-                    alarm.setLastTimeBucket(inputMetric.getTimeBucket());
-                    alarm.setSourceValue(MetricSource.Caller.getValue());
-                    alarm.setAlarmContent("");
-
-                    onNext(alarm);
-                }
-            } else {
-                logger.error("Please check the metric source, the value must 
be {} or {}", MetricSource.Caller.getValue(), MetricSource.Callee.getValue());
             }
+        } else if 
(inputMetric.getSourceValue().equals(MetricSource.Caller.getValue())) {
+            if (averageResponseTime >= callerAverageResponseTimeThreshold()) {
+                String id = String.valueOf(MetricSource.Caller.getValue()) + 
Const.ID_SPLIT + AlarmType.SLOW_RTT.getValue();
+                OUTPUT alarm = newAlarmObject(id, inputMetric);
+                alarm.setAlarmType(AlarmType.SLOW_RTT.getValue());
+                alarm.setLastTimeBucket(inputMetric.getTimeBucket());
+                alarm.setSourceValue(MetricSource.Caller.getValue());
+                alarm.setAlarmContent("");
+
+                onNext(alarm);
+            }
+        } else {
+            logger.error("Please check the metric source, the value must be {} 
or {}, but {}", MetricSource.Caller.getValue(), MetricSource.Callee.getValue(), 
inputMetric.getSourceValue());
         }
     }
 }
\ No newline at end of file
diff --git 
a/apm-collector/apm-collector-analysis/analysis-alarm/alarm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/alarm/provider/worker/application/ApplicationMetricAlarmListCopy.java
 
b/apm-collector/apm-collector-analysis/analysis-alarm/alarm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/alarm/provider/worker/application/ApplicationMetricAlarmListCopy.java
index 70ca915fb..95c7fb258 100644
--- 
a/apm-collector/apm-collector-analysis/analysis-alarm/alarm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/alarm/provider/worker/application/ApplicationMetricAlarmListCopy.java
+++ 
b/apm-collector/apm-collector-analysis/analysis-alarm/alarm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/alarm/provider/worker/application/ApplicationMetricAlarmListCopy.java
@@ -27,7 +27,6 @@
 
     public static ApplicationAlarmList copy(ApplicationAlarmList 
applicationAlarmList) {
         ApplicationAlarmList newApplicationAlarmList = new 
ApplicationAlarmList();
-        newApplicationAlarmList.setId(applicationAlarmList.getId());
         
newApplicationAlarmList.setMetricId(applicationAlarmList.getMetricId());
 
         
newApplicationAlarmList.setAlarmContent(applicationAlarmList.getAlarmContent());
diff --git a/apm-collector/apm-collector-boot/src/main/resources/log4j2.xml 
b/apm-collector/apm-collector-boot/src/main/resources/log4j2.xml
index 92f26c585..6697ebf27 100644
--- a/apm-collector/apm-collector-boot/src/main/resources/log4j2.xml
+++ b/apm-collector/apm-collector-boot/src/main/resources/log4j2.xml
@@ -17,7 +17,7 @@
   ~
   -->
 
-<Configuration status="debug">
+<Configuration status="info">
     <Appenders>
         <Console name="Console" target="SYSTEM_OUT">
             <PatternLayout charset="UTF-8" pattern="%d - %c -%-4r [%t] %-5p %x 
- %m%n"/>
@@ -30,7 +30,7 @@
         <logger 
name="org.apache.skywalking.apm.collector.agent.grpc.provider.handler.JVMMetricsServiceHandler"
 level="INFO"/>
         <logger 
name="org.apache.skywalking.apm.collector.analysis.worker.timer.PersistenceTimer"
 level="INFO"/>
         <logger name="io.grpc.netty" level="INFO"/>
-        <Root level="debug">
+        <Root level="info">
             <AppenderRef ref="Console"/>
         </Root>
     </Loggers>
diff --git 
a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/base/dao/AbstractPersistenceEsDAO.java
 
b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/base/dao/AbstractPersistenceEsDAO.java
index 43cae44ce..e98d2b5a2 100644
--- 
a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/base/dao/AbstractPersistenceEsDAO.java
+++ 
b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/base/dao/AbstractPersistenceEsDAO.java
@@ -49,7 +49,9 @@ protected AbstractPersistenceEsDAO(ElasticSearchClient 
client) {
     @Override public final STREAM_DATA get(String id) {
         GetResponse getResponse = getClient().prepareGet(tableName(), 
id).get();
         if (getResponse.isExists()) {
-            return esDataToStreamData(getResponse.getSource());
+            STREAM_DATA streamData = 
esDataToStreamData(getResponse.getSource());
+            streamData.setId(id);
+            return streamData;
         } else {
             return null;
         }
diff --git 
a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/base/dao/BatchEsDAO.java
 
b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/base/dao/BatchEsDAO.java
index 0e7e146f3..a006e7536 100644
--- 
a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/base/dao/BatchEsDAO.java
+++ 
b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/base/dao/BatchEsDAO.java
@@ -22,6 +22,7 @@
 import 
org.apache.skywalking.apm.collector.client.elasticsearch.ElasticSearchClient;
 import org.apache.skywalking.apm.collector.core.util.CollectionUtils;
 import org.apache.skywalking.apm.collector.storage.base.dao.IBatchDAO;
+import org.elasticsearch.action.bulk.BulkItemResponse;
 import org.elasticsearch.action.bulk.BulkRequestBuilder;
 import org.elasticsearch.action.bulk.BulkResponse;
 import org.elasticsearch.action.index.IndexRequestBuilder;
@@ -57,6 +58,9 @@ public BatchEsDAO(ElasticSearchClient client) {
             BulkResponse bulkResponse = bulkRequest.execute().actionGet();
             if (bulkResponse.hasFailures()) {
                 logger.error(bulkResponse.buildFailureMessage());
+                for (BulkItemResponse itemResponse : bulkResponse.getItems()) {
+                    logger.error("Bulk request failure, index: {}, id: {}", 
itemResponse.getIndex(), itemResponse.getId());
+                }
             }
         }
     }
diff --git 
a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/acp/AbstractApplicationComponentEsPersistenceDAO.java
 
b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/acp/AbstractApplicationComponentEsPersistenceDAO.java
index bd405e2ff..1842447d4 100644
--- 
a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/acp/AbstractApplicationComponentEsPersistenceDAO.java
+++ 
b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/acp/AbstractApplicationComponentEsPersistenceDAO.java
@@ -40,7 +40,6 @@
 
     @Override protected final ApplicationComponent 
esDataToStreamData(Map<String, Object> source) {
         ApplicationComponent applicationComponent = new ApplicationComponent();
-        
applicationComponent.setId((String)source.get(ApplicationComponentTable.COLUMN_ID));
         
applicationComponent.setMetricId((String)source.get(ApplicationComponentTable.COLUMN_METRIC_ID));
 
         
applicationComponent.setComponentId(((Number)source.get(ApplicationComponentTable.COLUMN_COMPONENT_ID)).intValue());
@@ -51,7 +50,6 @@
 
     @Override protected final Map<String, Object> 
esStreamDataToEsData(ApplicationComponent streamData) {
         Map<String, Object> source = new HashMap<>();
-        source.put(ApplicationComponentTable.COLUMN_ID, streamData.getId());
         source.put(ApplicationComponentTable.COLUMN_METRIC_ID, 
streamData.getMetricId());
 
         source.put(ApplicationComponentTable.COLUMN_COMPONENT_ID, 
streamData.getComponentId());
diff --git 
a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/alarm/AbstractApplicationAlarmListEsPersistenceDAO.java
 
b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/alarm/AbstractApplicationAlarmListEsPersistenceDAO.java
index f711d900d..1e8760b1b 100644
--- 
a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/alarm/AbstractApplicationAlarmListEsPersistenceDAO.java
+++ 
b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/alarm/AbstractApplicationAlarmListEsPersistenceDAO.java
@@ -40,7 +40,6 @@
 
     @Override protected final ApplicationAlarmList 
esDataToStreamData(Map<String, Object> source) {
         ApplicationAlarmList applicationAlarmList = new ApplicationAlarmList();
-        
applicationAlarmList.setId((String)source.get(ApplicationAlarmListTable.COLUMN_ID));
         
applicationAlarmList.setMetricId((String)source.get(ApplicationAlarmListTable.COLUMN_METRIC_ID));
         
applicationAlarmList.setApplicationId(((Number)source.get(ApplicationAlarmListTable.COLUMN_APPLICATION_ID)).intValue());
         
applicationAlarmList.setSourceValue(((Number)source.get(ApplicationAlarmListTable.COLUMN_SOURCE_VALUE)).intValue());
diff --git 
a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/amp/AbstractApplicationMetricEsPersistenceDAO.java
 
b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/amp/AbstractApplicationMetricEsPersistenceDAO.java
index 55c66f7bd..f7f012ea3 100644
--- 
a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/amp/AbstractApplicationMetricEsPersistenceDAO.java
+++ 
b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/amp/AbstractApplicationMetricEsPersistenceDAO.java
@@ -40,7 +40,6 @@
 
     @Override protected final ApplicationMetric esDataToStreamData(Map<String, 
Object> source) {
         ApplicationMetric applicationMetric = new ApplicationMetric();
-        
applicationMetric.setId((String)source.get(ApplicationMetricTable.COLUMN_ID));
         
applicationMetric.setMetricId((String)source.get(ApplicationMetricTable.COLUMN_METRIC_ID));
 
         
applicationMetric.setApplicationId(((Number)source.get(ApplicationMetricTable.COLUMN_APPLICATION_ID)).intValue());
@@ -71,7 +70,6 @@
 
     @Override protected final Map<String, Object> 
esStreamDataToEsData(ApplicationMetric streamData) {
         Map<String, Object> source = new HashMap<>();
-        source.put(ApplicationMetricTable.COLUMN_ID, streamData.getId());
         source.put(ApplicationMetricTable.COLUMN_METRIC_ID, 
streamData.getMetricId());
 
         source.put(ApplicationMetricTable.COLUMN_APPLICATION_ID, 
streamData.getApplicationId());
diff --git 
a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/ampp/AbstractApplicationMappingEsPersistenceDAO.java
 
b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/ampp/AbstractApplicationMappingEsPersistenceDAO.java
index c53681248..080b0f5a8 100644
--- 
a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/ampp/AbstractApplicationMappingEsPersistenceDAO.java
+++ 
b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/ampp/AbstractApplicationMappingEsPersistenceDAO.java
@@ -40,7 +40,6 @@
 
     @Override protected final ApplicationMapping 
esDataToStreamData(Map<String, Object> source) {
         ApplicationMapping applicationMapping = new ApplicationMapping();
-        
applicationMapping.setId((String)source.get(ApplicationMappingTable.COLUMN_ID));
         
applicationMapping.setMetricId((String)source.get(ApplicationMappingTable.COLUMN_METRIC_ID));
 
         
applicationMapping.setApplicationId(((Number)source.get(ApplicationMappingTable.COLUMN_APPLICATION_ID)).intValue());
@@ -51,7 +50,6 @@
 
     @Override protected final Map<String, Object> 
esStreamDataToEsData(ApplicationMapping streamData) {
         Map<String, Object> source = new HashMap<>();
-        source.put(ApplicationMappingTable.COLUMN_ID, streamData.getId());
         source.put(ApplicationMappingTable.COLUMN_METRIC_ID, 
streamData.getMetricId());
 
         source.put(ApplicationMappingTable.COLUMN_APPLICATION_ID, 
streamData.getApplicationId());
diff --git 
a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/armp/AbstractApplicationReferenceMetricEsPersistenceDAO.java
 
b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/armp/AbstractApplicationReferenceMetricEsPersistenceDAO.java
index dbb6bb747..a5bbea9ce 100644
--- 
a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/armp/AbstractApplicationReferenceMetricEsPersistenceDAO.java
+++ 
b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/armp/AbstractApplicationReferenceMetricEsPersistenceDAO.java
@@ -40,7 +40,6 @@
 
     @Override protected final ApplicationReferenceMetric 
esDataToStreamData(Map<String, Object> source) {
         ApplicationReferenceMetric applicationReferenceMetric = new 
ApplicationReferenceMetric();
-        
applicationReferenceMetric.setId((String)source.get(ApplicationReferenceMetricTable.COLUMN_ID));
         
applicationReferenceMetric.setMetricId((String)source.get(ApplicationReferenceMetricTable.COLUMN_METRIC_ID));
 
         
applicationReferenceMetric.setFrontApplicationId(((Number)source.get(ApplicationReferenceMetricTable.COLUMN_FRONT_APPLICATION_ID)).intValue());
@@ -72,7 +71,6 @@
 
     @Override protected final Map<String, Object> 
esStreamDataToEsData(ApplicationReferenceMetric streamData) {
         Map<String, Object> source = new HashMap<>();
-        source.put(ApplicationReferenceMetricTable.COLUMN_ID, 
streamData.getId());
         source.put(ApplicationReferenceMetricTable.COLUMN_METRIC_ID, 
streamData.getMetricId());
 
         
source.put(ApplicationReferenceMetricTable.COLUMN_FRONT_APPLICATION_ID, 
streamData.getFrontApplicationId());
diff --git 
a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/cpump/AbstractCpuMetricEsPersistenceDAO.java
 
b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/cpump/AbstractCpuMetricEsPersistenceDAO.java
index 33ce89121..f939325c7 100644
--- 
a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/cpump/AbstractCpuMetricEsPersistenceDAO.java
+++ 
b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/cpump/AbstractCpuMetricEsPersistenceDAO.java
@@ -40,7 +40,6 @@
 
     @Override protected final CpuMetric esDataToStreamData(Map<String, Object> 
source) {
         CpuMetric cpuMetric = new CpuMetric();
-        cpuMetric.setId((String)source.get(CpuMetricTable.COLUMN_ID));
         
cpuMetric.setMetricId((String)source.get(CpuMetricTable.COLUMN_METRIC_ID));
 
         
cpuMetric.setInstanceId(((Number)source.get(CpuMetricTable.COLUMN_INSTANCE_ID)).intValue());
@@ -54,7 +53,6 @@
 
     @Override protected final Map<String, Object> 
esStreamDataToEsData(CpuMetric streamData) {
         Map<String, Object> source = new HashMap<>();
-        source.put(CpuMetricTable.COLUMN_ID, streamData.getId());
         source.put(CpuMetricTable.COLUMN_METRIC_ID, streamData.getMetricId());
 
         source.put(CpuMetricTable.COLUMN_INSTANCE_ID, 
streamData.getInstanceId());
diff --git 
a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/gcmp/AbstractGCMetricEsPersistenceDAO.java
 
b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/gcmp/AbstractGCMetricEsPersistenceDAO.java
index b87d5fb33..f189241ee 100644
--- 
a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/gcmp/AbstractGCMetricEsPersistenceDAO.java
+++ 
b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/gcmp/AbstractGCMetricEsPersistenceDAO.java
@@ -40,7 +40,6 @@
 
     @Override protected final GCMetric esDataToStreamData(Map<String, Object> 
source) {
         GCMetric gcMetric = new GCMetric();
-        gcMetric.setId((String)source.get(GCMetricTable.COLUMN_ID));
         
gcMetric.setMetricId((String)source.get(GCMetricTable.COLUMN_METRIC_ID));
 
         
gcMetric.setInstanceId(((Number)source.get(GCMetricTable.COLUMN_INSTANCE_ID)).intValue());
@@ -56,7 +55,6 @@
 
     @Override protected final Map<String, Object> 
esStreamDataToEsData(GCMetric streamData) {
         Map<String, Object> source = new HashMap<>();
-        source.put(GCMetricTable.COLUMN_ID, streamData.getId());
         source.put(GCMetricTable.COLUMN_METRIC_ID, streamData.getMetricId());
 
         source.put(GCMetricTable.COLUMN_INSTANCE_ID, 
streamData.getInstanceId());
diff --git 
a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/imp/AbstractInstanceMetricEsPersistenceDAO.java
 
b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/imp/AbstractInstanceMetricEsPersistenceDAO.java
index 626545de6..abbdd9419 100644
--- 
a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/imp/AbstractInstanceMetricEsPersistenceDAO.java
+++ 
b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/imp/AbstractInstanceMetricEsPersistenceDAO.java
@@ -41,7 +41,6 @@
     @Override protected final InstanceMetric esDataToStreamData(Map<String, 
Object> source) {
         InstanceMetric instanceMetric = new InstanceMetric();
 
-        
instanceMetric.setId((String)source.get(InstanceMetricTable.COLUMN_ID));
         
instanceMetric.setMetricId((String)source.get(InstanceMetricTable.COLUMN_METRIC_ID));
         
instanceMetric.setApplicationId((Integer)source.get(InstanceMetricTable.COLUMN_APPLICATION_ID));
         
instanceMetric.setInstanceId((Integer)source.get(InstanceMetricTable.COLUMN_INSTANCE_ID));
@@ -68,7 +67,6 @@
 
     @Override protected final Map<String, Object> 
esStreamDataToEsData(InstanceMetric streamData) {
         Map<String, Object> source = new HashMap<>();
-        source.put(InstanceMetricTable.COLUMN_ID, streamData.getId());
         source.put(InstanceMetricTable.COLUMN_METRIC_ID, 
streamData.getMetricId());
 
         source.put(InstanceMetricTable.COLUMN_METRIC_ID, 
streamData.getMetricId());
diff --git 
a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/impp/AbstractInstanceMappingEsPersistenceDAO.java
 
b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/impp/AbstractInstanceMappingEsPersistenceDAO.java
index 76372ef11..d35baec53 100644
--- 
a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/impp/AbstractInstanceMappingEsPersistenceDAO.java
+++ 
b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/impp/AbstractInstanceMappingEsPersistenceDAO.java
@@ -40,7 +40,6 @@
 
     @Override protected final InstanceMapping esDataToStreamData(Map<String, 
Object> source) {
         InstanceMapping instanceMapping = new InstanceMapping();
-        
instanceMapping.setId((String)source.get(InstanceMappingTable.COLUMN_ID));
         
instanceMapping.setMetricId((String)source.get(InstanceMappingTable.COLUMN_METRIC_ID));
 
         
instanceMapping.setApplicationId(((Number)source.get(InstanceMappingTable.COLUMN_APPLICATION_ID)).intValue());
@@ -52,7 +51,6 @@
 
     @Override protected final Map<String, Object> 
esStreamDataToEsData(InstanceMapping streamData) {
         Map<String, Object> source = new HashMap<>();
-        source.put(InstanceMappingTable.COLUMN_ID, streamData.getId());
         source.put(InstanceMappingTable.COLUMN_METRIC_ID, 
streamData.getMetricId());
 
         source.put(InstanceMappingTable.COLUMN_APPLICATION_ID, 
streamData.getApplicationId());
diff --git 
a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/irmp/AbstractInstanceReferenceMetricEsPersistenceDAO.java
 
b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/irmp/AbstractInstanceReferenceMetricEsPersistenceDAO.java
index fbabc2d42..66a1202ec 100644
--- 
a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/irmp/AbstractInstanceReferenceMetricEsPersistenceDAO.java
+++ 
b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/irmp/AbstractInstanceReferenceMetricEsPersistenceDAO.java
@@ -40,7 +40,6 @@
 
     @Override protected final InstanceReferenceMetric 
esDataToStreamData(Map<String, Object> source) {
         InstanceReferenceMetric instanceReferenceMetric = new 
InstanceReferenceMetric();
-        
instanceReferenceMetric.setId((String)source.get(InstanceReferenceMetricTable.COLUMN_ID));
         
instanceReferenceMetric.setMetricId((String)source.get(InstanceReferenceMetricTable.COLUMN_METRIC_ID));
 
         
instanceReferenceMetric.setFrontApplicationId((Integer)source.get(InstanceReferenceMetricTable.COLUMN_FRONT_APPLICATION_ID));
@@ -70,7 +69,6 @@
 
     @Override protected final Map<String, Object> 
esStreamDataToEsData(InstanceReferenceMetric streamData) {
         Map<String, Object> source = new HashMap<>();
-        source.put(InstanceReferenceMetricTable.COLUMN_ID, streamData.getId());
         source.put(InstanceReferenceMetricTable.COLUMN_METRIC_ID, 
streamData.getMetricId());
 
         source.put(InstanceReferenceMetricTable.COLUMN_FRONT_APPLICATION_ID, 
streamData.getFrontApplicationId());
diff --git 
a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/memorymp/AbstractMemoryMetricEsPersistenceDAO.java
 
b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/memorymp/AbstractMemoryMetricEsPersistenceDAO.java
index bf480ffed..2398f8686 100644
--- 
a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/memorymp/AbstractMemoryMetricEsPersistenceDAO.java
+++ 
b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/memorymp/AbstractMemoryMetricEsPersistenceDAO.java
@@ -40,7 +40,6 @@
 
     @Override protected final MemoryMetric esDataToStreamData(Map<String, 
Object> source) {
         MemoryMetric memoryMetric = new MemoryMetric();
-        memoryMetric.setId((String)source.get(MemoryMetricTable.COLUMN_ID));
         
memoryMetric.setMetricId((String)source.get(MemoryMetricTable.COLUMN_METRIC_ID));
 
         
memoryMetric.setInstanceId(((Number)source.get(MemoryMetricTable.COLUMN_INSTANCE_ID)).intValue());
@@ -58,7 +57,6 @@
 
     @Override protected final Map<String, Object> 
esStreamDataToEsData(MemoryMetric streamData) {
         Map<String, Object> source = new HashMap<>();
-        source.put(MemoryMetricTable.COLUMN_ID, streamData.getId());
         source.put(MemoryMetricTable.COLUMN_METRIC_ID, 
streamData.getMetricId());
 
         source.put(MemoryMetricTable.COLUMN_INSTANCE_ID, 
streamData.getInstanceId());
diff --git 
a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/mpoolmp/AbstractMemoryPoolMetricEsPersistenceDAO.java
 
b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/mpoolmp/AbstractMemoryPoolMetricEsPersistenceDAO.java
index cc2244100..f5bb484be 100644
--- 
a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/mpoolmp/AbstractMemoryPoolMetricEsPersistenceDAO.java
+++ 
b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/mpoolmp/AbstractMemoryPoolMetricEsPersistenceDAO.java
@@ -40,7 +40,6 @@
 
     @Override protected final MemoryPoolMetric esDataToStreamData(Map<String, 
Object> source) {
         MemoryPoolMetric memoryPoolMetric = new MemoryPoolMetric();
-        
memoryPoolMetric.setId((String)source.get(MemoryPoolMetricTable.COLUMN_ID));
         
memoryPoolMetric.setMetricId((String)source.get(MemoryPoolMetricTable.COLUMN_METRIC_ID));
 
         
memoryPoolMetric.setInstanceId(((Number)source.get(MemoryPoolMetricTable.COLUMN_INSTANCE_ID)).intValue());
@@ -58,7 +57,6 @@
 
     @Override protected final Map<String, Object> 
esStreamDataToEsData(MemoryPoolMetric streamData) {
         Map<String, Object> source = new HashMap<>();
-        source.put(MemoryPoolMetricTable.COLUMN_ID, streamData.getId());
         source.put(MemoryPoolMetricTable.COLUMN_METRIC_ID, 
streamData.getMetricId());
 
         source.put(MemoryPoolMetricTable.COLUMN_INSTANCE_ID, 
streamData.getInstanceId());
diff --git 
a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/smp/AbstractServiceMetricEsPersistenceDAO.java
 
b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/smp/AbstractServiceMetricEsPersistenceDAO.java
index 7ca567681..5f15fcc97 100644
--- 
a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/smp/AbstractServiceMetricEsPersistenceDAO.java
+++ 
b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/smp/AbstractServiceMetricEsPersistenceDAO.java
@@ -40,7 +40,6 @@
 
     @Override protected final ServiceMetric esDataToStreamData(Map<String, 
Object> source) {
         ServiceMetric serviceMetric = new ServiceMetric();
-        serviceMetric.setId((String)source.get(ServiceMetricTable.COLUMN_ID));
         
serviceMetric.setMetricId((String)source.get(ServiceMetricTable.COLUMN_METRIC_ID));
 
         
serviceMetric.setApplicationId(((Number)source.get(ServiceMetricTable.COLUMN_APPLICATION_ID)).intValue());
@@ -69,7 +68,6 @@
 
     @Override protected final Map<String, Object> 
esStreamDataToEsData(ServiceMetric streamData) {
         Map<String, Object> source = new HashMap<>();
-        source.put(ServiceMetricTable.COLUMN_ID, streamData.getId());
         source.put(ServiceMetricTable.COLUMN_METRIC_ID, 
streamData.getMetricId());
 
         source.put(ServiceMetricTable.COLUMN_APPLICATION_ID, 
streamData.getApplicationId());
diff --git 
a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/srmp/AbstractServiceReferenceMetricEsPersistenceDAO.java
 
b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/srmp/AbstractServiceReferenceMetricEsPersistenceDAO.java
index 564fb53ea..2af8d109c 100644
--- 
a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/srmp/AbstractServiceReferenceMetricEsPersistenceDAO.java
+++ 
b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/srmp/AbstractServiceReferenceMetricEsPersistenceDAO.java
@@ -40,7 +40,6 @@
 
     @Override protected final ServiceReferenceMetric 
esDataToStreamData(Map<String, Object> source) {
         ServiceReferenceMetric serviceReferenceMetric = new 
ServiceReferenceMetric();
-        
serviceReferenceMetric.setId((String)source.get(ServiceReferenceMetricTable.COLUMN_ID));
         
serviceReferenceMetric.setMetricId((String)source.get(ServiceReferenceMetricTable.COLUMN_METRIC_ID));
 
         
serviceReferenceMetric.setFrontApplicationId(((Number)source.get(ServiceReferenceMetricTable.COLUMN_FRONT_APPLICATION_ID)).intValue());
@@ -72,7 +71,6 @@
 
     @Override protected final Map<String, Object> 
esStreamDataToEsData(ServiceReferenceMetric streamData) {
         Map<String, Object> source = new HashMap<>();
-        source.put(ServiceReferenceMetricTable.COLUMN_ID, streamData.getId());
         source.put(ServiceReferenceMetricTable.COLUMN_METRIC_ID, 
streamData.getMetricId());
 
         source.put(ServiceReferenceMetricTable.COLUMN_FRONT_APPLICATION_ID, 
streamData.getFrontApplicationId());
diff --git 
a/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/acp/AbstractApplicationComponentH2PersistenceDAO.java
 
b/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/acp/AbstractApplicationComponentH2PersistenceDAO.java
index 25019b012..a91a38ed4 100644
--- 
a/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/acp/AbstractApplicationComponentH2PersistenceDAO.java
+++ 
b/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/acp/AbstractApplicationComponentH2PersistenceDAO.java
@@ -49,6 +49,7 @@
 
     @Override protected final Map<String, Object> 
streamDataToH2Data(ApplicationComponent streamData) {
         Map<String, Object> source = new HashMap<>();
+        source.put(ApplicationComponentTable.COLUMN_ID, streamData.getId());
         source.put(ApplicationComponentTable.COLUMN_METRIC_ID, 
streamData.getMetricId());
 
         source.put(ApplicationComponentTable.COLUMN_COMPONENT_ID, 
streamData.getComponentId());
diff --git 
a/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/alarm/AbstractApplicationAlarmListH2PersistenceDAO.java
 
b/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/alarm/AbstractApplicationAlarmListH2PersistenceDAO.java
index e99f70c1d..9d6c95a40 100644
--- 
a/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/alarm/AbstractApplicationAlarmListH2PersistenceDAO.java
+++ 
b/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/alarm/AbstractApplicationAlarmListH2PersistenceDAO.java
@@ -54,6 +54,7 @@ public AbstractApplicationAlarmListH2PersistenceDAO(H2Client 
client) {
 
     @Override protected final Map<String, Object> 
streamDataToH2Data(ApplicationAlarmList streamData) {
         Map<String, Object> source = new HashMap<>();
+        source.put(ApplicationAlarmListTable.COLUMN_ID, streamData.getId());
         source.put(ApplicationAlarmListTable.COLUMN_METRIC_ID, 
streamData.getMetricId());
         source.put(ApplicationAlarmListTable.COLUMN_SOURCE_VALUE, 
streamData.getSourceValue());
 
diff --git 
a/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/amp/AbstractApplicationMetricH2PersistenceDAO.java
 
b/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/amp/AbstractApplicationMetricH2PersistenceDAO.java
index 676ae60da..a5a095de5 100644
--- 
a/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/amp/AbstractApplicationMetricH2PersistenceDAO.java
+++ 
b/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/amp/AbstractApplicationMetricH2PersistenceDAO.java
@@ -69,6 +69,7 @@ public AbstractApplicationMetricH2PersistenceDAO(H2Client 
client) {
 
     @Override protected final Map<String, Object> 
streamDataToH2Data(ApplicationMetric streamData) {
         Map<String, Object> source = new HashMap<>();
+        source.put(ApplicationMetricTable.COLUMN_ID, streamData.getId());
         source.put(ApplicationMetricTable.COLUMN_METRIC_ID, 
streamData.getMetricId());
 
         source.put(ApplicationMetricTable.COLUMN_APPLICATION_ID, 
streamData.getApplicationId());
diff --git 
a/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/ampp/AbstractApplicationMappingH2PersistenceDAO.java
 
b/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/ampp/AbstractApplicationMappingH2PersistenceDAO.java
index 3b6eb25c7..e211331c7 100644
--- 
a/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/ampp/AbstractApplicationMappingH2PersistenceDAO.java
+++ 
b/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/ampp/AbstractApplicationMappingH2PersistenceDAO.java
@@ -49,6 +49,7 @@
 
     @Override protected final Map<String, Object> 
streamDataToH2Data(ApplicationMapping streamData) {
         Map<String, Object> source = new HashMap<>();
+        source.put(ApplicationMappingTable.COLUMN_ID, streamData.getId());
         source.put(ApplicationMappingTable.COLUMN_METRIC_ID, 
streamData.getMetricId());
 
         source.put(ApplicationMappingTable.COLUMN_APPLICATION_ID, 
streamData.getApplicationId());
diff --git 
a/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/armp/AbstractApplicationReferenceMetricH2PersistenceDAO.java
 
b/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/armp/AbstractApplicationReferenceMetricH2PersistenceDAO.java
index 8e7f15008..16151dd59 100644
--- 
a/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/armp/AbstractApplicationReferenceMetricH2PersistenceDAO.java
+++ 
b/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/armp/AbstractApplicationReferenceMetricH2PersistenceDAO.java
@@ -70,6 +70,7 @@ public 
AbstractApplicationReferenceMetricH2PersistenceDAO(H2Client client) {
 
     @Override protected final Map<String, Object> 
streamDataToH2Data(ApplicationReferenceMetric streamData) {
         Map<String, Object> source = new HashMap<>();
+        source.put(ApplicationReferenceMetricTable.COLUMN_ID, 
streamData.getId());
         source.put(ApplicationReferenceMetricTable.COLUMN_METRIC_ID, 
streamData.getMetricId());
 
         
source.put(ApplicationReferenceMetricTable.COLUMN_FRONT_APPLICATION_ID, 
streamData.getFrontApplicationId());
diff --git 
a/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/cpump/AbstractCpuMetricH2PersistenceDAO.java
 
b/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/cpump/AbstractCpuMetricH2PersistenceDAO.java
index 14644a3b8..ab60d3adb 100644
--- 
a/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/cpump/AbstractCpuMetricH2PersistenceDAO.java
+++ 
b/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/cpump/AbstractCpuMetricH2PersistenceDAO.java
@@ -52,6 +52,7 @@ public AbstractCpuMetricH2PersistenceDAO(H2Client client) {
 
     @Override protected final Map<String, Object> streamDataToH2Data(CpuMetric 
streamData) {
         Map<String, Object> source = new HashMap<>();
+        source.put(CpuMetricTable.COLUMN_ID, streamData.getId());
         source.put(CpuMetricTable.COLUMN_METRIC_ID, streamData.getMetricId());
 
         source.put(CpuMetricTable.COLUMN_INSTANCE_ID, 
streamData.getInstanceId());
diff --git 
a/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/gcmp/AbstractGCMetricH2PersistenceDAO.java
 
b/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/gcmp/AbstractGCMetricH2PersistenceDAO.java
index ad7a04165..cb2afb61f 100644
--- 
a/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/gcmp/AbstractGCMetricH2PersistenceDAO.java
+++ 
b/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/gcmp/AbstractGCMetricH2PersistenceDAO.java
@@ -54,6 +54,7 @@ public AbstractGCMetricH2PersistenceDAO(H2Client client) {
 
     @Override protected final Map<String, Object> streamDataToH2Data(GCMetric 
streamData) {
         Map<String, Object> source = new HashMap<>();
+        source.put(GCMetricTable.COLUMN_ID, streamData.getId());
         source.put(GCMetricTable.COLUMN_METRIC_ID, streamData.getMetricId());
 
         source.put(GCMetricTable.COLUMN_INSTANCE_ID, 
streamData.getInstanceId());
diff --git 
a/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/imp/AbstractInstanceMetricH2PersistenceDAO.java
 
b/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/imp/AbstractInstanceMetricH2PersistenceDAO.java
index 2df5397e6..e0f5ab8fa 100644
--- 
a/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/imp/AbstractInstanceMetricH2PersistenceDAO.java
+++ 
b/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/imp/AbstractInstanceMetricH2PersistenceDAO.java
@@ -66,8 +66,7 @@ public AbstractInstanceMetricH2PersistenceDAO(H2Client 
client) {
 
     @Override protected final Map<String, Object> 
streamDataToH2Data(InstanceMetric streamData) {
         Map<String, Object> source = new HashMap<>();
-        source.put(InstanceMetricTable.COLUMN_METRIC_ID, 
streamData.getMetricId());
-
+        source.put(InstanceMetricTable.COLUMN_ID, streamData.getId());
         source.put(InstanceMetricTable.COLUMN_METRIC_ID, 
streamData.getMetricId());
 
         source.put(InstanceMetricTable.COLUMN_APPLICATION_ID, 
streamData.getApplicationId());
diff --git 
a/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/impp/AbstractInstanceMappingH2PersistenceDAO.java
 
b/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/impp/AbstractInstanceMappingH2PersistenceDAO.java
index ef5056713..d4a85a8f4 100644
--- 
a/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/impp/AbstractInstanceMappingH2PersistenceDAO.java
+++ 
b/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/impp/AbstractInstanceMappingH2PersistenceDAO.java
@@ -50,6 +50,7 @@ public AbstractInstanceMappingH2PersistenceDAO(H2Client 
client) {
 
     @Override protected final Map<String, Object> 
streamDataToH2Data(InstanceMapping streamData) {
         Map<String, Object> source = new HashMap<>();
+        source.put(InstanceMappingTable.COLUMN_ID, streamData.getId());
         source.put(InstanceMappingTable.COLUMN_METRIC_ID, 
streamData.getMetricId());
 
         source.put(InstanceMappingTable.COLUMN_APPLICATION_ID, 
streamData.getApplicationId());
diff --git 
a/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/irmp/AbstractInstanceReferenceMetricH2PersistenceDAO.java
 
b/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/irmp/AbstractInstanceReferenceMetricH2PersistenceDAO.java
index 7e33d4152..2e167c483 100644
--- 
a/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/irmp/AbstractInstanceReferenceMetricH2PersistenceDAO.java
+++ 
b/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/irmp/AbstractInstanceReferenceMetricH2PersistenceDAO.java
@@ -68,6 +68,7 @@ public 
AbstractInstanceReferenceMetricH2PersistenceDAO(H2Client client) {
 
     @Override protected final Map<String, Object> 
streamDataToH2Data(InstanceReferenceMetric streamData) {
         Map<String, Object> source = new HashMap<>();
+        source.put(InstanceReferenceMetricTable.COLUMN_ID, streamData.getId());
         source.put(InstanceReferenceMetricTable.COLUMN_METRIC_ID, 
streamData.getMetricId());
 
         source.put(InstanceReferenceMetricTable.COLUMN_FRONT_APPLICATION_ID, 
streamData.getFrontApplicationId());
diff --git 
a/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/memorymp/AbstractMemoryMetricH2PersistenceDAO.java
 
b/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/memorymp/AbstractMemoryMetricH2PersistenceDAO.java
index 03392889a..df6729275 100644
--- 
a/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/memorymp/AbstractMemoryMetricH2PersistenceDAO.java
+++ 
b/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/memorymp/AbstractMemoryMetricH2PersistenceDAO.java
@@ -56,6 +56,7 @@ public AbstractMemoryMetricH2PersistenceDAO(H2Client client) {
 
     @Override protected final Map<String, Object> 
streamDataToH2Data(MemoryMetric streamData) {
         Map<String, Object> source = new HashMap<>();
+        source.put(MemoryMetricTable.COLUMN_ID, streamData.getId());
         source.put(MemoryMetricTable.COLUMN_METRIC_ID, 
streamData.getMetricId());
 
         source.put(MemoryMetricTable.COLUMN_INSTANCE_ID, 
streamData.getInstanceId());
diff --git 
a/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/mpoolmp/AbstractMemoryPoolMetricH2PersistenceDAO.java
 
b/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/mpoolmp/AbstractMemoryPoolMetricH2PersistenceDAO.java
index e4150ded8..ff5ccc8cf 100644
--- 
a/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/mpoolmp/AbstractMemoryPoolMetricH2PersistenceDAO.java
+++ 
b/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/mpoolmp/AbstractMemoryPoolMetricH2PersistenceDAO.java
@@ -56,6 +56,7 @@ public AbstractMemoryPoolMetricH2PersistenceDAO(H2Client 
client) {
 
     @Override protected final Map<String, Object> 
streamDataToH2Data(MemoryPoolMetric streamData) {
         Map<String, Object> source = new HashMap<>();
+        source.put(MemoryPoolMetricTable.COLUMN_ID, streamData.getId());
         source.put(MemoryPoolMetricTable.COLUMN_METRIC_ID, 
streamData.getMetricId());
 
         source.put(MemoryPoolMetricTable.COLUMN_INSTANCE_ID, 
streamData.getInstanceId());
diff --git 
a/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/smp/AbstractServiceMetricH2PersistenceDAO.java
 
b/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/smp/AbstractServiceMetricH2PersistenceDAO.java
index c8d7e6359..8bb4538e9 100644
--- 
a/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/smp/AbstractServiceMetricH2PersistenceDAO.java
+++ 
b/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/smp/AbstractServiceMetricH2PersistenceDAO.java
@@ -67,6 +67,7 @@ public AbstractServiceMetricH2PersistenceDAO(H2Client client) 
{
 
     @Override protected final Map<String, Object> 
streamDataToH2Data(ServiceMetric streamData) {
         Map<String, Object> source = new HashMap<>();
+        source.put(ServiceMetricTable.COLUMN_ID, streamData.getId());
         source.put(ServiceMetricTable.COLUMN_METRIC_ID, 
streamData.getMetricId());
 
         source.put(ServiceMetricTable.COLUMN_APPLICATION_ID, 
streamData.getApplicationId());
diff --git 
a/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/srmp/AbstractServiceReferenceMetricH2PersistenceDAO.java
 
b/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/srmp/AbstractServiceReferenceMetricH2PersistenceDAO.java
index d482c8ef4..78aaf2890 100644
--- 
a/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/srmp/AbstractServiceReferenceMetricH2PersistenceDAO.java
+++ 
b/apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/srmp/AbstractServiceReferenceMetricH2PersistenceDAO.java
@@ -70,6 +70,7 @@
 
     @Override protected final Map<String, Object> 
streamDataToH2Data(ServiceReferenceMetric streamData) {
         Map<String, Object> source = new HashMap<>();
+        source.put(ServiceReferenceMetricTable.COLUMN_ID, streamData.getId());
         source.put(ServiceReferenceMetricTable.COLUMN_METRIC_ID, 
streamData.getMetricId());
 
         source.put(ServiceReferenceMetricTable.COLUMN_FRONT_APPLICATION_ID, 
streamData.getFrontApplicationId());


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to