Skip to content

HDDS-9849. Improve UUID generator and get rid of java-uuid-generator dependency#5740

Merged
adoroszlai merged 2 commits intoapache:masterfrom
vtutrinov:HDDS-9849-improve-uuid-generator
Dec 7, 2023
Merged

HDDS-9849. Improve UUID generator and get rid of java-uuid-generator dependency#5740
adoroszlai merged 2 commits intoapache:masterfrom
vtutrinov:HDDS-9849-improve-uuid-generator

Conversation

@vtutrinov
Copy link
Contributor

What changes were proposed in this pull request?

Provide a method to get generated UUID as a bytes array and get rid of the fasterxml:java-uuid-generator dependency

Please describe your PR in detail:

  • a new method was written to provide a generate UUID as a bytes array - org.apache.hadoop.util.UUIDUtil#randomUUIDBytes
  • the org.apache.hadoop.util.UUIDUtil#randomUUID method was rewritten to use the method described above and a couple of private methods to compute the most and the least significant bits

What is the link to the Apache JIRA

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

How was this patch tested?

manually

Copy link
Contributor

@szetszwo szetszwo left a comment

Choose a reason for hiding this comment

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

@vtutrinov , thanks for promptly working on this! Some code becomes unused. Let's remove them?

Copy link
Contributor

@szetszwo szetszwo left a comment

Choose a reason for hiding this comment

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

+1 the change looks good.

@adoroszlai adoroszlai merged commit eb29e2c into apache:master Dec 7, 2023
@adoroszlai
Copy link
Contributor

Thanks @vtutrinov for the patch, @szetszwo for the review.

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.

3 participants