[ 
https://issues.apache.org/jira/browse/HADOOP-16946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17069358#comment-17069358
 ] 

Ayush Saxena commented on HADOOP-16946:
---------------------------------------

Thanx [~rain_lyy] for the patch.
The same logic seems to be there here :

{code:java}
        if (verboseLog) {
          context.write(null,
              new Text("FILE_SKIPPED: source=" + sourceFileStatus.getPath()
              + ", size=" + sourceFileStatus.getLen() + " --> "
              + "target=" + target + ", size=" + (targetStatus == null ?
                  0 : targetStatus.getLen())));
{code}

Give a check if the same problem is there too. 

Moved this from HDFS to COMMON, since the changes aren't in HDFS.

[~linyiqun] [~xyao] you worked on HADOOP-14839, can you confirm this once.

> Distcp print wrong log info when use -log
> -----------------------------------------
>
>                 Key: HADOOP-16946
>                 URL: https://issues.apache.org/jira/browse/HADOOP-16946
>             Project: Hadoop Common
>          Issue Type: Improvement
>    Affects Versions: 3.1.1
>            Reporter: liuyanyu
>            Priority: Minor
>         Attachments: HDFS-15241.001.patch, image-2020-03-25-17-28-33-394.png
>
>
> when run distcp with -log /logpath -v, distcp will print copy status and file 
> info to /logpath, but print log with wrong file zise. The logs print as 
> follows:
> FILE_COPIED: source=hdfs://ns1/test/stax2-api-3.1.4.jar, size=161867 --> 
> target=hdfs://ns1/tmp/target/stax2-api-3.1.4.jar, size=0
> As I analysis ,the root cause is as follows:
> targrtFileStatus got before copying. So targrtFileStatus is null. Here should 
> get targrtFileStatus again after file copying.
> !image-2020-03-25-17-28-33-394.png!



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to