mcvsubbu commented on a change in pull request #3836: Clarify all methods in
PinotFS
URL: https://github.com/apache/incubator-pinot/pull/3836#discussion_r256658682
##########
File path:
pinot-filesystem/src/main/java/org/apache/pinot/filesystem/PinotFS.java
##########
@@ -45,42 +45,45 @@ public abstract boolean mkdir(URI uri)
/**
* Deletes the file at the location provided. If the segmentUri is a
directory, it will delete the entire directory.
* @param segmentUri URI of the segment
- * @param forceDelete true if we want the uri and any suburis to always be
deleted, false if we want delete to fail
+ * @param forceDelete true if we want the uri and any sub-uris to always be
deleted, false if we want delete to fail
* when we want to delete a directory and that directory
is not empty
* @return true if delete is successful else false
- * @throws IOException IO failure
- * @throws Exception if segmentUri is not valid or present
+ * @throws IOException IO failure, e.g Uri is not present or valid
*/
public abstract boolean delete(URI segmentUri, boolean forceDelete)
throws IOException;
/**
- * Moves the file from the src to dst. Does not keep the original file. If
the dst has parent directories
- * that haven't been created, this method will create all the necessary
parent directories. If dst already exists,
- * it will overwrite. Will work either for moving a directory or a file.
Currently assumes that both the srcUri
- * and the dstUri are of the same type (both files or both directories). If
srcUri is a file, it will move the file to
- * dstUri's location. If srcUri is a directory, it will move the directory
to dstUri. Does not support moving a file under a
- * directory.
- *
- * For example, if a/b/c is moved to x/y/z, in the case of overwrite, a/b/c
will be renamed to x/y/z.
+ * Moves the file or directory from the src to dst. Does not keep the
original file. If the dst has parent directories
+ * that haven't been created, this method will create all the necessary
parent directories.
+ * If both src and dst are files, dst will be overwritten.
+ * If src is a file and dst is a directory, src file will get moved under
dst directory.
Review comment:
Can we be consistent in the user of 'folder' and 'directory'?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]