[ https://issues.apache.org/jira/browse/HADOOP-11035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14123915#comment-14123915 ]
Yongjun Zhang commented on HADOOP-11035: ---------------------------------------- Hi Zhihai, Thanks for finding the issue and the patch. The patch looks good to me. Couple of minor comments about the test: - can we add a comment to describe the resulted command line? the string manipulation (substr, "+1", etc) in the test doesn't quickly tell how the resulted command line looks like. - add couple of empty lines to the test method, to separate the functionality of each block: initialization, run distcp, cleanup etc. Thanks. > distcp on mr1(branch-1) fails with NPE using a short relative source path. > -------------------------------------------------------------------------- > > Key: HADOOP-11035 > URL: https://issues.apache.org/jira/browse/HADOOP-11035 > Project: Hadoop Common > Issue Type: Bug > Components: tools > Reporter: zhihai xu > Assignee: zhihai xu > Attachments: HADOOP-11035.000.patch > > > distcp on mr1(branch-1) fails with NPE using a short relative source path. > The failure is at DistCp.java, makeRelative return null at the following code: > The parameters passed to makeRelative are not same format: > root is relative path and child.getPath() is a full path. > {code} > final String dst = makeRelative(root, child.getPath()); > {code} > The solution is > change root to full path to match child.getPath(). -- This message was sent by Atlassian JIRA (v6.3.4#6332)