Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
梦中观雨
cat
提交
08a49153
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,发现更多精彩内容 >>
提交
08a49153
编写于
7月 14, 2014
作者:
Y
youyong205
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
modify the app datasource
上级
1d25deed
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
20 addition
and
260 deletion
+20
-260
cat-core/pom.xml
cat-core/pom.xml
+1
-0
cat-core/src/main/java/com/dianping/cat/build/AppDatabaseConfigurator.java
.../java/com/dianping/cat/build/AppDatabaseConfigurator.java
+2
-2
cat-core/src/main/resources/META-INF/dal/jdbc/app-codegen.xml
...core/src/main/resources/META-INF/dal/jdbc/app-codegen.xml
+5
-0
cat-core/src/main/resources/META-INF/dal/jdbc/app-dal.xml
cat-core/src/main/resources/META-INF/dal/jdbc/app-dal.xml
+3
-0
cat-core/src/main/resources/META-INF/dal/jdbc/app-manifest.xml
...ore/src/main/resources/META-INF/dal/jdbc/app-manifest.xml
+6
-0
cat-core/src/main/resources/META-INF/wizard/jdbc/wizard.xml
cat-core/src/main/resources/META-INF/wizard/jdbc/wizard.xml
+1
-1
cat-home/src/main/java/com/dianping/cat/build/CatDatabaseConfigurator.java
.../java/com/dianping/cat/build/CatDatabaseConfigurator.java
+2
-3
cat-home/src/main/resources/META-INF/dal/jdbc/report-codegen.xml
...e/src/main/resources/META-INF/dal/jdbc/report-codegen.xml
+0
-45
cat-home/src/main/resources/META-INF/plexus/components.xml
cat-home/src/main/resources/META-INF/plexus/components.xml
+0
-209
未找到文件。
cat-core/pom.xml
浏览文件 @
08a49153
...
...
@@ -83,6 +83,7 @@
<manifest>
${basedir}/src/main/resources/META-INF/dal/jdbc/report-manifest.xml,
${basedir}/src/main/resources/META-INF/dal/jdbc/config-manifest.xml,
${basedir}/src/main/resources/META-INF/dal/jdbc/app-manifest.xml,
</manifest>
</configuration>
</execution>
...
...
cat-core/src/main/java/com/dianping/cat/build/AppDatabaseConfigurator.java
浏览文件 @
08a49153
...
...
@@ -13,8 +13,8 @@ final class AppDatabaseConfigurator extends AbstractJdbcResourceConfigurator {
// all.add(defineJdbcDataSourceComponent("app", "com.mysql.jdbc.Driver", "jdbc:mysql://127.0.0.1:3306/app", "root", "***", "<![CDATA[useUnicode=true&autoReconnect=true]]>"));
defineSimpleTableProviderComponents
(
all
,
"app"
,
com
.
dianping
.
cat
.
core
.
dal
.
_INDEX
.
getEntityClasses
());
defineDaoComponents
(
all
,
com
.
dianping
.
cat
.
core
.
dal
.
_INDEX
.
getDaoClasses
());
defineSimpleTableProviderComponents
(
all
,
"app"
,
com
.
dianping
.
cat
.
app
.
_INDEX
.
getEntityClasses
());
defineDaoComponents
(
all
,
com
.
dianping
.
cat
.
app
.
_INDEX
.
getDaoClasses
());
return
all
;
}
...
...
cat-core/src/main/resources/META-INF/dal/jdbc/
data
-codegen.xml
→
cat-core/src/main/resources/META-INF/dal/jdbc/
app
-codegen.xml
浏览文件 @
08a49153
...
...
@@ -4,6 +4,7 @@
<member
name=
"id"
field=
"id"
value-type=
"int"
length=
"10"
nullable=
"false"
key=
"true"
auto-increment=
"true"
/>
<member
name=
"period"
field=
"period"
value-type=
"Date"
nullable=
"false"
/>
<member
name=
"minute-order"
field=
"minute_order"
value-type=
"int"
length=
"5"
nullable=
"false"
/>
<member
name=
"status"
field=
"status"
value-type=
"int"
length=
"5"
nullable=
"false"
/>
<member
name=
"city"
field=
"city"
value-type=
"int"
length=
"5"
nullable=
"false"
/>
<member
name=
"operator"
field=
"operator"
value-type=
"int"
length=
"3"
nullable=
"false"
/>
<member
name=
"network"
field=
"network"
value-type=
"int"
length=
"3"
nullable=
"false"
/>
...
...
@@ -11,6 +12,10 @@
<member
name=
"connnect-type"
field=
"connnect_type"
value-type=
"int"
length=
"3"
nullable=
"false"
/>
<member
name=
"code"
field=
"code"
value-type=
"int"
length=
"5"
nullable=
"false"
/>
<member
name=
"platform"
field=
"platform"
value-type=
"int"
length=
"3"
nullable=
"false"
/>
<member
name=
"access-number"
field=
"access_number"
value-type=
"String"
length=
"16777215"
nullable=
"false"
/>
<member
name=
"response-sum-time"
field=
"response_sum_time"
value-type=
"String"
length=
"16777215"
nullable=
"false"
/>
<member
name=
"request-package"
field=
"request_package"
value-type=
"String"
length=
"16777215"
nullable=
"false"
/>
<member
name=
"response-package"
field=
"response_package"
value-type=
"String"
length=
"16777215"
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"
/>
...
...
cat-core/src/main/resources/META-INF/dal/jdbc/
data
-dal.xml
→
cat-core/src/main/resources/META-INF/dal/jdbc/
app
-dal.xml
浏览文件 @
08a49153
<?xml version="1.0" encoding="UTF-8"?>
<entities
do-package=
"com.dianping.cat.
core.dal
"
gen=
"true"
/>
<entities
do-package=
"com.dianping.cat.
app
"
gen=
"true"
/>
cat-core/src/main/resources/META-INF/dal/jdbc/
data
-manifest.xml
→
cat-core/src/main/resources/META-INF/dal/jdbc/
app
-manifest.xml
浏览文件 @
08a49153
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<file
path=
"
data
-codegen.xml"
/>
<file
path=
"
data
-dal.xml"
/>
<file
path=
"
app
-codegen.xml"
/>
<file
path=
"
app
-dal.xml"
/>
</manifest>
cat-core/src/main/resources/META-INF/wizard/jdbc/wizard.xml
浏览文件 @
08a49153
...
...
@@ -32,7 +32,7 @@
<password>
password
</password>
<properties>
useUnicode=true
&
autoReconnect=true
</properties>
</datasource>
<group
name=
"
data"
package=
"com.dianping.cat.core.dal
"
>
<group
name=
"
app"
package=
"com.dianping.cat.app
"
>
<table
name=
"app_data_command"
/>
</group>
</jdbc>
...
...
cat-home/src/main/java/com/dianping/cat/build/CatDatabaseConfigurator.java
浏览文件 @
08a49153
...
...
@@ -11,15 +11,14 @@ final class CatDatabaseConfigurator extends AbstractJdbcResourceConfigurator {
public
List
<
Component
>
defineComponents
()
{
List
<
Component
>
all
=
new
ArrayList
<
Component
>();
// all.add(defineJdbcDataSourceComponent("cat", "com.mysql.jdbc.Driver", "jdbc:mysql://127.0.0.1:3306/cat", "root", "***", "<![CDATA[useUnicode=true&autoReconnect=true]]>"));
defineSimpleTableProviderComponents
(
all
,
"cat"
,
com
.
dianping
.
cat
.
home
.
dal
.
report
.
_INDEX
.
getEntityClasses
());
defineDaoComponents
(
all
,
com
.
dianping
.
cat
.
home
.
dal
.
report
.
_INDEX
.
getDaoClasses
());
defineSimpleTableProviderComponents
(
all
,
"cat"
,
com
.
dianping
.
cat
.
home
.
dal
.
alarm
.
_INDEX
.
getEntityClasses
());
defineDaoComponents
(
all
,
com
.
dianping
.
cat
.
home
.
dal
.
alarm
.
_INDEX
.
getDaoClasses
());
defineSimpleTableProviderComponents
(
all
,
"app"
,
com
.
dianping
.
cat
.
core
.
dal
.
_INDEX
.
getEntityClasses
());
defineDaoComponents
(
all
,
com
.
dianping
.
cat
.
core
.
dal
.
_INDEX
.
getDaoClasses
());
return
all
;
}
}
cat-home/src/main/resources/META-INF/dal/jdbc/report-codegen.xml
浏览文件 @
08a49153
...
...
@@ -125,51 +125,6 @@
</query>
</query-defs>
</entity>
<entity
name=
"app-data"
table=
"app_data"
alias=
"ad"
>
<member
name=
"id"
field=
"id"
value-type=
"int"
length=
"10"
nullable=
"false"
key=
"true"
auto-increment=
"true"
/>
<member
name=
"ip"
field=
"ip"
value-type=
"String"
length=
"50"
nullable=
"false"
/>
<member
name=
"command"
field=
"command"
value-type=
"int"
length=
"10"
nullable=
"false"
/>
<member
name=
"code"
field=
"code"
value-type=
"int"
length=
"10"
nullable=
"false"
/>
<member
name=
"period"
field=
"period"
value-type=
"Date"
nullable=
"false"
/>
<member
name=
"city"
field=
"city"
value-type=
"int"
length=
"10"
nullable=
"false"
/>
<member
name=
"operator"
field=
"operator"
value-type=
"int"
length=
"10"
nullable=
"false"
/>
<member
name=
"network"
field=
"network"
value-type=
"int"
length=
"10"
nullable=
"false"
/>
<member
name=
"version"
field=
"version"
value-type=
"int"
length=
"10"
nullable=
"false"
/>
<member
name=
"channel"
field=
"channel"
value-type=
"int"
length=
"10"
nullable=
"false"
/>
<member
name=
"platform"
field=
"platform"
value-type=
"int"
length=
"10"
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=
"baseline"
table=
"baseline"
alias=
"b"
>
<member
name=
"id"
field=
"id"
value-type=
"int"
length=
"10"
nullable=
"false"
key=
"true"
auto-increment=
"true"
/>
<member
name=
"report-name"
field=
"report_name"
value-type=
"String"
length=
"100"
/>
...
...
cat-home/src/main/resources/META-INF/plexus/components.xml
浏览文件 @
08a49153
...
...
@@ -1983,16 +1983,6 @@
<data-source-name>
cat
</data-source-name>
</configuration>
</component>
<component>
<role>
org.unidal.dal.jdbc.mapping.TableProvider
</role>
<role-hint>
app-data
</role-hint>
<implementation>
org.unidal.dal.jdbc.mapping.SimpleTableProvider
</implementation>
<configuration>
<logical-table-name>
app-data
</logical-table-name>
<physical-table-name>
app_data
</physical-table-name>
<data-source-name>
cat
</data-source-name>
</configuration>
</component>
<component>
<role>
org.unidal.dal.jdbc.mapping.TableProvider
</role>
<role-hint>
baseline
</role-hint>
...
...
@@ -2080,15 +2070,6 @@
</requirement>
</requirements>
</component>
<component>
<role>
com.dianping.cat.home.dal.report.AppDataDao
</role>
<implementation>
com.dianping.cat.home.dal.report.AppDataDao
</implementation>
<requirements>
<requirement>
<role>
org.unidal.dal.jdbc.QueryEngine
</role>
</requirement>
</requirements>
</component>
<component>
<role>
com.dianping.cat.home.dal.report.BaselineDao
</role>
<implementation>
com.dianping.cat.home.dal.report.BaselineDao
</implementation>
...
...
@@ -2200,196 +2181,6 @@
</requirement>
</requirements>
</component>
<component>
<role>
org.unidal.dal.jdbc.mapping.TableProvider
</role>
<role-hint>
dailygraph
</role-hint>
<implementation>
org.unidal.dal.jdbc.mapping.SimpleTableProvider
</implementation>
<configuration>
<logical-table-name>
dailygraph
</logical-table-name>
<physical-table-name>
dailygraph
</physical-table-name>
<data-source-name>
app
</data-source-name>
</configuration>
</component>
<component>
<role>
org.unidal.dal.jdbc.mapping.TableProvider
</role>
<role-hint>
dailyreport
</role-hint>
<implementation>
org.unidal.dal.jdbc.mapping.SimpleTableProvider
</implementation>
<configuration>
<logical-table-name>
dailyreport
</logical-table-name>
<physical-table-name>
dailyreport
</physical-table-name>
<data-source-name>
app
</data-source-name>
</configuration>
</component>
<component>
<role>
org.unidal.dal.jdbc.mapping.TableProvider
</role>
<role-hint>
graph
</role-hint>
<implementation>
org.unidal.dal.jdbc.mapping.SimpleTableProvider
</implementation>
<configuration>
<logical-table-name>
graph
</logical-table-name>
<physical-table-name>
graph
</physical-table-name>
<data-source-name>
app
</data-source-name>
</configuration>
</component>
<component>
<role>
org.unidal.dal.jdbc.mapping.TableProvider
</role>
<role-hint>
hostinfo
</role-hint>
<implementation>
org.unidal.dal.jdbc.mapping.SimpleTableProvider
</implementation>
<configuration>
<logical-table-name>
hostinfo
</logical-table-name>
<physical-table-name>
hostinfo
</physical-table-name>
<data-source-name>
app
</data-source-name>
</configuration>
</component>
<component>
<role>
org.unidal.dal.jdbc.mapping.TableProvider
</role>
<role-hint>
monthreport
</role-hint>
<implementation>
org.unidal.dal.jdbc.mapping.SimpleTableProvider
</implementation>
<configuration>
<logical-table-name>
monthreport
</logical-table-name>
<physical-table-name>
monthreport
</physical-table-name>
<data-source-name>
app
</data-source-name>
</configuration>
</component>
<component>
<role>
org.unidal.dal.jdbc.mapping.TableProvider
</role>
<role-hint>
project
</role-hint>
<implementation>
org.unidal.dal.jdbc.mapping.SimpleTableProvider
</implementation>
<configuration>
<logical-table-name>
project
</logical-table-name>
<physical-table-name>
project
</physical-table-name>
<data-source-name>
app
</data-source-name>
</configuration>
</component>
<component>
<role>
org.unidal.dal.jdbc.mapping.TableProvider
</role>
<role-hint>
report
</role-hint>
<implementation>
org.unidal.dal.jdbc.mapping.SimpleTableProvider
</implementation>
<configuration>
<logical-table-name>
report
</logical-table-name>
<physical-table-name>
report
</physical-table-name>
<data-source-name>
app
</data-source-name>
</configuration>
</component>
<component>
<role>
org.unidal.dal.jdbc.mapping.TableProvider
</role>
<role-hint>
report-content
</role-hint>
<implementation>
org.unidal.dal.jdbc.mapping.SimpleTableProvider
</implementation>
<configuration>
<logical-table-name>
report-content
</logical-table-name>
<physical-table-name>
report_content
</physical-table-name>
<data-source-name>
app
</data-source-name>
</configuration>
</component>
<component>
<role>
org.unidal.dal.jdbc.mapping.TableProvider
</role>
<role-hint>
task
</role-hint>
<implementation>
org.unidal.dal.jdbc.mapping.SimpleTableProvider
</implementation>
<configuration>
<logical-table-name>
task
</logical-table-name>
<physical-table-name>
task
</physical-table-name>
<data-source-name>
app
</data-source-name>
</configuration>
</component>
<component>
<role>
org.unidal.dal.jdbc.mapping.TableProvider
</role>
<role-hint>
weeklyreport
</role-hint>
<implementation>
org.unidal.dal.jdbc.mapping.SimpleTableProvider
</implementation>
<configuration>
<logical-table-name>
weeklyreport
</logical-table-name>
<physical-table-name>
weeklyreport
</physical-table-name>
<data-source-name>
app
</data-source-name>
</configuration>
</component>
<component>
<role>
com.dianping.cat.core.dal.DailyGraphDao
</role>
<implementation>
com.dianping.cat.core.dal.DailyGraphDao
</implementation>
<requirements>
<requirement>
<role>
org.unidal.dal.jdbc.QueryEngine
</role>
</requirement>
</requirements>
</component>
<component>
<role>
com.dianping.cat.core.dal.DailyReportDao
</role>
<implementation>
com.dianping.cat.core.dal.DailyReportDao
</implementation>
<requirements>
<requirement>
<role>
org.unidal.dal.jdbc.QueryEngine
</role>
</requirement>
</requirements>
</component>
<component>
<role>
com.dianping.cat.core.dal.GraphDao
</role>
<implementation>
com.dianping.cat.core.dal.GraphDao
</implementation>
<requirements>
<requirement>
<role>
org.unidal.dal.jdbc.QueryEngine
</role>
</requirement>
</requirements>
</component>
<component>
<role>
com.dianping.cat.core.dal.HostinfoDao
</role>
<implementation>
com.dianping.cat.core.dal.HostinfoDao
</implementation>
<requirements>
<requirement>
<role>
org.unidal.dal.jdbc.QueryEngine
</role>
</requirement>
</requirements>
</component>
<component>
<role>
com.dianping.cat.core.dal.MonthlyReportDao
</role>
<implementation>
com.dianping.cat.core.dal.MonthlyReportDao
</implementation>
<requirements>
<requirement>
<role>
org.unidal.dal.jdbc.QueryEngine
</role>
</requirement>
</requirements>
</component>
<component>
<role>
com.dianping.cat.core.dal.ProjectDao
</role>
<implementation>
com.dianping.cat.core.dal.ProjectDao
</implementation>
<requirements>
<requirement>
<role>
org.unidal.dal.jdbc.QueryEngine
</role>
</requirement>
</requirements>
</component>
<component>
<role>
com.dianping.cat.core.dal.HourlyReportDao
</role>
<implementation>
com.dianping.cat.core.dal.HourlyReportDao
</implementation>
<requirements>
<requirement>
<role>
org.unidal.dal.jdbc.QueryEngine
</role>
</requirement>
</requirements>
</component>
<component>
<role>
com.dianping.cat.core.dal.HourlyReportContentDao
</role>
<implementation>
com.dianping.cat.core.dal.HourlyReportContentDao
</implementation>
<requirements>
<requirement>
<role>
org.unidal.dal.jdbc.QueryEngine
</role>
</requirement>
</requirements>
</component>
<component>
<role>
com.dianping.cat.core.dal.TaskDao
</role>
<implementation>
com.dianping.cat.core.dal.TaskDao
</implementation>
<requirements>
<requirement>
<role>
org.unidal.dal.jdbc.QueryEngine
</role>
</requirement>
</requirements>
</component>
<component>
<role>
com.dianping.cat.core.dal.WeeklyReportDao
</role>
<implementation>
com.dianping.cat.core.dal.WeeklyReportDao
</implementation>
<requirements>
<requirement>
<role>
org.unidal.dal.jdbc.QueryEngine
</role>
</requirement>
</requirements>
</component>
<component>
<role>
org.unidal.dal.jdbc.mapping.TableProvider
</role>
<role-hint>
dp-admin-login
</role-hint>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录