[
https://issues.apache.org/jira/browse/HDFS-12572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16193760#comment-16193760
]
Chen Liang commented on HDFS-12572:
-----------------------------------
Thanks [~msingh] for updating the patch! v004 patch looks good to me overall,
some comments below:
*OzoneFileSystem.java*
1. Looks like in the rename, it is after all subdirectories and files are
renamed, the src path gets removed? Seems this means the rename can potentially
generates doubled size of entries of the directory being renamed. Would it be
better (if possible) to rename one key at a time, deletes it, the move to next
one? I'm thinking of adding {{bucket.deleteKey}} around line 267-268, and
remove {{delete(src, true);}} on line 358. Not sure if this is enough though.
2. {{OzoneListingIterator}} make it an inner class of OzoneFileSystem? Because
it seems file system calls delete, list status and rename are and will be the
only use of this class.
3. in mkdir, seems when an inode in the path is a file, mkdir gets rollback
(line 463). Should we also roll back if createDir fails (line 473)
4. "Directory is represented using empty key with no value.” did you mean root
directory?
5. OzoneListingIterator#iterate and processKey() both return a boolean but
seems nowhere depends on this return value. So this seems a bit unnecessary to
me. Do we need to have processKey and iterate to return anything at all?
*BucketProcessTemplate.java*
Just log a word "Success" does not seem to be very useful, can expand this
message a little bit? Similarly for {{KeyProcessTemplate}}
> Ozone: OzoneFileSystem: delete/list status/rename/mkdir APIs
> ------------------------------------------------------------
>
> Key: HDFS-12572
> URL: https://issues.apache.org/jira/browse/HDFS-12572
> 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-12572-HDFS-7240.001.patch,
> HDFS-12572-HDFS-7240.002.patch, HDFS-12572-HDFS-7240.003.patch,
> HDFS-12572-HDFS-7240.004.patch
>
>
> This jira will add the delete/list status/rename/mkdir APIs
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]