steveloughran commented on a change in pull request #1591: HADOOP-16629: 
support copyFile in s3afilesystem
URL: https://github.com/apache/hadoop/pull/1591#discussion_r333722308
 
 

 ##########
 File path: 
hadoop-common-project/hadoop-common/src/site/markdown/filesystem/filesystem.md
 ##########
 @@ -905,6 +905,27 @@ the file, then verify the invariants in the `PathHandle` 
using
 `getFileStatus(Path)` to implement `CONTENT`. This could yield false
 positives and it requires additional RPC traffic.
 
+
+### `copyFile(URI srcFile, URI dstFile)`
+
+Copies a file `srcFile` to another file `dstFile`.
+
+Implementations without a compliant call SHOULD throw 
`UnsupportedOperationException`.
+
+#### Preconditions
+
+    if not exists(FS, srcFile) : raise FileNotFoundException
+
+    if not exists(parentFolder(dstFile)) : raise [IllegalArguementException]
+
+    if isDirectory(srcFile) : raise [IllegalArguementException]
+
+    if exists(dstFile) : raise FileAlreadyExistsException
+
+#### Postconditions
+
+`dstFile` is available in the filesystem.
 
 Review comment:
   afraid you are going to have to be a bit more detailed. Presumably the data 
in dstFile matches that of srcFile...currently that little detail isn't spelled 
out.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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]

Reply via email to