hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chen Zhang (Jira)" <j...@apache.org>
Subject [jira] [Comment Edited] (HDFS-14784) Add more methods to WebHdfsTestUtil to support tests outside of package
Date Fri, 30 Aug 2019 15:45:00 GMT

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

Chen Zhang edited comment on HDFS-14784 at 8/30/19 3:44 PM:
------------------------------------------------------------

Thanks [~crh] for your review, the purpose of adding \{{WebHdfsFileSystem#convertJsonToDelegationToken}}
is to make \{{JsonUtilClient#toDelegationToken()}} can be accessed out of package, so I just
replace the usage of \{{JsonUtilClient#toDelegationToken()}} in \{{TestWebHdfsTokens}} with \{{WebHdfsFileSystem#convertJsonToDelegationToken}},
so we can test the new added method in current tests.

Actually I do want to add a new test for this method, but it's a little complicate, because
we have to authenticate by kerberos first to get delegation token from a secure cluster, or
add a NoAuthFilter like we did in \{{TestRouterHttpDelegationToken}}, I think it's not worth
to do these things for testing a wrapper method.

upload the patch v2.


was (Author: zhangchen):
Thanks [~crh] for your review, the purpose of adding \{{WebHdfsFileSystem#convertJsonToDelegationToken}}
is to make \{{JsonUtilClient#toDelegationToken()}} can be accessed out of package, so I just
replace the usage of \{{JsonUtilClient#toDelegationToken()}} in \{{TestWebHdfsTokens}} with \{{WebHdfsFileSystem#convertJsonToDelegationToken}},
so we can test the new added method in current tests.

Actually I do want to add a new test for this method, but it's a little complicate, because
we have to authenticate by kerberos first to getDelegationToken from a secure cluster, or
add a NoAuthFilter like we did in \{{TestRouterHttpDelegationToken}}, I think it's not worth
to do these things for testing a wrapper method.

> Add more methods to WebHdfsTestUtil to support tests outside of package
> -----------------------------------------------------------------------
>
>                 Key: HDFS-14784
>                 URL: https://issues.apache.org/jira/browse/HDFS-14784
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>            Reporter: Chen Zhang
>            Assignee: Chen Zhang
>            Priority: Major
>         Attachments: HDFS-14784.001.patch, HDFS-14784.002.patch
>
>
> Before HDFS-14434, we can access a secure cluster by WebHDFS using user.name parameter
and {{PseudoAuthenticationHandler}} without kerberos authentication, it's quite useful for
some test situation.
> HDFS-14434 ignores user.name query parameter in secure WebHDFS when we using WebHdfsFileSystem,
so the only way to use user.name parameter is to access by URL.
> This Jira try to add more methods to WebHdfsTestUtil to support UT out of package to
test WebHDFS in customize way.
> More background and discuss, see HDFS-14609.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

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


Mime
View raw message