Skip to content

HBASE-30159 Make hash algorithm configurable for HashTable and SyncTable#8321

Open
jinhyukify wants to merge 2 commits into
apache:masterfrom
jinhyukify:HBASE-30159
Open

HBASE-30159 Make hash algorithm configurable for HashTable and SyncTable#8321
jinhyukify wants to merge 2 commits into
apache:masterfrom
jinhyukify:HBASE-30159

Conversation

@jinhyukify
Copy link
Copy Markdown
Contributor

Comment on lines +229 to +230
ImmutableMap<Integer, ImmutableBytesWritable> expectedHashes =
ImmutableMap.<Integer, ImmutableBytesWritable> builder()
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Generated SHA-256 hashes using this script.
https://gist.github.com/jinhyukify/705b9b6b81d06973556d5645353efcbb

for (int i = 0; i < args.length - NUM_ARGS; i++) {
String cmd = args[i];
if (cmd.equals("-h") || cmd.startsWith("--h")) {
if (cmd.equals("-h") || cmd.equals("--help")) {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Without this change, we cannot use options that start with --h including --hashAlgorithm

endTime = Long.parseLong(endTimeString);
}

hashAlgorithm = p.getProperty("hashAlgorithm", DEFAULT_HASH_ALGORITHM);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

For old HashTable files, we fall back to the original MD5 algorithm.

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