hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kai Zheng (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-13641) Update UGI#spawnAutoRenewalThreadForUserCreds to reduce indentation
Date Sun, 09 Oct 2016 09:51:20 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-13641?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15559704#comment-15559704
] 

Kai Zheng commented on HADOOP-13641:
------------------------------------

The latest patch LGTM and +1. Thanks Huafeng for the update.

> Update UGI#spawnAutoRenewalThreadForUserCreds to reduce indentation
> -------------------------------------------------------------------
>
>                 Key: HADOOP-13641
>                 URL: https://issues.apache.org/jira/browse/HADOOP-13641
>             Project: Hadoop Common
>          Issue Type: Improvement
>            Reporter: Xiao Chen
>            Assignee: Huafeng Wang
>            Priority: Minor
>              Labels: newbie
>         Attachments: HADOOP-13641.1.patch, HADOOP-13641.2.patch
>
>
> From [~drankye]'s comment in HADOOP-13590:
> Could we return earlier at the beginning so we can avoid at least 2 level of indents
and make the whole block more readable?
> {code}
>   /**Spawn a thread to do periodic renewals of kerberos credentials*/
>   private void spawnAutoRenewalThreadForUserCreds() {
>     if (isSecurityEnabled()) {
>       //spawn thread only if we have kerb credentials
>       if (user.getAuthenticationMethod() == AuthenticationMethod.KERBEROS &&
>           !isKeytab) {
> ...
> ...
>                              very deep nested ...
> ...
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Mime
View raw message