Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
山不在高_有仙则灵
SkyWalking
提交
9bde7b7b
S
SkyWalking
项目概览
山不在高_有仙则灵
/
SkyWalking
与 Fork 源项目一致
Fork自
apache / SkyWalking
通知
12
Star
0
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
SkyWalking
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9bde7b7b
编写于
2月 28, 2018
作者:
P
peng-yongsheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove the application named USER.
上级
8186365b
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
22 addition
and
31 deletion
+22
-31
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/apache/skywalking/apm/collector/storage/dao/ui/IInstanceUIDAO.java
...ywalking/apm/collector/storage/dao/ui/IInstanceUIDAO.java
+1
-1
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/ui/InstanceEsUIDAO.java
...king/apm/collector/storage/es/dao/ui/InstanceEsUIDAO.java
+3
-3
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/ui/InstanceH2UIDAO.java
...king/apm/collector/storage/h2/dao/ui/InstanceH2UIDAO.java
+2
-2
apm-collector/apm-collector-ui/collector-ui-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/ui/query/ApplicationQuery.java
...e/skywalking/apm/collector/ui/query/ApplicationQuery.java
+3
-3
apm-collector/apm-collector-ui/collector-ui-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/ui/query/OverViewLayerQuery.java
...skywalking/apm/collector/ui/query/OverViewLayerQuery.java
+3
-20
apm-collector/apm-collector-ui/collector-ui-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/ui/service/ApplicationService.java
...ywalking/apm/collector/ui/service/ApplicationService.java
+10
-2
未找到文件。
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/apache/skywalking/apm/collector/storage/dao/ui/IInstanceUIDAO.java
浏览文件 @
9bde7b7b
...
@@ -32,7 +32,7 @@ public interface IInstanceUIDAO extends DAO {
...
@@ -32,7 +32,7 @@ public interface IInstanceUIDAO extends DAO {
Long
instanceLastHeartBeatTime
(
long
applicationInstanceId
);
Long
instanceLastHeartBeatTime
(
long
applicationInstanceId
);
List
<
Application
>
getApplications
(
long
start
Time
,
long
endTime
,
int
...
applicationIds
);
List
<
Application
>
getApplications
(
long
start
SecondTimeBucket
,
long
endSecondTimeBucket
,
int
...
applicationIds
);
Instance
getInstance
(
int
instanceId
);
Instance
getInstance
(
int
instanceId
);
...
...
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/ui/InstanceEsUIDAO.java
浏览文件 @
9bde7b7b
...
@@ -97,14 +97,14 @@ public class InstanceEsUIDAO extends EsDAO implements IInstanceUIDAO {
...
@@ -97,14 +97,14 @@ public class InstanceEsUIDAO extends EsDAO implements IInstanceUIDAO {
return
heartBeatTime
;
return
heartBeatTime
;
}
}
@Override
public
List
<
Application
>
getApplications
(
long
start
Time
,
long
endTime
,
int
...
applicationIds
)
{
@Override
public
List
<
Application
>
getApplications
(
long
start
SecondTimeBucket
,
long
endSecondTimeBucket
,
int
...
applicationIds
)
{
logger
.
debug
(
"application list get, start time: {}, end time: {}"
,
start
Time
,
endTime
);
logger
.
debug
(
"application list get, start time: {}, end time: {}"
,
start
SecondTimeBucket
,
endSecondTimeBucket
);
SearchRequestBuilder
searchRequestBuilder
=
getClient
().
prepareSearch
(
InstanceTable
.
TABLE
);
SearchRequestBuilder
searchRequestBuilder
=
getClient
().
prepareSearch
(
InstanceTable
.
TABLE
);
searchRequestBuilder
.
setTypes
(
InstanceTable
.
TABLE_TYPE
);
searchRequestBuilder
.
setTypes
(
InstanceTable
.
TABLE_TYPE
);
searchRequestBuilder
.
setSearchType
(
SearchType
.
DFS_QUERY_THEN_FETCH
);
searchRequestBuilder
.
setSearchType
(
SearchType
.
DFS_QUERY_THEN_FETCH
);
BoolQueryBuilder
boolQueryBuilder
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
boolQueryBuilder
=
QueryBuilders
.
boolQuery
();
boolQueryBuilder
.
must
().
add
(
QueryBuilders
.
rangeQuery
(
InstanceTable
.
COLUMN_HEARTBEAT_TIME
).
gte
(
start
Time
));
boolQueryBuilder
.
must
().
add
(
QueryBuilders
.
rangeQuery
(
InstanceTable
.
COLUMN_HEARTBEAT_TIME
).
gte
(
start
SecondTimeBucket
));
boolQueryBuilder
.
must
().
add
(
QueryBuilders
.
termQuery
(
InstanceTable
.
COLUMN_IS_ADDRESS
,
BooleanUtils
.
FALSE
));
boolQueryBuilder
.
must
().
add
(
QueryBuilders
.
termQuery
(
InstanceTable
.
COLUMN_IS_ADDRESS
,
BooleanUtils
.
FALSE
));
if
(
applicationIds
.
length
>
0
)
{
if
(
applicationIds
.
length
>
0
)
{
boolQueryBuilder
.
must
().
add
(
QueryBuilders
.
termsQuery
(
InstanceTable
.
COLUMN_APPLICATION_ID
,
applicationIds
));
boolQueryBuilder
.
must
().
add
(
QueryBuilders
.
termsQuery
(
InstanceTable
.
COLUMN_APPLICATION_ID
,
applicationIds
));
...
...
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/ui/InstanceH2UIDAO.java
浏览文件 @
9bde7b7b
...
@@ -88,12 +88,12 @@ public class InstanceH2UIDAO extends H2DAO implements IInstanceUIDAO {
...
@@ -88,12 +88,12 @@ public class InstanceH2UIDAO extends H2DAO implements IInstanceUIDAO {
}
}
@Override
@Override
public
List
<
Application
>
getApplications
(
long
start
Time
,
long
endTime
,
int
...
applicationIds
)
{
public
List
<
Application
>
getApplications
(
long
start
SecondTimeBucket
,
long
endSecondTimeBucket
,
int
...
applicationIds
)
{
H2Client
client
=
getClient
();
H2Client
client
=
getClient
();
List
<
Application
>
applications
=
new
LinkedList
<>();
List
<
Application
>
applications
=
new
LinkedList
<>();
String
sql
=
SqlBuilder
.
buildSql
(
GET_APPLICATIONS_SQL
,
InstanceTable
.
COLUMN_INSTANCE_ID
,
String
sql
=
SqlBuilder
.
buildSql
(
GET_APPLICATIONS_SQL
,
InstanceTable
.
COLUMN_INSTANCE_ID
,
InstanceTable
.
TABLE
,
InstanceTable
.
COLUMN_HEARTBEAT_TIME
,
InstanceTable
.
COLUMN_APPLICATION_ID
);
InstanceTable
.
TABLE
,
InstanceTable
.
COLUMN_HEARTBEAT_TIME
,
InstanceTable
.
COLUMN_APPLICATION_ID
);
Object
[]
params
=
new
Object
[]
{
start
Time
};
Object
[]
params
=
new
Object
[]
{
start
SecondTimeBucket
};
try
(
ResultSet
rs
=
client
.
executeQuery
(
sql
,
params
))
{
try
(
ResultSet
rs
=
client
.
executeQuery
(
sql
,
params
))
{
while
(
rs
.
next
())
{
while
(
rs
.
next
())
{
Integer
applicationId
=
rs
.
getInt
(
InstanceTable
.
COLUMN_APPLICATION_ID
);
Integer
applicationId
=
rs
.
getInt
(
InstanceTable
.
COLUMN_APPLICATION_ID
);
...
...
apm-collector/apm-collector-ui/collector-ui-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/ui/query/ApplicationQuery.java
浏览文件 @
9bde7b7b
...
@@ -69,10 +69,10 @@ public class ApplicationQuery implements Query {
...
@@ -69,10 +69,10 @@ public class ApplicationQuery implements Query {
}
}
public
List
<
Application
>
getAllApplication
(
Duration
duration
)
throws
ParseException
{
public
List
<
Application
>
getAllApplication
(
Duration
duration
)
throws
ParseException
{
long
start
=
DurationUtils
.
INSTANCE
.
durationToSecondTimeBucket
(
duration
.
getStep
(),
duration
.
getStart
());
long
start
SecondTimeBucket
=
DurationUtils
.
INSTANCE
.
durationToSecondTimeBucket
(
duration
.
getStep
(),
duration
.
getStart
());
long
end
=
DurationUtils
.
INSTANCE
.
durationToSecondTimeBucket
(
duration
.
getStep
(),
duration
.
getEnd
());
long
end
SecondTimeBucket
=
DurationUtils
.
INSTANCE
.
durationToSecondTimeBucket
(
duration
.
getStep
(),
duration
.
getEnd
());
return
getApplicationService
().
getApplications
(
start
,
end
);
return
getApplicationService
().
getApplications
(
start
SecondTimeBucket
,
endSecondTimeBucket
);
}
}
public
Topology
getApplicationTopology
(
int
applicationId
,
Duration
duration
)
throws
ParseException
{
public
Topology
getApplicationTopology
(
int
applicationId
,
Duration
duration
)
throws
ParseException
{
...
...
apm-collector/apm-collector-ui/collector-ui-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/ui/query/OverViewLayerQuery.java
浏览文件 @
9bde7b7b
...
@@ -21,9 +21,7 @@ package org.apache.skywalking.apm.collector.ui.query;
...
@@ -21,9 +21,7 @@ package org.apache.skywalking.apm.collector.ui.query;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.util.List
;
import
java.util.List
;
import
org.apache.skywalking.apm.collector.core.module.ModuleManager
;
import
org.apache.skywalking.apm.collector.core.module.ModuleManager
;
import
org.apache.skywalking.apm.collector.core.util.Const
;
import
org.apache.skywalking.apm.collector.core.util.ObjectUtils
;
import
org.apache.skywalking.apm.collector.core.util.ObjectUtils
;
import
org.apache.skywalking.apm.collector.storage.ui.application.Application
;
import
org.apache.skywalking.apm.collector.storage.ui.common.Duration
;
import
org.apache.skywalking.apm.collector.storage.ui.common.Duration
;
import
org.apache.skywalking.apm.collector.storage.ui.common.Topology
;
import
org.apache.skywalking.apm.collector.storage.ui.common.Topology
;
import
org.apache.skywalking.apm.collector.storage.ui.overview.AlarmTrend
;
import
org.apache.skywalking.apm.collector.storage.ui.overview.AlarmTrend
;
...
@@ -101,26 +99,11 @@ public class OverViewLayerQuery implements Query {
...
@@ -101,26 +99,11 @@ public class OverViewLayerQuery implements Query {
}
}
public
ClusterBrief
getClusterBrief
(
Duration
duration
)
throws
ParseException
{
public
ClusterBrief
getClusterBrief
(
Duration
duration
)
throws
ParseException
{
long
start
=
DurationUtils
.
INSTANCE
.
durationToSecondTimeBucket
(
duration
.
getStep
(),
duration
.
getStart
());
long
start
SecondTimeBucket
=
DurationUtils
.
INSTANCE
.
durationToSecondTimeBucket
(
duration
.
getStep
(),
duration
.
getStart
());
long
end
=
DurationUtils
.
INSTANCE
.
durationToSecondTimeBucket
(
duration
.
getStep
(),
duration
.
getEnd
());
long
end
SecondTimeBucket
=
DurationUtils
.
INSTANCE
.
durationToSecondTimeBucket
(
duration
.
getStep
(),
duration
.
getEnd
());
ClusterBrief
clusterBrief
=
new
ClusterBrief
();
ClusterBrief
clusterBrief
=
new
ClusterBrief
();
clusterBrief
.
setNumOfApplication
(
getApplicationService
().
getApplications
(
startSecondTimeBucket
,
endSecondTimeBucket
).
size
());
List
<
Application
>
applications
=
getApplicationService
().
getApplications
(
start
,
end
);
boolean
containsUserApplication
=
false
;
for
(
Application
application
:
applications
)
{
if
(
application
.
getId
()
==
Const
.
NONE_INSTANCE_ID
)
{
containsUserApplication
=
true
;
break
;
}
}
if
(
containsUserApplication
)
{
clusterBrief
.
setNumOfApplication
(
applications
.
size
()
-
1
);
}
else
{
clusterBrief
.
setNumOfApplication
(
applications
.
size
());
}
clusterBrief
.
setNumOfDatabase
(
getNetworkAddressService
().
getNumOfDatabase
());
clusterBrief
.
setNumOfDatabase
(
getNetworkAddressService
().
getNumOfDatabase
());
clusterBrief
.
setNumOfCache
(
getNetworkAddressService
().
getNumOfCache
());
clusterBrief
.
setNumOfCache
(
getNetworkAddressService
().
getNumOfCache
());
clusterBrief
.
setNumOfMQ
(
getNetworkAddressService
().
getNumOfMQ
());
clusterBrief
.
setNumOfMQ
(
getNetworkAddressService
().
getNumOfMQ
());
...
...
apm-collector/apm-collector-ui/collector-ui-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/ui/service/ApplicationService.java
浏览文件 @
9bde7b7b
...
@@ -24,6 +24,7 @@ import org.apache.skywalking.apm.collector.cache.CacheModule;
...
@@ -24,6 +24,7 @@ import org.apache.skywalking.apm.collector.cache.CacheModule;
import
org.apache.skywalking.apm.collector.cache.service.ApplicationCacheService
;
import
org.apache.skywalking.apm.collector.cache.service.ApplicationCacheService
;
import
org.apache.skywalking.apm.collector.cache.service.ServiceNameCacheService
;
import
org.apache.skywalking.apm.collector.cache.service.ServiceNameCacheService
;
import
org.apache.skywalking.apm.collector.core.module.ModuleManager
;
import
org.apache.skywalking.apm.collector.core.module.ModuleManager
;
import
org.apache.skywalking.apm.collector.core.util.Const
;
import
org.apache.skywalking.apm.collector.storage.StorageModule
;
import
org.apache.skywalking.apm.collector.storage.StorageModule
;
import
org.apache.skywalking.apm.collector.storage.dao.ui.IApplicationMetricUIDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.ui.IApplicationMetricUIDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.ui.IInstanceUIDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.ui.IInstanceUIDAO
;
...
@@ -60,8 +61,15 @@ public class ApplicationService {
...
@@ -60,8 +61,15 @@ public class ApplicationService {
this
.
serviceNameCacheService
=
moduleManager
.
find
(
CacheModule
.
NAME
).
getService
(
ServiceNameCacheService
.
class
);
this
.
serviceNameCacheService
=
moduleManager
.
find
(
CacheModule
.
NAME
).
getService
(
ServiceNameCacheService
.
class
);
}
}
public
List
<
Application
>
getApplications
(
long
startTime
,
long
endTime
,
int
...
applicationIds
)
{
public
List
<
Application
>
getApplications
(
long
startSecondTimeBucket
,
long
endSecondTimeBucket
,
List
<
Application
>
applications
=
instanceDAO
.
getApplications
(
startTime
,
endTime
,
applicationIds
);
int
...
applicationIds
)
{
List
<
Application
>
applications
=
instanceDAO
.
getApplications
(
startSecondTimeBucket
,
endSecondTimeBucket
,
applicationIds
);
applications
.
forEach
(
application
->
{
if
(
application
.
getId
()
==
Const
.
NONE_APPLICATION_ID
)
{
applications
.
remove
(
application
);
}
});
applications
.
forEach
(
application
->
{
applications
.
forEach
(
application
->
{
String
applicationCode
=
applicationCacheService
.
getApplicationById
(
application
.
getId
()).
getApplicationCode
();
String
applicationCode
=
applicationCacheService
.
getApplicationById
(
application
.
getId
()).
getApplicationCode
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录