Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
梦中观雨
cat
提交
62f64b4b
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,发现更多精彩内容 >>
提交
62f64b4b
编写于
7月 18, 2014
作者:
Y
youyong205
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #401 from youyong205/master
modify the sql
上级
0946b4f0
38e70dfb
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
60 addition
and
69 deletion
+60
-69
cat-broker/src/main/java/com/dianping/cat/broker/build/ComponentsConfigurator.java
...com/dianping/cat/broker/build/ComponentsConfigurator.java
+2
-3
cat-broker/src/main/resources/META-INF/plexus/components.xml
cat-broker/src/main/resources/META-INF/plexus/components.xml
+3
-0
cat-client/src/main/java/com/dianping/cat/servlet/CatFilter.java
...ent/src/main/java/com/dianping/cat/servlet/CatFilter.java
+48
-61
cat-consumer-advanced/src/test/java/com/dianping/cat/consumer/metric/MetricConfigManagerTest.java
...dianping/cat/consumer/metric/MetricConfigManagerTest.java
+0
-1
cat-core/src/main/java/com/dianping/cat/config/app/AppDataService.java
...main/java/com/dianping/cat/config/app/AppDataService.java
+5
-1
cat-core/src/main/resources/META-INF/dal/jdbc/app-dal.xml
cat-core/src/main/resources/META-INF/dal/jdbc/app-dal.xml
+2
-3
未找到文件。
cat-broker/src/main/java/com/dianping/cat/broker/build/ComponentsConfigurator.java
浏览文件 @
62f64b4b
...
...
@@ -25,7 +25,6 @@ public class ComponentsConfigurator extends AbstractResourceConfigurator {
all
.
add
(
C
(
IpService
.
class
));
all
.
add
(
C
(
RequestUtils
.
class
));
all
.
add
(
C
(
MonitorManager
.
class
).
req
(
UrlPatternConfigManager
.
class
,
IpService
.
class
));
all
.
add
(
C
(
AppDataConsumer
.
class
).
req
(
AppDataService
.
class
));
all
.
add
(
C
(
TableProvider
.
class
,
"app-data-command"
,
AppDataCommandTableProvider
.
class
));
...
...
cat-broker/src/main/resources/META-INF/plexus/components.xml
浏览文件 @
62f64b4b
...
...
@@ -163,6 +163,9 @@
<requirement>
<role>
com.dianping.cat.app.AppDataCommandDao
</role>
</requirement>
<requirement>
<role>
com.dianping.cat.config.app.AppConfigManager
</role>
</requirement>
</requirements>
</component>
<component>
...
...
cat-client/src/main/java/com/dianping/cat/servlet/CatFilter.java
浏览文件 @
62f64b4b
...
...
@@ -92,20 +92,6 @@ public class CatFilter implements Filter {
}
}
protected
String
getCookie
(
HttpServletRequest
req
,
String
name
)
{
Cookie
[]
cookies
=
req
.
getCookies
();
if
(
cookies
!=
null
)
{
for
(
Cookie
cookie
:
cookies
)
{
if
(
name
.
equalsIgnoreCase
(
cookie
.
getName
()))
{
return
cookie
.
getValue
();
}
}
}
return
null
;
}
@Override
public
void
handle
(
Context
ctx
)
throws
IOException
,
ServletException
{
HttpServletRequest
req
=
ctx
.
getRequest
();
...
...
@@ -117,8 +103,6 @@ public class CatFilter implements Filter {
ctx
.
setMode
(
detectMode
(
req
));
ctx
.
setType
(
CatConstants
.
TYPE_URL
);
Cat
.
setup
(
getCookie
(
req
,
"JSESSIONID"
));
setTraceMode
(
req
);
}
else
{
ctx
.
setType
(
CatConstants
.
TYPE_URL_FORWARD
);
...
...
@@ -171,6 +155,9 @@ public class CatFilter implements Filter {
@Override
public
void
handle
(
Context
ctx
)
throws
IOException
,
ServletException
{
boolean
isTraceMode
=
Cat
.
getManager
().
isTraceMode
();
if
(
isTraceMode
)
{
HttpServletRequest
req
=
ctx
.
getRequest
();
HttpServletResponse
res
=
ctx
.
getResponse
();
MessageProducer
producer
=
Cat
.
getProducer
();
...
...
@@ -217,6 +204,7 @@ public class CatFilter implements Filter {
res
.
setHeader
(
"X-CAT-ID"
,
ctx
.
getId
());
break
;
}
}
ctx
.
handle
();
}
...
...
@@ -531,7 +519,6 @@ public class CatFilter implements Filter {
public
String
toString
()
{
return
m_cookie
.
toString
();
}
}
protected
static
interface
Handler
{
...
...
cat-consumer-advanced/src/test/java/com/dianping/cat/consumer/metric/MetricConfigManagerTest.java
浏览文件 @
62f64b4b
...
...
@@ -74,7 +74,6 @@ public class MetricConfigManagerTest {
configs
.
put
(
item
,
3L
);
Assert
.
assertEquals
(
3L
,
configs
.
get
(
item
).
longValue
());
Assert
.
assertEquals
(
1
,
configs
.
size
());
}
@Test
...
...
cat-core/src/main/java/com/dianping/cat/config/app/AppDataService.java
浏览文件 @
62f64b4b
...
...
@@ -33,7 +33,11 @@ public class AppDataService {
public
static
final
String
DELAY_AVG
=
"成功延时(ms)"
;
public
void
insert
(
AppDataCommand
proto
)
throws
DalException
{
m_dao
.
insertData
(
proto
);
m_dao
.
insert
(
proto
);
}
public
void
insert
(
AppDataCommand
[]
proto
)
throws
DalException
{
m_dao
.
insert
(
proto
);
}
public
double
[]
queryValue
(
QueryEntity
entity
,
String
type
)
{
...
...
cat-core/src/main/resources/META-INF/dal/jdbc/app-dal.xml
浏览文件 @
62f64b4b
...
...
@@ -27,8 +27,7 @@
</readset>
</readsets>
<query-defs>
<query
name=
"insert-data"
type=
"INSERT"
>
<param
name=
"command-id"
/>
<query
name=
"insert"
type=
"INSERT"
batch=
"true"
>
<statement>
<![CDATA[INSERT INTO <TABLE/>
(
<FIELDS/>
)
VALUES(
<VALUES/>
)]]>
</statement>
</query>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录