Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
SkyWalking
提交
8a892219
S
SkyWalking
项目概览
apache
/
SkyWalking
上一次同步 1 年多
通知
302
Star
21345
Fork
6091
代码
文件
提交
分支
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,体验更适合开发者的 AI 搜索 >>
提交
8a892219
编写于
8月 14, 2018
作者:
wu-sheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Push generated codes with percent and percent boolean expression. CC @peng-yongsheng
上级
0ebbb0a5
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
608 addition
and
0 deletion
+608
-0
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/generated/endpoint/EndpointAvgIndicator.java
...ore/analysis/generated/endpoint/EndpointAvgIndicator.java
+131
-0
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/generated/endpoint/EndpointDispatcher.java
.../core/analysis/generated/endpoint/EndpointDispatcher.java
+58
-0
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/generated/endpoint/EndpointPercentIndicator.java
...analysis/generated/endpoint/EndpointPercentIndicator.java
+131
-0
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/generated/service/ServiceDispatcher.java
...er/core/analysis/generated/service/ServiceDispatcher.java
+33
-0
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/indicator/PercentIndicator.java
.../oap/server/core/analysis/indicator/PercentIndicator.java
+59
-0
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/indicator/annotation/Expression.java
...server/core/analysis/indicator/annotation/Expression.java
+32
-0
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/indicator/annotation/ExpressionArg0.java
...er/core/analysis/indicator/annotation/ExpressionArg0.java
+32
-0
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/indicator/annotation/ExpressionArg1.java
...er/core/analysis/indicator/annotation/ExpressionArg1.java
+32
-0
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/indicator/expression/BinaryMatchExpression.java
.../analysis/indicator/expression/BinaryMatchExpression.java
+40
-0
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/indicator/expression/BooleanBinaryMatch.java
...ore/analysis/indicator/expression/BooleanBinaryMatch.java
+29
-0
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/Service.java
...org/apache/skywalking/oap/server/core/source/Service.java
+31
-0
未找到文件。
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/generated/endpoint/EndpointAvgIndicator.java
0 → 100644
浏览文件 @
8a892219
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package
org.apache.skywalking.oap.server.core.analysis.generated.endpoint
;
import
java.util.*
;
import
lombok.*
;
import
org.apache.skywalking.oap.server.core.analysis.indicator.*
;
import
org.apache.skywalking.oap.server.core.analysis.indicator.annotation.IndicatorType
;
import
org.apache.skywalking.oap.server.core.remote.annotation.StreamData
;
import
org.apache.skywalking.oap.server.core.remote.grpc.proto.RemoteData
;
import
org.apache.skywalking.oap.server.core.storage.annotation.*
;
import
org.apache.skywalking.oap.server.core.storage.StorageBuilder
;
/**
* This class is auto generated. Please don't change this class manually.
*
* @author Observability Analysis Language code generator
*/
@IndicatorType
@StreamData
@StorageEntity
(
name
=
"endpoint_avg"
,
builder
=
EndpointAvgIndicator
.
Builder
.
class
)
public
class
EndpointAvgIndicator
extends
AvgIndicator
{
@Setter
@Getter
@Column
(
columnName
=
"id"
)
private
int
id
;
@Setter
@Getter
@Column
(
columnName
=
"service_id"
)
private
int
serviceId
;
@Setter
@Getter
@Column
(
columnName
=
"service_instance_id"
)
private
int
serviceInstanceId
;
@Override
public
String
id
()
{
return
String
.
valueOf
(
id
);
}
@Override
public
int
hashCode
()
{
int
result
=
17
;
result
=
31
*
result
+
id
;
result
=
31
*
result
+
(
int
)
getTimeBucket
();
return
result
;
}
@Override
public
boolean
equals
(
Object
obj
)
{
if
(
this
==
obj
)
return
true
;
if
(
obj
==
null
)
return
false
;
if
(
getClass
()
!=
obj
.
getClass
())
return
false
;
EndpointAvgIndicator
indicator
=
(
EndpointAvgIndicator
)
obj
;
if
(
id
!=
indicator
.
id
)
return
false
;
if
(
getTimeBucket
()
!=
indicator
.
getTimeBucket
())
return
false
;
return
true
;
}
@Override
public
RemoteData
.
Builder
serialize
()
{
RemoteData
.
Builder
remoteBuilder
=
RemoteData
.
newBuilder
();
remoteBuilder
.
setDataLongs
(
0
,
getTimeBucket
());
remoteBuilder
.
setDataLongs
(
1
,
getSummation
());
remoteBuilder
.
setDataLongs
(
2
,
getValue
());
remoteBuilder
.
setDataLongs
(
3
,
getTimeBucket
());
remoteBuilder
.
setDataIntegers
(
0
,
getId
());
remoteBuilder
.
setDataIntegers
(
1
,
getServiceId
());
remoteBuilder
.
setDataIntegers
(
2
,
getServiceInstanceId
());
remoteBuilder
.
setDataIntegers
(
3
,
getCount
());
return
remoteBuilder
;
}
@Override
public
void
deserialize
(
RemoteData
remoteData
)
{
setTimeBucket
(
remoteData
.
getDataLongs
(
0
));
setSummation
(
remoteData
.
getDataLongs
(
1
));
setValue
(
remoteData
.
getDataLongs
(
2
));
setTimeBucket
(
remoteData
.
getDataLongs
(
3
));
setId
(
remoteData
.
getDataIntegers
(
0
));
setServiceId
(
remoteData
.
getDataIntegers
(
1
));
setServiceInstanceId
(
remoteData
.
getDataIntegers
(
2
));
setCount
(
remoteData
.
getDataIntegers
(
3
));
}
public
static
class
Builder
implements
StorageBuilder
<
EndpointAvgIndicator
>
{
@Override
public
Map
<
String
,
Object
>
data2Map
(
EndpointAvgIndicator
storageData
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"id"
,
storageData
.
getId
());
map
.
put
(
"service_id"
,
storageData
.
getServiceId
());
map
.
put
(
"service_instance_id"
,
storageData
.
getServiceInstanceId
());
map
.
put
(
"summation"
,
storageData
.
getSummation
());
map
.
put
(
"count"
,
storageData
.
getCount
());
map
.
put
(
"value"
,
storageData
.
getValue
());
map
.
put
(
"time_bucket"
,
storageData
.
getTimeBucket
());
return
map
;
}
@Override
public
EndpointAvgIndicator
map2Data
(
Map
<
String
,
Object
>
dbMap
)
{
EndpointAvgIndicator
indicator
=
new
EndpointAvgIndicator
();
indicator
.
setId
((
int
)
dbMap
.
get
(
"id"
));
indicator
.
setServiceId
((
int
)
dbMap
.
get
(
"service_id"
));
indicator
.
setServiceInstanceId
((
int
)
dbMap
.
get
(
"service_instance_id"
));
indicator
.
setSummation
((
long
)
dbMap
.
get
(
"summation"
));
indicator
.
setCount
((
int
)
dbMap
.
get
(
"count"
));
indicator
.
setValue
((
long
)
dbMap
.
get
(
"value"
));
indicator
.
setTimeBucket
((
long
)
dbMap
.
get
(
"time_bucket"
));
return
indicator
;
}
}
}
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/generated/endpoint/EndpointDispatcher.java
0 → 100644
浏览文件 @
8a892219
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package
org.apache.skywalking.oap.server.core.analysis.generated.endpoint
;
import
org.apache.skywalking.oap.server.core.analysis.SourceDispatcher
;
import
org.apache.skywalking.oap.server.core.analysis.worker.IndicatorProcess
;
import
org.apache.skywalking.oap.server.core.source.Endpoint
;
/**
* This class is auto generated. Please don't change this class manually.
*
* @author Observability Analysis Language code generator
*/
public
class
EndpointDispatcher
implements
SourceDispatcher
<
Endpoint
>
{
@Override
public
void
dispatch
(
Endpoint
source
)
{
doEndpointAvg
(
source
);
doEndpointPercent
(
source
);
}
private
void
doEndpointAvg
(
Endpoint
source
)
{
EndpointAvgIndicator
indicator
=
new
EndpointAvgIndicator
();
indicator
.
setTimeBucket
(
source
.
getTimeBucket
());
indicator
.
setId
(
source
.
getId
());
indicator
.
setServiceId
(
source
.
getServiceId
());
indicator
.
setServiceInstanceId
(
source
.
getServiceInstanceId
());
indicator
.
combine
(
source
.
getLatency
(),
1
);
IndicatorProcess
.
INSTANCE
.
in
(
indicator
);
}
private
void
doEndpointPercent
(
Endpoint
source
)
{
EndpointPercentIndicator
indicator
=
new
EndpointPercentIndicator
();
indicator
.
setTimeBucket
(
source
.
getTimeBucket
());
indicator
.
setId
(
source
.
getId
());
indicator
.
setServiceId
(
source
.
getServiceId
());
indicator
.
setServiceInstanceId
(
source
.
getServiceInstanceId
());
indicator
.
combine
(
new
org
.
apache
.
skywalking
.
oap
.
server
.
core
.
analysis
.
indicator
.
expression
.
BooleanBinaryMatch
(),
source
.
isStatus
(),
true
);
IndicatorProcess
.
INSTANCE
.
in
(
indicator
);
}
}
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/generated/endpoint/EndpointPercentIndicator.java
0 → 100644
浏览文件 @
8a892219
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package
org.apache.skywalking.oap.server.core.analysis.generated.endpoint
;
import
java.util.*
;
import
lombok.*
;
import
org.apache.skywalking.oap.server.core.analysis.indicator.*
;
import
org.apache.skywalking.oap.server.core.analysis.indicator.annotation.IndicatorType
;
import
org.apache.skywalking.oap.server.core.remote.annotation.StreamData
;
import
org.apache.skywalking.oap.server.core.remote.grpc.proto.RemoteData
;
import
org.apache.skywalking.oap.server.core.storage.annotation.*
;
import
org.apache.skywalking.oap.server.core.storage.StorageBuilder
;
/**
* This class is auto generated. Please don't change this class manually.
*
* @author Observability Analysis Language code generator
*/
@IndicatorType
@StreamData
@StorageEntity
(
name
=
"endpoint_percent"
,
builder
=
EndpointPercentIndicator
.
Builder
.
class
)
public
class
EndpointPercentIndicator
extends
PercentIndicator
{
@Setter
@Getter
@Column
(
columnName
=
"id"
)
private
int
id
;
@Setter
@Getter
@Column
(
columnName
=
"service_id"
)
private
int
serviceId
;
@Setter
@Getter
@Column
(
columnName
=
"service_instance_id"
)
private
int
serviceInstanceId
;
@Override
public
String
id
()
{
return
String
.
valueOf
(
id
);
}
@Override
public
int
hashCode
()
{
int
result
=
17
;
result
=
31
*
result
+
id
;
result
=
31
*
result
+
(
int
)
getTimeBucket
();
return
result
;
}
@Override
public
boolean
equals
(
Object
obj
)
{
if
(
this
==
obj
)
return
true
;
if
(
obj
==
null
)
return
false
;
if
(
getClass
()
!=
obj
.
getClass
())
return
false
;
EndpointPercentIndicator
indicator
=
(
EndpointPercentIndicator
)
obj
;
if
(
id
!=
indicator
.
id
)
return
false
;
if
(
getTimeBucket
()
!=
indicator
.
getTimeBucket
())
return
false
;
return
true
;
}
@Override
public
RemoteData
.
Builder
serialize
()
{
RemoteData
.
Builder
remoteBuilder
=
RemoteData
.
newBuilder
();
remoteBuilder
.
setDataLongs
(
0
,
getTimeBucket
());
remoteBuilder
.
setDataLongs
(
1
,
getTotal
());
remoteBuilder
.
setDataLongs
(
2
,
getMatch
());
remoteBuilder
.
setDataLongs
(
3
,
getTimeBucket
());
remoteBuilder
.
setDataIntegers
(
0
,
getId
());
remoteBuilder
.
setDataIntegers
(
1
,
getServiceId
());
remoteBuilder
.
setDataIntegers
(
2
,
getServiceInstanceId
());
remoteBuilder
.
setDataIntegers
(
3
,
getPercentage
());
return
remoteBuilder
;
}
@Override
public
void
deserialize
(
RemoteData
remoteData
)
{
setTimeBucket
(
remoteData
.
getDataLongs
(
0
));
setTotal
(
remoteData
.
getDataLongs
(
1
));
setMatch
(
remoteData
.
getDataLongs
(
2
));
setTimeBucket
(
remoteData
.
getDataLongs
(
3
));
setId
(
remoteData
.
getDataIntegers
(
0
));
setServiceId
(
remoteData
.
getDataIntegers
(
1
));
setServiceInstanceId
(
remoteData
.
getDataIntegers
(
2
));
setPercentage
(
remoteData
.
getDataIntegers
(
3
));
}
public
static
class
Builder
implements
StorageBuilder
<
EndpointPercentIndicator
>
{
@Override
public
Map
<
String
,
Object
>
data2Map
(
EndpointPercentIndicator
storageData
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"id"
,
storageData
.
getId
());
map
.
put
(
"service_id"
,
storageData
.
getServiceId
());
map
.
put
(
"service_instance_id"
,
storageData
.
getServiceInstanceId
());
map
.
put
(
"total"
,
storageData
.
getTotal
());
map
.
put
(
"percentage"
,
storageData
.
getPercentage
());
map
.
put
(
"match"
,
storageData
.
getMatch
());
map
.
put
(
"time_bucket"
,
storageData
.
getTimeBucket
());
return
map
;
}
@Override
public
EndpointPercentIndicator
map2Data
(
Map
<
String
,
Object
>
dbMap
)
{
EndpointPercentIndicator
indicator
=
new
EndpointPercentIndicator
();
indicator
.
setId
((
int
)
dbMap
.
get
(
"id"
));
indicator
.
setServiceId
((
int
)
dbMap
.
get
(
"service_id"
));
indicator
.
setServiceInstanceId
((
int
)
dbMap
.
get
(
"service_instance_id"
));
indicator
.
setTotal
((
long
)
dbMap
.
get
(
"total"
));
indicator
.
setPercentage
((
int
)
dbMap
.
get
(
"percentage"
));
indicator
.
setMatch
((
long
)
dbMap
.
get
(
"match"
));
indicator
.
setTimeBucket
((
long
)
dbMap
.
get
(
"time_bucket"
));
return
indicator
;
}
}
}
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/generated/service/ServiceDispatcher.java
0 → 100644
浏览文件 @
8a892219
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package
org.apache.skywalking.oap.server.core.analysis.generated.service
;
import
org.apache.skywalking.oap.server.core.analysis.SourceDispatcher
;
import
org.apache.skywalking.oap.server.core.source.Service
;
/**
* This class is auto generated. Please don't change this class manually.
*
* @author Observability Analysis Language code generator
*/
public
class
ServiceDispatcher
implements
SourceDispatcher
<
Service
>
{
@Override
public
void
dispatch
(
Service
source
)
{
}
}
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/indicator/PercentIndicator.java
0 → 100644
浏览文件 @
8a892219
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package
org.apache.skywalking.oap.server.core.analysis.indicator
;
import
lombok.Getter
;
import
lombok.Setter
;
import
org.apache.skywalking.oap.server.core.analysis.indicator.annotation.Entrance
;
import
org.apache.skywalking.oap.server.core.analysis.indicator.annotation.Expression
;
import
org.apache.skywalking.oap.server.core.analysis.indicator.annotation.ExpressionArg0
;
import
org.apache.skywalking.oap.server.core.analysis.indicator.annotation.ExpressionArg1
;
import
org.apache.skywalking.oap.server.core.analysis.indicator.annotation.IndicatorOperator
;
import
org.apache.skywalking.oap.server.core.analysis.indicator.expression.BooleanBinaryMatch
;
import
org.apache.skywalking.oap.server.core.storage.annotation.Column
;
/**
* @author wusheng
*/
@IndicatorOperator
public
abstract
class
PercentIndicator
extends
Indicator
{
protected
static
final
String
TOTAL
=
"total"
;
protected
static
final
String
MATCH
=
"match"
;
protected
static
final
String
PERCENTAGE
=
"percentage"
;
@Getter
@Setter
@Column
(
columnName
=
TOTAL
)
private
long
total
;
@Getter
@Setter
@Column
(
columnName
=
PERCENTAGE
)
private
int
percentage
;
@Getter
@Setter
@Column
(
columnName
=
MATCH
)
private
long
match
;
@Entrance
public
final
void
combine
(
@Expression
BooleanBinaryMatch
expression
,
@ExpressionArg0
Object
leftValue
,
@ExpressionArg1
Object
rightValue
)
{
expression
.
setLeft
(
leftValue
);
expression
.
setRight
(
rightValue
);
if
(
expression
.
match
())
{
match
++;
}
total
++;
}
@Override
public
final
void
combine
(
Indicator
indicator
)
{
total
+=
((
PercentIndicator
)
indicator
).
total
;
match
+=
((
PercentIndicator
)
indicator
).
match
;
}
}
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/indicator/annotation/Expression.java
0 → 100644
浏览文件 @
8a892219
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package
org.apache.skywalking.oap.server.core.analysis.indicator.annotation
;
import
java.lang.annotation.ElementType
;
import
java.lang.annotation.Retention
;
import
java.lang.annotation.RetentionPolicy
;
import
java.lang.annotation.Target
;
/**
* @author wusheng
*/
@Target
(
ElementType
.
PARAMETER
)
@Retention
(
RetentionPolicy
.
RUNTIME
)
public
@interface
Expression
{
}
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/indicator/annotation/ExpressionArg0.java
0 → 100644
浏览文件 @
8a892219
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package
org.apache.skywalking.oap.server.core.analysis.indicator.annotation
;
import
java.lang.annotation.ElementType
;
import
java.lang.annotation.Retention
;
import
java.lang.annotation.RetentionPolicy
;
import
java.lang.annotation.Target
;
/**
* @author wusheng
*/
@Target
(
ElementType
.
PARAMETER
)
@Retention
(
RetentionPolicy
.
RUNTIME
)
public
@interface
ExpressionArg0
{
}
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/indicator/annotation/ExpressionArg1.java
0 → 100644
浏览文件 @
8a892219
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package
org.apache.skywalking.oap.server.core.analysis.indicator.annotation
;
import
java.lang.annotation.ElementType
;
import
java.lang.annotation.Retention
;
import
java.lang.annotation.RetentionPolicy
;
import
java.lang.annotation.Target
;
/**
* @author wusheng
*/
@Target
(
ElementType
.
PARAMETER
)
@Retention
(
RetentionPolicy
.
RUNTIME
)
public
@interface
ExpressionArg1
{
}
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/indicator/expression/BinaryMatchExpression.java
0 → 100644
浏览文件 @
8a892219
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package
org.apache.skywalking.oap.server.core.analysis.indicator.expression
;
/**
* BinaryMatchExpression accepts two calculate factors,
* and return the True/False result.
*
* @author wusheng
*/
public
abstract
class
BinaryMatchExpression
{
protected
Object
left
;
protected
Object
right
;
public
void
setLeft
(
Object
left
)
{
this
.
left
=
left
;
}
public
void
setRight
(
Object
right
)
{
this
.
right
=
right
;
}
public
abstract
boolean
match
();
}
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/indicator/expression/BooleanBinaryMatch.java
0 → 100644
浏览文件 @
8a892219
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package
org.apache.skywalking.oap.server.core.analysis.indicator.expression
;
/**
*
* @author wusheng
*/
public
class
BooleanBinaryMatch
extends
BinaryMatchExpression
{
@Override
public
boolean
match
()
{
return
left
==
right
;
}
}
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/Service.java
0 → 100644
浏览文件 @
8a892219
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package
org.apache.skywalking.oap.server.core.source
;
import
org.apache.skywalking.oap.server.core.source.annotation.SourceType
;
/**
* @author wusheng
*/
@SourceType
public
class
Service
extends
Source
{
@Override
public
Scope
scope
()
{
return
Scope
.
Service
;
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录