Memory pool metric pyramid aggregate test successful.
This commit is contained in:
parent
8f753f1188
commit
3f82baa9fa
|
|
@ -66,11 +66,11 @@ public class JVMMetricsServiceHandler extends JVMMetricsServiceGrpc.JVMMetricsSe
|
|||
|
||||
request.getMetricsList().forEach(metric -> {
|
||||
long time = TimeBucketUtils.INSTANCE.getSecondTimeBucket(metric.getTime());
|
||||
sendToInstanceHeartBeatService(instanceId, metric.getTime());
|
||||
sendToCpuMetricService(instanceId, time, metric.getCpu());
|
||||
sendToMemoryMetricService(instanceId, time, metric.getMemoryList());
|
||||
// sendToInstanceHeartBeatService(instanceId, metric.getTime());
|
||||
// sendToCpuMetricService(instanceId, time, metric.getCpu());
|
||||
// sendToMemoryMetricService(instanceId, time, metric.getMemoryList());
|
||||
sendToMemoryPoolMetricService(instanceId, time, metric.getMemoryPoolList());
|
||||
sendToGCMetricService(instanceId, time, metric.getGcList());
|
||||
// sendToGCMetricService(instanceId, time, metric.getGcList());
|
||||
});
|
||||
|
||||
responseObserver.onNext(Downstream.newBuilder().build());
|
||||
|
|
|
|||
|
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* 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.JVMMetric;
|
||||
import org.apache.skywalking.apm.network.proto.JVMMetrics;
|
||||
import org.apache.skywalking.apm.network.proto.JVMMetricsServiceGrpc;
|
||||
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());
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
@ -24,5 +24,5 @@ import org.apache.skywalking.apm.collector.core.module.Service;
|
|||
* @author peng-yongsheng
|
||||
*/
|
||||
public interface IMemoryPoolMetricService extends Service {
|
||||
void send(int instanceId, long timeBucket, int poolType, long init, long max, long used, long commited);
|
||||
void send(int instanceId, long timeBucket, int poolType, long init, long max, long used, long committed);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,15 +45,20 @@ public class MemoryPoolMetricService implements IMemoryPoolMetricService {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void send(int instanceId, long timeBucket, int poolType, long init, long max, long used, long commited) {
|
||||
public void send(int instanceId, long timeBucket, int poolType, long init, long max, long used, long committed) {
|
||||
String metricId = instanceId + Const.ID_SPLIT + String.valueOf(poolType);
|
||||
String id = timeBucket + Const.ID_SPLIT + metricId;
|
||||
|
||||
MemoryPoolMetric memoryPoolMetric = new MemoryPoolMetric();
|
||||
memoryPoolMetric.setId(timeBucket + Const.ID_SPLIT + instanceId + Const.ID_SPLIT + String.valueOf(poolType));
|
||||
memoryPoolMetric.setId(id);
|
||||
memoryPoolMetric.setMetricId(metricId);
|
||||
memoryPoolMetric.setInstanceId(instanceId);
|
||||
memoryPoolMetric.setPoolType(poolType);
|
||||
memoryPoolMetric.setInit(init);
|
||||
memoryPoolMetric.setMax(max);
|
||||
memoryPoolMetric.setUsed(used);
|
||||
memoryPoolMetric.setCommitted(commited);
|
||||
memoryPoolMetric.setCommitted(committed);
|
||||
memoryPoolMetric.setTimes(1L);
|
||||
memoryPoolMetric.setTimeBucket(timeBucket);
|
||||
|
||||
logger.debug("push to memory pool metric graph, id: {}", memoryPoolMetric.getId());
|
||||
|
|
|
|||
|
|
@ -36,9 +36,10 @@ public class MemoryPoolDayMetricTransformNode implements NodeProcessor<MemoryPoo
|
|||
|
||||
@Override public void process(MemoryPoolMetric memoryPoolMetric, Next<MemoryPoolMetric> next) {
|
||||
long timeBucket = TimeBucketUtils.INSTANCE.secondToDay(memoryPoolMetric.getTimeBucket());
|
||||
memoryPoolMetric.setId(String.valueOf(timeBucket) + Const.ID_SPLIT + memoryPoolMetric.getMetricId());
|
||||
memoryPoolMetric.setTimeBucket(timeBucket);
|
||||
|
||||
next.execute(memoryPoolMetric);
|
||||
MemoryPoolMetric newMemoryPoolMetric = MemoryPoolMetricCopy.copy(memoryPoolMetric);
|
||||
newMemoryPoolMetric.setId(String.valueOf(timeBucket) + Const.ID_SPLIT + memoryPoolMetric.getMetricId());
|
||||
newMemoryPoolMetric.setTimeBucket(timeBucket);
|
||||
next.execute(newMemoryPoolMetric);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,9 +36,10 @@ public class MemoryPoolHourMetricTransformNode implements NodeProcessor<MemoryPo
|
|||
|
||||
@Override public void process(MemoryPoolMetric memoryPoolMetric, Next<MemoryPoolMetric> next) {
|
||||
long timeBucket = TimeBucketUtils.INSTANCE.secondToHour(memoryPoolMetric.getTimeBucket());
|
||||
memoryPoolMetric.setId(String.valueOf(timeBucket) + Const.ID_SPLIT + memoryPoolMetric.getMetricId());
|
||||
memoryPoolMetric.setTimeBucket(timeBucket);
|
||||
|
||||
next.execute(memoryPoolMetric);
|
||||
MemoryPoolMetric newMemoryPoolMetric = MemoryPoolMetricCopy.copy(memoryPoolMetric);
|
||||
newMemoryPoolMetric.setId(String.valueOf(timeBucket) + Const.ID_SPLIT + memoryPoolMetric.getMetricId());
|
||||
newMemoryPoolMetric.setTimeBucket(timeBucket);
|
||||
next.execute(newMemoryPoolMetric);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* 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.analysis.jvm.provider.worker.memorypool;
|
||||
|
||||
import org.apache.skywalking.apm.collector.storage.table.jvm.MemoryPoolMetric;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class MemoryPoolMetricCopy {
|
||||
|
||||
public static MemoryPoolMetric copy(MemoryPoolMetric memoryPoolMetric) {
|
||||
MemoryPoolMetric newMemoryPoolMetric = new MemoryPoolMetric();
|
||||
newMemoryPoolMetric.setId(memoryPoolMetric.getId());
|
||||
newMemoryPoolMetric.setMetricId(memoryPoolMetric.getMetricId());
|
||||
|
||||
newMemoryPoolMetric.setInstanceId(memoryPoolMetric.getInstanceId());
|
||||
|
||||
newMemoryPoolMetric.setInit(memoryPoolMetric.getInit());
|
||||
newMemoryPoolMetric.setMax(memoryPoolMetric.getMax());
|
||||
newMemoryPoolMetric.setUsed(memoryPoolMetric.getUsed());
|
||||
newMemoryPoolMetric.setCommitted(memoryPoolMetric.getCommitted());
|
||||
newMemoryPoolMetric.setPoolType(memoryPoolMetric.getPoolType());
|
||||
newMemoryPoolMetric.setTimes(memoryPoolMetric.getTimes());
|
||||
|
||||
newMemoryPoolMetric.setTimeBucket(memoryPoolMetric.getTimeBucket());
|
||||
return newMemoryPoolMetric;
|
||||
}
|
||||
}
|
||||
|
|
@ -36,9 +36,10 @@ public class MemoryPoolMinuteMetricTransformNode implements NodeProcessor<Memory
|
|||
|
||||
@Override public void process(MemoryPoolMetric memoryPoolMetric, Next<MemoryPoolMetric> next) {
|
||||
long timeBucket = TimeBucketUtils.INSTANCE.secondToMinute(memoryPoolMetric.getTimeBucket());
|
||||
memoryPoolMetric.setId(String.valueOf(timeBucket) + Const.ID_SPLIT + memoryPoolMetric.getMetricId());
|
||||
memoryPoolMetric.setTimeBucket(timeBucket);
|
||||
|
||||
next.execute(memoryPoolMetric);
|
||||
MemoryPoolMetric newMemoryPoolMetric = MemoryPoolMetricCopy.copy(memoryPoolMetric);
|
||||
newMemoryPoolMetric.setId(String.valueOf(timeBucket) + Const.ID_SPLIT + memoryPoolMetric.getMetricId());
|
||||
newMemoryPoolMetric.setTimeBucket(timeBucket);
|
||||
next.execute(newMemoryPoolMetric);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,9 +36,10 @@ public class MemoryPoolMonthMetricTransformNode implements NodeProcessor<MemoryP
|
|||
|
||||
@Override public void process(MemoryPoolMetric memoryPoolMetric, Next<MemoryPoolMetric> next) {
|
||||
long timeBucket = TimeBucketUtils.INSTANCE.secondToMonth(memoryPoolMetric.getTimeBucket());
|
||||
memoryPoolMetric.setId(String.valueOf(timeBucket) + Const.ID_SPLIT + memoryPoolMetric.getMetricId());
|
||||
memoryPoolMetric.setTimeBucket(timeBucket);
|
||||
|
||||
next.execute(memoryPoolMetric);
|
||||
MemoryPoolMetric newMemoryPoolMetric = MemoryPoolMetricCopy.copy(memoryPoolMetric);
|
||||
newMemoryPoolMetric.setId(String.valueOf(timeBucket) + Const.ID_SPLIT + memoryPoolMetric.getMetricId());
|
||||
newMemoryPoolMetric.setTimeBucket(timeBucket);
|
||||
next.execute(newMemoryPoolMetric);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
package org.apache.skywalking.apm.collector.core.data.operator;
|
||||
|
||||
import org.apache.skywalking.apm.collector.core.data.Operation;
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
package org.apache.skywalking.apm.collector.core.data.operator;
|
||||
|
||||
import org.apache.skywalking.apm.collector.core.data.Operation;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,63 @@
|
|||
/*
|
||||
* 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.core.data.operator;
|
||||
|
||||
import org.apache.skywalking.apm.collector.core.data.Operation;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class MaxOperation implements Operation {
|
||||
|
||||
@Override public String operate(String newValue, String oldValue) {
|
||||
throw new UnsupportedOperationException("not support string maximum operation");
|
||||
}
|
||||
|
||||
@Override public Long operate(Long newValue, Long oldValue) {
|
||||
if (newValue >= oldValue) {
|
||||
return newValue;
|
||||
} else {
|
||||
return oldValue;
|
||||
}
|
||||
}
|
||||
|
||||
@Override public Double operate(Double newValue, Double oldValue) {
|
||||
if (newValue >= oldValue) {
|
||||
return newValue;
|
||||
} else {
|
||||
return oldValue;
|
||||
}
|
||||
}
|
||||
|
||||
@Override public Integer operate(Integer newValue, Integer oldValue) {
|
||||
if (newValue >= oldValue) {
|
||||
return newValue;
|
||||
} else {
|
||||
return oldValue;
|
||||
}
|
||||
}
|
||||
|
||||
@Override public Boolean operate(Boolean newValue, Boolean oldValue) {
|
||||
throw new UnsupportedOperationException("not support boolean maximum operation");
|
||||
}
|
||||
|
||||
@Override public byte[] operate(byte[] newValue, byte[] oldValue) {
|
||||
throw new UnsupportedOperationException("not support byte maximum operation");
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
/*
|
||||
* 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.core.data.operator;
|
||||
|
||||
import org.apache.skywalking.apm.collector.core.data.Operation;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class MinOperation implements Operation {
|
||||
|
||||
@Override public String operate(String newValue, String oldValue) {
|
||||
throw new UnsupportedOperationException("not support string minimum operation");
|
||||
}
|
||||
|
||||
@Override public Long operate(Long newValue, Long oldValue) {
|
||||
if (newValue <= oldValue) {
|
||||
return newValue;
|
||||
} else {
|
||||
return oldValue;
|
||||
}
|
||||
}
|
||||
|
||||
@Override public Double operate(Double newValue, Double oldValue) {
|
||||
if (newValue <= oldValue) {
|
||||
return newValue;
|
||||
} else {
|
||||
return oldValue;
|
||||
}
|
||||
}
|
||||
|
||||
@Override public Integer operate(Integer newValue, Integer oldValue) {
|
||||
if (newValue <= oldValue) {
|
||||
return newValue;
|
||||
} else {
|
||||
return oldValue;
|
||||
}
|
||||
}
|
||||
|
||||
@Override public Boolean operate(Boolean newValue, Boolean oldValue) {
|
||||
throw new UnsupportedOperationException("not support boolean minimum operation");
|
||||
}
|
||||
|
||||
@Override public byte[] operate(byte[] newValue, byte[] oldValue) {
|
||||
throw new UnsupportedOperationException("not support byte minimum operation");
|
||||
}
|
||||
}
|
||||
|
|
@ -16,7 +16,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
package org.apache.skywalking.apm.collector.core.data.operator;
|
||||
|
||||
import org.apache.skywalking.apm.collector.core.data.Operation;
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ public enum TimeBucketUtils {
|
|||
}
|
||||
|
||||
public long secondToMonth(long secondBucket) {
|
||||
return secondBucket / 100 / 100 / 100;
|
||||
return secondBucket / 100 / 100 / 100 / 100;
|
||||
}
|
||||
|
||||
public long changeTimeBucket2TimeStamp(String timeBucketType, long timeBucket) {
|
||||
|
|
|
|||
|
|
@ -22,43 +22,39 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import org.apache.skywalking.apm.collector.core.module.Module;
|
||||
import org.apache.skywalking.apm.collector.storage.base.dao.IBatchDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IApplicationAlarmListPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IApplicationAlarmPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.cache.IApplicationCacheDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.IApplicationComponentUIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.IApplicationMappingUIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IApplicationReferenceAlarmListPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IApplicationReferenceAlarmPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.IApplicationReferenceMetricUIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.ICpuMetricUIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.IGCMetricUIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.IGlobalTracePersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.IGlobalTraceUIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IInstanceAlarmListPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IInstanceAlarmPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.cache.IInstanceCacheDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.IInstanceHeartBeatPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.IInstanceMetricUIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IInstanceReferenceAlarmListPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IInstanceReferenceAlarmPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.IInstanceUIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.IMemoryMetricUIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.IMemoryPoolMetricUIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.cache.INetworkAddressCacheDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.ISegmentCostPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.ISegmentCostUIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.ISegmentPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.ISegmentUIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IServiceAlarmListPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IServiceAlarmPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.cache.IServiceNameCacheDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IServiceReferenceAlarmListPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IServiceReferenceAlarmPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.IServiceReferenceUIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.acp.IApplicationComponentDayPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.acp.IApplicationComponentHourPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.acp.IApplicationComponentMinutePersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.acp.IApplicationComponentMonthPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IApplicationAlarmListPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IApplicationAlarmPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IApplicationReferenceAlarmListPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IApplicationReferenceAlarmPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IInstanceAlarmListPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IInstanceAlarmPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IInstanceReferenceAlarmListPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IInstanceReferenceAlarmPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IServiceAlarmListPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IServiceAlarmPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IServiceReferenceAlarmListPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IServiceReferenceAlarmPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.amp.IApplicationDayMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.amp.IApplicationHourMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.amp.IApplicationMinuteMetricPersistenceDAO;
|
||||
|
|
@ -71,6 +67,10 @@ import org.apache.skywalking.apm.collector.storage.dao.armp.IApplicationReferenc
|
|||
import org.apache.skywalking.apm.collector.storage.dao.armp.IApplicationReferenceHourMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.armp.IApplicationReferenceMinuteMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.armp.IApplicationReferenceMonthMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.cache.IApplicationCacheDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.cache.IInstanceCacheDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.cache.INetworkAddressCacheDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.cache.IServiceNameCacheDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.cpump.ICpuSecondMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.gcmp.IGCSecondMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.imp.IInstanceDayMetricPersistenceDAO;
|
||||
|
|
@ -86,6 +86,10 @@ import org.apache.skywalking.apm.collector.storage.dao.irmp.IInstanceReferenceHo
|
|||
import org.apache.skywalking.apm.collector.storage.dao.irmp.IInstanceReferenceMinuteMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.irmp.IInstanceReferenceMonthMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.memorymp.IMemorySecondMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.mpoolmp.IMemoryPoolDayMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.mpoolmp.IMemoryPoolHourMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.mpoolmp.IMemoryPoolMinuteMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.mpoolmp.IMemoryPoolMonthMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.mpoolmp.IMemoryPoolSecondMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.register.IApplicationRegisterDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.register.IInstanceRegisterDAO;
|
||||
|
|
@ -142,7 +146,12 @@ public class StorageModule extends Module {
|
|||
classes.add(ICpuSecondMetricPersistenceDAO.class);
|
||||
classes.add(IGCSecondMetricPersistenceDAO.class);
|
||||
classes.add(IMemorySecondMetricPersistenceDAO.class);
|
||||
|
||||
classes.add(IMemoryPoolSecondMetricPersistenceDAO.class);
|
||||
classes.add(IMemoryPoolMinuteMetricPersistenceDAO.class);
|
||||
classes.add(IMemoryPoolHourMetricPersistenceDAO.class);
|
||||
classes.add(IMemoryPoolDayMetricPersistenceDAO.class);
|
||||
classes.add(IMemoryPoolMonthMetricPersistenceDAO.class);
|
||||
|
||||
classes.add(IApplicationComponentMinutePersistenceDAO.class);
|
||||
classes.add(IApplicationComponentHourPersistenceDAO.class);
|
||||
|
|
|
|||
|
|
@ -20,7 +20,10 @@ package org.apache.skywalking.apm.collector.storage.table.jvm;
|
|||
|
||||
import org.apache.skywalking.apm.collector.core.data.Column;
|
||||
import org.apache.skywalking.apm.collector.core.data.StreamData;
|
||||
import org.apache.skywalking.apm.collector.core.data.operator.AddOperation;
|
||||
import org.apache.skywalking.apm.collector.core.data.operator.CoverOperation;
|
||||
import org.apache.skywalking.apm.collector.core.data.operator.MaxOperation;
|
||||
import org.apache.skywalking.apm.collector.core.data.operator.MinOperation;
|
||||
import org.apache.skywalking.apm.collector.core.data.operator.NonOperation;
|
||||
|
||||
/**
|
||||
|
|
@ -34,23 +37,24 @@ public class MemoryPoolMetric extends StreamData {
|
|||
};
|
||||
|
||||
private static final Column[] LONG_COLUMNS = {
|
||||
new Column(MemoryPoolMetricTable.COLUMN_INIT, new CoverOperation()),
|
||||
new Column(MemoryPoolMetricTable.COLUMN_MAX, new CoverOperation()),
|
||||
new Column(MemoryPoolMetricTable.COLUMN_USED, new CoverOperation()),
|
||||
new Column(MemoryPoolMetricTable.COLUMN_COMMITTED, new CoverOperation()),
|
||||
new Column(MemoryPoolMetricTable.COLUMN_TIME_BUCKET, new CoverOperation()),
|
||||
new Column(MemoryPoolMetricTable.COLUMN_INIT, new MinOperation()),
|
||||
new Column(MemoryPoolMetricTable.COLUMN_MAX, new MaxOperation()),
|
||||
new Column(MemoryPoolMetricTable.COLUMN_USED, new AddOperation()),
|
||||
new Column(MemoryPoolMetricTable.COLUMN_COMMITTED, new AddOperation()),
|
||||
new Column(MemoryPoolMetricTable.COLUMN_TIMES, new AddOperation()),
|
||||
new Column(MemoryPoolMetricTable.COLUMN_TIME_BUCKET, new NonOperation()),
|
||||
};
|
||||
|
||||
private static final Column[] DOUBLE_COLUMNS = {
|
||||
};
|
||||
|
||||
private static final Column[] INTEGER_COLUMNS = {
|
||||
new Column(MemoryPoolMetricTable.COLUMN_INSTANCE_ID, new CoverOperation()),
|
||||
new Column(MemoryPoolMetricTable.COLUMN_INSTANCE_ID, new NonOperation()),
|
||||
new Column(MemoryPoolMetricTable.COLUMN_POOL_TYPE, new CoverOperation()),
|
||||
};
|
||||
|
||||
private static final Column[] BOOLEAN_COLUMNS = {};
|
||||
|
||||
|
||||
private static final Column[] BYTE_COLUMNS = {};
|
||||
|
||||
public MemoryPoolMetric() {
|
||||
|
|
@ -105,12 +109,20 @@ public class MemoryPoolMetric extends StreamData {
|
|||
setDataLong(3, committed);
|
||||
}
|
||||
|
||||
public Long getTimeBucket() {
|
||||
public Long getTimes() {
|
||||
return getDataLong(4);
|
||||
}
|
||||
|
||||
public void setTimes(Long times) {
|
||||
setDataLong(4, times);
|
||||
}
|
||||
|
||||
public Long getTimeBucket() {
|
||||
return getDataLong(5);
|
||||
}
|
||||
|
||||
public void setTimeBucket(Long timeBucket) {
|
||||
setDataLong(4, timeBucket);
|
||||
setDataLong(5, timeBucket);
|
||||
}
|
||||
|
||||
public Integer getInstanceId() {
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
package org.apache.skywalking.apm.collector.storage.table.jvm;
|
||||
|
||||
import org.apache.skywalking.apm.collector.core.data.CommonTable;
|
||||
|
|
@ -32,4 +31,5 @@ public class MemoryPoolMetricTable extends CommonTable {
|
|||
public static final String COLUMN_MAX = "max";
|
||||
public static final String COLUMN_USED = "used";
|
||||
public static final String COLUMN_COMMITTED = "committed";
|
||||
public static final String COLUMN_TIMES = "times";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,43 +31,39 @@ import org.apache.skywalking.apm.collector.core.module.ServiceNotProvidedExcepti
|
|||
import org.apache.skywalking.apm.collector.storage.StorageException;
|
||||
import org.apache.skywalking.apm.collector.storage.StorageModule;
|
||||
import org.apache.skywalking.apm.collector.storage.base.dao.IBatchDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IApplicationAlarmListPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IApplicationAlarmPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.cache.IApplicationCacheDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.IApplicationComponentUIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.IApplicationMappingUIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IApplicationReferenceAlarmListPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IApplicationReferenceAlarmPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.IApplicationReferenceMetricUIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.ICpuMetricUIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.IGCMetricUIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.IGlobalTracePersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.IGlobalTraceUIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IInstanceAlarmListPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IInstanceAlarmPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.cache.IInstanceCacheDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.IInstanceHeartBeatPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.IInstanceMetricUIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IInstanceReferenceAlarmListPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IInstanceReferenceAlarmPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.IInstanceUIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.IMemoryMetricUIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.IMemoryPoolMetricUIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.cache.INetworkAddressCacheDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.ISegmentCostPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.ISegmentCostUIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.ISegmentPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.ISegmentUIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IServiceAlarmListPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IServiceAlarmPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.cache.IServiceNameCacheDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IServiceReferenceAlarmListPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IServiceReferenceAlarmPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.IServiceReferenceUIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.acp.IApplicationComponentDayPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.acp.IApplicationComponentHourPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.acp.IApplicationComponentMinutePersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.acp.IApplicationComponentMonthPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IApplicationAlarmListPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IApplicationAlarmPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IApplicationReferenceAlarmListPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IApplicationReferenceAlarmPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IInstanceAlarmListPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IInstanceAlarmPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IInstanceReferenceAlarmListPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IInstanceReferenceAlarmPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IServiceAlarmListPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IServiceAlarmPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IServiceReferenceAlarmListPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.alarm.IServiceReferenceAlarmPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.amp.IApplicationDayMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.amp.IApplicationHourMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.amp.IApplicationMinuteMetricPersistenceDAO;
|
||||
|
|
@ -80,6 +76,10 @@ import org.apache.skywalking.apm.collector.storage.dao.armp.IApplicationReferenc
|
|||
import org.apache.skywalking.apm.collector.storage.dao.armp.IApplicationReferenceHourMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.armp.IApplicationReferenceMinuteMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.armp.IApplicationReferenceMonthMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.cache.IApplicationCacheDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.cache.IInstanceCacheDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.cache.INetworkAddressCacheDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.cache.IServiceNameCacheDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.cpump.ICpuSecondMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.gcmp.IGCSecondMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.imp.IInstanceDayMetricPersistenceDAO;
|
||||
|
|
@ -95,6 +95,10 @@ import org.apache.skywalking.apm.collector.storage.dao.irmp.IInstanceReferenceHo
|
|||
import org.apache.skywalking.apm.collector.storage.dao.irmp.IInstanceReferenceMinuteMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.irmp.IInstanceReferenceMonthMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.memorymp.IMemorySecondMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.mpoolmp.IMemoryPoolDayMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.mpoolmp.IMemoryPoolHourMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.mpoolmp.IMemoryPoolMinuteMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.mpoolmp.IMemoryPoolMonthMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.mpoolmp.IMemoryPoolSecondMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.register.IApplicationRegisterDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.register.IInstanceRegisterDAO;
|
||||
|
|
@ -110,43 +114,39 @@ import org.apache.skywalking.apm.collector.storage.dao.srmp.IServiceReferenceMin
|
|||
import org.apache.skywalking.apm.collector.storage.dao.srmp.IServiceReferenceMonthMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.base.dao.BatchEsDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.base.define.ElasticSearchStorageInstaller;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.alarm.ApplicationAlarmEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.alarm.ApplicationAlarmListEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.ApplicationComponentEsUIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.cache.ApplicationEsCacheDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.ApplicationMappingEsUIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.alarm.ApplicationReferenceAlarmEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.alarm.ApplicationReferenceAlarmListEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.ApplicationReferenceMetricEsUIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.CpuMetricEsUIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.GCMetricEsUIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.GlobalTraceEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.GlobalTraceEsUIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.alarm.InstanceAlarmEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.alarm.InstanceAlarmListEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.cache.InstanceEsCacheDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.InstanceEsUIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.InstanceHeartBeatEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.InstanceMetricEsUIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.alarm.InstanceReferenceAlarmEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.alarm.InstanceReferenceAlarmListEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.MemoryMetricEsUIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.MemoryPoolMetricEsUIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.cache.NetworkAddressEsCacheDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.SegmentCostEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.SegmentCostEsUIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.SegmentEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.SegmentEsUIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.alarm.ServiceAlarmEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.alarm.ServiceAlarmListEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.cache.ServiceNameEsCacheDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.alarm.ServiceReferenceAlarmEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.alarm.ServiceReferenceAlarmListEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.ServiceReferenceEsUIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.acp.ApplicationComponentDayEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.acp.ApplicationComponentHourEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.acp.ApplicationComponentMinuteEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.acp.ApplicationComponentMonthEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.alarm.ApplicationAlarmEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.alarm.ApplicationAlarmListEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.alarm.ApplicationReferenceAlarmEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.alarm.ApplicationReferenceAlarmListEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.alarm.InstanceAlarmEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.alarm.InstanceAlarmListEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.alarm.InstanceReferenceAlarmEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.alarm.InstanceReferenceAlarmListEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.alarm.ServiceAlarmEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.alarm.ServiceAlarmListEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.alarm.ServiceReferenceAlarmEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.alarm.ServiceReferenceAlarmListEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.amp.ApplicationDayMetricEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.amp.ApplicationHourMetricEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.amp.ApplicationMinuteMetricEsPersistenceDAO;
|
||||
|
|
@ -159,6 +159,10 @@ import org.apache.skywalking.apm.collector.storage.es.dao.armp.ApplicationRefere
|
|||
import org.apache.skywalking.apm.collector.storage.es.dao.armp.ApplicationReferenceHourMetricEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.armp.ApplicationReferenceMinuteMetricEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.armp.ApplicationReferenceMonthMetricEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.cache.ApplicationEsCacheDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.cache.InstanceEsCacheDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.cache.NetworkAddressEsCacheDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.cache.ServiceNameEsCacheDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.cpump.CpuSecondMetricEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.gcmp.GCSecondMetricEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.imp.InstanceDayMetricEsPersistenceDAO;
|
||||
|
|
@ -174,6 +178,10 @@ import org.apache.skywalking.apm.collector.storage.es.dao.irmp.InstanceReference
|
|||
import org.apache.skywalking.apm.collector.storage.es.dao.irmp.InstanceReferenceMinuteMetricEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.irmp.InstanceReferenceMonthMetricEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.memorymp.MemorySecondMetricEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.mpoolmp.MemoryPoolDayMetricEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.mpoolmp.MemoryPoolHourMetricEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.mpoolmp.MemoryPoolMinuteMetricEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.mpoolmp.MemoryPoolMonthMetricEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.mpoolmp.MemoryPoolSecondMetricEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.register.ApplicationEsRegisterDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.register.InstanceEsRegisterDAO;
|
||||
|
|
@ -280,7 +288,12 @@ public class StorageModuleEsProvider extends ModuleProvider {
|
|||
this.registerServiceImplementation(ICpuSecondMetricPersistenceDAO.class, new CpuSecondMetricEsPersistenceDAO(elasticSearchClient));
|
||||
this.registerServiceImplementation(IGCSecondMetricPersistenceDAO.class, new GCSecondMetricEsPersistenceDAO(elasticSearchClient));
|
||||
this.registerServiceImplementation(IMemorySecondMetricPersistenceDAO.class, new MemorySecondMetricEsPersistenceDAO(elasticSearchClient));
|
||||
|
||||
this.registerServiceImplementation(IMemoryPoolSecondMetricPersistenceDAO.class, new MemoryPoolSecondMetricEsPersistenceDAO(elasticSearchClient));
|
||||
this.registerServiceImplementation(IMemoryPoolMinuteMetricPersistenceDAO.class, new MemoryPoolMinuteMetricEsPersistenceDAO(elasticSearchClient));
|
||||
this.registerServiceImplementation(IMemoryPoolHourMetricPersistenceDAO.class, new MemoryPoolHourMetricEsPersistenceDAO(elasticSearchClient));
|
||||
this.registerServiceImplementation(IMemoryPoolDayMetricPersistenceDAO.class, new MemoryPoolDayMetricEsPersistenceDAO(elasticSearchClient));
|
||||
this.registerServiceImplementation(IMemoryPoolMonthMetricPersistenceDAO.class, new MemoryPoolMonthMetricEsPersistenceDAO(elasticSearchClient));
|
||||
|
||||
this.registerServiceImplementation(IApplicationComponentMinutePersistenceDAO.class, new ApplicationComponentMinuteEsPersistenceDAO(elasticSearchClient));
|
||||
this.registerServiceImplementation(IApplicationComponentHourPersistenceDAO.class, new ApplicationComponentHourEsPersistenceDAO(elasticSearchClient));
|
||||
|
|
|
|||
|
|
@ -39,7 +39,21 @@ public abstract class AbstractMemoryPoolMetricEsPersistenceDAO extends AbstractP
|
|||
}
|
||||
|
||||
@Override protected final MemoryPoolMetric esDataToStreamData(Map<String, Object> source) {
|
||||
return null;
|
||||
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());
|
||||
memoryPoolMetric.setPoolType(((Number)source.get(MemoryPoolMetricTable.COLUMN_POOL_TYPE)).intValue());
|
||||
|
||||
memoryPoolMetric.setInit(((Number)source.get(MemoryPoolMetricTable.COLUMN_INIT)).longValue());
|
||||
memoryPoolMetric.setMax(((Number)source.get(MemoryPoolMetricTable.COLUMN_MAX)).longValue());
|
||||
memoryPoolMetric.setUsed(((Number)source.get(MemoryPoolMetricTable.COLUMN_USED)).longValue());
|
||||
memoryPoolMetric.setCommitted(((Number)source.get(MemoryPoolMetricTable.COLUMN_COMMITTED)).longValue());
|
||||
memoryPoolMetric.setTimes(((Number)source.get(MemoryPoolMetricTable.COLUMN_TIMES)).longValue());
|
||||
|
||||
memoryPoolMetric.setTimeBucket(((Number)source.get(MemoryPoolMetricTable.COLUMN_TIME_BUCKET)).longValue());
|
||||
return memoryPoolMetric;
|
||||
}
|
||||
|
||||
@Override protected final Map<String, Object> esStreamDataToEsData(MemoryPoolMetric streamData) {
|
||||
|
|
@ -53,6 +67,7 @@ public abstract class AbstractMemoryPoolMetricEsPersistenceDAO extends AbstractP
|
|||
source.put(MemoryPoolMetricTable.COLUMN_MAX, streamData.getMax());
|
||||
source.put(MemoryPoolMetricTable.COLUMN_USED, streamData.getUsed());
|
||||
source.put(MemoryPoolMetricTable.COLUMN_COMMITTED, streamData.getCommitted());
|
||||
source.put(MemoryPoolMetricTable.COLUMN_TIMES, streamData.getTimes());
|
||||
source.put(MemoryPoolMetricTable.COLUMN_TIME_BUCKET, streamData.getTimeBucket());
|
||||
|
||||
return source;
|
||||
|
|
|
|||
|
|
@ -16,8 +16,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
package org.apache.skywalking.apm.collector.storage.es.define;
|
||||
package org.apache.skywalking.apm.collector.storage.es.define.mpool;
|
||||
|
||||
import org.apache.skywalking.apm.collector.storage.es.base.define.ElasticSearchColumnDefine;
|
||||
import org.apache.skywalking.apm.collector.storage.es.base.define.ElasticSearchTableDefine;
|
||||
|
|
@ -26,23 +25,26 @@ import org.apache.skywalking.apm.collector.storage.table.jvm.MemoryPoolMetricTab
|
|||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class MemoryPoolMetricEsTableDefine extends ElasticSearchTableDefine {
|
||||
public abstract class AbstractMemoryPoolMetricEsTableDefine extends ElasticSearchTableDefine {
|
||||
|
||||
public MemoryPoolMetricEsTableDefine() {
|
||||
super(MemoryPoolMetricTable.TABLE);
|
||||
public AbstractMemoryPoolMetricEsTableDefine(String name) {
|
||||
super(name);
|
||||
}
|
||||
|
||||
@Override public int refreshInterval() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override public void initialize() {
|
||||
@Override public final void initialize() {
|
||||
addColumn(new ElasticSearchColumnDefine(MemoryPoolMetricTable.COLUMN_ID, ElasticSearchColumnDefine.Type.Keyword.name()));
|
||||
addColumn(new ElasticSearchColumnDefine(MemoryPoolMetricTable.COLUMN_METRIC_ID, ElasticSearchColumnDefine.Type.Keyword.name()));
|
||||
addColumn(new ElasticSearchColumnDefine(MemoryPoolMetricTable.COLUMN_INSTANCE_ID, ElasticSearchColumnDefine.Type.Integer.name()));
|
||||
addColumn(new ElasticSearchColumnDefine(MemoryPoolMetricTable.COLUMN_POOL_TYPE, ElasticSearchColumnDefine.Type.Integer.name()));
|
||||
addColumn(new ElasticSearchColumnDefine(MemoryPoolMetricTable.COLUMN_INIT, ElasticSearchColumnDefine.Type.Long.name()));
|
||||
addColumn(new ElasticSearchColumnDefine(MemoryPoolMetricTable.COLUMN_MAX, ElasticSearchColumnDefine.Type.Long.name()));
|
||||
addColumn(new ElasticSearchColumnDefine(MemoryPoolMetricTable.COLUMN_USED, ElasticSearchColumnDefine.Type.Long.name()));
|
||||
addColumn(new ElasticSearchColumnDefine(MemoryPoolMetricTable.COLUMN_COMMITTED, ElasticSearchColumnDefine.Type.Long.name()));
|
||||
addColumn(new ElasticSearchColumnDefine(MemoryPoolMetricTable.COLUMN_TIMES, ElasticSearchColumnDefine.Type.Long.name()));
|
||||
addColumn(new ElasticSearchColumnDefine(MemoryPoolMetricTable.COLUMN_TIME_BUCKET, ElasticSearchColumnDefine.Type.Long.name()));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* 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.storage.es.define.mpool;
|
||||
|
||||
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
|
||||
import org.apache.skywalking.apm.collector.core.util.Const;
|
||||
import org.apache.skywalking.apm.collector.storage.table.jvm.MemoryPoolMetricTable;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class MemoryPoolDayMetricEsTableDefine extends AbstractMemoryPoolMetricEsTableDefine {
|
||||
|
||||
public MemoryPoolDayMetricEsTableDefine() {
|
||||
super(MemoryPoolMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Day.getName());
|
||||
}
|
||||
|
||||
@Override public int refreshInterval() {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* 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.storage.es.define.mpool;
|
||||
|
||||
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
|
||||
import org.apache.skywalking.apm.collector.core.util.Const;
|
||||
import org.apache.skywalking.apm.collector.storage.table.jvm.MemoryPoolMetricTable;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class MemoryPoolHourMetricEsTableDefine extends AbstractMemoryPoolMetricEsTableDefine {
|
||||
|
||||
public MemoryPoolHourMetricEsTableDefine() {
|
||||
super(MemoryPoolMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Hour.getName());
|
||||
}
|
||||
|
||||
@Override public int refreshInterval() {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* 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.storage.es.define.mpool;
|
||||
|
||||
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
|
||||
import org.apache.skywalking.apm.collector.core.util.Const;
|
||||
import org.apache.skywalking.apm.collector.storage.table.jvm.MemoryPoolMetricTable;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class MemoryPoolMinuteMetricEsTableDefine extends AbstractMemoryPoolMetricEsTableDefine {
|
||||
|
||||
public MemoryPoolMinuteMetricEsTableDefine() {
|
||||
super(MemoryPoolMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Minute.getName());
|
||||
}
|
||||
|
||||
@Override public int refreshInterval() {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* 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.storage.es.define.mpool;
|
||||
|
||||
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
|
||||
import org.apache.skywalking.apm.collector.core.util.Const;
|
||||
import org.apache.skywalking.apm.collector.storage.table.jvm.MemoryPoolMetricTable;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class MemoryPoolMonthMetricEsTableDefine extends AbstractMemoryPoolMetricEsTableDefine {
|
||||
|
||||
public MemoryPoolMonthMetricEsTableDefine() {
|
||||
super(MemoryPoolMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Month.getName());
|
||||
}
|
||||
|
||||
@Override public int refreshInterval() {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* 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.storage.es.define.mpool;
|
||||
|
||||
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
|
||||
import org.apache.skywalking.apm.collector.core.util.Const;
|
||||
import org.apache.skywalking.apm.collector.storage.table.jvm.MemoryPoolMetricTable;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class MemoryPoolSecondMetricEsTableDefine extends AbstractMemoryPoolMetricEsTableDefine {
|
||||
|
||||
public MemoryPoolSecondMetricEsTableDefine() {
|
||||
super(MemoryPoolMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Second.getName());
|
||||
}
|
||||
|
||||
@Override public int refreshInterval() {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
|
@ -63,4 +63,10 @@ org.apache.skywalking.apm.collector.storage.es.define.alarm.InstanceReferenceAla
|
|||
org.apache.skywalking.apm.collector.storage.es.define.alarm.ServiceAlarmEsTableDefine
|
||||
org.apache.skywalking.apm.collector.storage.es.define.alarm.ServiceAlarmListEsTableDefine
|
||||
org.apache.skywalking.apm.collector.storage.es.define.alarm.ServiceReferenceAlarmEsTableDefine
|
||||
org.apache.skywalking.apm.collector.storage.es.define.alarm.ServiceReferenceAlarmListEsTableDefine
|
||||
org.apache.skywalking.apm.collector.storage.es.define.alarm.ServiceReferenceAlarmListEsTableDefine
|
||||
|
||||
org.apache.skywalking.apm.collector.storage.es.define.mpool.MemoryPoolSecondMetricEsTableDefine
|
||||
org.apache.skywalking.apm.collector.storage.es.define.mpool.MemoryPoolMinuteMetricEsTableDefine
|
||||
org.apache.skywalking.apm.collector.storage.es.define.mpool.MemoryPoolHourMetricEsTableDefine
|
||||
org.apache.skywalking.apm.collector.storage.es.define.mpool.MemoryPoolDayMetricEsTableDefine
|
||||
org.apache.skywalking.apm.collector.storage.es.define.mpool.MemoryPoolMonthMetricEsTableDefine
|
||||
Loading…
Reference in New Issue