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

Xiaoyu Yao commented on HDFS-12425:
-----------------------------------

Thanks for the update, [~msingh]. The patch v4 looks good to me overall, just 
few comments.

OzoneFileSystem.java
Line 273/290/292, "/" can be replaced with OZONE_URI_DELIMITER

same applies to OzoneBucket.java line 300.

OZoneInputStream.java
1. Line 70/81: suggest using URI to handle this.
bq. Can you please elaborate this comment 

{code}
 private final URI uri;
...
this.uri = new URI(OZONE_URI_SCHEME, bucket.getQualifiedKeyName(key), null)
{code}

I also suggest change the bucket.getQualifiedKeyName to use URI and return a 
URI as well for validation and
easy integration of security in the future. 

{code}
 private final URI uri;
...
this.uri = bucket.getQualifiedName().resolve(key);
{code}

OzoneBucket.java

getQualifiedKeyName should build a bucket URI at the constructor time and 
return it upon request
{code}

public URI getQualifiedName() {
  return uri;
}


OzoneBucket() {
...
uri = new URI(OZONE_URI_SCHEME, 
getBucketInfo().getVolumeName()).resolve(getBucketName());
}

{code}


bq. Yes, I wanted to use this jira to provide the basic functionality of 
read/write/open and getFileInfo. I will replace these functions when the new 
put key api's are in.

Sounds good to me.



> Ozone: OzoneFileSystem: OzoneFileystem read/write/create/open/getFileInfo APIs
> ------------------------------------------------------------------------------
>
>                 Key: HDFS-12425
>                 URL: https://issues.apache.org/jira/browse/HDFS-12425
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: ozone
>    Affects Versions: HDFS-7240
>            Reporter: Mukul Kumar Singh
>            Assignee: Mukul Kumar Singh
>              Labels: ozoneMerge
>             Fix For: HDFS-7240
>
>         Attachments: HDFS-12425-HDFS-7240.001.patch, 
> HDFS-12425-HDFS-7240.002.patch, HDFS-12425-HDFS-7240.003.patch, 
> HDFS-12425-HDFS-7240.004.patch
>
>
> This jira will add create/open and read/write APIs for OzoneFileSystem.



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

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