[
https://issues.apache.org/jira/browse/HDFS-12425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16173971#comment-16173971
]
Xiaoyu Yao commented on HDFS-12425:
-----------------------------------
Thanks [~msingh] for working on this. The patch looks good to me overall. Here
are some comments.
1. OzoneFileSystem.java
LINE 151/168/269/321, NIT: change the log level from debug to trace, also
suggest using parameterized syntax to reduce logging overhead.
Line 183: the try/catch is not being used to catch any exception that we plan
to handle, should we remove it?
Line 254: suggest using parameterized syntax to reduce logging overhead.
Line 268-273: can you add document somewhere mentioning how ozfs differentiate
directory/file by the trailing "/"?
Maybe define a OZONE_URI_SEPARATOR "/" as I've seen "/" used in many places if
there is not one exist. The other choice is to use URI#resolve
to handle this without worrying about the "/"
OzoneInputStream.java
1. Line 70/81: suggest using URI to handle this.
2. Line 53/92: can we use a stream (Bucket#readKey) instead of a local
file(Bucket#getKey) here for better perf?
This will affect other API implementation based on RandomAccessFile
OzoneOutputStream.java
Similar to the inputstream, can we avoid the stream backed by local file that
write to the bucket when close()?
TestOzoneFileInterfaces.java
Line 113: inputStream needs to be closed to avoid leaking. Consider using
try-with-resource to achieve that easily.
> 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
>
>
> 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: [email protected]
For additional commands, e-mail: [email protected]