Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
梦中观雨
cat
提交
850e29bf
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,发现更多精彩内容 >>
提交
850e29bf
编写于
7月 16, 2014
作者:
曾
曾伟伟
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
app data
上级
aa57e15f
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
241 addition
and
227 deletion
+241
-227
cat-broker/src/main/java/com/dianping/cat/broker/api/app/BucketHandler.java
...n/java/com/dianping/cat/broker/api/app/BucketHandler.java
+9
-3
cat-broker/src/main/java/com/dianping/cat/broker/api/page/batch/Handler.java
.../java/com/dianping/cat/broker/api/page/batch/Handler.java
+12
-4
pom.xml
pom.xml
+220
-220
未找到文件。
cat-broker/src/main/java/com/dianping/cat/broker/api/app/BucketHandler.java
浏览文件 @
850e29bf
...
...
@@ -12,7 +12,9 @@ import java.util.Map.Entry;
import
org.codehaus.plexus.logging.LogEnabled
;
import
org.codehaus.plexus.logging.Logger
;
import
org.unidal.helper.Threads.Task
;
import
org.unidal.lookup.annotation.Inject
;
import
com.dianping.cat.config.app.AppDataService
;
import
com.dianping.cat.service.appData.entity.AppData
;
public
class
BucketHandler
implements
Task
,
LogEnabled
{
...
...
@@ -22,6 +24,9 @@ public class BucketHandler implements Task, LogEnabled {
private
AppDataQueue
m_appDataQueue
;
private
HashMap
<
Integer
,
HashMap
<
String
,
AppData
>>
m_mergedData
;
@Inject
private
AppDataService
m_appDataService
;
private
long
m_startTime
;
...
...
@@ -99,7 +104,7 @@ public class BucketHandler implements Task, LogEnabled {
for
(
Entry
<
String
,
AppData
>
entry
:
outerEntry
.
getValue
().
entrySet
())
{
AppData
appData
=
entry
.
getValue
();
if
(
toHb
ase
(
appData
)
==
false
)
{
if
(
saveToDataB
ase
(
appData
)
==
false
)
{
saveToFile
(
appData
);
}
}
...
...
@@ -121,8 +126,9 @@ public class BucketHandler implements Task, LogEnabled {
m_appDataQueue
.
offer
(
appData
);
}
private
boolean
toHbase
(
AppData
appData
)
{
return
false
;
private
boolean
saveToDataBase
(
AppData
appData
)
{
m_appDataService
.
insert
();
return
true
;
}
private
void
saveToFile
(
AppData
appData
)
{
...
...
cat-broker/src/main/java/com/dianping/cat/broker/api/page/batch/Handler.java
浏览文件 @
850e29bf
...
...
@@ -22,6 +22,7 @@ import com.dianping.cat.broker.api.page.IpService.IpInfo;
import
com.dianping.cat.broker.api.page.MonitorEntity
;
import
com.dianping.cat.broker.api.page.MonitorManager
;
import
com.dianping.cat.broker.api.page.RequestUtils
;
import
com.dianping.cat.config.app.AppConfigManager
;
import
com.dianping.cat.service.appData.entity.AppData
;
public
class
Handler
implements
PageHandler
<
Context
>,
LogEnabled
{
...
...
@@ -31,6 +32,9 @@ public class Handler implements PageHandler<Context>, LogEnabled {
@Inject
private
IpService
m_ipService
;
@Inject
private
AppConfigManager
m_appConfigManager
;
private
Logger
m_logger
;
...
...
@@ -129,10 +133,14 @@ public class Handler implements PageHandler<Context>, LogEnabled {
try
{
appData
.
setTimestamp
(
Long
.
parseLong
(
items
[
0
]));
appData
.
setNetwork
(
Integer
.
parseInt
(
items
[
1
]));
appData
.
setVersion
(
Integer
.
parseInt
(
items
[
2
]));
appData
.
setChannel
(
Integer
.
parseInt
(
items
[
3
]));
appData
.
setCommand
(
Integer
.
parseInt
(
items
[
4
]));
Integer
command
=
m_appConfigManager
.
getCommands
().
get
(
items
[
2
]);
if
(
command
==
null
)
{
continue
;
}
appData
.
setCommand
(
command
);
appData
.
setNetwork
(
Integer
.
parseInt
(
items
[
2
]));
appData
.
setVersion
(
Integer
.
parseInt
(
items
[
3
]));
appData
.
setChannel
(
Integer
.
parseInt
(
items
[
4
]));
appData
.
setCode
(
Integer
.
parseInt
(
items
[
5
]));
appData
.
setPlatform
(
Integer
.
parseInt
(
items
[
6
]));
appData
.
setRequestByte
(
Integer
.
parseInt
(
items
[
7
]));
...
...
pom.xml
浏览文件 @
850e29bf
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
>
<
modelVersion>
4.0.0
</modelVersion>
<
groupId>
com.dianping.cat
</groupId>
<
artifactId>
parent
</artifactId>
<
version>
1.0.5
</version>
<
name>
parent
</name>
<
description>
Central Application Tracking
</description>
<
packaging>
pom
</packaging>
<modules>
<module>
cat-c
lient
</module>
<module>
cat-co
re
</module>
<module>
cat-
consumer
</module>
<module>
cat-
hadoop
</module>
<module>
cat-
consumer-advanced
</module>
<module>
cat-
home
</module>
<module>
cat-
broker
</module>
<module>
cat-agent
</module>
</modules>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>
com.dianping.cat
</groupId>
<artifactId>
cat-client
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
com.dianping.cat
</groupId>
<artifactId>
cat-core
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
com.dianping.cat
</groupId>
<artifactId>
cat-hadoop
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
com.dianping.cat
</groupId>
<artifactId>
cat-consumer
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
com.dianping.cat
</groupId>
<artifactId>
cat-consumer-advanced
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
<version>
4.8.1
</version>
</dependency>
<dependency>
<groupId>
org.mortbay.jetty
</groupId>
<artifactId>
jetty
</artifactId>
<version>
6.1.14
</version>
</dependency>
<dependency>
<groupId>
org.mortbay.jetty
</groupId>
<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>
<version>
6.1.14
</version>
</dependency>
<dependency>
<groupId>
javax.servlet
</groupId>
<artifactId>
servlet-api
</artifactId>
<version>
2.5
</version>
</dependency>
<dependency>
<groupId>
javax.servlet.jsp
</groupId>
<artifactId>
jsp-api
</artifactId>
<version>
2.1
</version>
</dependency>
<dependency>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
<version>
5.1.20
</version>
</dependency>
<dependency>
<groupId>
org.jboss.netty
</groupId>
<artifactId>
netty
</artifactId>
<version>
3.2.7.Final
</version>
</dependency>
<dependency>
<groupId>
com.google.code.gson
</groupId>
<artifactId>
gson
</artifactId>
<version>
1.6
</version>
</dependency>
<dependency>
<groupId>
log4j
</groupId>
<artifactId>
log4j
</artifactId>
<version>
1.2.14
</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>
maven-compiler-plugin
</artifactId>
<version>
2.5.1
</version>
<configuration>
<source>
1.6
</source>
<target>
1.6
</target>
</configuration>
</plugin>
<plugin>
<artifactId>
maven-surefire-plugin
</artifactId>
<version>
2.9
</version>
<configuration>
<includes>
<include>
**/AllTests.java
</include>
</includes>
<!-- <debugForkedProcess>-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -Xnoagent -Djava.compiler=NONE</debugForkedProcess> -->
</configuration>
<dependencies>
<dependency>
<groupId>
org.apache.maven.surefire
</groupId>
<artifactId>
surefire-junit47
</artifactId>
<version>
2.9
</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<artifactId>
maven-eclipse-plugin
</artifactId>
<version>
2.9
</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.6
]]>
</content>
</file>
<file>
<name>
.settings/org.eclipse.core.resources.prefs
</name>
<content>
<![CDATA[
eclipse.preferences.version=1
encoding/<project>
=UTF-8
]]>
</content>
</file>
</additionalConfig>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<artifactId>
maven-source-plugin
</artifactId>
<version>
2.2
</version>
<executions>
<execution>
<id>
attach-sources
</id>
<phase>
package
</phase>
<goals>
<goal>
jar-no-fork
</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>
com.dianping.cat
</groupId>
<artifactId>
cat-maven-plugin
</artifactId>
<version>
1.0.5
</version>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>
central
</id>
<name>
Maven2 Central Repository
</name>
<layout>
default
</layout>
<url>
http://repo1.maven.org/maven2
</url>
</repository>
<repository>
<id>
cat.repo
</id>
<url>
https://raw.github.com/dianping/cat/mvn-repo
</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>
central
</id>
<url>
http://repo1.maven.org/maven2
</url>
</pluginRepository>
<pluginRepository>
<id>
cat.repo
</id>
<url>
https://raw.github.com/dianping/cat/mvn-repo
</url>
</pluginRepository>
</pluginRepositories>
<distributionManagement>
<repository>
<id>
dianping.repo
</id>
<url>
http://mvn.dianpingoa.com/dianping-releases
</url>
</repository>
<snapshotRepository>
<id>
dianping.repo.snapshots
</id>
<url>
http://mvn.dianpingoa.com/dianping-snapshots
</url>
</snapshotRepository>
</distributionManagement>
<properties>
<project.build.sourceEncoding>
utf-8
</project.build.sourceEncoding>
</properties>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<
groupId>
com.dianping.cat
</groupId>
<
artifactId>
parent
</artifactId>
<
version>
1.0.5
</version>
<
name>
parent
</name>
<
description>
Central Application Tracking
</description>
<
packaging>
pom
</packaging>
<
modules>
<module>
cat-client
</module>
<module>
cat-c
ore
</module>
<module>
cat-co
nsumer
</module>
<module>
cat-
hadoop
</module>
<module>
cat-
consumer-advanced
</module>
<module>
cat-
home
</module>
<module>
cat-
broker
</module>
<module>
cat-
agent
</module>
<module>
IPService
</module>
</modules>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>
com.dianping.cat
</groupId>
<artifactId>
cat-client
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
com.dianping.cat
</groupId>
<artifactId>
cat-core
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
com.dianping.cat
</groupId>
<artifactId>
cat-hadoop
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
com.dianping.cat
</groupId>
<artifactId>
cat-consumer
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
com.dianping.cat
</groupId>
<artifactId>
cat-consumer-advanced
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
<version>
4.8.1
</version>
</dependency>
<dependency>
<groupId>
org.mortbay.jetty
</groupId>
<artifactId>
jetty
</artifactId>
<version>
6.1.14
</version>
</dependency>
<dependency>
<groupId>
org.mortbay.jetty
</groupId>
<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>
<version>
6.1.14
</version>
</dependency>
<dependency>
<groupId>
javax.servlet
</groupId>
<artifactId>
servlet-api
</artifactId>
<version>
2.5
</version>
</dependency>
<dependency>
<groupId>
javax.servlet.jsp
</groupId>
<artifactId>
jsp-api
</artifactId>
<version>
2.1
</version>
</dependency>
<dependency>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
<version>
5.1.20
</version>
</dependency>
<dependency>
<groupId>
org.jboss.netty
</groupId>
<artifactId>
netty
</artifactId>
<version>
3.2.7.Final
</version>
</dependency>
<dependency>
<groupId>
com.google.code.gson
</groupId>
<artifactId>
gson
</artifactId>
<version>
1.6
</version>
</dependency>
<dependency>
<groupId>
log4j
</groupId>
<artifactId>
log4j
</artifactId>
<version>
1.2.14
</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>
maven-compiler-plugin
</artifactId>
<version>
2.5.1
</version>
<configuration>
<source>
1.6
</source>
<target>
1.6
</target>
</configuration>
</plugin>
<plugin>
<artifactId>
maven-surefire-plugin
</artifactId>
<version>
2.9
</version>
<configuration>
<includes>
<include>
**/AllTests.java
</include>
</includes>
<!-- <debugForkedProcess>-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -Xnoagent -Djava.compiler=NONE</debugForkedProcess> -->
</configuration>
<dependencies>
<dependency>
<groupId>
org.apache.maven.surefire
</groupId>
<artifactId>
surefire-junit47
</artifactId>
<version>
2.9
</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<artifactId>
maven-eclipse-plugin
</artifactId>
<version>
2.9
</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.6
]]>
</content>
</file>
<file>
<name>
.settings/org.eclipse.core.resources.prefs
</name>
<content>
<![CDATA[
eclipse.preferences.version=1
encoding/<project>
=UTF-8
]]>
</content>
</file>
</additionalConfig>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<artifactId>
maven-source-plugin
</artifactId>
<version>
2.2
</version>
<executions>
<execution>
<id>
attach-sources
</id>
<phase>
package
</phase>
<goals>
<goal>
jar-no-fork
</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>
com.dianping.cat
</groupId>
<artifactId>
cat-maven-plugin
</artifactId>
<version>
1.0.5
</version>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>
central
</id>
<name>
Maven2 Central Repository
</name>
<layout>
default
</layout>
<url>
http://repo1.maven.org/maven2
</url>
</repository>
<repository>
<id>
cat.repo
</id>
<url>
https://raw.github.com/dianping/cat/mvn-repo
</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>
central
</id>
<url>
http://repo1.maven.org/maven2
</url>
</pluginRepository>
<pluginRepository>
<id>
cat.repo
</id>
<url>
https://raw.github.com/dianping/cat/mvn-repo
</url>
</pluginRepository>
</pluginRepositories>
<distributionManagement>
<repository>
<id>
dianping.repo
</id>
<url>
http://mvn.dianpingoa.com/dianping-releases
</url>
</repository>
<snapshotRepository>
<id>
dianping.repo.snapshots
</id>
<url>
http://mvn.dianpingoa.com/dianping-snapshots
</url>
</snapshotRepository>
</distributionManagement>
<properties>
<project.build.sourceEncoding>
utf-8
</project.build.sourceEncoding>
</properties>
</project>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录