Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
SkyWalking
提交
5fd06a7c
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,发现更多精彩内容 >>
未验证
提交
5fd06a7c
编写于
1月 08, 2021
作者:
Z
zifeihan
提交者:
GitHub
1月 08, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix `timeBucket` not taking effect in EqualsAndHashCode annotation. (#6153)
上级
e3fbb3f7
变更
10
显示空白变更内容
内联
并排
Showing
10 changed file
with
229 addition
and
15 deletion
+229
-15
CHANGES.md
CHANGES.md
+1
-0
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/manual/relation/endpoint/EndpointRelationServerSideMetrics.java
.../relation/endpoint/EndpointRelationServerSideMetrics.java
+2
-3
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/manual/relation/instance/ServiceInstanceRelationClientSideMetrics.java
...on/instance/ServiceInstanceRelationClientSideMetrics.java
+2
-3
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/manual/relation/instance/ServiceInstanceRelationServerSideMetrics.java
...on/instance/ServiceInstanceRelationServerSideMetrics.java
+2
-3
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/manual/relation/service/ServiceRelationClientSideMetrics.java
...al/relation/service/ServiceRelationClientSideMetrics.java
+2
-3
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/manual/relation/service/ServiceRelationServerSideMetrics.java
...al/relation/service/ServiceRelationServerSideMetrics.java
+2
-3
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/metrics/Metrics.java
.../skywalking/oap/server/core/analysis/metrics/Metrics.java
+4
-0
oap-server/server-core/src/test/java/org/apache/skywalking/oap/server/core/analysis/manual/relation/endpoint/EndpointCallRelationTest.java
...is/manual/relation/endpoint/EndpointCallRelationTest.java
+54
-0
oap-server/server-core/src/test/java/org/apache/skywalking/oap/server/core/analysis/manual/relation/instance/ServiceInstanceRelationTest.java
...manual/relation/instance/ServiceInstanceRelationTest.java
+84
-0
oap-server/server-core/src/test/java/org/apache/skywalking/oap/server/core/analysis/manual/relation/service/ServiceRelationTest.java
...analysis/manual/relation/service/ServiceRelationTest.java
+76
-0
未找到文件。
CHANGES.md
浏览文件 @
5fd06a7c
...
...
@@ -54,6 +54,7 @@ Release Notes.
*
Fix bug that istio version metric type on UI template mismatches the otel rule.
*
Improve ReadWriteSafeCache concurrency read-write performance
*
Fix bug that if use JSON as InfluxDB.ResponseFormat then NumberFormatException maybe occur.
*
Fix
`timeBucket`
not taking effect in EqualsAndHashCode annotation of some relationship metrics.
#### UI
*
Fix un-removed tags in trace query.
...
...
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/manual/relation/endpoint/EndpointRelationServerSideMetrics.java
浏览文件 @
5fd06a7c
...
...
@@ -35,9 +35,8 @@ import org.apache.skywalking.oap.server.core.storage.annotation.Column;
@Stream
(
name
=
EndpointRelationServerSideMetrics
.
INDEX_NAME
,
scopeId
=
DefaultScopeDefine
.
ENDPOINT_RELATION
,
builder
=
EndpointRelationServerSideMetrics
.
Builder
.
class
,
processor
=
MetricsStreamProcessor
.
class
)
@EqualsAndHashCode
(
of
=
{
"entityId"
,
"timeBucket"
})
"entityId"
},
callSuper
=
true
)
public
class
EndpointRelationServerSideMetrics
extends
Metrics
{
public
static
final
String
INDEX_NAME
=
"endpoint_relation_server_side"
;
...
...
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/manual/relation/instance/ServiceInstanceRelationClientSideMetrics.java
浏览文件 @
5fd06a7c
...
...
@@ -35,9 +35,8 @@ import org.apache.skywalking.oap.server.core.storage.annotation.Column;
@Stream
(
name
=
ServiceInstanceRelationClientSideMetrics
.
INDEX_NAME
,
scopeId
=
DefaultScopeDefine
.
SERVICE_INSTANCE_RELATION
,
builder
=
ServiceInstanceRelationClientSideMetrics
.
Builder
.
class
,
processor
=
MetricsStreamProcessor
.
class
)
@EqualsAndHashCode
(
of
=
{
"entityId"
,
"timeBucket"
})
"entityId"
},
callSuper
=
true
)
public
class
ServiceInstanceRelationClientSideMetrics
extends
Metrics
{
public
static
final
String
INDEX_NAME
=
"service_instance_relation_client_side"
;
...
...
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/manual/relation/instance/ServiceInstanceRelationServerSideMetrics.java
浏览文件 @
5fd06a7c
...
...
@@ -35,9 +35,8 @@ import org.apache.skywalking.oap.server.core.storage.annotation.Column;
@Stream
(
name
=
ServiceInstanceRelationServerSideMetrics
.
INDEX_NAME
,
scopeId
=
DefaultScopeDefine
.
SERVICE_INSTANCE_RELATION
,
builder
=
ServiceInstanceRelationServerSideMetrics
.
Builder
.
class
,
processor
=
MetricsStreamProcessor
.
class
)
@EqualsAndHashCode
(
of
=
{
"entityId"
,
"timeBucket"
})
"entityId"
},
callSuper
=
true
)
public
class
ServiceInstanceRelationServerSideMetrics
extends
Metrics
{
public
static
final
String
INDEX_NAME
=
"service_instance_relation_server_side"
;
...
...
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/manual/relation/service/ServiceRelationClientSideMetrics.java
浏览文件 @
5fd06a7c
...
...
@@ -35,9 +35,8 @@ import org.apache.skywalking.oap.server.core.storage.annotation.Column;
@Stream
(
name
=
ServiceRelationClientSideMetrics
.
INDEX_NAME
,
scopeId
=
DefaultScopeDefine
.
SERVICE_RELATION
,
builder
=
ServiceRelationClientSideMetrics
.
Builder
.
class
,
processor
=
MetricsStreamProcessor
.
class
)
@EqualsAndHashCode
(
of
=
{
"entityId"
,
"timeBucket"
})
"entityId"
},
callSuper
=
true
)
public
class
ServiceRelationClientSideMetrics
extends
Metrics
{
public
static
final
String
INDEX_NAME
=
"service_relation_client_side"
;
...
...
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/manual/relation/service/ServiceRelationServerSideMetrics.java
浏览文件 @
5fd06a7c
...
...
@@ -35,9 +35,8 @@ import org.apache.skywalking.oap.server.core.storage.annotation.Column;
@Stream
(
name
=
ServiceRelationServerSideMetrics
.
INDEX_NAME
,
scopeId
=
DefaultScopeDefine
.
SERVICE_RELATION
,
builder
=
ServiceRelationServerSideMetrics
.
Builder
.
class
,
processor
=
MetricsStreamProcessor
.
class
)
@EqualsAndHashCode
(
of
=
{
"entityId"
,
"timeBucket"
})
"entityId"
},
callSuper
=
true
)
public
class
ServiceRelationServerSideMetrics
extends
Metrics
{
public
static
final
String
INDEX_NAME
=
"service_relation_server_side"
;
...
...
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/metrics/Metrics.java
浏览文件 @
5fd06a7c
...
...
@@ -18,6 +18,7 @@
package
org.apache.skywalking.oap.server.core.analysis.metrics
;
import
lombok.EqualsAndHashCode
;
import
lombok.Getter
;
import
lombok.Setter
;
import
org.apache.skywalking.oap.server.core.analysis.TimeBucket
;
...
...
@@ -29,6 +30,9 @@ import org.apache.skywalking.oap.server.core.storage.annotation.Column;
* Metrics represents the statistic data, which analysis by OAL script or hard code. It has the lifecycle controlled by
* TTL(time to live).
*/
@EqualsAndHashCode
(
of
=
{
"timeBucket"
})
public
abstract
class
Metrics
extends
StreamData
implements
StorageData
{
public
static
final
String
TIME_BUCKET
=
"time_bucket"
;
...
...
oap-server/server-core/src/test/java/org/apache/skywalking/oap/server/core/analysis/manual/relation/endpoint/EndpointCallRelationTest.java
0 → 100644
浏览文件 @
5fd06a7c
/*
* 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.manual.relation.endpoint
;
import
org.junit.Assert
;
import
org.junit.Test
;
public
class
EndpointCallRelationTest
{
@Test
public
void
testEndpointRelationServerSideMetricsEquals
()
{
EndpointRelationServerSideMetrics
thisObject
=
new
EndpointRelationServerSideMetrics
();
thisObject
.
setEntityId
(
"VXNlcg==.0-VXNlcg==-em1iaXotcHJvbW90aW9uMi1hZG1pbkAxMjUyNw==.1-L0Bpbi9hcGkvaGVhbHRo"
);
thisObject
.
setTimeBucket
(
202101071505L
);
EndpointRelationServerSideMetrics
otherObject
=
new
EndpointRelationServerSideMetrics
();
otherObject
.
setEntityId
(
"VXNlcg==.0-VXNlcg==-em1iaXotcHJvbW90aW9uMi1hZG1pbkAxMjUyNw==.1-L0Bpbi9hcGkvaGVhbHRo"
);
otherObject
.
setTimeBucket
(
202101071505L
);
Assert
.
assertTrue
(
thisObject
.
equals
(
otherObject
));
}
@Test
public
void
testEndpointRelationServerSideMetricsNotEquals
()
{
EndpointRelationServerSideMetrics
thisObject
=
new
EndpointRelationServerSideMetrics
();
thisObject
.
setEntityId
(
"VXNlcg==.0-VXNlcg==-em1iaXotcHJvbW90aW9uMi1hZG1pbkAxMjUyNw==.1-L0Bpbi9hcGkvaGVhbHRo"
);
thisObject
.
setTimeBucket
(
202101071505L
);
EndpointRelationServerSideMetrics
otherObject
=
new
EndpointRelationServerSideMetrics
();
otherObject
.
setEntityId
(
"VXNlcg==.0-VXNlcg==-em1iaXotcHJvbW90aW9uMi1hZG1pbkAxMjUyNw==.1-L0Bpbi9hcGkvaGVhbHRo"
);
otherObject
.
setTimeBucket
(
202101071506L
);
Assert
.
assertFalse
(
thisObject
.
equals
(
otherObject
));
}
}
oap-server/server-core/src/test/java/org/apache/skywalking/oap/server/core/analysis/manual/relation/instance/ServiceInstanceRelationTest.java
0 → 100644
浏览文件 @
5fd06a7c
/*
* 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.manual.relation.instance
;
import
org.junit.Assert
;
import
org.junit.Test
;
public
class
ServiceInstanceRelationTest
{
@Test
public
void
testServiceInstanceRelationClientSideMetricsEquals
()
{
ServiceInstanceRelationClientSideMetrics
thisObject
=
new
ServiceInstanceRelationClientSideMetrics
();
thisObject
.
setEntityId
(
"em1jLWJlYWNvbi1taWRkbGV3YXJlQDExMTIz.1_MTAuMTExLjIzMi4yMDc=-MTkyLjE2OC40Ni4xNDM6NDY2MDY=.0_MTkyLjE2OC40Ni4xNDM6NDY2MDY="
);
thisObject
.
setTimeBucket
(
202101071505L
);
ServiceInstanceRelationClientSideMetrics
otherObject
=
new
ServiceInstanceRelationClientSideMetrics
();
otherObject
.
setEntityId
(
"em1jLWJlYWNvbi1taWRkbGV3YXJlQDExMTIz.1_MTAuMTExLjIzMi4yMDc=-MTkyLjE2OC40Ni4xNDM6NDY2MDY=.0_MTkyLjE2OC40Ni4xNDM6NDY2MDY="
);
otherObject
.
setTimeBucket
(
202101071505L
);
Assert
.
assertTrue
(
thisObject
.
equals
(
otherObject
));
}
@Test
public
void
testServiceInstanceRelationClientSideMetricsNotEquals
()
{
ServiceInstanceRelationClientSideMetrics
thisObject
=
new
ServiceInstanceRelationClientSideMetrics
();
thisObject
.
setEntityId
(
"em1jLWJlYWNvbi1taWRkbGV3YXJlQDExMTIz.1_MTAuMTExLjIzMi4yMDc=-MTkyLjE2OC40Ni4xNDM6NDY2MDY=.0_MTkyLjE2OC40Ni4xNDM6NDY2MDY="
);
thisObject
.
setTimeBucket
(
202101071505L
);
ServiceInstanceRelationClientSideMetrics
otherObject
=
new
ServiceInstanceRelationClientSideMetrics
();
otherObject
.
setEntityId
(
"em1jLWJlYWNvbi1taWRkbGV3YXJlQDExMTIz.1_MTAuMTExLjIzMi4yMDc=-MTkyLjE2OC40Ni4xNDM6NDY2MDY=.0_MTkyLjE2OC40Ni4xNDM6NDY2MDY="
);
otherObject
.
setTimeBucket
(
202101071506L
);
Assert
.
assertFalse
(
thisObject
.
equals
(
otherObject
));
}
@Test
public
void
testServiceInstanceRelationServerSideMetricsEquals
()
{
ServiceInstanceRelationServerSideMetrics
thisObject
=
new
ServiceInstanceRelationServerSideMetrics
();
thisObject
.
setEntityId
(
"em1jLWJlYWNvbi1taWRkbGV3YXJlQDExMTIz.1_MTAuMTExLjIzMi4yMDc=-MTkyLjE2OC40Ni4xNDM6NDY2MDY=.0_MTkyLjE2OC40Ni4xNDM6NDY2MDY="
);
thisObject
.
setTimeBucket
(
202101071505L
);
ServiceInstanceRelationServerSideMetrics
otherObject
=
new
ServiceInstanceRelationServerSideMetrics
();
otherObject
.
setEntityId
(
"em1jLWJlYWNvbi1taWRkbGV3YXJlQDExMTIz.1_MTAuMTExLjIzMi4yMDc=-MTkyLjE2OC40Ni4xNDM6NDY2MDY=.0_MTkyLjE2OC40Ni4xNDM6NDY2MDY="
);
otherObject
.
setTimeBucket
(
202101071505L
);
Assert
.
assertTrue
(
thisObject
.
equals
(
otherObject
));
}
@Test
public
void
testServiceInstanceRelationServerSideMetricsNotEquals
()
{
ServiceInstanceRelationServerSideMetrics
thisObject
=
new
ServiceInstanceRelationServerSideMetrics
();
thisObject
.
setEntityId
(
"em1jLWJlYWNvbi1taWRkbGV3YXJlQDExMTIz.1_MTAuMTExLjIzMi4yMDc=-MTkyLjE2OC40Ni4xNDM6NDY2MDY=.0_MTkyLjE2OC40Ni4xNDM6NDY2MDY="
);
thisObject
.
setTimeBucket
(
202101071505L
);
ServiceInstanceRelationServerSideMetrics
otherObject
=
new
ServiceInstanceRelationServerSideMetrics
();
otherObject
.
setEntityId
(
"em1jLWJlYWNvbi1taWRkbGV3YXJlQDExMTIz.1_MTAuMTExLjIzMi4yMDc=-MTkyLjE2OC40Ni4xNDM6NDY2MDY=.0_MTkyLjE2OC40Ni4xNDM6NDY2MDY="
);
otherObject
.
setTimeBucket
(
202101071506L
);
Assert
.
assertFalse
(
thisObject
.
equals
(
otherObject
));
}
}
oap-server/server-core/src/test/java/org/apache/skywalking/oap/server/core/analysis/manual/relation/service/ServiceRelationTest.java
0 → 100644
浏览文件 @
5fd06a7c
/*
* 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.manual.relation.service
;
import
org.junit.Assert
;
import
org.junit.Test
;
public
class
ServiceRelationTest
{
@Test
public
void
testServiceRelationClientSideMetricsEquals
()
{
ServiceRelationClientSideMetrics
thisObject
=
new
ServiceRelationClientSideMetrics
();
thisObject
.
setEntityId
(
"VXNlcg==.0-em0tY2xpZW50LXNldHRpbmctd2ViYXBpQDEwNjQ4.1"
);
thisObject
.
setTimeBucket
(
202101071505L
);
ServiceRelationClientSideMetrics
otherObject
=
new
ServiceRelationClientSideMetrics
();
otherObject
.
setEntityId
(
"VXNlcg==.0-em0tY2xpZW50LXNldHRpbmctd2ViYXBpQDEwNjQ4.1"
);
otherObject
.
setTimeBucket
(
202101071505L
);
Assert
.
assertTrue
(
thisObject
.
equals
(
otherObject
));
}
@Test
public
void
testServiceRelationClientSideMetricsNotEquals
()
{
ServiceRelationClientSideMetrics
thisObject
=
new
ServiceRelationClientSideMetrics
();
thisObject
.
setEntityId
(
"VXNlcg==.0-em0tY2xpZW50LXNldHRpbmctd2ViYXBpQDEwNjQ4.1"
);
thisObject
.
setTimeBucket
(
202101071505L
);
ServiceRelationClientSideMetrics
otherObject
=
new
ServiceRelationClientSideMetrics
();
otherObject
.
setEntityId
(
"VXNlcg==.0-em0tY2xpZW50LXNldHRpbmctd2ViYXBpQDEwNjQ4.1"
);
otherObject
.
setTimeBucket
(
202101071506L
);
Assert
.
assertFalse
(
thisObject
.
equals
(
otherObject
));
}
@Test
public
void
testServiceRelationServerSideMetricsEquals
()
{
ServiceRelationServerSideMetrics
thisObject
=
new
ServiceRelationServerSideMetrics
();
thisObject
.
setEntityId
(
"VXNlcg==.0-em0tY2xpZW50LXNldHRpbmctd2ViYXBpQDEwNjQ4.1"
);
thisObject
.
setTimeBucket
(
202101071505L
);
ServiceRelationServerSideMetrics
otherObject
=
new
ServiceRelationServerSideMetrics
();
otherObject
.
setEntityId
(
"VXNlcg==.0-em0tY2xpZW50LXNldHRpbmctd2ViYXBpQDEwNjQ4.1"
);
otherObject
.
setTimeBucket
(
202101071505L
);
Assert
.
assertTrue
(
thisObject
.
equals
(
otherObject
));
}
@Test
public
void
testServiceRelationServerSideMetricsNotEquals
()
{
ServiceRelationServerSideMetrics
thisObject
=
new
ServiceRelationServerSideMetrics
();
thisObject
.
setEntityId
(
"VXNlcg==.0-em0tY2xpZW50LXNldHRpbmctd2ViYXBpQDEwNjQ4.1"
);
thisObject
.
setTimeBucket
(
202101071505L
);
ServiceRelationServerSideMetrics
otherObject
=
new
ServiceRelationServerSideMetrics
();
otherObject
.
setEntityId
(
"VXNlcg==.0-em0tY2xpZW50LXNldHRpbmctd2ViYXBpQDEwNjQ4.1"
);
otherObject
.
setTimeBucket
(
202101071506L
);
Assert
.
assertFalse
(
thisObject
.
equals
(
otherObject
));
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录