-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
blockSize - a new config paramter for max size of the block #272
Conversation
@@ -622,7 +623,15 @@ public boolean getShowConcise() { | |||
public void setShowConcise(boolean showConcise) { | |||
this.showConcise = showConcise; | |||
} | |||
|
|||
|
|||
public long getblockSize() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
camel casing is missing - getBlockSize, same for setter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will break the json parsing - please also test one end to end case with 120l records and set block size in args. Use debug logs to verify
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to Camel Case.
Ran with examples/febrl120k/config.json. Output attached. Appropriate block size was selected.
|
||
public static long getMaxBlockSize(long totalCount) { | ||
public static final long MIN_SIZE = 8L; | ||
public static long getMaxBlockSize(long totalCount, long blockSizeFromConfig) { | ||
long maxSize = 8; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldnt this be set to the min size var ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Used MIN_SIZE
LOG.debug("**Block size found **" + maxSize); | ||
if (maxSize > 100) maxSize = 100; | ||
LOG.debug("**Block size found **"); | ||
if (maxSize > blockSizeFromConfig) maxSize = blockSizeFromConfig; | ||
if (maxSize <= 8) maxSize = 8; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use the defined constant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
used MIN_SIZE
Output:
|
Output:
|
long maxSize = 8; | ||
/*if (totalCount > 100 && totalCount < 500){ | ||
maxSize = totalCount / 5; | ||
} | ||
else {*/ | ||
maxSize = (long) (0.001 * totalCount); | ||
LOG.debug("**Block size found **" + maxSize); | ||
if (maxSize > 100) maxSize = 100; | ||
LOG.debug("**Block size found **"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please print max size here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Restored
No description provided.