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

Steve Loughran commented on HADOOP-14455:
-----------------------------------------

Ignoring the semantics of rename, test wise I think it fails my [well known 
checklist of requirements of 
tests|https://github.com/steveloughran/formality/blob/master/styleguide/styleguide.md],
 namely
* will assertions fail with any form of meaningful diagnostics, or will 
debugging Jenkins faiures be impossible without further patches to the tests. 
Fix: Use {{ContractTestUtils.assertPathExists()}}
* Does it use hard-coded string comparisons when looking for exception text. 
Fix: static constant in production source, reference in test.
* if a caught exception is not the one expected, is that caught exception lost, 
or is it the stack trace and the message propagated. Fix 
{{GenericTestUtils.assertExceptionContains()}}, or, if targeting java 8+ only, 
{{LambdaTestUtils.intercept()}}

Imagine it is 18 months from now, and the test starts failing intermittently on 
Jenkins. Will the tests provide the information needed, or will you (or a 
successor) be left not having any idea what's going on? That's what tests 
should be trying to address. Not just verifying that the code works, but 
proving information needed to debug problems if/when it stops working

> ViewFileSystem#rename should support be supported within same nameservice 
> with different mountpoints
> ----------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-14455
>                 URL: https://issues.apache.org/jira/browse/HADOOP-14455
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: viewfs
>            Reporter: Brahma Reddy Battula
>            Assignee: Brahma Reddy Battula
>         Attachments: HADOOP-14455-002.patch, HADOOP-14455.patch
>
>
> *Scenario:* 
> || Mount Point || NameService|| Value||
> |/tmp|hacluster|/tmp|
> |/user|hacluster|/user|
> Move file from {{/tmp}} to {{/user}}
> It will fail by throwing the following error
> {noformat}
> Caused by: java.io.IOException: Renames across Mount points not supported
>         at 
> org.apache.hadoop.fs.viewfs.ViewFileSystem.rename(ViewFileSystem.java:500)
>         at org.apache.hadoop.hive.ql.metadata.Hive.moveFile(Hive.java:2692)
>         ... 22 more
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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

Reply via email to