hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andras Bokor (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (HADOOP-14389) Exception handling is incorrect in KerberosName.java
Date Tue, 01 Aug 2017 11:56:00 GMT

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

Andras Bokor edited comment on HADOOP-14389 at 8/1/17 11:55 AM:
----------------------------------------------------------------

Thanks [~jzhuge] for looking into this.
Since my patch guava version was downgraded to 11 by HADOOP-14386.
I changed {{splitToList}} to {{split}} which has the same behavior but returns Iterable instead
of a List.
Tests pass locally and I did a try on a Hadoop install:
{code}/etc/hadoop-3.0.0-alpha4/bin/hadoop kerbname {nn,dn,rm,nm,jhs}/host.domain@REALM.TLD
Name: nn/host.domain@REALM.TLD to hdfs
Name: dn/host.domain@REALM.TLD to hdfs
Name: rm/host.domain@REALM.TLD to yarn
Name: nm/host.domain@REALM.TLD to yarn
Name: jhs/host.domain@REALM.TLD to mapred{code}


was (Author: boky01):
Thanks [~jzhuge] for looking into this.
Since my patch guava version was downgraded to 11 by HADOOP-14386.
I changed {{splitToList}} to {{split}} which has the same behavior but return Iterable instead
of a List.
Tests pass locally and I did a try on a Hadoop install:
{code}/etc/hadoop-3.0.0-alpha4/bin/hadoop kerbname {nn,dn,rm,nm,jhs}/host.domain@REALM.TLD
Name: nn/host.domain@REALM.TLD to hdfs
Name: dn/host.domain@REALM.TLD to hdfs
Name: rm/host.domain@REALM.TLD to yarn
Name: nm/host.domain@REALM.TLD to yarn
Name: jhs/host.domain@REALM.TLD to mapred{code}

> Exception handling is incorrect in KerberosName.java
> ----------------------------------------------------
>
>                 Key: HADOOP-14389
>                 URL: https://issues.apache.org/jira/browse/HADOOP-14389
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Andras Bokor
>            Assignee: Andras Bokor
>              Labels: supportability
>         Attachments: HADOOP-14389.01.patch, HADOOP-14389.02.patch
>
>
> I found multiple inconsistency:
> Rule: {{RULE:\[2:$1/$2\@$3\](.\*)s/.\*/hdfs/}}
> Principal: {{nn/host.domain@REALM.TLD}}
> Expected exception: {{BadStringFormat: ...3 is out of range...}}
> Actual exception: {{ArrayIndexOutOfBoundsException: 3}}
> ----
> Rule: {{RULE:\[:$1/$2\@$0](.\*)s/.\*/hdfs/}} (Missing num of components)
> Expected: {{IllegalArgumentException}}
> Actual: {{java.lang.NumberFormatException: For input string: ""}}
> ----
> Rule: {{RULE:\[2:$-1/$2\@$3\](.\*)s/.\*/hdfs/}}
> Expected {{BadStringFormat: -1 is outside of valid range...}}
> Actual: {{java.lang.NumberFormatException: For input string: ""}}
> ----
> Rule: {{RULE:\[2:$one/$2\@$3\](.\*)s/.\*/hdfs/}}
> Expected {{java.lang.NumberFormatException: For input string: "one"}}
> Acutal {{java.lang.NumberFormatException: For input string: ""}}
> ----
> In addtion:
> {code}[^\\]]{code}
> does not really make sense in {{ruleParser}}. Most probably it was needed because we
parse the whole rule string and remove the parsed rule from beginning of the string: {{KerberosName#parseRules}}.
This made the regex engine parse wrong without it.
> In addition:
> In tests some corner cases are not covered.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
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