[#107] CassandraKeyValue workload: add an option to generate rows with common hash component of primary key#108
Merged
Merged
Conversation
qvad
requested changes
Feb 19, 2026
qvad
left a comment
Contributor
There was a problem hiding this comment.
Small styling fixes, overall LGFM
| getRandomValue(keyValueBytes, valueSize, outBuffer); | ||
| } | ||
|
|
||
| static public void GenerateRandomString(Random random, int i, int size, byte[] outBuffer, boolean restrictToAscii) { |
Contributor
There was a problem hiding this comment.
method names should be started with lower letter
Contributor
There was a problem hiding this comment.
for work order also it is more readable to keep existing style public static void
Comment on lines
+49
to
+50
| int commonHashKeySize = AppBase.appConfig.commonHashKeySize; | ||
| if (commonHashKeySize > 0) { |
Contributor
There was a problem hiding this comment.
we don't need to add new variable here IMO, it is not modified later, so we can just use AppBase.appConfig.commonHashKeySize everywhere.
Comment on lines
+57
to
+58
| insertStatement = String.format("INSERT INTO %s " + | ||
| (commonHashKey.isEmpty() ? "(k, v) VALUES (?, ?);" : "(hash_k, k, v) VALUES (?, ?, ?);"), getTableName()); |
Contributor
There was a problem hiding this comment.
we can use one type of formatting here, it will be more readable, i.e.
String.format("INSERT INTO %s %s", getTableName(), commonHashKey.isEmpty() ? "(k, v) VALUES (?, ?);" : "(hash_k, k, v) VALUES (?, ?, ?);")
qvad
approved these changes
Feb 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
--common_hash_key_sizecommand line option to specify size of randomly generated common (per write thread) primary key hash component (ASCII)GenerateRandomStringfunction and also fixed it to really generate only ASCII characters whenrestrictToAscii == true(this was broken)