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

Mingliang Liu commented on HADOOP-13626:
----------------------------------------

The patch looks good to me overall. +1

I have a few trivial comments:

# Can you also update the javadoc of {{CopyListingFileStatus}} class?
{code}
/**
 * CopyListingFileStatus is a specialized subclass of {@link FileStatus} for
 * attaching additional data members useful to distcp.  This class does not
 * override {@link FileStatus#compareTo}, because the additional data members
 * are not relevant to sort order.
 */
{code}
This will be so not true.
# Can we not use wildcard if the classes are not all imported? I personally got 
pain when backporting code to our internal branches.
{code:title=TestCopyListingFileStatus.java}
27      import static org.junit.Assert.*;
{code}
# {{assertEquals}} has signature {{assertEquals(expected, actual)}}. The 
failing message will be confusing if the order is not take care of.
{code}
55          assertEquals(clfs.getLen(), stat.getLen());
56          assertEquals(clfs.isDirectory(), stat.isDirectory());
57          assertEquals(clfs.getReplication(), stat.getReplication());
58          assertEquals(clfs.getBlockSize(), stat.getBlockSize());
59          assertEquals(clfs.getAccessTime(), stat.getAccessTime());
...
{code}
Here I think stat's values are expected?

> Remove distcp dependency on FileStatus serialization
> ----------------------------------------------------
>
>                 Key: HADOOP-13626
>                 URL: https://issues.apache.org/jira/browse/HADOOP-13626
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: tools/distcp
>            Reporter: Chris Douglas
>            Assignee: Chris Douglas
>         Attachments: HADOOP-13626.001.patch, HADOOP-13626.002.patch, 
> HADOOP-13626.003.patch
>
>
> DistCp uses an internal struct {{CopyListingFileStatus}} to record metadata. 
> Because this record extends {{FileStatus}}, it also relies on the 
> {{Writable}} contract from that type. Because DistCp performs its checks on a 
> subset of the fields (i.e., does not actually rely on {{FileStatus}} as a 
> supertype), these types should be independent.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to