Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
梦中观雨
cat
提交
0fa282e3
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,发现更多精彩内容 >>
提交
0fa282e3
编写于
4月 19, 2013
作者:
F
Frankie Wu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove bee-engine dependency
上级
a11e65db
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
129 addition
and
106 deletion
+129
-106
cat-consumer/pom.xml
cat-consumer/pom.xml
+11
-12
cat-consumer/src/main/java/com/dianping/cat/consumer/build/ComponentsConfigurator.java
...m/dianping/cat/consumer/build/ComponentsConfigurator.java
+5
-6
cat-consumer/src/main/java/com/dianping/cat/consumer/sql/SqlParseManager.java
...n/java/com/dianping/cat/consumer/sql/SqlParseManager.java
+3
-3
cat-consumer/src/main/java/com/dianping/cat/consumer/sql/SqlParsers.java
...c/main/java/com/dianping/cat/consumer/sql/SqlParsers.java
+91
-0
cat-consumer/src/main/java/com/dianping/cat/consumer/top/TopAnalyzer.java
.../main/java/com/dianping/cat/consumer/top/TopAnalyzer.java
+0
-4
cat-core/pom.xml
cat-core/pom.xml
+1
-1
cat-hadoop/pom.xml
cat-hadoop/pom.xml
+1
-16
cat-home/pom.xml
cat-home/pom.xml
+7
-50
cat-home/src/main/resources/META-INF/wizard/webapp/wizard.xml
...home/src/main/resources/META-INF/wizard/webapp/wizard.xml
+1
-1
pom.xml
pom.xml
+9
-13
未找到文件。
cat-consumer/pom.xml
浏览文件 @
0fa282e3
...
...
@@ -3,31 +3,31 @@
<parent>
<groupId>
com.dianping.cat
</groupId>
<artifactId>
parent
</artifactId>
<version>
0.
5.2.10
</version>
<version>
0.
6.0-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
cat-consumer
</artifactId>
<name>
CAT Consumer
</name>
<dependencies>
<dependency>
<groupId>
com.dianping.bee
</groupId>
<artifactId>
bee-engine
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
com.dianping.cat
</groupId>
<artifactId>
cat-hadoop
</artifactId>
</dependency>
<dependency>
<groupId>
org.unidal.framework
</groupId>
<artifactId>
test-framework
</artifactId>
<version>
2.0.2
</version>
<scope>
test
</scope>
<artifactId>
dal-jdbc
</artifactId>
<version>
2.0.1
</version>
</dependency>
<dependency>
<groupId>
com.alibaba.cobar
</groupId>
<artifactId>
cobar-server
</artifactId>
<version>
1.3.0
</version>
</dependency>
<dependency>
<groupId>
org.unidal.framework
</groupId>
<artifactId>
dal-jdbc
</artifactId>
<version>
2.0.1
</version>
<artifactId>
test-framework
</artifactId>
<version>
2.0.2
</version>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
com.google.code.gson
</groupId>
...
...
@@ -37,7 +37,6 @@
<dependency>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
<version>
5.1.20
</version>
<scope>
runtime
</scope>
</dependency>
</dependencies>
...
...
cat-consumer/src/main/java/com/dianping/cat/consumer/build/ComponentsConfigurator.java
浏览文件 @
0fa282e3
...
...
@@ -100,12 +100,11 @@ public class ComponentsConfigurator extends AbstractResourceConfigurator {
.
req
(
BucketManager
.
class
,
ReportDao
.
class
,
TaskDao
.
class
));
all
.
add
(
C
(
DumpAnalyzer
.
class
).
is
(
PER_LOOKUP
)
//
.
req
(
ServerConfigManager
.
class
)
//
.
req
(
DumpUploader
.
class
)
//
.
req
(
MessageBucketManager
.
class
,
LocalMessageBucketManager
.
ID
).
req
(
ServerStateManager
.
class
));
.
req
(
ServerConfigManager
.
class
,
DumpUploader
.
class
,
ServerStateManager
.
class
)
//
.
req
(
MessageBucketManager
.
class
,
LocalMessageBucketManager
.
ID
));
all
.
add
(
C
(
TopAnalyzer
.
class
).
is
(
PER_LOOKUP
)
//
.
req
(
BucketManager
.
class
,
ReportDao
.
class
,
TaskDao
.
class
));
.
req
(
BucketManager
.
class
,
ReportDao
.
class
));
all
.
add
(
C
(
DumpUploader
.
class
)
//
.
req
(
ServerConfigManager
.
class
,
FileSystemManager
.
class
));
...
...
@@ -113,8 +112,8 @@ public class ComponentsConfigurator extends AbstractResourceConfigurator {
all
.
add
(
C
(
Module
.
class
,
CatConsumerModule
.
ID
,
CatConsumerModule
.
class
));
// database
all
.
add
(
C
(
JdbcDataSourceConfigurationManager
.
class
)
.
config
(
E
(
"datasourceFile"
).
value
(
"/data/appdatas/cat/datasources.xml"
)));
all
.
add
(
C
(
JdbcDataSourceConfigurationManager
.
class
)
//
.
config
(
E
(
"datasourceFile"
).
value
(
"/data/appdatas/cat/datasources.xml"
)));
all
.
addAll
(
new
CatDatabaseConfigurator
().
defineComponents
());
...
...
cat-consumer/src/main/java/com/dianping/cat/consumer/sql/SqlParseManager.java
浏览文件 @
0fa282e3
...
...
@@ -6,13 +6,13 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Set
;
import
org.unidal.dal.jdbc.DalException
;
import
org.unidal.lookup.annotation.Inject
;
import
com.dainping.cat.consumer.dal.report.Sqltable
;
import
com.dainping.cat.consumer.dal.report.SqltableDao
;
import
com.dainping.cat.consumer.dal.report.SqltableEntity
;
import
com.dianping.bee.engine.helper.SqlParsers
;
import
com.dianping.cat.Cat
;
import
org.unidal.dal.jdbc.DalException
;
import
org.unidal.lookup.annotation.Inject
;
public
class
SqlParseManager
{
@Inject
...
...
cat-consumer/src/main/java/com/dianping/cat/consumer/sql/SqlParsers.java
0 → 100644
浏览文件 @
0fa282e3
package
com.dianping.cat.consumer.sql
;
import
java.util.ArrayList
;
import
java.util.List
;
import
com.alibaba.cobar.parser.ast.expression.primary.Identifier
;
import
com.alibaba.cobar.parser.ast.fragment.tableref.TableRefFactor
;
import
com.alibaba.cobar.parser.ast.stmt.SQLStatement
;
import
com.alibaba.cobar.parser.ast.stmt.dml.DMLDeleteStatement
;
import
com.alibaba.cobar.parser.ast.stmt.dml.DMLInsertStatement
;
import
com.alibaba.cobar.parser.recognizer.SQLParserDelegate
;
import
com.alibaba.cobar.parser.visitor.EmptySQLASTVisitor
;
public
class
SqlParsers
{
public
static
TableParser
forTable
()
{
return
new
TableParser
();
}
public
static
Escaper
forEscape
()
{
return
Escaper
.
INSTANCE
;
}
public
enum
Escaper
{
INSTANCE
;
public
String
unescape
(
String
str
)
{
if
(
str
==
null
||
str
.
length
()
<
2
)
{
return
str
;
}
int
length
=
str
.
length
();
if
(
str
.
charAt
(
0
)
==
'`'
&&
str
.
charAt
(
length
-
1
)
==
'`'
)
{
return
str
.
substring
(
1
,
length
-
1
);
}
else
if
(
str
.
charAt
(
0
)
==
'\''
&&
str
.
charAt
(
length
-
1
)
==
'\''
)
{
return
str
.
substring
(
1
,
length
-
1
);
}
else
{
return
str
;
}
}
}
public
static
class
TableParser
extends
EmptySQLASTVisitor
{
private
List
<
String
>
m_tables
=
new
ArrayList
<
String
>(
3
);
public
List
<
String
>
parse
(
String
sql
)
{
try
{
SQLStatement
statement
=
SQLParserDelegate
.
parse
(
sql
);
statement
.
accept
(
this
);
return
m_tables
;
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
e
);
}
}
@Override
public
void
visit
(
DMLDeleteStatement
node
)
{
for
(
Identifier
tableIdentifier
:
node
.
getTableNames
())
{
String
table
=
tableIdentifier
.
getIdText
();
if
(!
m_tables
.
contains
(
table
))
{
m_tables
.
add
(
table
);
}
}
super
.
visit
(
node
);
}
@Override
public
void
visit
(
DMLInsertStatement
node
)
{
Identifier
tableIdentifier
=
node
.
getTable
();
String
table
=
tableIdentifier
.
getIdText
();
if
(!
m_tables
.
contains
(
table
))
{
m_tables
.
add
(
table
);
}
super
.
visit
(
node
);
}
@Override
public
void
visit
(
TableRefFactor
node
)
{
String
table
=
node
.
getTable
().
getIdText
();
if
(!
m_tables
.
contains
(
table
))
{
m_tables
.
add
(
table
);
}
}
}
}
cat-consumer/src/main/java/com/dianping/cat/consumer/top/TopAnalyzer.java
浏览文件 @
0fa282e3
...
...
@@ -12,7 +12,6 @@ import org.unidal.lookup.annotation.Inject;
import
com.dainping.cat.consumer.dal.report.Report
;
import
com.dainping.cat.consumer.dal.report.ReportDao
;
import
com.dainping.cat.consumer.dal.report.TaskDao
;
import
com.dianping.cat.Cat
;
import
com.dianping.cat.configuration.NetworkInterfaceManager
;
import
com.dianping.cat.consumer.problem.ProblemAnalyzer
;
...
...
@@ -39,9 +38,6 @@ public class TopAnalyzer extends AbstractMessageAnalyzer<TopReport> implements L
@Inject
private
ReportDao
m_reportDao
;
@Inject
private
TaskDao
m_taskDao
;
private
TransactionAnalyzer
m_transactionAnalyzer
;
private
ProblemAnalyzer
m_problemAnalyzer
;
...
...
cat-core/pom.xml
浏览文件 @
0fa282e3
...
...
@@ -4,7 +4,7 @@
<parent>
<groupId>
com.dianping.cat
</groupId>
<artifactId>
parent
</artifactId>
<version>
0.
5.2.10
</version>
<version>
0.
6.0-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
cat-core
</artifactId>
...
...
cat-hadoop/pom.xml
浏览文件 @
0fa282e3
...
...
@@ -4,7 +4,7 @@
<parent>
<groupId>
com.dianping.cat
</groupId>
<artifactId>
parent
</artifactId>
<version>
0.
5.2.10
</version>
<version>
0.
6.0-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
cat-hadoop
</artifactId>
...
...
@@ -14,16 +14,6 @@
<groupId>
com.dianping.cat
</groupId>
<artifactId>
cat-core
</artifactId>
</dependency>
<dependency>
<groupId>
org.unidal.framework
</groupId>
<artifactId>
dal-jdbc
</artifactId>
<version>
2.0.1
</version>
</dependency>
<dependency>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
<scope>
runtime
</scope>
</dependency>
<dependency>
<groupId>
org.apache.hadoop
</groupId>
<artifactId>
hadoop-core
</artifactId>
...
...
@@ -47,11 +37,6 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
org.codehaus.jackson
</groupId>
<artifactId>
jackson-mapper-asl
</artifactId>
<version>
1.9.4
</version>
</dependency>
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
...
...
cat-home/pom.xml
浏览文件 @
0fa282e3
...
...
@@ -3,7 +3,7 @@
<parent>
<groupId>
com.dianping.cat
</groupId>
<artifactId>
parent
</artifactId>
<version>
0.
5.2.10
</version>
<version>
0.
6.0-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
cat-home
</artifactId>
...
...
@@ -59,10 +59,14 @@
<artifactId>
WebResServer
</artifactId>
<version>
1.2.0
</version>
</dependency>
<dependency>
<groupId>
org.unidal.framework
</groupId>
<artifactId>
web-framework
</artifactId>
<version>
2.0.2
</version>
</dependency>
<dependency>
<groupId>
javax.servlet
</groupId>
<artifactId>
servlet-api
</artifactId>
<version>
2.5
</version>
<scope>
provided
</scope>
</dependency>
<dependency>
...
...
@@ -79,7 +83,6 @@
<dependency>
<groupId>
org.mortbay.jetty
</groupId>
<artifactId>
jsp-2.1
</artifactId>
<version>
6.1.14
</version>
<scope>
provided
</scope>
</dependency>
<dependency>
...
...
@@ -95,25 +98,18 @@
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
<version>
4.8.1
</version>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
org.mortbay.jetty
</groupId>
<artifactId>
jetty
</artifactId>
<version>
6.1.14
</version>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
org.unidal.framework
</groupId>
<artifactId>
web-framework
</artifactId>
<version>
2.0.2
</version>
</dependency>
<dependency>
<groupId>
org.unidal.framework
</groupId>
<artifactId>
test-framework
</artifactId>
<scope>
${test-framework.scope}
</scope>
<version>
2.0.2
</version>
<scope>
test
</scope>
</dependency>
</dependencies>
<build>
...
...
@@ -202,49 +198,10 @@
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<artifactId>
maven-compiler-plugin
</artifactId>
<version>
2.3.2
</version>
<configuration>
<source>
1.6
</source>
<target>
1.6
</target>
</configuration>
</plugin>
<plugin>
<artifactId>
maven-eclipse-plugin
</artifactId>
<version>
2.8
</version>
<configuration>
<downloadSources>
true
</downloadSources>
<ajdtVersion>
none
</ajdtVersion>
<additionalConfig>
<file>
<name>
.settings/org.eclipse.jdt.core.prefs
</name>
<content>
<![CDATA[org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.source=1.6
org.eclipse.jdt.core.compiler.compliance=1.6org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.source=1.6
org.eclipse.jdt.core.compiler.compliance=1.6org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.source=1.6
org.eclipse.jdt.core.compiler.compliance=1.6]]><![CDATA[org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.source=1.6
org.eclipse.jdt.core.compiler.compliance=1.6]]>
</content>
</file>
</additionalConfig>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<properties>
<packaging>
war
</packaging>
<env>
alpha
</env>
<test-framework.scope>
test
</test-framework.scope>
<project.build.sourceEncoding>
utf-8
</project.build.sourceEncoding>
</properties>
</project>
...
...
cat-home/src/main/resources/META-INF/wizard/webapp/wizard.xml
浏览文件 @
0fa282e3
<?xml version="1.0" encoding="utf-8"?>
<wizard
package=
"com.dianping.cat"
>
<webapp
package=
"com.dianping.cat"
webres=
"true"
plugin-management=
"
tru
e"
>
<webapp
package=
"com.dianping.cat"
webres=
"true"
plugin-management=
"
fals
e"
>
<module
name=
"report"
path=
"r"
>
<page
name=
"home"
title=
"Home"
default=
"true"
>
<description>
Home Page
</description>
...
...
pom.xml
浏览文件 @
0fa282e3
...
...
@@ -4,7 +4,7 @@
<modelVersion>
4.0.0
</modelVersion>
<groupId>
com.dianping.cat
</groupId>
<artifactId>
parent
</artifactId>
<version>
0.
5.2.10
</version>
<version>
0.
6.0-SNAPSHOT
</version>
<name>
arch-cat
</name>
<description>
Central Application Tracking
</description>
<packaging>
pom
</packaging>
...
...
@@ -46,6 +46,12 @@
<artifactId>
jetty-util
</artifactId>
<version>
6.1.14
</version>
</dependency>
<dependency>
<groupId>
org.mortbay.jetty
</groupId>
<artifactId>
jsp-api-2.1
</artifactId>
<version>
6.1.14
</version>
<scope>
provided
</scope>
</dependency>
<dependency>
<groupId>
org.mortbay.jetty
</groupId>
<artifactId>
jsp-2.1
</artifactId>
...
...
@@ -101,11 +107,7 @@
<includes>
<include>
**/AllTests.java
</include>
</includes>
<!--
<debugForkedProcess>-Xdebug
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
-Xnoagent -Djava.compiler=NONE</debugForkedProcess>
-->
<!-- <debugForkedProcess>-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -Xnoagent -Djava.compiler=NONE</debugForkedProcess> -->
</configuration>
<dependencies>
<dependency>
...
...
@@ -120,7 +122,7 @@
<version>
2.8
</version>
<configuration>
<downloadSources>
true
</downloadSources>
<ajdtVersion>
none
</ajdtVersion>
<ajdtVersion>
none
</ajdtVersion>
<additionalConfig>
<file>
<name>
.settings/org.eclipse.jdt.core.prefs
</name>
...
...
@@ -161,12 +163,6 @@ org.eclipse.jdt.core.compiler.compliance=1.6
</plugin>
</plugins>
</build>
<distributionManagement>
<repository>
<id>
dianping.repo
</id>
<url>
http://192.168.8.45:8080/artifactory/dianping-releases
</url>
</repository>
</distributionManagement>
<properties>
<project.build.sourceEncoding>
utf-8
</project.build.sourceEncoding>
</properties>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录