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

Yongjun Zhang commented on HDFS-10313:
--------------------------------------

Hi [~linyiqun],

Thanks for the new rev. A few more minor things below. I am +1 after they are 
addressed.

1.
{code}
117           throw new InvalidInputException("Snapshot not be found: " + nfe);
{code}
Add the following method in {{CopyListing.java}}
{code}
    public InvalidInputException(String message, Throwable cause) {
      super(message, cause);
    }    
{code}
and change the call to
{code}
117           throw new InvalidInputException("Input snapshot is not found", 
nfe);
{code}

2. In {{DistCp#createAndSubmitJob()}}

{code}
         throw new InvalidInputException(
              "Distcp sync failed, because of invalid options: " + 
inputOptions);
{code}
DistCp sync may have failed for different reasons. Though I initially suggested 
{{InvalidInputException}}, I now think using {{Exception}} here is better. 
Sorry about that.


3. Add spaces by changing
{code}
731         try{
...
735         }catch(HadoopIllegalArgumentException e){
{code}

to

{code}
731         try {
...
735         } catch (HadoopIllegalArgumentException e) {
{code}

Thanks.

--Yongjun

> Distcp does not check the order of snapshot names passed to -diff
> -----------------------------------------------------------------
>
>                 Key: HDFS-10313
>                 URL: https://issues.apache.org/jira/browse/HDFS-10313
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: distcp
>            Reporter: Yongjun Zhang
>            Assignee: Lin Yiqun
>         Attachments: HDFS-10313.001.patch, HDFS-10313.002.patch
>
>
> This jira is to propose adding a check to distcp, when {{-diff s1 s2}} is 
> passed, we need to ensure that s2 is newer than s1, otherwise, abort with a 
> informative error message.
> This is the result of my offline discussion with [~jingzhao] on HDFS-9820. 
> Thanks Jing.



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

Reply via email to