-
Notifications
You must be signed in to change notification settings - Fork 9.1k
HDFS-15430. create should work when parent dir is internalDir and fallback configured. #2107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
...fs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFsLinkFallback.java
Outdated
Show resolved
Hide resolved
...ct/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemLinkFallback.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just cosmetic issues otherwise LGTM
...ct/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemLinkFallback.java
Outdated
Show resolved
Hide resolved
|
Thanks @jojochuang for the review. I have updated with fixing the comments. Let me know if you have further. Thanks |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
…lback configured.
…dition as we attempt create only in the case of fallback.
7f7bad8 to
3225add
Compare
|
💔 -1 overall
This message was automatically generated. |
|
Test failures are unrelated and javadoc failures due to HADOOP-17091. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanx @umamaheswararao for the work here. Seems the test cases tend to handle almost all cases which I can think of. :-)
Changes LGTM +1
| vfs.create(vfsTestDir); | ||
| Assert.fail("Should fail to create file as this is an internal dir."); | ||
| } catch (NotInMountpointException e){ | ||
| // This tree is part of internal tree. The above expetion will be thrown |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo "expetion"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Done.
| ParentNotDirectoryException, UnsupportedFileSystemException, | ||
| UnresolvedLinkException, IOException { | ||
| Preconditions.checkNotNull(f, "File cannot be null."); | ||
| // Just a sanity check. This should not happen. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean by : This should not happen. Ideally client call shouldn't land here or This If check will never get hit(It does get hit, I verified),
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My comments seems to be too light. "//" will trigger this. But ideally that should not happen as users would not create files with /. However if somebody attempts we are ready to shoot. I have removed that comment, as it may be confusing.
However, this will trigger mostly in ViewFs.java, but may not be in ViewFileSystem.java. In ViewFileSystem.java, getDefaultReplication API itself might shade this condition if parent is internal currently. Anyway the current condition should be good enough to handle if some one try with files as "//" etc
Thanks for checking.
|
Thank you @ayushtkn for review!! |
|
💔 -1 overall
This message was automatically generated. |
https://issues.apache.org/jira/browse/HDFS-15430