Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
SkyWalking
提交
01cd19a0
S
SkyWalking
项目概览
apache
/
SkyWalking
上一次同步 1 年多
通知
302
Star
21345
Fork
6091
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
SkyWalking
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
01cd19a0
编写于
1月 11, 2018
作者:
P
peng-yongsheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
GC metric pyramid aggregate by h2 storage test successful.
上级
ccd4c8ef
变更
16
隐藏空白更改
内联
并排
Showing
16 changed file
with
460 addition
and
36 deletion
+460
-36
apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/JVMMetricServiceHandlerTestCase.java
...rpc/provider/handler/JVMMetricServiceHandlerTestCase.java
+1
-1
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/apache/skywalking/apm/collector/storage/StorageModule.java
...pache/skywalking/apm/collector/storage/StorageModule.java
+12
-7
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/StorageModuleH2Provider.java
...ing/apm/collector/storage/h2/StorageModuleH2Provider.java
+16
-1
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/gcmp/AbstractGCMetricH2PersistenceDAO.java
...storage/h2/dao/gcmp/AbstractGCMetricH2PersistenceDAO.java
+67
-0
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/gcmp/GCDayMetricH2PersistenceDAO.java
...ctor/storage/h2/dao/gcmp/GCDayMetricH2PersistenceDAO.java
+13
-13
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/gcmp/GCHourMetricH2PersistenceDAO.java
...tor/storage/h2/dao/gcmp/GCHourMetricH2PersistenceDAO.java
+13
-13
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/gcmp/GCMinuteMetricH2PersistenceDAO.java
...r/storage/h2/dao/gcmp/GCMinuteMetricH2PersistenceDAO.java
+41
-0
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/gcmp/GCMonthMetricH2PersistenceDAO.java
...or/storage/h2/dao/gcmp/GCMonthMetricH2PersistenceDAO.java
+41
-0
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/gcmp/GCSecondMetricH2PersistenceDAO.java
...r/storage/h2/dao/gcmp/GCSecondMetricH2PersistenceDAO.java
+41
-0
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/define/gc/AbstractGCMetricH2TableDefine.java
...r/storage/h2/define/gc/AbstractGCMetricH2TableDefine.java
+43
-0
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/define/gc/GCDayMetricH2TableDefine.java
...lector/storage/h2/define/gc/GCDayMetricH2TableDefine.java
+33
-0
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/define/gc/GCHourMetricH2TableDefine.java
...ector/storage/h2/define/gc/GCHourMetricH2TableDefine.java
+33
-0
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/define/gc/GCMinuteMetricH2TableDefine.java
...tor/storage/h2/define/gc/GCMinuteMetricH2TableDefine.java
+33
-0
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/define/gc/GCMonthMetricH2TableDefine.java
...ctor/storage/h2/define/gc/GCMonthMetricH2TableDefine.java
+33
-0
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/define/gc/GCSecondMetricH2TableDefine.java
...tor/storage/h2/define/gc/GCSecondMetricH2TableDefine.java
+33
-0
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/resources/META-INF/defines/storage.define
...ovider/src/main/resources/META-INF/defines/storage.define
+7
-1
未找到文件。
apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/JVMMetricServiceHandlerTestCase.java
浏览文件 @
01cd19a0
...
...
@@ -46,7 +46,7 @@ public class JVMMetricServiceHandlerTestCase {
metricBuilder
.
setTime
(
System
.
currentTimeMillis
());
buildCPUMetric
(
metricBuilder
);
//
buildGCMetric(metricBuilder);
buildGCMetric
(
metricBuilder
);
// buildMemoryMetric(metricBuilder);
// buildMemoryPoolMetric(metricBuilder);
...
...
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/apache/skywalking/apm/collector/storage/StorageModule.java
浏览文件 @
01cd19a0
...
...
@@ -44,6 +44,11 @@ import org.apache.skywalking.apm.collector.storage.dao.cpump.ICpuHourMetricPersi
import
org.apache.skywalking.apm.collector.storage.dao.cpump.ICpuMinuteMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.cpump.ICpuMonthMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.cpump.ICpuSecondMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.gcmp.IGCDayMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.gcmp.IGCHourMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.gcmp.IGCMinuteMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.gcmp.IGCMonthMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.gcmp.IGCSecondMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.register.IApplicationRegisterDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.register.IInstanceRegisterDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.register.INetworkAddressRegisterDAO
;
...
...
@@ -93,13 +98,13 @@ public class StorageModule extends Module {
classes
.
add
(
ICpuHourMetricPersistenceDAO
.
class
);
classes
.
add
(
ICpuDayMetricPersistenceDAO
.
class
);
classes
.
add
(
ICpuMonthMetricPersistenceDAO
.
class
);
//
//
classes.add(IGCSecondMetricPersistenceDAO.class);
//
classes.add(IGCMinuteMetricPersistenceDAO.class);
//
classes.add(IGCHourMetricPersistenceDAO.class);
//
classes.add(IGCDayMetricPersistenceDAO.class);
//
classes.add(IGCMonthMetricPersistenceDAO.class);
//
classes
.
add
(
IGCSecondMetricPersistenceDAO
.
class
);
classes
.
add
(
IGCMinuteMetricPersistenceDAO
.
class
);
classes
.
add
(
IGCHourMetricPersistenceDAO
.
class
);
classes
.
add
(
IGCDayMetricPersistenceDAO
.
class
);
classes
.
add
(
IGCMonthMetricPersistenceDAO
.
class
);
// classes.add(IMemorySecondMetricPersistenceDAO.class);
// classes.add(IMemoryMinuteMetricPersistenceDAO.class);
// classes.add(IMemoryHourMetricPersistenceDAO.class);
...
...
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/StorageModuleH2Provider.java
浏览文件 @
01cd19a0
...
...
@@ -49,6 +49,11 @@ import org.apache.skywalking.apm.collector.storage.dao.cpump.ICpuHourMetricPersi
import
org.apache.skywalking.apm.collector.storage.dao.cpump.ICpuMinuteMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.cpump.ICpuMonthMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.cpump.ICpuSecondMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.gcmp.IGCDayMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.gcmp.IGCHourMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.gcmp.IGCMinuteMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.gcmp.IGCMonthMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.gcmp.IGCSecondMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.register.IApplicationRegisterDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.register.IInstanceRegisterDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.register.INetworkAddressRegisterDAO
;
...
...
@@ -77,6 +82,11 @@ import org.apache.skywalking.apm.collector.storage.h2.dao.cpump.CpuHourMetricH2P
import
org.apache.skywalking.apm.collector.storage.h2.dao.cpump.CpuMinuteMetricH2PersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.h2.dao.cpump.CpuMonthMetricH2PersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.h2.dao.cpump.CpuSecondMetricH2PersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.h2.dao.gcmp.GCDayMetricH2PersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.h2.dao.gcmp.GCHourMetricH2PersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.h2.dao.gcmp.GCMinuteMetricH2PersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.h2.dao.gcmp.GCMonthMetricH2PersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.h2.dao.gcmp.GCSecondMetricH2PersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.h2.dao.register.ApplicationRegisterH2DAO
;
import
org.apache.skywalking.apm.collector.storage.h2.dao.register.InstanceRegisterH2DAO
;
import
org.apache.skywalking.apm.collector.storage.h2.dao.register.NetworkAddressRegisterH2DAO
;
...
...
@@ -159,7 +169,12 @@ public class StorageModuleH2Provider extends ModuleProvider {
this
.
registerServiceImplementation
(
ICpuDayMetricPersistenceDAO
.
class
,
new
CpuDayMetricH2PersistenceDAO
(
h2Client
));
this
.
registerServiceImplementation
(
ICpuMonthMetricPersistenceDAO
.
class
,
new
CpuMonthMetricH2PersistenceDAO
(
h2Client
));
// this.registerServiceImplementation(IGCSecondMetricPersistenceDAO.class, new GCSecondMetricH2PersistenceDAO(h2Client));
this
.
registerServiceImplementation
(
IGCSecondMetricPersistenceDAO
.
class
,
new
GCSecondMetricH2PersistenceDAO
(
h2Client
));
this
.
registerServiceImplementation
(
IGCMinuteMetricPersistenceDAO
.
class
,
new
GCMinuteMetricH2PersistenceDAO
(
h2Client
));
this
.
registerServiceImplementation
(
IGCHourMetricPersistenceDAO
.
class
,
new
GCHourMetricH2PersistenceDAO
(
h2Client
));
this
.
registerServiceImplementation
(
IGCDayMetricPersistenceDAO
.
class
,
new
GCDayMetricH2PersistenceDAO
(
h2Client
));
this
.
registerServiceImplementation
(
IGCMonthMetricPersistenceDAO
.
class
,
new
GCMonthMetricH2PersistenceDAO
(
h2Client
));
// this.registerServiceImplementation(IMemorySecondMetricPersistenceDAO.class, new MemorySecondMetricH2PersistenceDAO(h2Client));
// this.registerServiceImplementation(IMemoryPoolSecondMetricPersistenceDAO.class, new MemoryPoolSecondMetricH2PersistenceDAO(h2Client));
//
...
...
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/gcmp/AbstractGCMetricH2PersistenceDAO.java
0 → 100644
浏览文件 @
01cd19a0
/*
* 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.h2.dao.gcmp
;
import
java.sql.ResultSet
;
import
java.sql.SQLException
;
import
java.util.HashMap
;
import
java.util.Map
;
import
org.apache.skywalking.apm.collector.client.h2.H2Client
;
import
org.apache.skywalking.apm.collector.storage.h2.base.dao.AbstractPersistenceH2DAO
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.GCMetric
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.GCMetricTable
;
/**
* @author peng-yongsheng
*/
public
abstract
class
AbstractGCMetricH2PersistenceDAO
extends
AbstractPersistenceH2DAO
<
GCMetric
>
{
public
AbstractGCMetricH2PersistenceDAO
(
H2Client
client
)
{
super
(
client
);
}
@Override
protected
final
GCMetric
h2DataToStreamData
(
ResultSet
resultSet
)
throws
SQLException
{
GCMetric
gcMetric
=
new
GCMetric
();
gcMetric
.
setId
(
resultSet
.
getString
(
GCMetricTable
.
COLUMN_ID
));
gcMetric
.
setMetricId
(
resultSet
.
getString
(
GCMetricTable
.
COLUMN_METRIC_ID
));
gcMetric
.
setInstanceId
(
resultSet
.
getInt
(
GCMetricTable
.
COLUMN_INSTANCE_ID
));
gcMetric
.
setPhrase
(
resultSet
.
getInt
(
GCMetricTable
.
COLUMN_PHRASE
));
gcMetric
.
setCount
(
resultSet
.
getLong
(
GCMetricTable
.
COLUMN_COUNT
));
gcMetric
.
setTimes
(
resultSet
.
getLong
(
GCMetricTable
.
COLUMN_TIMES
));
gcMetric
.
setTimeBucket
(
resultSet
.
getLong
(
GCMetricTable
.
COLUMN_TIME_BUCKET
));
return
gcMetric
;
}
@Override
protected
final
Map
<
String
,
Object
>
streamDataToH2Data
(
GCMetric
streamData
)
{
Map
<
String
,
Object
>
source
=
new
HashMap
<>();
source
.
put
(
GCMetricTable
.
COLUMN_METRIC_ID
,
streamData
.
getMetricId
());
source
.
put
(
GCMetricTable
.
COLUMN_INSTANCE_ID
,
streamData
.
getInstanceId
());
source
.
put
(
GCMetricTable
.
COLUMN_PHRASE
,
streamData
.
getPhrase
());
source
.
put
(
GCMetricTable
.
COLUMN_COUNT
,
streamData
.
getCount
());
source
.
put
(
GCMetricTable
.
COLUMN_TIMES
,
streamData
.
getTimes
());
source
.
put
(
GCMetricTable
.
COLUMN_TIME_BUCKET
,
streamData
.
getTimeBucket
());
return
source
;
}
}
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/d
efine/CpuMetricH2TableDefine
.java
→
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/d
ao/gcmp/GCDayMetricH2PersistenceDAO
.java
浏览文件 @
01cd19a0
...
...
@@ -16,26 +16,26 @@
*
*/
package
org.apache.skywalking.apm.collector.storage.h2.dao.gcmp
;
package
org.apache.skywalking.apm.collector.storage.h2.define
;
import
org.apache.skywalking.apm.collector.storage.h2.base.define.H2ColumnDefine
;
import
org.apache.skywalking.apm.collector.storage.h2.base.define.H2TableDefine
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.CpuMetricTable
;
import
org.apache.skywalking.apm.collector.client.h2.H2Client
;
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.dao.gcmp.IGCDayMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.h2.base.define.H2SqlEntity
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.GCMetric
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.GCMetricTable
;
/**
* @author peng-yongsheng
*/
public
class
CpuMetricH2TableDefine
extends
H2TableDefine
{
public
class
GCDayMetricH2PersistenceDAO
extends
AbstractGCMetricH2PersistenceDAO
implements
IGCDayMetricPersistenceDAO
<
H2SqlEntity
,
H2SqlEntity
,
GCMetric
>
{
public
CpuMetricH2TableDefine
(
)
{
super
(
CpuMetricTable
.
TABLE
);
public
GCDayMetricH2PersistenceDAO
(
H2Client
client
)
{
super
(
client
);
}
@Override
public
void
initialize
()
{
addColumn
(
new
H2ColumnDefine
(
CpuMetricTable
.
COLUMN_ID
,
H2ColumnDefine
.
Type
.
Varchar
.
name
()));
addColumn
(
new
H2ColumnDefine
(
CpuMetricTable
.
COLUMN_INSTANCE_ID
,
H2ColumnDefine
.
Type
.
Int
.
name
()));
addColumn
(
new
H2ColumnDefine
(
CpuMetricTable
.
COLUMN_USAGE_PERCENT
,
H2ColumnDefine
.
Type
.
Double
.
name
()));
addColumn
(
new
H2ColumnDefine
(
CpuMetricTable
.
COLUMN_TIME_BUCKET
,
H2ColumnDefine
.
Type
.
Bigint
.
name
()));
@Override
protected
String
tableName
()
{
return
GCMetricTable
.
TABLE
+
Const
.
ID_SPLIT
+
TimePyramid
.
Day
.
getName
();
}
}
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/d
efine/ServiceNameH2TableDefine
.java
→
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/d
ao/gcmp/GCHourMetricH2PersistenceDAO
.java
浏览文件 @
01cd19a0
...
...
@@ -16,26 +16,26 @@
*
*/
package
org.apache.skywalking.apm.collector.storage.h2.dao.gcmp
;
package
org.apache.skywalking.apm.collector.storage.h2.define
;
import
org.apache.skywalking.apm.collector.storage.h2.base.define.H2ColumnDefine
;
import
org.apache.skywalking.apm.collector.storage.h2.base.define.H2TableDefine
;
import
org.apache.skywalking.apm.collector.storage.table.register.ServiceNameTable
;
import
org.apache.skywalking.apm.collector.client.h2.H2Client
;
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.dao.gcmp.IGCHourMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.h2.base.define.H2SqlEntity
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.GCMetric
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.GCMetricTable
;
/**
* @author peng-yongsheng
*/
public
class
ServiceNameH2TableDefine
extends
H2TableDefine
{
public
class
GCHourMetricH2PersistenceDAO
extends
AbstractGCMetricH2PersistenceDAO
implements
IGCHourMetricPersistenceDAO
<
H2SqlEntity
,
H2SqlEntity
,
GCMetric
>
{
public
ServiceNameH2TableDefine
(
)
{
super
(
ServiceNameTable
.
TABLE
);
public
GCHourMetricH2PersistenceDAO
(
H2Client
client
)
{
super
(
client
);
}
@Override
public
void
initialize
()
{
addColumn
(
new
H2ColumnDefine
(
ServiceNameTable
.
COLUMN_ID
,
H2ColumnDefine
.
Type
.
Varchar
.
name
()));
addColumn
(
new
H2ColumnDefine
(
ServiceNameTable
.
COLUMN_APPLICATION_ID
,
H2ColumnDefine
.
Type
.
Int
.
name
()));
addColumn
(
new
H2ColumnDefine
(
ServiceNameTable
.
COLUMN_SERVICE_NAME
,
H2ColumnDefine
.
Type
.
Varchar
.
name
()));
addColumn
(
new
H2ColumnDefine
(
ServiceNameTable
.
COLUMN_SERVICE_ID
,
H2ColumnDefine
.
Type
.
Int
.
name
()));
@Override
protected
String
tableName
()
{
return
GCMetricTable
.
TABLE
+
Const
.
ID_SPLIT
+
TimePyramid
.
Hour
.
getName
();
}
}
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/gcmp/GCMinuteMetricH2PersistenceDAO.java
0 → 100644
浏览文件 @
01cd19a0
/*
* 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.h2.dao.gcmp
;
import
org.apache.skywalking.apm.collector.client.h2.H2Client
;
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.dao.gcmp.IGCMinuteMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.h2.base.define.H2SqlEntity
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.GCMetric
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.GCMetricTable
;
/**
* @author peng-yongsheng
*/
public
class
GCMinuteMetricH2PersistenceDAO
extends
AbstractGCMetricH2PersistenceDAO
implements
IGCMinuteMetricPersistenceDAO
<
H2SqlEntity
,
H2SqlEntity
,
GCMetric
>
{
public
GCMinuteMetricH2PersistenceDAO
(
H2Client
client
)
{
super
(
client
);
}
@Override
protected
String
tableName
()
{
return
GCMetricTable
.
TABLE
+
Const
.
ID_SPLIT
+
TimePyramid
.
Minute
.
getName
();
}
}
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/gcmp/GCMonthMetricH2PersistenceDAO.java
0 → 100644
浏览文件 @
01cd19a0
/*
* 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.h2.dao.gcmp
;
import
org.apache.skywalking.apm.collector.client.h2.H2Client
;
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.dao.gcmp.IGCMonthMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.h2.base.define.H2SqlEntity
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.GCMetric
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.GCMetricTable
;
/**
* @author peng-yongsheng
*/
public
class
GCMonthMetricH2PersistenceDAO
extends
AbstractGCMetricH2PersistenceDAO
implements
IGCMonthMetricPersistenceDAO
<
H2SqlEntity
,
H2SqlEntity
,
GCMetric
>
{
public
GCMonthMetricH2PersistenceDAO
(
H2Client
client
)
{
super
(
client
);
}
@Override
protected
String
tableName
()
{
return
GCMetricTable
.
TABLE
+
Const
.
ID_SPLIT
+
TimePyramid
.
Month
.
getName
();
}
}
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/gcmp/GCSecondMetricH2PersistenceDAO.java
0 → 100644
浏览文件 @
01cd19a0
/*
* 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.h2.dao.gcmp
;
import
org.apache.skywalking.apm.collector.client.h2.H2Client
;
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.dao.gcmp.IGCSecondMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.h2.base.define.H2SqlEntity
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.GCMetric
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.GCMetricTable
;
/**
* @author peng-yongsheng
*/
public
class
GCSecondMetricH2PersistenceDAO
extends
AbstractGCMetricH2PersistenceDAO
implements
IGCSecondMetricPersistenceDAO
<
H2SqlEntity
,
H2SqlEntity
,
GCMetric
>
{
public
GCSecondMetricH2PersistenceDAO
(
H2Client
client
)
{
super
(
client
);
}
@Override
protected
String
tableName
()
{
return
GCMetricTable
.
TABLE
+
Const
.
ID_SPLIT
+
TimePyramid
.
Second
.
getName
();
}
}
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/define/gc/AbstractGCMetricH2TableDefine.java
0 → 100644
浏览文件 @
01cd19a0
/*
* 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.h2.define.gc
;
import
org.apache.skywalking.apm.collector.storage.h2.base.define.H2ColumnDefine
;
import
org.apache.skywalking.apm.collector.storage.h2.base.define.H2TableDefine
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.GCMetricTable
;
/**
* @author peng-yongsheng
*/
public
abstract
class
AbstractGCMetricH2TableDefine
extends
H2TableDefine
{
public
AbstractGCMetricH2TableDefine
(
String
name
)
{
super
(
name
);
}
@Override
public
final
void
initialize
()
{
addColumn
(
new
H2ColumnDefine
(
GCMetricTable
.
COLUMN_ID
,
H2ColumnDefine
.
Type
.
Varchar
.
name
()));
addColumn
(
new
H2ColumnDefine
(
GCMetricTable
.
COLUMN_METRIC_ID
,
H2ColumnDefine
.
Type
.
Varchar
.
name
()));
addColumn
(
new
H2ColumnDefine
(
GCMetricTable
.
COLUMN_INSTANCE_ID
,
H2ColumnDefine
.
Type
.
Int
.
name
()));
addColumn
(
new
H2ColumnDefine
(
GCMetricTable
.
COLUMN_PHRASE
,
H2ColumnDefine
.
Type
.
Int
.
name
()));
addColumn
(
new
H2ColumnDefine
(
GCMetricTable
.
COLUMN_COUNT
,
H2ColumnDefine
.
Type
.
Bigint
.
name
()));
addColumn
(
new
H2ColumnDefine
(
GCMetricTable
.
COLUMN_TIMES
,
H2ColumnDefine
.
Type
.
Bigint
.
name
()));
addColumn
(
new
H2ColumnDefine
(
GCMetricTable
.
COLUMN_TIME_BUCKET
,
H2ColumnDefine
.
Type
.
Bigint
.
name
()));
}
}
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/define/gc/GCDayMetricH2TableDefine.java
0 → 100644
浏览文件 @
01cd19a0
/*
* 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.h2.define.gc
;
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.GCMetricTable
;
/**
* @author peng-yongsheng
*/
public
class
GCDayMetricH2TableDefine
extends
AbstractGCMetricH2TableDefine
{
public
GCDayMetricH2TableDefine
()
{
super
(
GCMetricTable
.
TABLE
+
Const
.
ID_SPLIT
+
TimePyramid
.
Day
.
getName
());
}
}
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/define/gc/GCHourMetricH2TableDefine.java
0 → 100644
浏览文件 @
01cd19a0
/*
* 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.h2.define.gc
;
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.GCMetricTable
;
/**
* @author peng-yongsheng
*/
public
class
GCHourMetricH2TableDefine
extends
AbstractGCMetricH2TableDefine
{
public
GCHourMetricH2TableDefine
()
{
super
(
GCMetricTable
.
TABLE
+
Const
.
ID_SPLIT
+
TimePyramid
.
Hour
.
getName
());
}
}
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/define/gc/GCMinuteMetricH2TableDefine.java
0 → 100644
浏览文件 @
01cd19a0
/*
* 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.h2.define.gc
;
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.GCMetricTable
;
/**
* @author peng-yongsheng
*/
public
class
GCMinuteMetricH2TableDefine
extends
AbstractGCMetricH2TableDefine
{
public
GCMinuteMetricH2TableDefine
()
{
super
(
GCMetricTable
.
TABLE
+
Const
.
ID_SPLIT
+
TimePyramid
.
Minute
.
getName
());
}
}
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/define/gc/GCMonthMetricH2TableDefine.java
0 → 100644
浏览文件 @
01cd19a0
/*
* 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.h2.define.gc
;
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.GCMetricTable
;
/**
* @author peng-yongsheng
*/
public
class
GCMonthMetricH2TableDefine
extends
AbstractGCMetricH2TableDefine
{
public
GCMonthMetricH2TableDefine
()
{
super
(
GCMetricTable
.
TABLE
+
Const
.
ID_SPLIT
+
TimePyramid
.
Month
.
getName
());
}
}
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/define/gc/GCSecondMetricH2TableDefine.java
0 → 100644
浏览文件 @
01cd19a0
/*
* 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.h2.define.gc
;
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.GCMetricTable
;
/**
* @author peng-yongsheng
*/
public
class
GCSecondMetricH2TableDefine
extends
AbstractGCMetricH2TableDefine
{
public
GCSecondMetricH2TableDefine
()
{
super
(
GCMetricTable
.
TABLE
+
Const
.
ID_SPLIT
+
TimePyramid
.
Second
.
getName
());
}
}
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/resources/META-INF/defines/storage.define
浏览文件 @
01cd19a0
...
...
@@ -7,4 +7,10 @@ org.apache.skywalking.apm.collector.storage.h2.define.cpu.CpuSecondMetricH2Table
org.apache.skywalking.apm.collector.storage.h2.define.cpu.CpuMinuteMetricH2TableDefine
org.apache.skywalking.apm.collector.storage.h2.define.cpu.CpuHourMetricH2TableDefine
org.apache.skywalking.apm.collector.storage.h2.define.cpu.CpuDayMetricH2TableDefine
org.apache.skywalking.apm.collector.storage.h2.define.cpu.CpuMonthMetricH2TableDefine
\ No newline at end of file
org.apache.skywalking.apm.collector.storage.h2.define.cpu.CpuMonthMetricH2TableDefine
org.apache.skywalking.apm.collector.storage.h2.define.gc.GCSecondMetricH2TableDefine
org.apache.skywalking.apm.collector.storage.h2.define.gc.GCMinuteMetricH2TableDefine
org.apache.skywalking.apm.collector.storage.h2.define.gc.GCHourMetricH2TableDefine
org.apache.skywalking.apm.collector.storage.h2.define.gc.GCDayMetricH2TableDefine
org.apache.skywalking.apm.collector.storage.h2.define.gc.GCMonthMetricH2TableDefine
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录