You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/10/09 07:11:00 UTC
[jira] [Commented] (YARN-11334) [Federation] improve SubClusterState#fromString parameter and LogMessage
[ https://issues.apache.org/jira/browse/YARN-11334?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17614628#comment-17614628 ]
ASF GitHub Bot commented on YARN-11334:
---------------------------------------
slfan1989 opened a new pull request, #4988:
URL: https://github.com/apache/hadoop/pull/4988
JIRA: YARN-11334. [Federation] Improve SubClusterState#fromString parameter and LogMessage.
> [Federation] improve SubClusterState#fromString parameter and LogMessage
> ------------------------------------------------------------------------
>
> Key: YARN-11334
> URL: https://issues.apache.org/jira/browse/YARN-11334
> Project: Hadoop YARN
> Issue Type: Improvement
> Components: federation
> Affects Versions: 3.4.0
> Reporter: fanshilun
> Assignee: fanshilun
> Priority: Major
>
> The SubClusterState object has a fromString method, which can be improved in the following 2 places
> {code:java}
> /**
> * Convert a string into {@code SubClusterState}.
> *
> * @param x the string to convert in SubClusterState
> * @return the respective {@code SubClusterState}
> */
> public static SubClusterState fromString(String x) {
> try {
> return SubClusterState.valueOf(x);
> } catch (Exception e) {
> LOG.error("Invalid SubCluster State value in the StateStore does not"
> + " match with the YARN Federation standard.");
> return null;
> }
> } {code}
> * The parameter is named x, which cannot well express the meaning of the input parameter.
> * The error log does not print the error value.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org