Skip to content

HDDS-12802. Avoid using reflection in SimpleStriped#9814

Merged
adoroszlai merged 3 commits intoapache:masterfrom
echonesis:HDDS-12802
Feb 27, 2026
Merged

HDDS-12802. Avoid using reflection in SimpleStriped#9814
adoroszlai merged 3 commits intoapache:masterfrom
echonesis:HDDS-12802

Conversation

@echonesis
Copy link
Copy Markdown
Contributor

@echonesis echonesis commented Feb 24, 2026

What changes were proposed in this pull request?

This PR eliminates the reflection-based workaround in SimpleStriped by using native public method directly.

What is the link to the Apache JIRA

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

How was this patch tested?

GitHub Actions CI: https://github.com/echonesis/ozone/actions/runs/22379059258

@echonesis echonesis marked this pull request as ready for review February 24, 2026 13:51
@adoroszlai
Copy link
Copy Markdown
Contributor

Thanks @echonesis for the patch. Striped#custom(int, Supplier) is now public in Guava, so we can remove reflection without moving to Guava's package.

@echonesis
Copy link
Copy Markdown
Contributor Author

Thanks @echonesis for the patch. Striped#custom(int, Supplier) is now public in Guava, so we can remove reflection without moving to Guava's package.

Thanks @adoroszlai for mentioning.
I've updated it in the latest commit.

Copy link
Copy Markdown
Contributor

@adoroszlai adoroszlai left a comment

Choose a reason for hiding this comment

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

Thanks @echonesis for updating the patch. I think we can replace calls of SimpleStriped.custom with Striped.custom, and completely remove both SimpleStriped.custom and TestSimpleStriped.testCustomStripes.

Copy link
Copy Markdown
Contributor

@adoroszlai adoroszlai left a comment

Choose a reason for hiding this comment

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

Thanks @echonesis for updating the patch.

@adoroszlai adoroszlai merged commit 00fe0fc into apache:master Feb 27, 2026
44 checks passed
@echonesis
Copy link
Copy Markdown
Contributor Author

Thanks @adoroszlai for the review and merge.

@echonesis echonesis deleted the HDDS-12802 branch February 28, 2026 02:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants