Skip to content

Conversation

@YuanbenWang
Copy link
Contributor

What changes were proposed in this pull request?

This PR aims to add percentile for ProtocolMessageMetrics.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-9522

How was this patch tested?

Tested locally.
The result is shown on the Jira page.

@adoroszlai
Copy link
Contributor

Thanks @YuanbenWang for the patch.

There are some checkstyle failures:

hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/OzoneConfigKeys.java
 185: Line is longer than 80 characters (found 83).
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/ProtocolMessageMetrics.java
 49: Variable 'quantileEnable' must be private and have accessor methods.
 79: Line is longer than 80 characters (found 85).
 82: Line is longer than 80 characters (found 82).
 83: Line is longer than 80 characters (found 86).

https://github.com/YuanbenWang/ozone/actions/runs/6609721675/job/17950326373#step:7:11

@YuanbenWang
Copy link
Contributor Author

YuanbenWang commented Oct 23, 2023

Thanks @YuanbenWang for the patch.

There are some checkstyle failures:

hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/OzoneConfigKeys.java
 185: Line is longer than 80 characters (found 83).
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/ProtocolMessageMetrics.java
 49: Variable 'quantileEnable' must be private and have accessor methods.
 79: Line is longer than 80 characters (found 85).
 82: Line is longer than 80 characters (found 82).
 83: Line is longer than 80 characters (found 86).

https://github.com/YuanbenWang/ozone/actions/runs/6609721675/job/17950326373#step:7:11

Thanks for the review~! I have fixed it and pushed the new PR.

@YuanbenWang
Copy link
Contributor Author

@adoroszlai CI has been success in my own project. Could you plz help review this PR?

@adoroszlai
Copy link
Contributor

@tanvipenumudy please review

Copy link
Contributor

@xichen01 xichen01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@YuanbenWang thanks for working on this! The change looks good. Just a few comment inlined.

mutableQuantiles[i] = registry.newQuantiles(
value.toString() + "RpcTime" + intervals[i] + "s",
value.toString() + "rpc time in milli second",
"ops", "latency", intervals[i]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to clarify the unit of time in the name of the Metrics, such as Use latencyMS

Copy link
Contributor Author

@YuanbenWang YuanbenWang Nov 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now the name of the Metric will be like “InfoVolumeRpcTime127s90thPercentileLatency” and the unit of time is including in it as "s". It will be appreciated if you could tell me how to let it more suitable. How about "InfoVolumeRpcTime127latencySeconds90thPercentileLatency"? @xichen01

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that InfoVolumeRpcTime127s90thPercentileLatencyMs is available, the 127s is the time of sampling, Ms is the unit of the Metrics value.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

InfoVolumeRpcTime127latencySeconds90thPercentileLatency

Thank you for your feedback! I appreciate your clarification on the suggestion you provided. I now understand it better, and I will proceed to make the necessary modifications according to your advice.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for not expressing it clearly, I think we can remove the type from the Metrics name when we move it to the tag, so the name can be 127s90thPercentileLatencyMs

Suggested change
"ops", "latency", intervals[i]);
for (KEY value : values) {
MetricsRegistry registry = new MetricsRegistry(name + "MessageMetrics");
registries.put(value, registry);
//...
if (quantileEnable) {
mutableQuantiles[i] = registry.newQuantiles(
"_" + intervals[i] + "s_",
value.toString() + "rpc time in milli second",
"ops", "latencyMS", intervals[i]);

The Metrics name will be like this om_client_protocol_127s_99th_percentile_latency_ms{type="TransferLeadership",hostname="xxx"} 0 om_client_protocol_127s_num_ops{type="TransferLeadership",hostname="xxx"}
This name is consistent with the original Metrics style and is simpler.

@YuanbenWang
Copy link
Contributor Author

@xichen01 Thank you for reviewing my code and providing valuable suggestions. I have made the necessary modifications based on your feedback. Could you please review the updated code again?

@xichen01
Copy link
Contributor

Thanks @YuanbenWang, LGTM +1.

@YuanbenWang
Copy link
Contributor Author

@xichen01 Thank you for the review and precious suggestions !

@YuanbenWang
Copy link
Contributor Author

@adoroszlai Hello~! Could you please help trigger the CI? In my own project, it has been success.

@adoroszlai
Copy link
Contributor

@duongkame @kerneltime @tanvipenumudy please review

@YuanbenWang
Copy link
Contributor Author

@ChenSammi @xBis7 Hello! Could you please review this PR?

Copy link
Contributor

@xBis7 xBis7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@YuanbenWang Thanks for the patch. I've left some comments.

@YuanbenWang
Copy link
Contributor Author

@xBis7 I'm sorry for the long delay in responding to your review. I'v changed my code. Could you please review the updated code again?

@xBis7
Copy link
Contributor

xBis7 commented Jan 3, 2024

@YuanbenWang Thanks for the changes. With ozone freon ockg, percentiles get updated









LGTM! I'm triggering the CI.

@xBis7
Copy link
Contributor

xBis7 commented Jan 3, 2024

@YuanbenWang Can you add a simple unit test for ProtocolMessageMetrics.java? You can initialize everything and get the metrics like TestSCMHAMetrics, mock and stub everything else and check that values increment.

I think it's odd there are no tests for protocol message metrics.

@YuanbenWang
Copy link
Contributor Author

@YuanbenWang Can you add a simple unit test for ProtocolMessageMetrics.java? You can initialize everything and get the metrics like TestSCMHAMetrics, mock and stub everything else and check that values increment.

I think it's odd there are no tests for protocol message metrics.

OK, I will do it in the next few days.

@adoroszlai
Copy link
Contributor

Can you add a simple unit test for ProtocolMessageMetrics.java?

We should be checking metrics as part of normal functional tests, not in separate metrics-specific tests.

@adoroszlai
Copy link
Contributor

/pending tests

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Marking this issue as un-mergeable as requested.

Please use /ready comment when it's resolved.

Please note that the PR will be closed after 21 days of inactivity from now. (But can be re-opened anytime later...)

tests

@github-actions
Copy link

Thank you very much for the patch. I am closing this PR temporarily as there was no activity recently and it is waiting for response from its author.

It doesn't mean that this PR is not important or ignored: feel free to reopen the PR at any time.

It only means that attention of committers is not required. We prefer to keep the review queue clean. This ensures PRs in need of review are more visible, which results in faster feedback for all PRs.

If you need ANY help to finish this PR, please contact the community on the mailing list or the slack channel."

@github-actions github-actions bot closed this May 14, 2024
@YuanbenWang
Copy link
Contributor Author

YuanbenWang commented May 15, 2024

Can you add a simple unit test for ProtocolMessageMetrics.java?

We should be checking metrics as part of normal functional tests, not in separate metrics-specific tests.
@adoroszlai
I'm sorry for not updating this PR earlier for my own busy work. Could you please help reopen this PR now?

This pr is reviewed except I'm not sure if I should add unit tests and where they should be added. Could you give me some advice?

@adoroszlai
Copy link
Contributor

adoroszlai commented May 15, 2024

Could you please help reopen this PR now?

"Reopen and comment" is disabled for me, it says "branch was force-pushed or recreated". Please feel free to open a new PR and reference this one. Sorry for the trouble.

@YuanbenWang
Copy link
Contributor Author

Could you please help reopen this PR now?

"Reopen and comment" is disabled for me, it says "branch was force-pushed or recreated". Please feel free to open a new PR and reference this one. Sorry for the trouble.

Thank you for your help~! I will open new one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants