Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
梦中观雨
cat
提交
3d7e541a
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,发现更多精彩内容 >>
提交
3d7e541a
编写于
1月 11, 2012
作者:
Y
youyong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
modify the package and the remove some unused resources
上级
cc8253a6
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
37 addition
and
69 deletion
+37
-69
cat-consumer/src/main/java/com/dianping/cat/consumer/failure/FailureReportAnalyzer.java
.../dianping/cat/consumer/failure/FailureReportAnalyzer.java
+5
-5
cat-consumer/src/main/java/com/dianping/cat/consumer/failure/FailureReportStore.java
...com/dianping/cat/consumer/failure/FailureReportStore.java
+2
-2
cat-consumer/src/main/java/com/dianping/cat/consumer/transaction/TransactionReportMessageAnalyzer.java
...onsumer/transaction/TransactionReportMessageAnalyzer.java
+4
-4
cat-consumer/src/main/resources/META-INF/plexus/components.xml
...onsumer/src/main/resources/META-INF/plexus/components.xml
+5
-5
cat-consumer/src/test/java/com/dianping/cat/consumer/failure/FailureAnalyzerStoreTest.java
...anping/cat/consumer/failure/FailureAnalyzerStoreTest.java
+2
-2
cat-consumer/src/test/java/com/dianping/cat/consumer/failure/FailureAnalyzerTest.java
...om/dianping/cat/consumer/failure/FailureAnalyzerTest.java
+3
-3
cat-consumer/src/test/java/com/dianping/cat/consumer/failure/FailureAnaylzerStoreTestConfigurator.java
...onsumer/failure/FailureAnaylzerStoreTestConfigurator.java
+0
-1
cat-consumer/src/test/java/com/dianping/cat/consumer/failure/FailureReportModelTest.java
...dianping/cat/consumer/failure/FailureReportModelTest.java
+0
-30
cat-consumer/src/test/java/com/dianping/cat/consumer/transaction/TransactionReportMessageAnalyzerTest.java
...mer/transaction/TransactionReportMessageAnalyzerTest.java
+4
-5
cat-consumer/src/test/resources/com/dianping/cat/consumer/ManyAnalyzerTest.xml
.../resources/com/dianping/cat/consumer/ManyAnalyzerTest.xml
+7
-7
cat-consumer/src/test/resources/com/dianping/cat/consumer/OneAnalyzerTwoDurationTest.xml
.../com/dianping/cat/consumer/OneAnalyzerTwoDurationTest.xml
+5
-5
未找到文件。
cat-consumer/src/main/java/com/dianping/cat/consumer/failure/FailureReportAnalyzer.java
浏览文件 @
3d7e541a
...
...
@@ -9,11 +9,11 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Set
;
import
com.dianping.cat.consumer.
model.failure
.entity.Entry
;
import
com.dianping.cat.consumer.
model.failure
.entity.FailureReport
;
import
com.dianping.cat.consumer.
model.failure
.entity.Machines
;
import
com.dianping.cat.consumer.
model.failure
.entity.Segment
;
import
com.dianping.cat.consumer.
model.failure
.entity.Threads
;
import
com.dianping.cat.consumer.
failure.model
.entity.Entry
;
import
com.dianping.cat.consumer.
failure.model
.entity.FailureReport
;
import
com.dianping.cat.consumer.
failure.model
.entity.Machines
;
import
com.dianping.cat.consumer.
failure.model
.entity.Segment
;
import
com.dianping.cat.consumer.
failure.model
.entity.Threads
;
import
com.dianping.cat.message.Event
;
import
com.dianping.cat.message.Message
;
import
com.dianping.cat.message.Transaction
;
...
...
cat-consumer/src/main/java/com/dianping/cat/consumer/failure/FailureReportStore.java
浏览文件 @
3d7e541a
...
...
@@ -4,8 +4,8 @@ import java.io.File;
import
java.io.IOException
;
import
java.text.SimpleDateFormat
;
import
com.dianping.cat.consumer.
model.failure
.entity.FailureReport
;
import
com.dianping.cat.consumer.
model.failure
.transform.DefaultJsonBuilder
;
import
com.dianping.cat.consumer.
failure.model
.entity.FailureReport
;
import
com.dianping.cat.consumer.
failure.model
.transform.DefaultJsonBuilder
;
import
com.site.helper.Files
;
public
class
FailureReportStore
{
...
...
cat-consumer/src/main/java/com/dianping/cat/consumer/transaction/TransactionReportMessageAnalyzer.java
浏览文件 @
3d7e541a
...
...
@@ -11,10 +11,10 @@ import java.util.List;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.LogFactory
;
import
com.dianping.cat.consumer.
model.transaction
.entity.TransactionName
;
import
com.dianping.cat.consumer.
model.transaction
.entity.TransactionReport
;
import
com.dianping.cat.consumer.
model.transaction
.entity.TransactionType
;
import
com.dianping.cat.consumer.
model.transaction
.transform.DefaultJsonBuilder
;
import
com.dianping.cat.consumer.
transaction.model
.entity.TransactionName
;
import
com.dianping.cat.consumer.
transaction.model
.entity.TransactionReport
;
import
com.dianping.cat.consumer.
transaction.model
.entity.TransactionType
;
import
com.dianping.cat.consumer.
transaction.model
.transform.DefaultJsonBuilder
;
import
com.dianping.cat.message.Message
;
import
com.dianping.cat.message.Transaction
;
import
com.dianping.cat.message.spi.AbstractMessageAnalyzer
;
...
...
cat-consumer/src/main/resources/META-INF/plexus/components.xml
浏览文件 @
3d7e541a
...
...
@@ -2,17 +2,17 @@
<components>
<component>
<role>
com.dianping.cat.message.spi.MessageQueue
</role>
<implementation>
com.dianping.cat.consumer.
impl.
DefaultMessageQueue
</implementation>
<implementation>
com.dianping.cat.consumer.DefaultMessageQueue
</implementation>
<instantiation-strategy>
per-lookup
</instantiation-strategy>
</component>
<component>
<role>
com.dianping.cat.consumer.
impl.
AnalyzerFactory
</role>
<implementation>
com.dianping.cat.consumer.
impl.DefaultAnalyzerFactoryImpl
</implementation>
<role>
com.dianping.cat.consumer.AnalyzerFactory
</role>
<implementation>
com.dianping.cat.consumer.
DefaultAnalyzerFactory
</implementation>
</component>
<component>
<role>
com.dianping.cat.message.spi.MessageConsumer
</role>
<role-hint>
realtime
</role-hint>
<implementation>
com.dianping.cat.consumer.
impl.
RealtimeConsumer
</implementation>
<implementation>
com.dianping.cat.consumer.RealtimeConsumer
</implementation>
<configuration>
<consumerId>
realtime
</consumerId>
<domain>
Review
</domain>
...
...
@@ -21,7 +21,7 @@
</configuration>
<requirements>
<requirement>
<role>
com.dianping.cat.consumer.
impl.
AnalyzerFactory
</role>
<role>
com.dianping.cat.consumer.AnalyzerFactory
</role>
</requirement>
</requirements>
</component>
...
...
cat-consumer/src/test/java/com/dianping/cat/consumer/failure/FailureAnalyzerStoreTest.java
浏览文件 @
3d7e541a
...
...
@@ -9,8 +9,8 @@ import org.junit.runner.RunWith;
import
org.junit.runners.JUnit4
;
import
com.dianping.cat.consumer.AnalyzerFactory
;
import
com.dianping.cat.consumer.
model.failure
.entity.FailureReport
;
import
com.dianping.cat.consumer.
model.failure
.transform.DefaultJsonBuilder
;
import
com.dianping.cat.consumer.
failure.model
.entity.FailureReport
;
import
com.dianping.cat.consumer.
failure.model
.transform.DefaultJsonBuilder
;
import
com.dianping.cat.message.internal.DefaultTransaction
;
import
com.dianping.cat.message.spi.MessageTree
;
import
com.dianping.cat.message.spi.internal.DefaultMessageTree
;
...
...
cat-consumer/src/test/java/com/dianping/cat/consumer/failure/FailureAnalyzerTest.java
浏览文件 @
3d7e541a
...
...
@@ -10,9 +10,9 @@ import org.junit.runner.RunWith;
import
org.junit.runners.JUnit4
;
import
com.dianping.cat.consumer.AnalyzerFactory
;
import
com.dianping.cat.consumer.
model.failure
.entity.Entry
;
import
com.dianping.cat.consumer.
model.failure
.entity.FailureReport
;
import
com.dianping.cat.consumer.
model.failure
.entity.Segment
;
import
com.dianping.cat.consumer.
failure.model
.entity.Entry
;
import
com.dianping.cat.consumer.
failure.model
.entity.FailureReport
;
import
com.dianping.cat.consumer.
failure.model
.entity.Segment
;
import
com.dianping.cat.message.Message
;
import
com.dianping.cat.message.internal.DefaultEvent
;
import
com.dianping.cat.message.internal.DefaultTransaction
;
...
...
cat-consumer/src/test/java/com/dianping/cat/consumer/failure/FailureAnaylzerStoreTestConfigurator.java
浏览文件 @
3d7e541a
...
...
@@ -4,7 +4,6 @@ import java.io.File;
import
java.util.ArrayList
;
import
java.util.List
;
import
com.dianping.cat.consumer.failure.FailureReportAnalyzer
;
import
com.dianping.cat.consumer.failure.FailureReportAnalyzer.Handler
;
import
com.site.lookup.configuration.AbstractResourceConfigurator
;
import
com.site.lookup.configuration.Component
;
...
...
cat-consumer/src/test/java/com/dianping/cat/consumer/failure/FailureReportModelTest.java
已删除
100644 → 0
浏览文件 @
cc8253a6
package
com.dianping.cat.consumer.failure
;
import
java.io.IOException
;
import
org.junit.Test
;
import
org.xml.sax.SAXException
;
import
com.dianping.cat.consumer.model.failure.entity.FailureReport
;
import
com.dianping.cat.consumer.model.failure.transform.DefaultJsonBuilder
;
import
com.dianping.cat.consumer.model.failure.transform.DefaultParser
;
import
com.site.helper.Files
;
public
class
FailureReportModelTest
{
@Test
public
void
test
()
throws
SAXException
,
IOException
{
String
xml
=
Files
.
forIO
().
readFrom
(
getClass
().
getResourceAsStream
(
"/logView.xml"
),
"utf-8"
);
FailureReport
report
=
new
DefaultParser
().
parse
(
xml
);
System
.
out
.
println
(
report
);
report
.
getMachines
().
addMachine
(
"a"
).
addMachine
(
"b"
);
System
.
out
.
println
(
report
);
DefaultJsonBuilder
jsonBuilder
=
new
DefaultJsonBuilder
();
jsonBuilder
.
visitFailureReport
(
report
);
System
.
out
.
println
(
jsonBuilder
.
getString
());
}
}
cat-consumer/src/test/java/com/dianping/cat/consumer/transaction/TransactionReportMessageAnalyzerTest.java
浏览文件 @
3d7e541a
...
...
@@ -11,11 +11,10 @@ import org.junit.Before;
import
org.junit.BeforeClass
;
import
org.junit.Test
;
import
com.dianping.cat.consumer.model.transaction.entity.TransactionName
;
import
com.dianping.cat.consumer.model.transaction.entity.TransactionReport
;
import
com.dianping.cat.consumer.model.transaction.entity.TransactionType
;
import
com.dianping.cat.consumer.model.transaction.transform.DefaultJsonBuilder
;
import
com.dianping.cat.consumer.transaction.TransactionReportMessageAnalyzer
;
import
com.dianping.cat.consumer.transaction.model.entity.TransactionName
;
import
com.dianping.cat.consumer.transaction.model.entity.TransactionReport
;
import
com.dianping.cat.consumer.transaction.model.entity.TransactionType
;
import
com.dianping.cat.consumer.transaction.model.transform.DefaultJsonBuilder
;
import
com.dianping.cat.message.Message
;
import
com.dianping.cat.message.internal.DefaultTransaction
;
import
com.dianping.cat.message.spi.MessageTree
;
...
...
cat-consumer/src/test/resources/com/dianping/cat/consumer/ManyAnalyzerTest.xml
浏览文件 @
3d7e541a
...
...
@@ -3,38 +3,38 @@
<component>
<role>
com.dianping.cat.message.spi.MessageConsumer
</role>
<role-hint>
mockManyAnalyzers
</role-hint>
<implementation>
com.dianping.cat.consumer.
impl.
RealtimeConsumer
</implementation>
<implementation>
com.dianping.cat.consumer.RealtimeConsumer
</implementation>
<configuration>
<consumerId>
analyzers
</consumerId>
<analyzerNames>
mock1,mock2,mock3
</analyzerNames>
</configuration>
<requirements>
<requirement>
<role>
com.dianping.cat.consumer.
impl.
AnalyzerFactory
</role>
<role>
com.dianping.cat.consumer.AnalyzerFactory
</role>
</requirement>
</requirements>
</component>
<component>
<role>
com.dianping.cat.message.spi.MessageAnalyzer
</role>
<role-hint>
mock1
</role-hint>
<implementation>
com.dianping.cat.consumer.
impl.
ManyAnalyzerTest$MockAnalyzer1
</implementation>
<implementation>
com.dianping.cat.consumer.ManyAnalyzerTest$MockAnalyzer1
</implementation>
<instantiation-strategy>
per-lookup
</instantiation-strategy>
</component>
<component>
<role>
com.dianping.cat.message.spi.MessageAnalyzer
</role>
<role-hint>
mock2
</role-hint>
<implementation>
com.dianping.cat.consumer.
impl.
ManyAnalyzerTest$MockAnalyzer2
</implementation>
<implementation>
com.dianping.cat.consumer.ManyAnalyzerTest$MockAnalyzer2
</implementation>
<instantiation-strategy>
per-lookup
</instantiation-strategy>
</component>
<component>
<role>
com.dianping.cat.message.spi.MessageAnalyzer
</role>
<role-hint>
mock3
</role-hint>
<implementation>
com.dianping.cat.consumer.
impl.
ManyAnalyzerTest$MockAnalyzer3
</implementation>
<implementation>
com.dianping.cat.consumer.ManyAnalyzerTest$MockAnalyzer3
</implementation>
<instantiation-strategy>
per-lookup
</instantiation-strategy>
</component>
<component>
<role>
com.dianping.cat.consumer.
impl.
AnalyzerFactory
</role>
<implementation>
com.dianping.cat.consumer.
impl.
ManyAnalyerMockFactory
</implementation>
<role>
com.dianping.cat.consumer.AnalyzerFactory
</role>
<implementation>
com.dianping.cat.consumer.ManyAnalyerMockFactory
</implementation>
</component>
</components>
</plexus>
cat-consumer/src/test/resources/com/dianping/cat/consumer/OneAnalyzerTwoDurationTest.xml
浏览文件 @
3d7e541a
...
...
@@ -3,26 +3,26 @@
<component>
<role>
com.dianping.cat.message.spi.MessageConsumer
</role>
<role-hint>
mock
</role-hint>
<implementation>
com.dianping.cat.consumer.
impl.
RealtimeConsumer
</implementation>
<implementation>
com.dianping.cat.consumer.RealtimeConsumer
</implementation>
<configuration>
<consumerId>
mock
</consumerId>
<analyzerNames>
mock
</analyzerNames>
</configuration>
<requirements>
<requirement>
<role>
com.dianping.cat.consumer.
impl.
AnalyzerFactory
</role>
<role>
com.dianping.cat.consumer.AnalyzerFactory
</role>
</requirement>
</requirements>
</component>
<component>
<role>
com.dianping.cat.message.spi.MessageAnalyzer
</role>
<role-hint>
mock
</role-hint>
<implementation>
com.dianping.cat.consumer.
impl.
OneAnalyzerTwoDurationTest$MockAnalyzer
</implementation>
<implementation>
com.dianping.cat.consumer.OneAnalyzerTwoDurationTest$MockAnalyzer
</implementation>
<instantiation-strategy>
per-lookup
</instantiation-strategy>
</component>
<component>
<role>
com.dianping.cat.consumer.
impl.
AnalyzerFactory
</role>
<implementation>
com.dianping.cat.consumer.
impl.
OneAnalyzerMockFactory
</implementation>
<role>
com.dianping.cat.consumer.AnalyzerFactory
</role>
<implementation>
com.dianping.cat.consumer.OneAnalyzerMockFactory
</implementation>
</component>
</components>
</plexus>
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录