[ https://issues.apache.org/jira/browse/HDFS-6502?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14029322#comment-14029322 ]
Yongjun Zhang commented on HDFS-6502: ------------------------------------- HI [~ajisakaa], I reviewed it and suggest a little more modification: Original {quote} -update` | Overwrite if src size different from dst size | As noted in the preceding, this is not a "sync" operation. The only criterion examined is the source and destination file sizes; if they differ, the source file replaces the destination file. As discussed in the Usage documentation, it also changes the semantics for generating destination paths, so users should use this carefully. {quote} Current patched version {quote} `-update` | Overwrite if source and destination have different contents | As noted in the preceding, this is not a "sync" operation. The criteria examined are the source and destination file sizes, blocksizes, and checksums; if they differ, the source file replaces the destination file. As discussed in the Usage documentation, it also changes the semantics for generating destination paths, so users should use this carefully. {quote} New suggested change: {quote} `-update` | Overwrite if source and destination differ in size, blocksize, or checksum | As noted in the preceding, this is not a "sync" operation. The criteria examined are the source and destination file sizes, blocksizes, and checksums; if they differ, the source file replaces the destination file. As discussed in the Usage documentation, it also changes the semantics for generating destination paths, so users should use this carefully. {quote} Thanks again for the patch. > incorrect description in distcp2 document > ----------------------------------------- > > Key: HDFS-6502 > URL: https://issues.apache.org/jira/browse/HDFS-6502 > Project: Hadoop HDFS > Issue Type: Bug > Components: documentation > Affects Versions: 1.2.1, 2.5.0 > Reporter: Yongjun Zhang > Assignee: Akira AJISAKA > Labels: newbie > Attachments: HDFS-6502.patch > > > In http://hadoop.apache.org/docs/r1.2.1/distcp2.html#UpdateAndOverwrite > The first statement of the "Update and Overwrite" section says: > {quote} > -update is used to copy files from source that don't exist at the target, or > have different contents. -overwrite overwrites target-files even if they > exist at the source, or have the same contents. > {quote} > The "Command Line Options" table says : > {quote} > -overwrite: Overwrite destination > -update: Overwrite if src size different from dst size > {quote} > Based on the implementation, making the following modification would be more > accurate: > The first statement of the "Update and Overwrite" section: > {code} > -update is used to copy files from source that don't exist at the target, or > have different contents. -overwrite overwrites target-files if they exist at > the target. > {code} > The "Command Line Options" table: > {code} > -overwrite: Overwrite destination > -update: Overwrite destination if source and destination have different > contents > {code} > Thanks. -- This message was sent by Atlassian JIRA (v6.2#6252)