Compile successful.
This commit is contained in:
parent
63e9c54f97
commit
eb656cd462
|
|
@ -21,7 +21,7 @@ package org.apache.skywalking.apm.collector.analysis.alarm.provider.worker;
|
|||
import org.apache.skywalking.apm.collector.analysis.metric.define.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.AbstractData;
|
||||
import org.apache.skywalking.apm.collector.core.data.StreamData;
|
||||
import org.apache.skywalking.apm.collector.core.module.ModuleManager;
|
||||
import org.apache.skywalking.apm.collector.core.util.Const;
|
||||
import org.apache.skywalking.apm.collector.core.util.NumberFormatUtils;
|
||||
|
|
@ -34,7 +34,7 @@ import org.slf4j.LoggerFactory;
|
|||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public abstract class AlarmAssertWorker<INPUT extends AbstractData & Metric, OUTPUT extends AbstractData & Alarm> extends AbstractLocalAsyncWorker<INPUT, OUTPUT> {
|
||||
public abstract class AlarmAssertWorker<INPUT extends StreamData & Metric, OUTPUT extends StreamData & Alarm> extends AbstractLocalAsyncWorker<INPUT, OUTPUT> {
|
||||
|
||||
private final Logger logger = LoggerFactory.getLogger(AlarmAssertWorker.class);
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
package org.apache.skywalking.apm.collector.analysis.alarm.provider.worker;
|
||||
|
||||
import org.apache.skywalking.apm.collector.analysis.worker.model.base.AbstractLocalAsyncWorkerProvider;
|
||||
import org.apache.skywalking.apm.collector.core.data.AbstractData;
|
||||
import org.apache.skywalking.apm.collector.core.data.StreamData;
|
||||
import org.apache.skywalking.apm.collector.core.module.ModuleManager;
|
||||
import org.apache.skywalking.apm.collector.storage.table.Metric;
|
||||
import org.apache.skywalking.apm.collector.storage.table.alarm.Alarm;
|
||||
|
|
@ -27,7 +27,7 @@ import org.apache.skywalking.apm.collector.storage.table.alarm.Alarm;
|
|||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public abstract class AlarmAssertWorkerProvider<INPUT extends AbstractData & Metric, OUTPUT extends AbstractData & Alarm, WORKER_TYPE extends AlarmAssertWorker<INPUT, OUTPUT>> extends AbstractLocalAsyncWorkerProvider<INPUT, OUTPUT, WORKER_TYPE> {
|
||||
public abstract class AlarmAssertWorkerProvider<INPUT extends StreamData & Metric, OUTPUT extends StreamData & Alarm, WORKER_TYPE extends AlarmAssertWorker<INPUT, OUTPUT>> extends AbstractLocalAsyncWorkerProvider<INPUT, OUTPUT, WORKER_TYPE> {
|
||||
|
||||
public AlarmAssertWorkerProvider(ModuleManager moduleManager) {
|
||||
super(moduleManager);
|
||||
|
|
|
|||
|
|
@ -45,7 +45,8 @@ public class ApplicationMetricAlarmAssertWorker extends AlarmAssertWorker<Applic
|
|||
}
|
||||
|
||||
@Override protected ApplicationAlarm newAlarmObject(String id, ApplicationMetric inputMetric) {
|
||||
ApplicationAlarm applicationAlarm = new ApplicationAlarm(id + Const.ID_SPLIT + inputMetric.getApplicationId());
|
||||
ApplicationAlarm applicationAlarm = new ApplicationAlarm();
|
||||
applicationAlarm.setId(id + Const.ID_SPLIT + inputMetric.getApplicationId());
|
||||
applicationAlarm.setApplicationId(inputMetric.getApplicationId());
|
||||
return applicationAlarm;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,8 @@ public class ApplicationMetricAlarmToListNodeProcessor implements NodeProcessor<
|
|||
+ Const.ID_SPLIT + applicationAlarm.getAlarmType()
|
||||
+ Const.ID_SPLIT + applicationAlarm.getApplicationId();
|
||||
|
||||
ApplicationAlarmList applicationAlarmList = new ApplicationAlarmList(id);
|
||||
ApplicationAlarmList applicationAlarmList = new ApplicationAlarmList();
|
||||
applicationAlarmList.setId(id);
|
||||
applicationAlarmList.setApplicationId(applicationAlarm.getApplicationId());
|
||||
applicationAlarmList.setSourceValue(applicationAlarm.getSourceValue());
|
||||
applicationAlarmList.setAlarmType(applicationAlarm.getAlarmType());
|
||||
|
|
|
|||
|
|
@ -45,7 +45,8 @@ public class ApplicationReferenceMetricAlarmAssertWorker extends AlarmAssertWork
|
|||
}
|
||||
|
||||
@Override protected ApplicationReferenceAlarm newAlarmObject(String id, ApplicationReferenceMetric inputMetric) {
|
||||
ApplicationReferenceAlarm applicationReferenceAlarm = new ApplicationReferenceAlarm(id + Const.ID_SPLIT + inputMetric.getFrontApplicationId() + Const.ID_SPLIT + inputMetric.getBehindApplicationId());
|
||||
ApplicationReferenceAlarm applicationReferenceAlarm = new ApplicationReferenceAlarm();
|
||||
applicationReferenceAlarm.setId(id + Const.ID_SPLIT + inputMetric.getFrontApplicationId() + Const.ID_SPLIT + inputMetric.getBehindApplicationId());
|
||||
applicationReferenceAlarm.setFrontApplicationId(inputMetric.getFrontApplicationId());
|
||||
applicationReferenceAlarm.setBehindApplicationId(inputMetric.getBehindApplicationId());
|
||||
return applicationReferenceAlarm;
|
||||
|
|
|
|||
|
|
@ -41,7 +41,8 @@ public class ApplicationReferenceMetricAlarmToListNodeProcessor implements NodeP
|
|||
+ Const.ID_SPLIT + applicationReferenceAlarm.getFrontApplicationId()
|
||||
+ Const.ID_SPLIT + applicationReferenceAlarm.getBehindApplicationId();
|
||||
|
||||
ApplicationReferenceAlarmList applicationReferenceAlarmList = new ApplicationReferenceAlarmList(id);
|
||||
ApplicationReferenceAlarmList applicationReferenceAlarmList = new ApplicationReferenceAlarmList();
|
||||
applicationReferenceAlarmList.setId(id);
|
||||
applicationReferenceAlarmList.setFrontApplicationId(applicationReferenceAlarm.getFrontApplicationId());
|
||||
applicationReferenceAlarmList.setBehindApplicationId(applicationReferenceAlarm.getBehindApplicationId());
|
||||
applicationReferenceAlarmList.setSourceValue(applicationReferenceAlarm.getSourceValue());
|
||||
|
|
|
|||
|
|
@ -45,7 +45,8 @@ public class InstanceMetricAlarmAssertWorker extends AlarmAssertWorker<InstanceM
|
|||
}
|
||||
|
||||
@Override protected InstanceAlarm newAlarmObject(String id, InstanceMetric inputMetric) {
|
||||
InstanceAlarm instanceAlarm = new InstanceAlarm(id + Const.ID_SPLIT + inputMetric.getInstanceId());
|
||||
InstanceAlarm instanceAlarm = new InstanceAlarm();
|
||||
inputMetric.setId(id + Const.ID_SPLIT + inputMetric.getInstanceId());
|
||||
instanceAlarm.setApplicationId(inputMetric.getApplicationId());
|
||||
instanceAlarm.setInstanceId(inputMetric.getInstanceId());
|
||||
return instanceAlarm;
|
||||
|
|
|
|||
|
|
@ -39,7 +39,8 @@ public class InstanceMetricAlarmToListNodeProcessor implements NodeProcessor<Ins
|
|||
+ Const.ID_SPLIT + instanceAlarm.getAlarmType()
|
||||
+ Const.ID_SPLIT + instanceAlarm.getInstanceId();
|
||||
|
||||
InstanceAlarmList instanceAlarmList = new InstanceAlarmList(id);
|
||||
InstanceAlarmList instanceAlarmList = new InstanceAlarmList();
|
||||
instanceAlarmList.setId(id);
|
||||
instanceAlarmList.setApplicationId(instanceAlarm.getApplicationId());
|
||||
instanceAlarmList.setInstanceId(instanceAlarm.getInstanceId());
|
||||
instanceAlarmList.setSourceValue(instanceAlarm.getSourceValue());
|
||||
|
|
|
|||
|
|
@ -45,7 +45,8 @@ public class InstanceReferenceMetricAlarmAssertWorker extends AlarmAssertWorker<
|
|||
}
|
||||
|
||||
@Override protected InstanceReferenceAlarm newAlarmObject(String id, InstanceReferenceMetric inputMetric) {
|
||||
InstanceReferenceAlarm instanceReferenceAlarm = new InstanceReferenceAlarm(id + Const.ID_SPLIT + inputMetric.getFrontInstanceId() + Const.ID_SPLIT + inputMetric.getBehindInstanceId());
|
||||
InstanceReferenceAlarm instanceReferenceAlarm = new InstanceReferenceAlarm();
|
||||
instanceReferenceAlarm.setId(id + Const.ID_SPLIT + inputMetric.getFrontInstanceId() + Const.ID_SPLIT + inputMetric.getBehindInstanceId());
|
||||
instanceReferenceAlarm.setFrontApplicationId(inputMetric.getFrontApplicationId());
|
||||
instanceReferenceAlarm.setBehindApplicationId(inputMetric.getBehindApplicationId());
|
||||
instanceReferenceAlarm.setFrontInstanceId(inputMetric.getFrontInstanceId());
|
||||
|
|
|
|||
|
|
@ -41,7 +41,8 @@ public class InstanceReferenceMetricAlarmToListNodeProcessor implements NodeProc
|
|||
+ Const.ID_SPLIT + instanceReferenceAlarm.getFrontInstanceId()
|
||||
+ Const.ID_SPLIT + instanceReferenceAlarm.getBehindInstanceId();
|
||||
|
||||
InstanceReferenceAlarmList instanceReferenceAlarmList = new InstanceReferenceAlarmList(id);
|
||||
InstanceReferenceAlarmList instanceReferenceAlarmList = new InstanceReferenceAlarmList();
|
||||
instanceReferenceAlarmList.setId(id);
|
||||
instanceReferenceAlarmList.setFrontApplicationId(instanceReferenceAlarm.getFrontApplicationId());
|
||||
instanceReferenceAlarmList.setBehindApplicationId(instanceReferenceAlarm.getBehindApplicationId());
|
||||
instanceReferenceAlarmList.setFrontInstanceId(instanceReferenceAlarm.getFrontInstanceId());
|
||||
|
|
|
|||
|
|
@ -45,7 +45,8 @@ public class ServiceMetricAlarmAssertWorker extends AlarmAssertWorker<ServiceMet
|
|||
}
|
||||
|
||||
@Override protected ServiceAlarm newAlarmObject(String id, ServiceMetric inputMetric) {
|
||||
ServiceAlarm serviceAlarm = new ServiceAlarm(id + Const.ID_SPLIT + inputMetric.getServiceId());
|
||||
ServiceAlarm serviceAlarm = new ServiceAlarm();
|
||||
serviceAlarm.setId(id + Const.ID_SPLIT + inputMetric.getServiceId());
|
||||
serviceAlarm.setApplicationId(inputMetric.getApplicationId());
|
||||
serviceAlarm.setInstanceId(inputMetric.getInstanceId());
|
||||
serviceAlarm.setServiceId(inputMetric.getServiceId());
|
||||
|
|
|
|||
|
|
@ -39,7 +39,8 @@ public class ServiceMetricAlarmToListNodeProcessor implements NodeProcessor<Serv
|
|||
+ Const.ID_SPLIT + serviceAlarm.getAlarmType()
|
||||
+ Const.ID_SPLIT + serviceAlarm.getServiceId();
|
||||
|
||||
ServiceAlarmList serviceAlarmList = new ServiceAlarmList(id);
|
||||
ServiceAlarmList serviceAlarmList = new ServiceAlarmList();
|
||||
serviceAlarmList.setId(id);
|
||||
serviceAlarmList.setApplicationId(serviceAlarm.getApplicationId());
|
||||
serviceAlarmList.setInstanceId(serviceAlarm.getInstanceId());
|
||||
serviceAlarmList.setServiceId(serviceAlarm.getServiceId());
|
||||
|
|
|
|||
|
|
@ -49,7 +49,8 @@ public class ServiceReferenceMetricAlarmAssertWorker extends AlarmAssertWorker<S
|
|||
}
|
||||
|
||||
@Override protected ServiceReferenceAlarm newAlarmObject(String id, ServiceReferenceMetric inputMetric) {
|
||||
ServiceReferenceAlarm serviceReferenceAlarm = new ServiceReferenceAlarm(id + Const.ID_SPLIT + inputMetric.getFrontServiceId() + Const.ID_SPLIT + inputMetric.getBehindServiceId());
|
||||
ServiceReferenceAlarm serviceReferenceAlarm = new ServiceReferenceAlarm();
|
||||
serviceReferenceAlarm.setId(id + Const.ID_SPLIT + inputMetric.getFrontServiceId() + Const.ID_SPLIT + inputMetric.getBehindServiceId());
|
||||
serviceReferenceAlarm.setFrontApplicationId(inputMetric.getFrontApplicationId());
|
||||
serviceReferenceAlarm.setBehindApplicationId(inputMetric.getBehindApplicationId());
|
||||
serviceReferenceAlarm.setFrontInstanceId(inputMetric.getFrontInstanceId());
|
||||
|
|
|
|||
|
|
@ -40,7 +40,8 @@ public class ServiceReferenceMetricAlarmToListNodeProcessor implements NodeProce
|
|||
+ Const.ID_SPLIT + serviceReferenceAlarm.getFrontServiceId()
|
||||
+ Const.ID_SPLIT + serviceReferenceAlarm.getBehindServiceId();
|
||||
|
||||
ServiceReferenceAlarmList serviceReferenceAlarmList = new ServiceReferenceAlarmList(id);
|
||||
ServiceReferenceAlarmList serviceReferenceAlarmList = new ServiceReferenceAlarmList();
|
||||
serviceReferenceAlarmList.setId(id);
|
||||
serviceReferenceAlarmList.setFrontApplicationId(serviceReferenceAlarm.getFrontApplicationId());
|
||||
serviceReferenceAlarmList.setBehindApplicationId(serviceReferenceAlarm.getBehindApplicationId());
|
||||
serviceReferenceAlarmList.setFrontInstanceId(serviceReferenceAlarm.getFrontInstanceId());
|
||||
|
|
|
|||
|
|
@ -45,7 +45,8 @@ public class CpuMetricService implements ICpuMetricService {
|
|||
}
|
||||
|
||||
@Override public void send(int instanceId, long timeBucket, double usagePercent) {
|
||||
CpuMetric cpuMetric = new CpuMetric(timeBucket + Const.ID_SPLIT + instanceId);
|
||||
CpuMetric cpuMetric = new CpuMetric();
|
||||
cpuMetric.setId(timeBucket + Const.ID_SPLIT + instanceId);
|
||||
cpuMetric.setInstanceId(instanceId);
|
||||
cpuMetric.setUsagePercent(usagePercent);
|
||||
cpuMetric.setTimeBucket(timeBucket);
|
||||
|
|
|
|||
|
|
@ -45,7 +45,8 @@ public class GCMetricService implements IGCMetricService {
|
|||
}
|
||||
|
||||
@Override public void send(int instanceId, long timeBucket, int phraseValue, long count, long time) {
|
||||
GCMetric gcMetric = new GCMetric(timeBucket + Const.ID_SPLIT + instanceId + Const.ID_SPLIT + String.valueOf(phraseValue));
|
||||
GCMetric gcMetric = new GCMetric();
|
||||
gcMetric.setId(timeBucket + Const.ID_SPLIT + instanceId + Const.ID_SPLIT + String.valueOf(phraseValue));
|
||||
gcMetric.setInstanceId(instanceId);
|
||||
gcMetric.setPhrase(phraseValue);
|
||||
gcMetric.setCount(count);
|
||||
|
|
|
|||
|
|
@ -45,7 +45,8 @@ public class InstanceHeartBeatService implements IInstanceHeartBeatService {
|
|||
}
|
||||
|
||||
@Override public void send(int instanceId, long heartBeatTime) {
|
||||
Instance instance = new Instance(String.valueOf(instanceId));
|
||||
Instance instance = new Instance();
|
||||
instance.setId(String.valueOf(instanceId));
|
||||
instance.setHeartBeatTime(TimeBucketUtils.INSTANCE.getSecondTimeBucket(heartBeatTime));
|
||||
instance.setInstanceId(instanceId);
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,8 @@ public class MemoryMetricService implements IMemoryMetricService {
|
|||
|
||||
@Override
|
||||
public void send(int instanceId, long timeBucket, boolean isHeap, long init, long max, long used, long commited) {
|
||||
MemoryMetric memoryMetric = new MemoryMetric(timeBucket + Const.ID_SPLIT + instanceId + Const.ID_SPLIT + String.valueOf(isHeap));
|
||||
MemoryMetric memoryMetric = new MemoryMetric();
|
||||
memoryMetric.setId(timeBucket + Const.ID_SPLIT + instanceId + Const.ID_SPLIT + String.valueOf(isHeap));
|
||||
memoryMetric.setInstanceId(instanceId);
|
||||
memoryMetric.setIsHeap(isHeap);
|
||||
memoryMetric.setInit(init);
|
||||
|
|
|
|||
|
|
@ -46,7 +46,8 @@ public class MemoryPoolMetricService implements IMemoryPoolMetricService {
|
|||
|
||||
@Override
|
||||
public void send(int instanceId, long timeBucket, int poolType, long init, long max, long used, long commited) {
|
||||
MemoryPoolMetric memoryPoolMetric = new MemoryPoolMetric(timeBucket + Const.ID_SPLIT + instanceId + Const.ID_SPLIT + String.valueOf(poolType));
|
||||
MemoryPoolMetric memoryPoolMetric = new MemoryPoolMetric();
|
||||
memoryPoolMetric.setId(timeBucket + Const.ID_SPLIT + instanceId + Const.ID_SPLIT + String.valueOf(poolType));
|
||||
memoryPoolMetric.setInstanceId(instanceId);
|
||||
memoryPoolMetric.setPoolType(poolType);
|
||||
memoryPoolMetric.setInit(init);
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ public class ApplicationMappingSpanListener implements FirstSpanListener, EntryS
|
|||
logger.debug("application mapping listener parse reference");
|
||||
if (spanDecorator.getRefsCount() > 0) {
|
||||
for (int i = 0; i < spanDecorator.getRefsCount(); i++) {
|
||||
ApplicationMapping applicationMapping = new ApplicationMapping(Const.EMPTY_STRING);
|
||||
ApplicationMapping applicationMapping = new ApplicationMapping();
|
||||
applicationMapping.setApplicationId(applicationId);
|
||||
applicationMapping.setAddressId(spanDecorator.getRefs(i).getNetworkAddressId());
|
||||
String id = String.valueOf(applicationId) + Const.ID_SPLIT + String.valueOf(applicationMapping.getAddressId());
|
||||
|
|
|
|||
|
|
@ -75,7 +75,8 @@ public class ServiceEntrySpanListener implements FirstSpanListener, EntrySpanLis
|
|||
@Override public void build() {
|
||||
logger.debug("entry service listener build");
|
||||
if (!hasReference && hasEntry) {
|
||||
ServiceEntry serviceEntry = new ServiceEntry(applicationId + Const.ID_SPLIT + entryServiceId);
|
||||
ServiceEntry serviceEntry = new ServiceEntry();
|
||||
serviceEntry.setId(applicationId + Const.ID_SPLIT + entryServiceId);
|
||||
serviceEntry.setApplicationId(applicationId);
|
||||
serviceEntry.setEntryServiceId(entryServiceId);
|
||||
serviceEntry.setEntryServiceName(entryServiceName);
|
||||
|
|
|
|||
|
|
@ -60,13 +60,15 @@ public class ServiceNameRegisterSerialWorker extends AbstractLocalAsyncWorker<Se
|
|||
|
||||
int min = serviceNameRegisterDAO.getMinServiceId();
|
||||
if (min == 0) {
|
||||
ServiceName noneServiceName = new ServiceName("1");
|
||||
ServiceName noneServiceName = new ServiceName();
|
||||
noneServiceName.setId("1");
|
||||
noneServiceName.setApplicationId(0);
|
||||
noneServiceName.setServiceId(Const.NONE_SERVICE_ID);
|
||||
noneServiceName.setServiceName(Const.NONE_SERVICE_NAME);
|
||||
serviceNameRegisterDAO.save(noneServiceName);
|
||||
|
||||
newServiceName = new ServiceName("-1");
|
||||
newServiceName = new ServiceName();
|
||||
newServiceName.setId("-1");
|
||||
newServiceName.setApplicationId(serviceName.getApplicationId());
|
||||
newServiceName.setServiceId(-1);
|
||||
newServiceName.setServiceName(serviceName.getServiceName());
|
||||
|
|
@ -74,7 +76,8 @@ public class ServiceNameRegisterSerialWorker extends AbstractLocalAsyncWorker<Se
|
|||
int max = serviceNameRegisterDAO.getMaxServiceId();
|
||||
serviceId = IdAutoIncrement.INSTANCE.increment(min, max);
|
||||
|
||||
newServiceName = new ServiceName(String.valueOf(serviceId));
|
||||
newServiceName = new ServiceName();
|
||||
newServiceName.setId(String.valueOf(serviceId));
|
||||
newServiceName.setApplicationId(serviceName.getApplicationId());
|
||||
newServiceName.setServiceId(serviceId);
|
||||
newServiceName.setServiceName(serviceName.getServiceName());
|
||||
|
|
|
|||
|
|
@ -73,7 +73,8 @@ public class ApplicationIDService implements IApplicationIDService {
|
|||
int applicationId = getApplicationCacheService().getApplicationIdByCode(applicationCode);
|
||||
|
||||
if (applicationId == 0) {
|
||||
Application application = new Application(applicationCode);
|
||||
Application application = new Application();
|
||||
application.setId(applicationCode);
|
||||
application.setApplicationCode(applicationCode);
|
||||
application.setApplicationId(0);
|
||||
application.setAddressId(Const.NONE);
|
||||
|
|
@ -88,7 +89,8 @@ public class ApplicationIDService implements IApplicationIDService {
|
|||
int applicationId = getApplicationCacheService().getApplicationIdByAddressId(addressId);
|
||||
|
||||
if (applicationId == 0) {
|
||||
Application application = new Application(networkAddress);
|
||||
Application application = new Application();
|
||||
application.setId(networkAddress);
|
||||
application.setApplicationCode(networkAddress);
|
||||
application.setApplicationId(0);
|
||||
application.setAddressId(addressId);
|
||||
|
|
|
|||
|
|
@ -75,7 +75,8 @@ public class InstanceIDService implements IInstanceIDService {
|
|||
int instanceId = getInstanceCacheService().getInstanceIdByAgentUUID(applicationId, agentUUID);
|
||||
|
||||
if (instanceId == 0) {
|
||||
Instance instance = new Instance("0");
|
||||
Instance instance = new Instance();
|
||||
instance.setId("0");
|
||||
instance.setApplicationId(applicationId);
|
||||
instance.setAgentUUID(agentUUID);
|
||||
instance.setRegisterTime(registerTime);
|
||||
|
|
@ -95,7 +96,8 @@ public class InstanceIDService implements IInstanceIDService {
|
|||
int instanceId = getInstanceCacheService().getInstanceIdByAddressId(applicationId, addressId);
|
||||
|
||||
if (instanceId == 0) {
|
||||
Instance instance = new Instance("0");
|
||||
Instance instance = new Instance();
|
||||
instance.setId("0");
|
||||
instance.setApplicationId(applicationId);
|
||||
instance.setAgentUUID(Const.EMPTY_STRING);
|
||||
instance.setRegisterTime(registerTime);
|
||||
|
|
@ -112,7 +114,8 @@ public class InstanceIDService implements IInstanceIDService {
|
|||
|
||||
@Override public void recover(int instanceId, int applicationId, long registerTime, String osInfo) {
|
||||
logger.debug("instance recover, instance id: {}, application id: {}, register time: {}", instanceId, applicationId, registerTime);
|
||||
Instance instance = new Instance(String.valueOf(instanceId));
|
||||
Instance instance = new Instance();
|
||||
instance.setId(String.valueOf(instanceId));
|
||||
instance.setApplicationId(applicationId);
|
||||
instance.setAgentUUID("");
|
||||
instance.setRegisterTime(registerTime);
|
||||
|
|
|
|||
|
|
@ -92,7 +92,8 @@ public class NetworkAddressIDService implements INetworkAddressIDService {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
NetworkAddress newNetworkAddress = new NetworkAddress("0");
|
||||
NetworkAddress newNetworkAddress = new NetworkAddress();
|
||||
newNetworkAddress.setId("0");
|
||||
newNetworkAddress.setNetworkAddress(networkAddress);
|
||||
newNetworkAddress.setAddressId(0);
|
||||
|
||||
|
|
|
|||
|
|
@ -63,7 +63,8 @@ public class ServiceNameService implements IServiceNameService {
|
|||
int serviceId = getServiceIdCacheService().get(applicationId, serviceName);
|
||||
|
||||
if (serviceId == 0) {
|
||||
ServiceName service = new ServiceName("0");
|
||||
ServiceName service = new ServiceName();
|
||||
service.setId("0");
|
||||
service.setApplicationId(applicationId);
|
||||
service.setServiceName(serviceName);
|
||||
service.setServiceId(0);
|
||||
|
|
|
|||
|
|
@ -162,7 +162,8 @@ public class SegmentParse {
|
|||
}
|
||||
|
||||
private void buildSegment(String id, byte[] dataBinary) {
|
||||
Segment segment = new Segment(id);
|
||||
Segment segment = new Segment();
|
||||
segment.setId(id);
|
||||
segment.setDataBinary(dataBinary);
|
||||
segment.setTimeBucket(timeBucket);
|
||||
Graph<Segment> graph = GraphManager.INSTANCE.findGraph(GraphIdDefine.SEGMENT_PERSISTENCE_GRAPH_ID, Segment.class);
|
||||
|
|
|
|||
|
|
@ -16,19 +16,35 @@
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
package org.apache.skywalking.apm.collector.analysis.segment.parser.provider.parser.standardization;
|
||||
|
||||
import org.apache.skywalking.apm.collector.core.data.EndOfBatchQueueMessage;
|
||||
import org.apache.skywalking.apm.collector.core.data.QueueData;
|
||||
import org.apache.skywalking.apm.collector.core.queue.EndOfBatchContext;
|
||||
import org.apache.skywalking.apm.network.proto.UpstreamSegment;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class SegmentStandardization extends EndOfBatchQueueMessage {
|
||||
public class SegmentStandardization implements QueueData {
|
||||
|
||||
public SegmentStandardization(String key) {
|
||||
super(key);
|
||||
private final String id;
|
||||
|
||||
public SegmentStandardization(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
private EndOfBatchContext context;
|
||||
|
||||
@Override public EndOfBatchContext getEndOfBatchContext() {
|
||||
return this.context;
|
||||
}
|
||||
|
||||
@Override public void setEndOfBatchContext(EndOfBatchContext context) {
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
private UpstreamSegment upstreamSegment;
|
||||
|
|
|
|||
|
|
@ -35,8 +35,6 @@ public abstract class TableDefine {
|
|||
|
||||
public abstract void initialize();
|
||||
|
||||
public abstract boolean isPyramidTable();
|
||||
|
||||
public final void addColumn(ColumnDefine columnDefine) {
|
||||
columnDefines.add(columnDefine);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,14 +19,14 @@
|
|||
package org.apache.skywalking.apm.collector.storage.table.alarm;
|
||||
|
||||
import org.apache.skywalking.apm.collector.core.data.Column;
|
||||
import org.apache.skywalking.apm.collector.core.data.AbstractData;
|
||||
import org.apache.skywalking.apm.collector.core.data.StreamData;
|
||||
import org.apache.skywalking.apm.collector.core.data.operator.CoverOperation;
|
||||
import org.apache.skywalking.apm.collector.core.data.operator.NonOperation;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class ApplicationAlarmList extends AbstractData {
|
||||
public class ApplicationAlarmList extends StreamData {
|
||||
|
||||
private static final Column[] STRING_COLUMNS = {
|
||||
new Column(ApplicationAlarmListTable.COLUMN_ID, new NonOperation()),
|
||||
|
|
@ -49,8 +49,24 @@ public class ApplicationAlarmList extends AbstractData {
|
|||
|
||||
private static final Column[] BYTE_COLUMNS = {};
|
||||
|
||||
public ApplicationAlarmList(String id) {
|
||||
super(id, STRING_COLUMNS, LONG_COLUMNS, DOUBLE_COLUMNS, INTEGER_COLUMNS, BOOLEAN_COLUMNS, BYTE_COLUMNS);
|
||||
public ApplicationAlarmList() {
|
||||
super(STRING_COLUMNS, LONG_COLUMNS, DOUBLE_COLUMNS, INTEGER_COLUMNS, BOOLEAN_COLUMNS, BYTE_COLUMNS);
|
||||
}
|
||||
|
||||
@Override public String getId() {
|
||||
return getDataString(0);
|
||||
}
|
||||
|
||||
@Override public void setId(String id) {
|
||||
setDataString(0, id);
|
||||
}
|
||||
|
||||
@Override public String getMetricId() {
|
||||
return getId();
|
||||
}
|
||||
|
||||
@Override public void setMetricId(String metricId) {
|
||||
setId(metricId);
|
||||
}
|
||||
|
||||
public Integer getAlarmType() {
|
||||
|
|
|
|||
|
|
@ -19,14 +19,14 @@
|
|||
package org.apache.skywalking.apm.collector.storage.table.alarm;
|
||||
|
||||
import org.apache.skywalking.apm.collector.core.data.Column;
|
||||
import org.apache.skywalking.apm.collector.core.data.AbstractData;
|
||||
import org.apache.skywalking.apm.collector.core.data.StreamData;
|
||||
import org.apache.skywalking.apm.collector.core.data.operator.CoverOperation;
|
||||
import org.apache.skywalking.apm.collector.core.data.operator.NonOperation;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class ApplicationReferenceAlarm extends AbstractData implements Alarm {
|
||||
public class ApplicationReferenceAlarm extends StreamData implements Alarm {
|
||||
|
||||
private static final Column[] STRING_COLUMNS = {
|
||||
new Column(ApplicationReferenceAlarmTable.COLUMN_ID, new NonOperation()),
|
||||
|
|
@ -50,8 +50,24 @@ public class ApplicationReferenceAlarm extends AbstractData implements Alarm {
|
|||
|
||||
private static final Column[] BYTE_COLUMNS = {};
|
||||
|
||||
public ApplicationReferenceAlarm(String id) {
|
||||
super(id, STRING_COLUMNS, LONG_COLUMNS, DOUBLE_COLUMNS, INTEGER_COLUMNS, BOOLEAN_COLUMNS, BYTE_COLUMNS);
|
||||
public ApplicationReferenceAlarm() {
|
||||
super(STRING_COLUMNS, LONG_COLUMNS, DOUBLE_COLUMNS, INTEGER_COLUMNS, BOOLEAN_COLUMNS, BYTE_COLUMNS);
|
||||
}
|
||||
|
||||
@Override public String getId() {
|
||||
return getDataString(0);
|
||||
}
|
||||
|
||||
@Override public void setId(String id) {
|
||||
setDataString(0, id);
|
||||
}
|
||||
|
||||
@Override public String getMetricId() {
|
||||
return getId();
|
||||
}
|
||||
|
||||
@Override public void setMetricId(String metricId) {
|
||||
setId(metricId);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -19,14 +19,14 @@
|
|||
package org.apache.skywalking.apm.collector.storage.table.alarm;
|
||||
|
||||
import org.apache.skywalking.apm.collector.core.data.Column;
|
||||
import org.apache.skywalking.apm.collector.core.data.AbstractData;
|
||||
import org.apache.skywalking.apm.collector.core.data.StreamData;
|
||||
import org.apache.skywalking.apm.collector.core.data.operator.CoverOperation;
|
||||
import org.apache.skywalking.apm.collector.core.data.operator.NonOperation;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class ApplicationReferenceAlarmList extends AbstractData {
|
||||
public class ApplicationReferenceAlarmList extends StreamData {
|
||||
|
||||
private static final Column[] STRING_COLUMNS = {
|
||||
new Column(ApplicationReferenceAlarmListTable.COLUMN_ID, new NonOperation()),
|
||||
|
|
@ -50,8 +50,24 @@ public class ApplicationReferenceAlarmList extends AbstractData {
|
|||
|
||||
private static final Column[] BYTE_COLUMNS = {};
|
||||
|
||||
public ApplicationReferenceAlarmList(String id) {
|
||||
super(id, STRING_COLUMNS, LONG_COLUMNS, DOUBLE_COLUMNS, INTEGER_COLUMNS, BOOLEAN_COLUMNS, BYTE_COLUMNS);
|
||||
public ApplicationReferenceAlarmList() {
|
||||
super(STRING_COLUMNS, LONG_COLUMNS, DOUBLE_COLUMNS, INTEGER_COLUMNS, BOOLEAN_COLUMNS, BYTE_COLUMNS);
|
||||
}
|
||||
|
||||
@Override public String getId() {
|
||||
return getDataString(0);
|
||||
}
|
||||
|
||||
@Override public void setId(String id) {
|
||||
setDataString(0, id);
|
||||
}
|
||||
|
||||
@Override public String getMetricId() {
|
||||
return getId();
|
||||
}
|
||||
|
||||
@Override public void setMetricId(String metricId) {
|
||||
setId(metricId);
|
||||
}
|
||||
|
||||
public Integer getAlarmType() {
|
||||
|
|
|
|||
|
|
@ -19,14 +19,14 @@
|
|||
package org.apache.skywalking.apm.collector.storage.table.alarm;
|
||||
|
||||
import org.apache.skywalking.apm.collector.core.data.Column;
|
||||
import org.apache.skywalking.apm.collector.core.data.AbstractData;
|
||||
import org.apache.skywalking.apm.collector.core.data.StreamData;
|
||||
import org.apache.skywalking.apm.collector.core.data.operator.CoverOperation;
|
||||
import org.apache.skywalking.apm.collector.core.data.operator.NonOperation;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class InstanceAlarm extends AbstractData implements Alarm {
|
||||
public class InstanceAlarm extends StreamData implements Alarm {
|
||||
|
||||
private static final Column[] STRING_COLUMNS = {
|
||||
new Column(InstanceAlarmTable.COLUMN_ID, new NonOperation()),
|
||||
|
|
@ -50,8 +50,24 @@ public class InstanceAlarm extends AbstractData implements Alarm {
|
|||
|
||||
private static final Column[] BYTE_COLUMNS = {};
|
||||
|
||||
public InstanceAlarm(String id) {
|
||||
super(id, STRING_COLUMNS, LONG_COLUMNS, DOUBLE_COLUMNS, INTEGER_COLUMNS, BOOLEAN_COLUMNS, BYTE_COLUMNS);
|
||||
public InstanceAlarm() {
|
||||
super(STRING_COLUMNS, LONG_COLUMNS, DOUBLE_COLUMNS, INTEGER_COLUMNS, BOOLEAN_COLUMNS, BYTE_COLUMNS);
|
||||
}
|
||||
|
||||
@Override public String getId() {
|
||||
return getDataString(0);
|
||||
}
|
||||
|
||||
@Override public void setId(String id) {
|
||||
setDataString(0, id);
|
||||
}
|
||||
|
||||
@Override public String getMetricId() {
|
||||
return getId();
|
||||
}
|
||||
|
||||
@Override public void setMetricId(String metricId) {
|
||||
setId(metricId);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -19,14 +19,14 @@
|
|||
package org.apache.skywalking.apm.collector.storage.table.alarm;
|
||||
|
||||
import org.apache.skywalking.apm.collector.core.data.Column;
|
||||
import org.apache.skywalking.apm.collector.core.data.AbstractData;
|
||||
import org.apache.skywalking.apm.collector.core.data.StreamData;
|
||||
import org.apache.skywalking.apm.collector.core.data.operator.CoverOperation;
|
||||
import org.apache.skywalking.apm.collector.core.data.operator.NonOperation;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class InstanceAlarmList extends AbstractData {
|
||||
public class InstanceAlarmList extends StreamData {
|
||||
|
||||
private static final Column[] STRING_COLUMNS = {
|
||||
new Column(InstanceAlarmListTable.COLUMN_ID, new NonOperation()),
|
||||
|
|
@ -50,8 +50,24 @@ public class InstanceAlarmList extends AbstractData {
|
|||
|
||||
private static final Column[] BYTE_COLUMNS = {};
|
||||
|
||||
public InstanceAlarmList(String id) {
|
||||
super(id, STRING_COLUMNS, LONG_COLUMNS, DOUBLE_COLUMNS, INTEGER_COLUMNS, BOOLEAN_COLUMNS, BYTE_COLUMNS);
|
||||
public InstanceAlarmList() {
|
||||
super(STRING_COLUMNS, LONG_COLUMNS, DOUBLE_COLUMNS, INTEGER_COLUMNS, BOOLEAN_COLUMNS, BYTE_COLUMNS);
|
||||
}
|
||||
|
||||
@Override public String getId() {
|
||||
return getDataString(0);
|
||||
}
|
||||
|
||||
@Override public void setId(String id) {
|
||||
setDataString(0, id);
|
||||
}
|
||||
|
||||
@Override public String getMetricId() {
|
||||
return getId();
|
||||
}
|
||||
|
||||
@Override public void setMetricId(String metricId) {
|
||||
setId(metricId);
|
||||
}
|
||||
|
||||
public Integer getAlarmType() {
|
||||
|
|
|
|||
|
|
@ -19,14 +19,14 @@
|
|||
package org.apache.skywalking.apm.collector.storage.table.alarm;
|
||||
|
||||
import org.apache.skywalking.apm.collector.core.data.Column;
|
||||
import org.apache.skywalking.apm.collector.core.data.AbstractData;
|
||||
import org.apache.skywalking.apm.collector.core.data.StreamData;
|
||||
import org.apache.skywalking.apm.collector.core.data.operator.CoverOperation;
|
||||
import org.apache.skywalking.apm.collector.core.data.operator.NonOperation;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class InstanceReferenceAlarm extends AbstractData implements Alarm {
|
||||
public class InstanceReferenceAlarm extends StreamData implements Alarm {
|
||||
|
||||
private static final Column[] STRING_COLUMNS = {
|
||||
new Column(InstanceReferenceAlarmTable.COLUMN_ID, new NonOperation()),
|
||||
|
|
@ -52,8 +52,24 @@ public class InstanceReferenceAlarm extends AbstractData implements Alarm {
|
|||
|
||||
private static final Column[] BYTE_COLUMNS = {};
|
||||
|
||||
public InstanceReferenceAlarm(String id) {
|
||||
super(id, STRING_COLUMNS, LONG_COLUMNS, DOUBLE_COLUMNS, INTEGER_COLUMNS, BOOLEAN_COLUMNS, BYTE_COLUMNS);
|
||||
public InstanceReferenceAlarm() {
|
||||
super(STRING_COLUMNS, LONG_COLUMNS, DOUBLE_COLUMNS, INTEGER_COLUMNS, BOOLEAN_COLUMNS, BYTE_COLUMNS);
|
||||
}
|
||||
|
||||
@Override public String getId() {
|
||||
return getDataString(0);
|
||||
}
|
||||
|
||||
@Override public void setId(String id) {
|
||||
setDataString(0, id);
|
||||
}
|
||||
|
||||
@Override public String getMetricId() {
|
||||
return getId();
|
||||
}
|
||||
|
||||
@Override public void setMetricId(String metricId) {
|
||||
setId(metricId);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -19,14 +19,14 @@
|
|||
package org.apache.skywalking.apm.collector.storage.table.alarm;
|
||||
|
||||
import org.apache.skywalking.apm.collector.core.data.Column;
|
||||
import org.apache.skywalking.apm.collector.core.data.AbstractData;
|
||||
import org.apache.skywalking.apm.collector.core.data.StreamData;
|
||||
import org.apache.skywalking.apm.collector.core.data.operator.CoverOperation;
|
||||
import org.apache.skywalking.apm.collector.core.data.operator.NonOperation;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class InstanceReferenceAlarmList extends AbstractData {
|
||||
public class InstanceReferenceAlarmList extends StreamData {
|
||||
|
||||
private static final Column[] STRING_COLUMNS = {
|
||||
new Column(InstanceReferenceAlarmListTable.COLUMN_ID, new NonOperation()),
|
||||
|
|
@ -52,8 +52,24 @@ public class InstanceReferenceAlarmList extends AbstractData {
|
|||
|
||||
private static final Column[] BYTE_COLUMNS = {};
|
||||
|
||||
public InstanceReferenceAlarmList(String id) {
|
||||
super(id, STRING_COLUMNS, LONG_COLUMNS, DOUBLE_COLUMNS, INTEGER_COLUMNS, BOOLEAN_COLUMNS, BYTE_COLUMNS);
|
||||
public InstanceReferenceAlarmList() {
|
||||
super(STRING_COLUMNS, LONG_COLUMNS, DOUBLE_COLUMNS, INTEGER_COLUMNS, BOOLEAN_COLUMNS, BYTE_COLUMNS);
|
||||
}
|
||||
|
||||
@Override public String getId() {
|
||||
return getDataString(0);
|
||||
}
|
||||
|
||||
@Override public void setId(String id) {
|
||||
setDataString(0, id);
|
||||
}
|
||||
|
||||
@Override public String getMetricId() {
|
||||
return getId();
|
||||
}
|
||||
|
||||
@Override public void setMetricId(String metricId) {
|
||||
setId(metricId);
|
||||
}
|
||||
|
||||
public Integer getAlarmType() {
|
||||
|
|
|
|||
|
|
@ -19,14 +19,14 @@
|
|||
package org.apache.skywalking.apm.collector.storage.table.alarm;
|
||||
|
||||
import org.apache.skywalking.apm.collector.core.data.Column;
|
||||
import org.apache.skywalking.apm.collector.core.data.AbstractData;
|
||||
import org.apache.skywalking.apm.collector.core.data.StreamData;
|
||||
import org.apache.skywalking.apm.collector.core.data.operator.CoverOperation;
|
||||
import org.apache.skywalking.apm.collector.core.data.operator.NonOperation;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class ServiceAlarm extends AbstractData implements Alarm {
|
||||
public class ServiceAlarm extends StreamData implements Alarm {
|
||||
|
||||
private static final Column[] STRING_COLUMNS = {
|
||||
new Column(ServiceAlarmTable.COLUMN_ID, new NonOperation()),
|
||||
|
|
@ -51,8 +51,24 @@ public class ServiceAlarm extends AbstractData implements Alarm {
|
|||
|
||||
private static final Column[] BYTE_COLUMNS = {};
|
||||
|
||||
public ServiceAlarm(String id) {
|
||||
super(id, STRING_COLUMNS, LONG_COLUMNS, DOUBLE_COLUMNS, INTEGER_COLUMNS, BOOLEAN_COLUMNS, BYTE_COLUMNS);
|
||||
public ServiceAlarm() {
|
||||
super(STRING_COLUMNS, LONG_COLUMNS, DOUBLE_COLUMNS, INTEGER_COLUMNS, BOOLEAN_COLUMNS, BYTE_COLUMNS);
|
||||
}
|
||||
|
||||
@Override public String getId() {
|
||||
return getDataString(0);
|
||||
}
|
||||
|
||||
@Override public void setId(String id) {
|
||||
setDataString(0, id);
|
||||
}
|
||||
|
||||
@Override public String getMetricId() {
|
||||
return getId();
|
||||
}
|
||||
|
||||
@Override public void setMetricId(String metricId) {
|
||||
setId(metricId);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -19,14 +19,14 @@
|
|||
package org.apache.skywalking.apm.collector.storage.table.alarm;
|
||||
|
||||
import org.apache.skywalking.apm.collector.core.data.Column;
|
||||
import org.apache.skywalking.apm.collector.core.data.AbstractData;
|
||||
import org.apache.skywalking.apm.collector.core.data.StreamData;
|
||||
import org.apache.skywalking.apm.collector.core.data.operator.CoverOperation;
|
||||
import org.apache.skywalking.apm.collector.core.data.operator.NonOperation;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class ServiceAlarmList extends AbstractData {
|
||||
public class ServiceAlarmList extends StreamData {
|
||||
|
||||
private static final Column[] STRING_COLUMNS = {
|
||||
new Column(ServiceAlarmListTable.COLUMN_ID, new NonOperation()),
|
||||
|
|
@ -51,8 +51,24 @@ public class ServiceAlarmList extends AbstractData {
|
|||
|
||||
private static final Column[] BYTE_COLUMNS = {};
|
||||
|
||||
public ServiceAlarmList(String id) {
|
||||
super(id, STRING_COLUMNS, LONG_COLUMNS, DOUBLE_COLUMNS, INTEGER_COLUMNS, BOOLEAN_COLUMNS, BYTE_COLUMNS);
|
||||
public ServiceAlarmList() {
|
||||
super(STRING_COLUMNS, LONG_COLUMNS, DOUBLE_COLUMNS, INTEGER_COLUMNS, BOOLEAN_COLUMNS, BYTE_COLUMNS);
|
||||
}
|
||||
|
||||
@Override public String getId() {
|
||||
return getDataString(0);
|
||||
}
|
||||
|
||||
@Override public void setId(String id) {
|
||||
setDataString(0, id);
|
||||
}
|
||||
|
||||
@Override public String getMetricId() {
|
||||
return getId();
|
||||
}
|
||||
|
||||
@Override public void setMetricId(String metricId) {
|
||||
setId(metricId);
|
||||
}
|
||||
|
||||
public Integer getAlarmType() {
|
||||
|
|
|
|||
|
|
@ -19,14 +19,14 @@
|
|||
package org.apache.skywalking.apm.collector.storage.table.alarm;
|
||||
|
||||
import org.apache.skywalking.apm.collector.core.data.Column;
|
||||
import org.apache.skywalking.apm.collector.core.data.AbstractData;
|
||||
import org.apache.skywalking.apm.collector.core.data.StreamData;
|
||||
import org.apache.skywalking.apm.collector.core.data.operator.CoverOperation;
|
||||
import org.apache.skywalking.apm.collector.core.data.operator.NonOperation;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class ServiceReferenceAlarm extends AbstractData implements Alarm {
|
||||
public class ServiceReferenceAlarm extends StreamData implements Alarm {
|
||||
|
||||
private static final Column[] STRING_COLUMNS = {
|
||||
new Column(ServiceReferenceAlarmTable.COLUMN_ID, new NonOperation()),
|
||||
|
|
@ -54,8 +54,24 @@ public class ServiceReferenceAlarm extends AbstractData implements Alarm {
|
|||
|
||||
private static final Column[] BYTE_COLUMNS = {};
|
||||
|
||||
public ServiceReferenceAlarm(String id) {
|
||||
super(id, STRING_COLUMNS, LONG_COLUMNS, DOUBLE_COLUMNS, INTEGER_COLUMNS, BOOLEAN_COLUMNS, BYTE_COLUMNS);
|
||||
public ServiceReferenceAlarm() {
|
||||
super(STRING_COLUMNS, LONG_COLUMNS, DOUBLE_COLUMNS, INTEGER_COLUMNS, BOOLEAN_COLUMNS, BYTE_COLUMNS);
|
||||
}
|
||||
|
||||
@Override public String getId() {
|
||||
return getDataString(0);
|
||||
}
|
||||
|
||||
@Override public void setId(String id) {
|
||||
setDataString(0, id);
|
||||
}
|
||||
|
||||
@Override public String getMetricId() {
|
||||
return getId();
|
||||
}
|
||||
|
||||
@Override public void setMetricId(String metricId) {
|
||||
setId(metricId);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -19,14 +19,14 @@
|
|||
package org.apache.skywalking.apm.collector.storage.table.alarm;
|
||||
|
||||
import org.apache.skywalking.apm.collector.core.data.Column;
|
||||
import org.apache.skywalking.apm.collector.core.data.AbstractData;
|
||||
import org.apache.skywalking.apm.collector.core.data.StreamData;
|
||||
import org.apache.skywalking.apm.collector.core.data.operator.CoverOperation;
|
||||
import org.apache.skywalking.apm.collector.core.data.operator.NonOperation;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class ServiceReferenceAlarmList extends AbstractData {
|
||||
public class ServiceReferenceAlarmList extends StreamData {
|
||||
|
||||
private static final Column[] STRING_COLUMNS = {
|
||||
new Column(ServiceReferenceAlarmListTable.COLUMN_ID, new NonOperation()),
|
||||
|
|
@ -54,8 +54,24 @@ public class ServiceReferenceAlarmList extends AbstractData {
|
|||
|
||||
private static final Column[] BYTE_COLUMNS = {};
|
||||
|
||||
public ServiceReferenceAlarmList(String id) {
|
||||
super(id, STRING_COLUMNS, LONG_COLUMNS, DOUBLE_COLUMNS, INTEGER_COLUMNS, BOOLEAN_COLUMNS, BYTE_COLUMNS);
|
||||
public ServiceReferenceAlarmList() {
|
||||
super(STRING_COLUMNS, LONG_COLUMNS, DOUBLE_COLUMNS, INTEGER_COLUMNS, BOOLEAN_COLUMNS, BYTE_COLUMNS);
|
||||
}
|
||||
|
||||
@Override public String getId() {
|
||||
return getDataString(0);
|
||||
}
|
||||
|
||||
@Override public void setId(String id) {
|
||||
setDataString(0, id);
|
||||
}
|
||||
|
||||
@Override public String getMetricId() {
|
||||
return getId();
|
||||
}
|
||||
|
||||
@Override public void setMetricId(String metricId) {
|
||||
setId(metricId);
|
||||
}
|
||||
|
||||
public Integer getAlarmType() {
|
||||
|
|
|
|||
|
|
@ -19,14 +19,14 @@
|
|||
package org.apache.skywalking.apm.collector.storage.table.register;
|
||||
|
||||
import org.apache.skywalking.apm.collector.core.data.Column;
|
||||
import org.apache.skywalking.apm.collector.core.data.RegisterData;
|
||||
import org.apache.skywalking.apm.collector.core.data.StreamData;
|
||||
import org.apache.skywalking.apm.collector.core.data.operator.CoverOperation;
|
||||
import org.apache.skywalking.apm.collector.core.data.operator.NonOperation;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class Application extends RegisterData {
|
||||
public class Application extends StreamData {
|
||||
|
||||
private static final Column[] STRING_COLUMNS = {
|
||||
new Column(ApplicationTable.COLUMN_ID, new NonOperation()),
|
||||
|
|
@ -60,6 +60,14 @@ public class Application extends RegisterData {
|
|||
setDataString(0, id);
|
||||
}
|
||||
|
||||
@Override public String getMetricId() {
|
||||
return getId();
|
||||
}
|
||||
|
||||
@Override public void setMetricId(String metricId) {
|
||||
setId(metricId);
|
||||
}
|
||||
|
||||
public String getApplicationCode() {
|
||||
return getDataString(1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,14 +19,14 @@
|
|||
package org.apache.skywalking.apm.collector.storage.table.register;
|
||||
|
||||
import org.apache.skywalking.apm.collector.core.data.Column;
|
||||
import org.apache.skywalking.apm.collector.core.data.RegisterData;
|
||||
import org.apache.skywalking.apm.collector.core.data.StreamData;
|
||||
import org.apache.skywalking.apm.collector.core.data.operator.CoverOperation;
|
||||
import org.apache.skywalking.apm.collector.core.data.operator.NonOperation;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class Instance extends RegisterData {
|
||||
public class Instance extends StreamData {
|
||||
|
||||
private static final Column[] STRING_COLUMNS = {
|
||||
new Column(InstanceTable.COLUMN_ID, new NonOperation()),
|
||||
|
|
@ -65,6 +65,14 @@ public class Instance extends RegisterData {
|
|||
setDataString(0, id);
|
||||
}
|
||||
|
||||
@Override public String getMetricId() {
|
||||
return getId();
|
||||
}
|
||||
|
||||
@Override public void setMetricId(String metricId) {
|
||||
setId(metricId);
|
||||
}
|
||||
|
||||
public int getApplicationId() {
|
||||
return getDataInteger(0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,13 +19,13 @@
|
|||
package org.apache.skywalking.apm.collector.storage.table.register;
|
||||
|
||||
import org.apache.skywalking.apm.collector.core.data.Column;
|
||||
import org.apache.skywalking.apm.collector.core.data.RegisterData;
|
||||
import org.apache.skywalking.apm.collector.core.data.StreamData;
|
||||
import org.apache.skywalking.apm.collector.core.data.operator.NonOperation;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class NetworkAddress extends RegisterData {
|
||||
public class NetworkAddress extends StreamData {
|
||||
|
||||
private static final Column[] STRING_COLUMNS = {
|
||||
new Column(NetworkAddressTable.COLUMN_ID, new NonOperation()),
|
||||
|
|
@ -57,6 +57,14 @@ public class NetworkAddress extends RegisterData {
|
|||
setDataString(0, id);
|
||||
}
|
||||
|
||||
@Override public String getMetricId() {
|
||||
return getId();
|
||||
}
|
||||
|
||||
@Override public void setMetricId(String metricId) {
|
||||
setId(metricId);
|
||||
}
|
||||
|
||||
public String getNetworkAddress() {
|
||||
return getDataString(1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,14 +19,14 @@
|
|||
package org.apache.skywalking.apm.collector.storage.table.register;
|
||||
|
||||
import org.apache.skywalking.apm.collector.core.data.Column;
|
||||
import org.apache.skywalking.apm.collector.core.data.RegisterData;
|
||||
import org.apache.skywalking.apm.collector.core.data.StreamData;
|
||||
import org.apache.skywalking.apm.collector.core.data.operator.CoverOperation;
|
||||
import org.apache.skywalking.apm.collector.core.data.operator.NonOperation;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class ServiceName extends RegisterData {
|
||||
public class ServiceName extends StreamData {
|
||||
|
||||
private static final Column[] STRING_COLUMNS = {
|
||||
new Column(ServiceNameTable.COLUMN_ID, new NonOperation()),
|
||||
|
|
@ -55,6 +55,14 @@ public class ServiceName extends RegisterData {
|
|||
setDataString(0, id);
|
||||
}
|
||||
|
||||
@Override public String getMetricId() {
|
||||
return getId();
|
||||
}
|
||||
|
||||
@Override public void setMetricId(String metricId) {
|
||||
setId(metricId);
|
||||
}
|
||||
|
||||
public String getServiceName() {
|
||||
return getDataString(1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@ public class ServiceMetric extends StreamData implements Metric {
|
|||
|
||||
private static final Column[] STRING_COLUMNS = {
|
||||
new Column(ServiceMetricTable.COLUMN_ID, new NonOperation()),
|
||||
new Column(ServiceMetricTable.COLUMN_METRIC_ID, new NonOperation()),
|
||||
};
|
||||
|
||||
private static final Column[] LONG_COLUMNS = {
|
||||
|
|
@ -77,11 +76,11 @@ public class ServiceMetric extends StreamData implements Metric {
|
|||
}
|
||||
|
||||
@Override public String getMetricId() {
|
||||
return getDataString(1);
|
||||
return getId();
|
||||
}
|
||||
|
||||
@Override public void setMetricId(String metricId) {
|
||||
setDataString(1, metricId);
|
||||
setId(metricId);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -48,7 +48,9 @@ public class ApplicationAlarmEsPersistenceDAO extends EsDAO implements IApplicat
|
|||
@Override public ApplicationAlarm get(String id) {
|
||||
GetResponse getResponse = getClient().prepareGet(ApplicationAlarmTable.TABLE, id).get();
|
||||
if (getResponse.isExists()) {
|
||||
ApplicationAlarm instanceAlarm = new ApplicationAlarm(id);
|
||||
ApplicationAlarm instanceAlarm = new ApplicationAlarm();
|
||||
instanceAlarm.setId(id);
|
||||
|
||||
Map<String, Object> source = getResponse.getSource();
|
||||
instanceAlarm.setApplicationId(((Number)source.get(ApplicationAlarmTable.COLUMN_APPLICATION_ID)).intValue());
|
||||
instanceAlarm.setSourceValue(((Number)source.get(ApplicationAlarmTable.COLUMN_SOURCE_VALUE)).intValue());
|
||||
|
|
|
|||
|
|
@ -48,7 +48,8 @@ public class ApplicationAlarmListEsPersistenceDAO extends EsDAO implements IAppl
|
|||
@Override public ApplicationAlarmList get(String id) {
|
||||
GetResponse getResponse = getClient().prepareGet(ApplicationAlarmListTable.TABLE, id).get();
|
||||
if (getResponse.isExists()) {
|
||||
ApplicationAlarmList applicationAlarmList = new ApplicationAlarmList(id);
|
||||
ApplicationAlarmList applicationAlarmList = new ApplicationAlarmList();
|
||||
applicationAlarmList.setId(id);
|
||||
Map<String, Object> source = getResponse.getSource();
|
||||
applicationAlarmList.setApplicationId(((Number)source.get(ApplicationAlarmListTable.COLUMN_APPLICATION_ID)).intValue());
|
||||
applicationAlarmList.setSourceValue(((Number)source.get(ApplicationAlarmListTable.COLUMN_SOURCE_VALUE)).intValue());
|
||||
|
|
|
|||
|
|
@ -48,7 +48,8 @@ public class ApplicationReferenceAlarmEsPersistenceDAO extends EsDAO implements
|
|||
@Override public ApplicationReferenceAlarm get(String id) {
|
||||
GetResponse getResponse = getClient().prepareGet(ApplicationReferenceAlarmTable.TABLE, id).get();
|
||||
if (getResponse.isExists()) {
|
||||
ApplicationReferenceAlarm applicationReferenceAlarm = new ApplicationReferenceAlarm(id);
|
||||
ApplicationReferenceAlarm applicationReferenceAlarm = new ApplicationReferenceAlarm();
|
||||
applicationReferenceAlarm.setId(id);
|
||||
Map<String, Object> source = getResponse.getSource();
|
||||
applicationReferenceAlarm.setFrontApplicationId(((Number)source.get(ApplicationReferenceAlarmTable.COLUMN_FRONT_APPLICATION_ID)).intValue());
|
||||
applicationReferenceAlarm.setBehindApplicationId(((Number)source.get(ApplicationReferenceAlarmTable.COLUMN_BEHIND_APPLICATION_ID)).intValue());
|
||||
|
|
|
|||
|
|
@ -48,7 +48,8 @@ public class ApplicationReferenceAlarmListEsPersistenceDAO extends EsDAO impleme
|
|||
@Override public ApplicationReferenceAlarmList get(String id) {
|
||||
GetResponse getResponse = getClient().prepareGet(ApplicationReferenceAlarmListTable.TABLE, id).get();
|
||||
if (getResponse.isExists()) {
|
||||
ApplicationReferenceAlarmList applicationReferenceAlarmList = new ApplicationReferenceAlarmList(id);
|
||||
ApplicationReferenceAlarmList applicationReferenceAlarmList = new ApplicationReferenceAlarmList();
|
||||
applicationReferenceAlarmList.setId(id);
|
||||
Map<String, Object> source = getResponse.getSource();
|
||||
applicationReferenceAlarmList.setFrontApplicationId(((Number)source.get(ApplicationReferenceAlarmListTable.COLUMN_FRONT_APPLICATION_ID)).intValue());
|
||||
applicationReferenceAlarmList.setBehindApplicationId(((Number)source.get(ApplicationReferenceAlarmListTable.COLUMN_BEHIND_APPLICATION_ID)).intValue());
|
||||
|
|
|
|||
|
|
@ -48,7 +48,8 @@ public class InstanceAlarmEsPersistenceDAO extends EsDAO implements IInstanceAla
|
|||
@Override public InstanceAlarm get(String id) {
|
||||
GetResponse getResponse = getClient().prepareGet(InstanceAlarmTable.TABLE, id).get();
|
||||
if (getResponse.isExists()) {
|
||||
InstanceAlarm instanceAlarm = new InstanceAlarm(id);
|
||||
InstanceAlarm instanceAlarm = new InstanceAlarm();
|
||||
instanceAlarm.setId(id);
|
||||
Map<String, Object> source = getResponse.getSource();
|
||||
instanceAlarm.setApplicationId(((Number)source.get(InstanceAlarmTable.COLUMN_APPLICATION_ID)).intValue());
|
||||
instanceAlarm.setInstanceId(((Number)source.get(InstanceAlarmTable.COLUMN_INSTANCE_ID)).intValue());
|
||||
|
|
|
|||
|
|
@ -48,7 +48,8 @@ public class InstanceAlarmListEsPersistenceDAO extends EsDAO implements IInstanc
|
|||
@Override public InstanceAlarmList get(String id) {
|
||||
GetResponse getResponse = getClient().prepareGet(InstanceAlarmListTable.TABLE, id).get();
|
||||
if (getResponse.isExists()) {
|
||||
InstanceAlarmList instanceAlarmList = new InstanceAlarmList(id);
|
||||
InstanceAlarmList instanceAlarmList = new InstanceAlarmList();
|
||||
instanceAlarmList.setId(id);
|
||||
Map<String, Object> source = getResponse.getSource();
|
||||
instanceAlarmList.setApplicationId(((Number)source.get(InstanceAlarmListTable.COLUMN_APPLICATION_ID)).intValue());
|
||||
instanceAlarmList.setInstanceId(((Number)source.get(InstanceAlarmListTable.COLUMN_INSTANCE_ID)).intValue());
|
||||
|
|
|
|||
|
|
@ -128,7 +128,8 @@ public class InstanceEsUIDAO extends EsDAO implements IInstanceUIDAO {
|
|||
GetRequestBuilder requestBuilder = getClient().prepareGet(InstanceTable.TABLE, String.valueOf(instanceId));
|
||||
GetResponse getResponse = requestBuilder.get();
|
||||
if (getResponse.isExists()) {
|
||||
Instance instance = new Instance(getResponse.getId());
|
||||
Instance instance = new Instance();
|
||||
instance.setId(getResponse.getId());
|
||||
instance.setApplicationId(((Number)getResponse.getSource().get(InstanceTable.COLUMN_APPLICATION_ID)).intValue());
|
||||
instance.setAgentUUID((String)getResponse.getSource().get(InstanceTable.COLUMN_AGENT_UUID));
|
||||
instance.setRegisterTime(((Number)getResponse.getSource().get(InstanceTable.COLUMN_REGISTER_TIME)).longValue());
|
||||
|
|
@ -156,7 +157,8 @@ public class InstanceEsUIDAO extends EsDAO implements IInstanceUIDAO {
|
|||
|
||||
List<Instance> instanceList = new LinkedList<>();
|
||||
for (SearchHit searchHit : searchHits) {
|
||||
Instance instance = new Instance(searchHit.getId());
|
||||
Instance instance = new Instance();
|
||||
instance.setId(searchHit.getId());
|
||||
instance.setApplicationId(((Number)searchHit.getSource().get(InstanceTable.COLUMN_APPLICATION_ID)).intValue());
|
||||
instance.setHeartBeatTime(((Number)searchHit.getSource().get(InstanceTable.COLUMN_HEARTBEAT_TIME)).longValue());
|
||||
instance.setInstanceId(((Number)searchHit.getSource().get(InstanceTable.COLUMN_INSTANCE_ID)).intValue());
|
||||
|
|
|
|||
|
|
@ -46,7 +46,8 @@ public class InstanceHeartBeatEsPersistenceDAO extends EsDAO implements IInstanc
|
|||
@Override public Instance get(String id) {
|
||||
GetResponse getResponse = getClient().prepareGet(InstanceTable.TABLE, id).get();
|
||||
if (getResponse.isExists()) {
|
||||
Instance instance = new Instance(id);
|
||||
Instance instance = new Instance();
|
||||
instance.setId(id);
|
||||
Map<String, Object> source = getResponse.getSource();
|
||||
instance.setInstanceId((Integer)source.get(InstanceTable.COLUMN_INSTANCE_ID));
|
||||
instance.setHeartBeatTime((Long)source.get(InstanceTable.COLUMN_HEARTBEAT_TIME));
|
||||
|
|
|
|||
|
|
@ -48,7 +48,8 @@ public class InstanceReferenceAlarmEsPersistenceDAO extends EsDAO implements IIn
|
|||
@Override public InstanceReferenceAlarm get(String id) {
|
||||
GetResponse getResponse = getClient().prepareGet(InstanceReferenceAlarmTable.TABLE, id).get();
|
||||
if (getResponse.isExists()) {
|
||||
InstanceReferenceAlarm instanceReferenceAlarm = new InstanceReferenceAlarm(id);
|
||||
InstanceReferenceAlarm instanceReferenceAlarm = new InstanceReferenceAlarm();
|
||||
instanceReferenceAlarm.setId(id);
|
||||
Map<String, Object> source = getResponse.getSource();
|
||||
instanceReferenceAlarm.setFrontApplicationId(((Number)source.get(InstanceReferenceAlarmTable.COLUMN_FRONT_APPLICATION_ID)).intValue());
|
||||
instanceReferenceAlarm.setBehindApplicationId(((Number)source.get(InstanceReferenceAlarmTable.COLUMN_BEHIND_APPLICATION_ID)).intValue());
|
||||
|
|
|
|||
|
|
@ -48,7 +48,8 @@ public class InstanceReferenceAlarmListEsPersistenceDAO extends EsDAO implements
|
|||
@Override public InstanceReferenceAlarmList get(String id) {
|
||||
GetResponse getResponse = getClient().prepareGet(InstanceReferenceAlarmListTable.TABLE, id).get();
|
||||
if (getResponse.isExists()) {
|
||||
InstanceReferenceAlarmList serviceReferenceAlarmList = new InstanceReferenceAlarmList(id);
|
||||
InstanceReferenceAlarmList serviceReferenceAlarmList = new InstanceReferenceAlarmList();
|
||||
serviceReferenceAlarmList.setId(id);
|
||||
Map<String, Object> source = getResponse.getSource();
|
||||
serviceReferenceAlarmList.setFrontApplicationId(((Number)source.get(InstanceReferenceAlarmListTable.COLUMN_FRONT_APPLICATION_ID)).intValue());
|
||||
serviceReferenceAlarmList.setBehindApplicationId(((Number)source.get(InstanceReferenceAlarmListTable.COLUMN_BEHIND_APPLICATION_ID)).intValue());
|
||||
|
|
|
|||
|
|
@ -48,7 +48,8 @@ public class ServiceAlarmEsPersistenceDAO extends EsDAO implements IServiceAlarm
|
|||
@Override public ServiceAlarm get(String id) {
|
||||
GetResponse getResponse = getClient().prepareGet(ServiceAlarmTable.TABLE, id).get();
|
||||
if (getResponse.isExists()) {
|
||||
ServiceAlarm serviceAlarm = new ServiceAlarm(id);
|
||||
ServiceAlarm serviceAlarm = new ServiceAlarm();
|
||||
serviceAlarm.setId(id);
|
||||
Map<String, Object> source = getResponse.getSource();
|
||||
serviceAlarm.setApplicationId(((Number)source.get(ServiceAlarmTable.COLUMN_APPLICATION_ID)).intValue());
|
||||
serviceAlarm.setInstanceId(((Number)source.get(ServiceAlarmTable.COLUMN_INSTANCE_ID)).intValue());
|
||||
|
|
|
|||
|
|
@ -48,7 +48,8 @@ public class ServiceAlarmListEsPersistenceDAO extends EsDAO implements IServiceA
|
|||
@Override public ServiceAlarmList get(String id) {
|
||||
GetResponse getResponse = getClient().prepareGet(ServiceAlarmListTable.TABLE, id).get();
|
||||
if (getResponse.isExists()) {
|
||||
ServiceAlarmList serviceAlarmList = new ServiceAlarmList(id);
|
||||
ServiceAlarmList serviceAlarmList = new ServiceAlarmList();
|
||||
serviceAlarmList.setId(id);
|
||||
Map<String, Object> source = getResponse.getSource();
|
||||
serviceAlarmList.setApplicationId(((Number)source.get(ServiceAlarmListTable.COLUMN_APPLICATION_ID)).intValue());
|
||||
serviceAlarmList.setInstanceId(((Number)source.get(ServiceAlarmListTable.COLUMN_INSTANCE_ID)).intValue());
|
||||
|
|
|
|||
|
|
@ -48,7 +48,8 @@ public class ServiceReferenceAlarmEsPersistenceDAO extends EsDAO implements ISer
|
|||
@Override public ServiceReferenceAlarm get(String id) {
|
||||
GetResponse getResponse = getClient().prepareGet(ServiceReferenceAlarmTable.TABLE, id).get();
|
||||
if (getResponse.isExists()) {
|
||||
ServiceReferenceAlarm serviceReferenceAlarm = new ServiceReferenceAlarm(id);
|
||||
ServiceReferenceAlarm serviceReferenceAlarm = new ServiceReferenceAlarm();
|
||||
serviceReferenceAlarm.setId(id);
|
||||
Map<String, Object> source = getResponse.getSource();
|
||||
serviceReferenceAlarm.setFrontApplicationId(((Number)source.get(ServiceReferenceAlarmTable.COLUMN_FRONT_APPLICATION_ID)).intValue());
|
||||
serviceReferenceAlarm.setBehindApplicationId(((Number)source.get(ServiceReferenceAlarmTable.COLUMN_BEHIND_APPLICATION_ID)).intValue());
|
||||
|
|
|
|||
|
|
@ -48,7 +48,8 @@ public class ServiceReferenceAlarmListEsPersistenceDAO extends EsDAO implements
|
|||
@Override public ServiceReferenceAlarmList get(String id) {
|
||||
GetResponse getResponse = getClient().prepareGet(ServiceReferenceAlarmListTable.TABLE, id).get();
|
||||
if (getResponse.isExists()) {
|
||||
ServiceReferenceAlarmList serviceReferenceAlarmList = new ServiceReferenceAlarmList(id);
|
||||
ServiceReferenceAlarmList serviceReferenceAlarmList = new ServiceReferenceAlarmList();
|
||||
serviceReferenceAlarmList.setId(id);
|
||||
Map<String, Object> source = getResponse.getSource();
|
||||
serviceReferenceAlarmList.setFrontApplicationId(((Number)source.get(ServiceReferenceAlarmListTable.COLUMN_FRONT_APPLICATION_ID)).intValue());
|
||||
serviceReferenceAlarmList.setBehindApplicationId(((Number)source.get(ServiceReferenceAlarmListTable.COLUMN_BEHIND_APPLICATION_ID)).intValue());
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
package org.apache.skywalking.apm.collector.storage.h2.dao;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
|
|
@ -26,13 +25,13 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.apache.skywalking.apm.collector.client.h2.H2Client;
|
||||
import org.apache.skywalking.apm.collector.client.h2.H2ClientException;
|
||||
import org.apache.skywalking.apm.collector.storage.base.sql.SqlBuilder;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.acp.IApplicationComponentMinutePersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.h2.base.dao.H2DAO;
|
||||
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2SqlEntity;
|
||||
import org.apache.skywalking.apm.collector.storage.table.application.ApplicationComponentTable;
|
||||
import org.apache.skywalking.apm.collector.client.h2.H2ClientException;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.acp.IApplicationComponentMinutePersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.table.application.ApplicationComponent;
|
||||
import org.apache.skywalking.apm.collector.storage.table.application.ApplicationComponentTable;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
|
@ -54,7 +53,8 @@ public class ApplicationComponentH2MinutePersistenceDAO extends H2DAO implements
|
|||
Object[] params = new Object[] {id};
|
||||
try (ResultSet rs = client.executeQuery(sql, params)) {
|
||||
if (rs.next()) {
|
||||
ApplicationComponent applicationComponent = new ApplicationComponent(id);
|
||||
ApplicationComponent applicationComponent = new ApplicationComponent();
|
||||
applicationComponent.setId(id);
|
||||
applicationComponent.setComponentId(rs.getInt(ApplicationComponentTable.COLUMN_COMPONENT_ID));
|
||||
applicationComponent.setPeerId(rs.getInt(ApplicationComponentTable.COLUMN_PEER_ID));
|
||||
applicationComponent.setTimeBucket(rs.getLong(ApplicationComponentTable.COLUMN_TIME_BUCKET));
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
package org.apache.skywalking.apm.collector.storage.h2.dao;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
|
|
@ -26,13 +25,13 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.apache.skywalking.apm.collector.client.h2.H2Client;
|
||||
import org.apache.skywalking.apm.collector.client.h2.H2ClientException;
|
||||
import org.apache.skywalking.apm.collector.storage.base.sql.SqlBuilder;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.ampp.IApplicationMappingMinutePersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.h2.base.dao.H2DAO;
|
||||
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2SqlEntity;
|
||||
import org.apache.skywalking.apm.collector.storage.table.application.ApplicationMapping;
|
||||
import org.apache.skywalking.apm.collector.storage.table.application.ApplicationMappingTable;
|
||||
import org.apache.skywalking.apm.collector.client.h2.H2ClientException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
|
@ -54,7 +53,8 @@ public class ApplicationMappingH2MinutePersistenceDAO extends H2DAO implements I
|
|||
Object[] params = new Object[] {id};
|
||||
try (ResultSet rs = client.executeQuery(sql, params)) {
|
||||
if (rs.next()) {
|
||||
ApplicationMapping applicationMapping = new ApplicationMapping(id);
|
||||
ApplicationMapping applicationMapping = new ApplicationMapping();
|
||||
applicationMapping.setId(id);
|
||||
applicationMapping.setApplicationId(rs.getInt(ApplicationMappingTable.COLUMN_APPLICATION_ID));
|
||||
applicationMapping.setAddressId(rs.getInt(ApplicationMappingTable.COLUMN_ADDRESS_ID));
|
||||
applicationMapping.setTimeBucket(rs.getLong(ApplicationMappingTable.COLUMN_TIME_BUCKET));
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
package org.apache.skywalking.apm.collector.storage.h2.dao;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
|
|
@ -26,13 +25,13 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.apache.skywalking.apm.collector.client.h2.H2Client;
|
||||
import org.apache.skywalking.apm.collector.client.h2.H2ClientException;
|
||||
import org.apache.skywalking.apm.collector.storage.base.sql.SqlBuilder;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.amp.IApplicationMinuteMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.h2.base.dao.H2DAO;
|
||||
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2SqlEntity;
|
||||
import org.apache.skywalking.apm.collector.storage.table.application.ApplicationMetric;
|
||||
import org.apache.skywalking.apm.collector.storage.table.application.ApplicationMetricTable;
|
||||
import org.apache.skywalking.apm.collector.client.h2.H2ClientException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
|
@ -54,7 +53,8 @@ public class ApplicationMinuteMetricH2PersistenceDAO extends H2DAO implements IA
|
|||
Object[] params = new Object[] {id};
|
||||
try (ResultSet rs = client.executeQuery(sql, params)) {
|
||||
if (rs.next()) {
|
||||
ApplicationMetric applicationMetric = new ApplicationMetric(id);
|
||||
ApplicationMetric applicationMetric = new ApplicationMetric();
|
||||
applicationMetric.setId(id);
|
||||
applicationMetric.setApplicationId(rs.getInt(ApplicationMetricTable.COLUMN_APPLICATION_ID));
|
||||
|
||||
applicationMetric.setTransactionCalls(rs.getLong(ApplicationMetricTable.COLUMN_TRANSACTION_CALLS));
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
package org.apache.skywalking.apm.collector.storage.h2.dao;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
|
|
@ -25,14 +24,14 @@ import java.util.ArrayList;
|
|||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.apache.skywalking.apm.collector.storage.base.sql.SqlBuilder;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.armp.IApplicationReferenceMinuteMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2SqlEntity;
|
||||
import org.apache.skywalking.apm.collector.storage.table.application.ApplicationReferenceMetricTable;
|
||||
import org.apache.skywalking.apm.collector.client.h2.H2Client;
|
||||
import org.apache.skywalking.apm.collector.client.h2.H2ClientException;
|
||||
import org.apache.skywalking.apm.collector.storage.base.sql.SqlBuilder;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.armp.IApplicationReferenceMinuteMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.h2.base.dao.H2DAO;
|
||||
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2SqlEntity;
|
||||
import org.apache.skywalking.apm.collector.storage.table.application.ApplicationReferenceMetric;
|
||||
import org.apache.skywalking.apm.collector.storage.table.application.ApplicationReferenceMetricTable;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
|
@ -54,7 +53,8 @@ public class ApplicationReferenceMinuteMetricH2PersistenceDAO extends H2DAO impl
|
|||
Object[] params = new Object[] {id};
|
||||
try (ResultSet rs = client.executeQuery(sql, params)) {
|
||||
if (rs.next()) {
|
||||
ApplicationReferenceMetric applicationReferenceMetric = new ApplicationReferenceMetric(id);
|
||||
ApplicationReferenceMetric applicationReferenceMetric = new ApplicationReferenceMetric();
|
||||
applicationReferenceMetric.setId(id);
|
||||
applicationReferenceMetric.setFrontApplicationId(rs.getInt(ApplicationReferenceMetricTable.COLUMN_FRONT_APPLICATION_ID));
|
||||
applicationReferenceMetric.setBehindApplicationId(rs.getInt(ApplicationReferenceMetricTable.COLUMN_BEHIND_APPLICATION_ID));
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
package org.apache.skywalking.apm.collector.storage.h2.dao;
|
||||
|
||||
import com.google.gson.JsonArray;
|
||||
|
|
@ -25,14 +24,14 @@ import java.sql.ResultSet;
|
|||
import java.sql.SQLException;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import org.apache.skywalking.apm.collector.storage.base.sql.SqlBuilder;
|
||||
import org.apache.skywalking.apm.collector.storage.table.register.Instance;
|
||||
import org.apache.skywalking.apm.collector.storage.table.register.InstanceTable;
|
||||
import org.apache.skywalking.apm.collector.client.h2.H2Client;
|
||||
import org.apache.skywalking.apm.collector.client.h2.H2ClientException;
|
||||
import org.apache.skywalking.apm.collector.core.util.TimeBucketUtils;
|
||||
import org.apache.skywalking.apm.collector.storage.base.sql.SqlBuilder;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.IInstanceUIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.h2.base.dao.H2DAO;
|
||||
import org.apache.skywalking.apm.collector.storage.table.register.Instance;
|
||||
import org.apache.skywalking.apm.collector.storage.table.register.InstanceTable;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
|
@ -117,7 +116,8 @@ public class InstanceH2UIDAO extends H2DAO implements IInstanceUIDAO {
|
|||
Object[] params = new Object[] {instanceId};
|
||||
try (ResultSet rs = client.executeQuery(sql, params)) {
|
||||
if (rs.next()) {
|
||||
Instance instance = new Instance(rs.getString(InstanceTable.COLUMN_ID));
|
||||
Instance instance = new Instance();
|
||||
instance.setId(rs.getString(InstanceTable.COLUMN_ID));
|
||||
instance.setApplicationId(rs.getInt(InstanceTable.COLUMN_APPLICATION_ID));
|
||||
instance.setAgentUUID(rs.getString(InstanceTable.COLUMN_AGENT_UUID));
|
||||
instance.setRegisterTime(rs.getLong(InstanceTable.COLUMN_REGISTER_TIME));
|
||||
|
|
@ -140,7 +140,8 @@ public class InstanceH2UIDAO extends H2DAO implements IInstanceUIDAO {
|
|||
Object[] params = new Object[] {applicationId, timeBucket};
|
||||
try (ResultSet rs = client.executeQuery(sql, params)) {
|
||||
while (rs.next()) {
|
||||
Instance instance = new Instance(rs.getString(InstanceTable.COLUMN_ID));
|
||||
Instance instance = new Instance();
|
||||
instance.setId(rs.getString(InstanceTable.COLUMN_ID));
|
||||
instance.setApplicationId(rs.getInt(InstanceTable.COLUMN_APPLICATION_ID));
|
||||
instance.setHeartBeatTime(rs.getLong(InstanceTable.COLUMN_HEARTBEAT_TIME));
|
||||
instance.setInstanceId(rs.getInt(InstanceTable.COLUMN_INSTANCE_ID));
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
package org.apache.skywalking.apm.collector.storage.h2.dao;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
|
|
@ -26,6 +25,7 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.apache.skywalking.apm.collector.client.h2.H2Client;
|
||||
import org.apache.skywalking.apm.collector.client.h2.H2ClientException;
|
||||
import org.apache.skywalking.apm.collector.core.UnexpectedException;
|
||||
import org.apache.skywalking.apm.collector.storage.base.sql.SqlBuilder;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.IInstanceHeartBeatPersistenceDAO;
|
||||
|
|
@ -33,7 +33,6 @@ import org.apache.skywalking.apm.collector.storage.h2.base.dao.H2DAO;
|
|||
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2SqlEntity;
|
||||
import org.apache.skywalking.apm.collector.storage.table.register.Instance;
|
||||
import org.apache.skywalking.apm.collector.storage.table.register.InstanceTable;
|
||||
import org.apache.skywalking.apm.collector.client.h2.H2ClientException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
|
@ -56,7 +55,8 @@ public class InstanceHeartBeatH2PersistenceDAO extends H2DAO implements IInstanc
|
|||
Object[] params = new Object[] {id};
|
||||
try (ResultSet rs = client.executeQuery(sql, params)) {
|
||||
if (rs.next()) {
|
||||
Instance instance = new Instance(id);
|
||||
Instance instance = new Instance();
|
||||
instance.setId(id);
|
||||
instance.setInstanceId(rs.getInt(InstanceTable.COLUMN_INSTANCE_ID));
|
||||
instance.setHeartBeatTime(rs.getLong(InstanceTable.COLUMN_HEARTBEAT_TIME));
|
||||
return instance;
|
||||
|
|
|
|||
|
|
@ -53,7 +53,8 @@ public class InstanceMappingH2MinutePersistenceDAO extends H2DAO implements IIns
|
|||
Object[] params = new Object[] {id};
|
||||
try (ResultSet rs = client.executeQuery(sql, params)) {
|
||||
if (rs.next()) {
|
||||
InstanceMapping instanceMapping = new InstanceMapping(id);
|
||||
InstanceMapping instanceMapping = new InstanceMapping();
|
||||
instanceMapping.setId(id);
|
||||
instanceMapping.setApplicationId(rs.getInt(InstanceMappingTable.COLUMN_APPLICATION_ID));
|
||||
instanceMapping.setInstanceId(rs.getInt(InstanceMappingTable.COLUMN_INSTANCE_ID));
|
||||
instanceMapping.setAddressId(rs.getInt(InstanceMappingTable.COLUMN_ADDRESS_ID));
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
package org.apache.skywalking.apm.collector.storage.h2.dao;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
|
|
@ -25,13 +24,13 @@ import java.util.ArrayList;
|
|||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.apache.skywalking.apm.collector.storage.base.sql.SqlBuilder;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.imp.IInstanceMinuteMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2SqlEntity;
|
||||
import org.apache.skywalking.apm.collector.storage.table.instance.InstanceMetric;
|
||||
import org.apache.skywalking.apm.collector.client.h2.H2Client;
|
||||
import org.apache.skywalking.apm.collector.client.h2.H2ClientException;
|
||||
import org.apache.skywalking.apm.collector.storage.base.sql.SqlBuilder;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.imp.IInstanceMinuteMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.h2.base.dao.H2DAO;
|
||||
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2SqlEntity;
|
||||
import org.apache.skywalking.apm.collector.storage.table.instance.InstanceMetric;
|
||||
import org.apache.skywalking.apm.collector.storage.table.instance.InstanceMetricTable;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
|
@ -54,7 +53,8 @@ public class InstanceMinuteMetricH2PersistenceDAO extends H2DAO implements IInst
|
|||
Object[] params = new Object[] {id};
|
||||
try (ResultSet rs = client.executeQuery(sql, params)) {
|
||||
if (rs.next()) {
|
||||
InstanceMetric instanceMetric = new InstanceMetric(id);
|
||||
InstanceMetric instanceMetric = new InstanceMetric();
|
||||
instanceMetric.setId(id);
|
||||
instanceMetric.setApplicationId(rs.getInt(InstanceMetricTable.COLUMN_APPLICATION_ID));
|
||||
instanceMetric.setInstanceId(rs.getInt(InstanceMetricTable.COLUMN_INSTANCE_ID));
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,8 @@ public class InstanceReferenceMetricH2PersistenceDAO extends H2DAO implements II
|
|||
Object[] params = new Object[] {id};
|
||||
try (ResultSet rs = client.executeQuery(sql, params)) {
|
||||
if (rs.next()) {
|
||||
InstanceReferenceMetric instanceReferenceMetric = new InstanceReferenceMetric(id);
|
||||
InstanceReferenceMetric instanceReferenceMetric = new InstanceReferenceMetric();
|
||||
instanceReferenceMetric.setId(id);
|
||||
instanceReferenceMetric.setFrontInstanceId(rs.getInt(InstanceReferenceMetricTable.COLUMN_FRONT_INSTANCE_ID));
|
||||
instanceReferenceMetric.setBehindInstanceId(rs.getInt(InstanceReferenceMetricTable.COLUMN_BEHIND_INSTANCE_ID));
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
package org.apache.skywalking.apm.collector.storage.h2.dao;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
|
|
@ -54,7 +53,8 @@ public class ServiceEntryH2PersistenceDAO extends H2DAO implements IServiceEntry
|
|||
Object[] params = new Object[] {id};
|
||||
try (ResultSet rs = client.executeQuery(sql, params)) {
|
||||
if (rs.next()) {
|
||||
ServiceEntry serviceEntry = new ServiceEntry(id);
|
||||
ServiceEntry serviceEntry = new ServiceEntry();
|
||||
serviceEntry.setId(id);
|
||||
serviceEntry.setApplicationId(rs.getInt(ServiceEntryTable.COLUMN_APPLICATION_ID));
|
||||
serviceEntry.setEntryServiceId(rs.getInt(ServiceEntryTable.COLUMN_ENTRY_SERVICE_ID));
|
||||
serviceEntry.setEntryServiceName(rs.getString(ServiceEntryTable.COLUMN_ENTRY_SERVICE_NAME));
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
package org.apache.skywalking.apm.collector.storage.h2.dao;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
|
|
@ -25,14 +24,14 @@ import java.util.ArrayList;
|
|||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.apache.skywalking.apm.collector.storage.base.sql.SqlBuilder;
|
||||
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2SqlEntity;
|
||||
import org.apache.skywalking.apm.collector.storage.table.service.ServiceMetricTable;
|
||||
import org.apache.skywalking.apm.collector.client.h2.H2Client;
|
||||
import org.apache.skywalking.apm.collector.client.h2.H2ClientException;
|
||||
import org.apache.skywalking.apm.collector.storage.base.sql.SqlBuilder;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.smp.IServiceMinuteMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.h2.base.dao.H2DAO;
|
||||
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2SqlEntity;
|
||||
import org.apache.skywalking.apm.collector.storage.table.service.ServiceMetric;
|
||||
import org.apache.skywalking.apm.collector.storage.table.service.ServiceMetricTable;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
|
@ -55,7 +54,8 @@ public class ServiceMinuteMetricH2PersistenceDAO extends H2DAO implements IServi
|
|||
Object[] params = new Object[] {id};
|
||||
try (ResultSet rs = client.executeQuery(sql, params)) {
|
||||
if (rs.next()) {
|
||||
ServiceMetric serviceMetric = new ServiceMetric(id);
|
||||
ServiceMetric serviceMetric = new ServiceMetric();
|
||||
serviceMetric.setId(id);
|
||||
serviceMetric.setServiceId(rs.getInt(ServiceMetricTable.COLUMN_SERVICE_ID));
|
||||
|
||||
serviceMetric.setTransactionCalls(rs.getLong(ServiceMetricTable.COLUMN_TRANSACTION_CALLS));
|
||||
|
|
|
|||
|
|
@ -54,7 +54,8 @@ public class ServiceReferenceMetricH2PersistenceDAO extends H2DAO implements ISe
|
|||
Object[] params = new Object[] {id};
|
||||
try (ResultSet rs = client.executeQuery(sql, params)) {
|
||||
if (rs.next()) {
|
||||
ServiceReferenceMetric serviceReferenceMetric = new ServiceReferenceMetric(id);
|
||||
ServiceReferenceMetric serviceReferenceMetric = new ServiceReferenceMetric();
|
||||
serviceReferenceMetric.setId(id);
|
||||
serviceReferenceMetric.setFrontServiceId(rs.getInt(ServiceReferenceMetricTable.COLUMN_FRONT_SERVICE_ID));
|
||||
serviceReferenceMetric.setBehindServiceId(rs.getInt(ServiceReferenceMetricTable.COLUMN_BEHIND_SERVICE_ID));
|
||||
serviceReferenceMetric.setSourceValue(rs.getInt(ServiceReferenceMetricTable.COLUMN_SOURCE_VALUE));
|
||||
|
|
|
|||
Loading…
Reference in New Issue