Skip to content

HDDS-12802. Avoid using reflection in SimpleStriped#9814

Open
echonesis wants to merge 2 commits intoapache:masterfrom
echonesis:HDDS-12802
Open

HDDS-12802. Avoid using reflection in SimpleStriped#9814
echonesis wants to merge 2 commits intoapache:masterfrom
echonesis:HDDS-12802

Conversation

@echonesis
Copy link
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
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
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
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.

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