-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
YARN-9425. Make initialDelay configurable for FederationStateStoreService#scheduledExecutorService #4731
Conversation
…vice#scheduledExecutorService
💔 -1 overall
This message was automatically generated. |
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.
Makes sense to me. Thanx @ashutoshcipher, Give a check if you can extend a test as well. If you don't find any smart way to check the functionality, Can just check on the LOG messages. GenericTestUtils.LogCapturer can help with that.
public static final String FEDERATION_STATESTORE_HEARTBEAT_INITIAL_DELAY_SECS = | ||
FEDERATION_PREFIX + "state-store.heartbeat.initial-delay-secs"; | ||
|
||
// 30 secs | ||
public static final int | ||
DEFAULT_FEDERATION_STATESTORE_HEARTBEAT_INITIAL_DELAY_SECS = 30; | ||
|
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.
Make the config support rather than binding it just with Seconds
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.
Thanks @ayushtkn for reviewing. Can you please elaborate on this? Are you suggesting to remove -secs
and _SECS
?
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.
yes, don't bind it with seconds, just make seconds as the default type, in case no unit is specified use Seconds, else whatever unit is specified. conf.getTimeDuration should do it for you.
Check this if it help:
Lines 65 to 70 in e0c8c6e
timeout = conf.getTimeDuration( | |
CommonConfigurationKeys. | |
HADOOP_SECURITY_GROUP_SHELL_COMMAND_TIMEOUT_KEY, | |
CommonConfigurationKeys. | |
HADOOP_SECURITY_GROUP_SHELL_COMMAND_TIMEOUT_DEFAULT, | |
TimeUnit.MILLISECONDS); |
if (heartbeatInitialDelay <= 0) { | ||
heartbeatInitialDelay = | ||
YarnConfiguration.DEFAULT_FEDERATION_STATESTORE_HEARTBEAT_INITIAL_DELAY_SECS; | ||
} |
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.
Add a warn log here, that the configured value for the Config is wrong it should be greater than 0, so using the default of....
And somewhere below an info log that we are using an initial delay of {configured} {unit}
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.
Makes sense. I will address this in my next commit.
💔 -1 overall
This message was automatically generated. |
Failure is unrelated, Ran it multiple times in local - its working fine. |
@ayushtkn - I have addressed your comments, can you please review it again. Thanks. |
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.
Dropped a comment, rest lgtm
TimeUnit.SECONDS); | ||
|
||
if (heartbeatInitialDelay <= 0) { | ||
LOG.warn("{} configured value is wrong, must be at <= 0; using default value of {}", |
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.
must be at <=0? It should be greater than 0, right?
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.
Thanks for pointing it out. Sorry I missed it. Fixed it in latest commit.
Thanks for review and approval :)
🎊 +1 overall
This message was automatically generated. |
Hi @ayushtkn - Thanks for your review and approval, I have update the log line as well. Can you commit this |
…vice#scheduledExecutorService (apache#4731). Contributed by groot and Shen Yinjie. Signed-off-by: Ayush Saxena <ayushsaxena@apache.org>
Description of PR
Make initialDelay configurable for FederationStateStoreService#scheduledExecutorService
JIRA - YARN-9425
For code changes:
LICENSE
,LICENSE-binary
,NOTICE-binary
files?