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

 ##########
 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
 
 Review comment:
   why? Because with s3 I you don't get an atomic check anyway...it's simplest 
just to do the copy and say "yes, we overwrite".

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