hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Raju (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-2956) calling fetchdt without a --renewer argument throws NPE
Date Tue, 31 Jul 2012 15:53:34 GMT

    [ https://issues.apache.org/jira/browse/HDFS-2956?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13425861#comment-13425861

Raju commented on HDFS-2956:

Here we are defining the protocol message as
message GetDelegationTokenRequestProto {
  required string renewer = 1;

based on some of the above comments I feel the renewer should be optional (since null can
be passed I mean we are not providing renewer).

Even with optional we will have the generated class with null check for renewer, so I guess
we can have null check for renewer like

if(renewer != null) {
    GetDelegationTokenRequestProto req = GetDelegationTokenRequestProto
    } else {
      GetDelegationTokenRequestProto req = GetDelegationTokenRequestProto
This should be possible since we are declaring the renewer optional, similarly we can parse
the message back at serverside translator.

Please correct me if I am wrong
> calling fetchdt without a --renewer argument throws NPE
> -------------------------------------------------------
>                 Key: HDFS-2956
>                 URL: https://issues.apache.org/jira/browse/HDFS-2956
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 0.24.0
>            Reporter: Todd Lipcon
>            Assignee: Daryn Sharp
> If I call "bin/hdfs fetchdt /tmp/mytoken" without a "--renewer foo" argument, then it
will throw a NullPointerException:
> Exception in thread "main" java.lang.NullPointerException
>         at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.getDelegationToken(ClientNamenodeProtocolTranslatorPB.java:830)
> this is because getDelegationToken is being called with a null renewer

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message