Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
梦中观雨
cat
提交
acc9cac8
C
cat
项目概览
梦中观雨
/
cat
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
cat
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
acc9cac8
编写于
10月 30, 2014
作者:
L
leon.li
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add new table highload_sql
上级
1a55f336
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
89 addition
and
1 deletion
+89
-1
cat-home/src/main/java/com/dianping/cat/build/TaskComponentConfigurator.java
...ava/com/dianping/cat/build/TaskComponentConfigurator.java
+2
-1
cat-home/src/main/resources/META-INF/dal/jdbc/report-codegen.xml
...e/src/main/resources/META-INF/dal/jdbc/report-codegen.xml
+39
-0
cat-home/src/main/resources/META-INF/dal/jdbc/report-dal.xml
cat-home/src/main/resources/META-INF/dal/jdbc/report-dal.xml
+15
-0
cat-home/src/main/resources/META-INF/plexus/components.xml
cat-home/src/main/resources/META-INF/plexus/components.xml
+22
-0
cat-home/src/main/resources/META-INF/wizard/jdbc/wizard.xml
cat-home/src/main/resources/META-INF/wizard/jdbc/wizard.xml
+1
-0
script/Cat.sql
script/Cat.sql
+10
-0
未找到文件。
cat-home/src/main/java/com/dianping/cat/build/TaskComponentConfigurator.java
浏览文件 @
acc9cac8
...
@@ -26,6 +26,7 @@ import com.dianping.cat.home.dal.alarm.ScheduledReportDao;
...
@@ -26,6 +26,7 @@ import com.dianping.cat.home.dal.alarm.ScheduledReportDao;
import
com.dianping.cat.home.dal.alarm.ScheduledSubscriptionDao
;
import
com.dianping.cat.home.dal.alarm.ScheduledSubscriptionDao
;
import
com.dianping.cat.home.dal.report.BaselineDao
;
import
com.dianping.cat.home.dal.report.BaselineDao
;
import
com.dianping.cat.home.dal.report.DailyReportContentDao
;
import
com.dianping.cat.home.dal.report.DailyReportContentDao
;
import
com.dianping.cat.home.dal.report.HighloadSqlDao
;
import
com.dianping.cat.home.dal.report.MonthlyReportContentDao
;
import
com.dianping.cat.home.dal.report.MonthlyReportContentDao
;
import
com.dianping.cat.home.dal.report.OverloadDao
;
import
com.dianping.cat.home.dal.report.OverloadDao
;
import
com.dianping.cat.home.dal.report.TopologyGraphDao
;
import
com.dianping.cat.home.dal.report.TopologyGraphDao
;
...
@@ -187,7 +188,7 @@ public class TaskComponentConfigurator extends AbstractResourceConfigurator {
...
@@ -187,7 +188,7 @@ public class TaskComponentConfigurator extends AbstractResourceConfigurator {
all
.
add
(
C
(
ReportTaskBuilder
.
class
,
HighLoadSqlUpdater
.
ID
,
HighLoadSqlUpdater
.
class
)
//
all
.
add
(
C
(
ReportTaskBuilder
.
class
,
HighLoadSqlUpdater
.
ID
,
HighLoadSqlUpdater
.
class
)
//
.
req
(
ModelService
.
class
,
TransactionAnalyzer
.
ID
)
//
.
req
(
ModelService
.
class
,
TransactionAnalyzer
.
ID
)
//
.
req
(
ReportServiceManager
.
class
));
.
req
(
ReportServiceManager
.
class
)
.
req
(
HighloadSqlDao
.
class
)
);
all
.
add
(
C
(
ReportRender
.
class
,
ReportRenderImpl
.
class
));
all
.
add
(
C
(
ReportRender
.
class
,
ReportRenderImpl
.
class
));
...
...
cat-home/src/main/resources/META-INF/dal/jdbc/report-codegen.xml
浏览文件 @
acc9cac8
...
@@ -285,6 +285,45 @@
...
@@ -285,6 +285,45 @@
</query>
</query>
</query-defs>
</query-defs>
</entity>
</entity>
<entity
name=
"highload-sql"
table=
"highload_sql"
alias=
"hs"
>
<member
name=
"id"
field=
"id"
value-type=
"int"
length=
"10"
nullable=
"false"
key=
"true"
auto-increment=
"true"
/>
<member
name=
"domain"
field=
"domain"
value-type=
"String"
length=
"50"
nullable=
"false"
/>
<member
name=
"weight"
field=
"weight"
value-type=
"double"
length=
"5"
decimal=
"3"
nullable=
"false"
/>
<member
name=
"transaction-name-content"
field=
"transaction_name_content"
value-type=
"String"
length=
"65535"
nullable=
"false"
/>
<member
name=
"date"
field=
"date"
value-type=
"Date"
nullable=
"false"
/>
<member
name=
"creation-date"
field=
"creation_date"
value-type=
"Date"
nullable=
"false"
/>
<var
name=
"key-id"
value-type=
"int"
key-member=
"id"
/>
<primary-key
name=
"PRIMARY"
members=
"id"
/>
<readsets>
<readset
name=
"FULL"
all=
"true"
/>
</readsets>
<updatesets>
<updateset
name=
"FULL"
all=
"true"
/>
</updatesets>
<query-defs>
<query
name=
"find-by-PK"
type=
"SELECT"
>
<param
name=
"key-id"
/>
<statement>
<![CDATA[SELECT <FIELDS/>
FROM
<TABLE/>
WHERE
<FIELD
name=
'id'
/>
= ${key-id}]]>
</statement>
</query>
<query
name=
"insert"
type=
"INSERT"
>
<statement>
<![CDATA[INSERT INTO <TABLE/>
(
<FIELDS/>
)
VALUES(
<VALUES/>
)]]>
</statement>
</query>
<query
name=
"update-by-PK"
type=
"UPDATE"
>
<param
name=
"key-id"
/>
<statement>
<![CDATA[UPDATE <TABLE/>
SET
<FIELDS/>
WHERE
<FIELD
name=
'id'
/>
= ${key-id}]]>
</statement>
</query>
<query
name=
"delete-by-PK"
type=
"DELETE"
>
<param
name=
"key-id"
/>
<statement>
<![CDATA[DELETE FROM <TABLE/>
WHERE
<FIELD
name=
'id'
/>
= ${key-id}]]>
</statement>
</query>
</query-defs>
</entity>
<entity
name=
"monthly-report-content"
table=
"monthly_report_content"
alias=
"mrc"
>
<entity
name=
"monthly-report-content"
table=
"monthly_report_content"
alias=
"mrc"
>
<member
name=
"report-id"
field=
"report_id"
value-type=
"int"
length=
"10"
nullable=
"false"
key=
"true"
/>
<member
name=
"report-id"
field=
"report_id"
value-type=
"int"
length=
"10"
nullable=
"false"
key=
"true"
/>
<member
name=
"content"
field=
"content"
value-type=
"byte[]"
length=
"2147483647"
nullable=
"false"
/>
<member
name=
"content"
field=
"content"
value-type=
"byte[]"
length=
"2147483647"
nullable=
"false"
/>
...
...
cat-home/src/main/resources/META-INF/dal/jdbc/report-dal.xml
浏览文件 @
acc9cac8
...
@@ -302,4 +302,19 @@
...
@@ -302,4 +302,19 @@
<entity
name=
"config-modification"
table=
"config_modification"
alias=
"cm"
>
<entity
name=
"config-modification"
table=
"config_modification"
alias=
"cm"
>
<member
name=
"creation-date"
insert-expr=
"NOW()"
/>
<member
name=
"creation-date"
insert-expr=
"NOW()"
/>
</entity>
</entity>
<entity
name=
"highload-sql"
table=
"highload_sql"
alias=
"hs"
>
<var
name=
"select-date"
value-type=
"Date"
/>
<member
name=
"creation-date"
insert-expr=
"NOW()"
/>
<query-defs>
<query
name=
"find-by-date"
type=
"SELECT"
multiple=
"true"
>
<param
name=
"date"
/>
<statement>
<![CDATA[
SELECT <FIELDS/>
FROM
<TABLE/>
WHERE
<FIELD
name=
'date'
/>
= ${select-date}
ORDER BY
<FIELD
name=
'weight'
/>
DESC
]]>
</statement>
</query>
</query-defs>
</entity>
</entities>
</entities>
\ No newline at end of file
cat-home/src/main/resources/META-INF/plexus/components.xml
浏览文件 @
acc9cac8
...
@@ -1451,6 +1451,9 @@
...
@@ -1451,6 +1451,9 @@
<requirement>
<requirement>
<role>
com.dianping.cat.report.service.ReportServiceManager
</role>
<role>
com.dianping.cat.report.service.ReportServiceManager
</role>
</requirement>
</requirement>
<requirement>
<role>
com.dianping.cat.home.dal.report.HighloadSqlDao
</role>
</requirement>
</requirements>
</requirements>
</component>
</component>
<component>
<component>
...
@@ -2110,6 +2113,16 @@
...
@@ -2110,6 +2113,16 @@
<data-source-name>
cat
</data-source-name>
<data-source-name>
cat
</data-source-name>
</configuration>
</configuration>
</component>
</component>
<component>
<role>
org.unidal.dal.jdbc.mapping.TableProvider
</role>
<role-hint>
highload-sql
</role-hint>
<implementation>
org.unidal.dal.jdbc.mapping.SimpleTableProvider
</implementation>
<configuration>
<logical-table-name>
highload-sql
</logical-table-name>
<physical-table-name>
highload_sql
</physical-table-name>
<data-source-name>
cat
</data-source-name>
</configuration>
</component>
<component>
<component>
<role>
org.unidal.dal.jdbc.mapping.TableProvider
</role>
<role>
org.unidal.dal.jdbc.mapping.TableProvider
</role>
<role-hint>
monthly-report-content
</role-hint>
<role-hint>
monthly-report-content
</role-hint>
...
@@ -2223,6 +2236,15 @@
...
@@ -2223,6 +2236,15 @@
</requirement>
</requirement>
</requirements>
</requirements>
</component>
</component>
<component>
<role>
com.dianping.cat.home.dal.report.HighloadSqlDao
</role>
<implementation>
com.dianping.cat.home.dal.report.HighloadSqlDao
</implementation>
<requirements>
<requirement>
<role>
org.unidal.dal.jdbc.QueryEngine
</role>
</requirement>
</requirements>
</component>
<component>
<component>
<role>
com.dianping.cat.home.dal.report.MonthlyReportContentDao
</role>
<role>
com.dianping.cat.home.dal.report.MonthlyReportContentDao
</role>
<implementation>
com.dianping.cat.home.dal.report.MonthlyReportContentDao
</implementation>
<implementation>
com.dianping.cat.home.dal.report.MonthlyReportContentDao
</implementation>
...
...
cat-home/src/main/resources/META-INF/wizard/jdbc/wizard.xml
浏览文件 @
acc9cac8
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
<table
name=
"overload"
/>
<table
name=
"overload"
/>
<table
name=
"config_modification"
/>
<table
name=
"config_modification"
/>
<table
name=
"user_define_rule"
/>
<table
name=
"user_define_rule"
/>
<table
name=
"highload_sql"
/>
</group>
</group>
<group
name=
"alarm"
package=
"com.dianping.cat.home.dal.alarm"
>
<group
name=
"alarm"
package=
"com.dianping.cat.home.dal.alarm"
>
<table
name=
"mailRecord"
/>
<table
name=
"mailRecord"
/>
...
...
script/Cat.sql
浏览文件 @
acc9cac8
...
@@ -402,3 +402,13 @@ CREATE TABLE `user_define_rule` (
...
@@ -402,3 +402,13 @@ CREATE TABLE `user_define_rule` (
`creation_date`
datetime
NOT
NULL
COMMENT
'创建时间'
,
`creation_date`
datetime
NOT
NULL
COMMENT
'创建时间'
,
PRIMARY
KEY
(
`id`
)
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
1242
DEFAULT
CHARSET
=
utf8
COMMENT
=
'用户定义规则表'
;
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
1242
DEFAULT
CHARSET
=
utf8
COMMENT
=
'用户定义规则表'
;
CREATE
TABLE
`highload_sql`
(
`id`
int
(
11
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'自增长ID'
,
`domain`
varchar
(
50
)
NOT
NULL
COMMENT
'项目名称'
,
`weight`
double
NOT
NULL
COMMENT
'权重'
,
`transaction_name_content`
text
NOT
NULL
COMMENT
'TransactionName内容'
,
`date`
datetime
NOT
NULL
COMMENT
'统计时间'
,
`creation_date`
datetime
NOT
NULL
COMMENT
'创建时间'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
1242
DEFAULT
CHARSET
=
utf8
COMMENT
=
'高消耗SQL记录表'
;
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录