You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
I added a judgment condition to ensure that when the request is empty, the metrics can be effectively counted
How was this patch tested?
Added new unit test to check if request is empty
For code changes:
The original code logic does not judge that the request is empty. In this case, add a judgment condition to ensure that when it is empty, it can be effectively processed
I need to ask a question, is it necessary to use a multi-threaded method when acquiring sub-clusters, can it not be traversed directly through a for loop? I tried to rewrite part of the code, can you help me to review it.
This should be more readable and not make much difference in performance.
When the PR was automatically checked, it was found that the test could not pass, and the following error was reported in the local test.
Caused by: org.apache.hadoop.metrics2.MetricsException: Metrics source DelegationTokenSecretManagerMetrics already exists!
at org.apache.hadoop.metrics2.lib.DefaultMetricsSystem.newSourceName(DefaultMetricsSystem.java:152)
at org.apache.hadoop.metrics2.lib.DefaultMetricsSystem.sourceName(DefaultMetricsSystem.java:125)
at org.apache.hadoop.metrics2.impl.MetricsSystemImpl.register(MetricsSystemImpl.java:229)
at org.apache.hadoop.metrics2.MetricsSystem.register(MetricsSystem.java:71)
at org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager$DelegationTokenSecretManagerMetrics.create(AbstractDelegationTokenSecretManager.java:878)
at org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager.<init>(AbstractDelegationTokenSecretManager.java:152)
at org.apache.hadoop.security.token.delegation.web.DelegationTokenManager$DelegationTokenSecretManager.<init>(DelegationTokenManager.java:72)
at org.apache.hadoop.security.token.delegation.web.DelegationTokenManager.<init>(DelegationTokenManager.java:122)
at org.apache.hadoop.security.token.delegation.web.DelegationTokenAuthenticationHandler.initTokenManager(DelegationTokenAuthenticationHandler.java:161)
at org.apache.hadoop.security.token.delegation.web.DelegationTokenAuthenticationHandler.init(DelegationTokenAuthenticationHandler.java:130)
at org.apache.hadoop.security.authentication.server.AuthenticationFilter.initializeAuthHandler(AuthenticationFilter.java:194)
at org.apache.hadoop.security.token.delegation.web.DelegationTokenAuthenticationFilter.initializeAuthHandler(DelegationTokenAuthenticationFilter.java:214)
at org.apache.hadoop.security.authentication.server.AuthenticationFilter.init(AuthenticationFilter.java:180)
at org.apache.hadoop.security.token.delegation.web.DelegationTokenAuthenticationFilter.init(DelegationTokenAuthenticationFilter.java:180)
at org.apache.hadoop.yarn.server.security.http.RMAuthenticationFilter.init(RMAuthenticationFilter.java:53)
at org.eclipse.jetty.servlet.FilterHolder.initialize(FilterHolder.java:140)
@hchaverri HiοΌhchaverriοΌI found that your submission in HADOOP-18167 may cause an online bug in Yarn. The code you submitted will cause the DelegationTokenSecretManagerMetrics to be initialized twice. Please checkYARN-11123
slfan1989
changed the title
YARN-11121:Conditional judgment Add in getClusterMetrics
YARN-11121:Check GetClusterMetrics Request parameter is null
May 6, 2022
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.
Description of PR
YARN-11121 - Conditional judgment Add in getClusterMetrics
https://issues.apache.org/jira/browse/YARN-11121
I added a judgment condition to ensure that when the request is empty, the metrics can be effectively counted
How was this patch tested?
Added new unit test to check if request is empty
For code changes:
The original code logic does not judge that the request is empty. In this case, add a judgment condition to ensure that when it is empty, it can be effectively processed