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

Takanobu Asanuma edited comment on HDFS-15063 at 12/29/19 5:12 AM:
-------------------------------------------------------------------

Thanks for your explanation and updating the patch, [~hemanthboyina].

After applying [^HDFS-15063.002.patch], users can execute GETFILESTATUS of 
WEBHDFS REST API against HttpFS server. But it still fails when users use 
{{WebHdfsFileSystem#getFileStatus()}} against HttpFS server. I confirmed it 
with adding the following codes to the bottom of testECPolicy().
{code:java}
 WebHdfsFileSystem httpfsWebHdfs = (WebHdfsFileSystem) FileSystem.get(new 
URI("webhdfs://" + TestJettyHelper.getJettyURL().toURI().getAuthority()), 
TestHdfsHelper.getHdfsConf());
 HdfsFileStatus httpfsFileStatus = 
(HdfsFileStatus)httpfsWebHdfs.getFileStatus(ecFile);
 assertNotNull(httpfsFileStatus.getErasureCodingPolicy()); // This should 
succeed.
{code}
This is because the return value of {{FSOperations#toJsonInner}} doesn't have 
{{ecPolicyObj}} and {{JsonUtilClient#toFileStatus}} can't get the ecPolicy 
information. Could you check it?


was (Author: tasanuma0829):
Thanks for your explanation and updating the patch, [~hemanthboyina].

After applying [^HDFS-15063.002.patch], users can execute GETFILESTATUS of 
WEBHDFS REST AI against HttpFS server. But it still fails when users use 
{{WebHdfsFileSystem#getFileStatus()}} against HttpFS server. I confirmed it 
with adding the following codes to the bottom of testECPolicy().
{code:java}
 WebHdfsFileSystem httpfsWebHdfs = (WebHdfsFileSystem) FileSystem.get(new 
URI("webhdfs://" + TestJettyHelper.getJettyURL().toURI().getAuthority()), 
TestHdfsHelper.getHdfsConf());
 HdfsFileStatus httpfsFileStatus = 
(HdfsFileStatus)httpfsWebHdfs.getFileStatus(ecFile);
 assertNotNull(httpfsFileStatus.getErasureCodingPolicy()); // This should 
succeed.
{code}
This is because the return value of {{FSOperations#toJsonInner}} doesn't have 
{{ecPolicyObj}} and {{JsonUtilClient#toFileStatus}} can't get the ecPolicy 
information. Could you check it?

> HttpFS : getFileStatus doesn't return ecPolicy
> ----------------------------------------------
>
>                 Key: HDFS-15063
>                 URL: https://issues.apache.org/jira/browse/HDFS-15063
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: hemanthboyina
>            Assignee: hemanthboyina
>            Priority: Major
>         Attachments: HDFS-15063.001.patch, HDFS-15063.002.patch
>
>
> Currently LISTSTATUS call to HttpFS returns a json. These jsonArray elements  
> have the ecPolicy name.
> But when HttpFsFileSystem converts it back into a FileStatus object, then 
> ecPolicy is not added



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to