[
https://issues.apache.org/jira/browse/HADOOP-15860?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16721703#comment-16721703
]
Sean Mackrory edited comment on HADOOP-15860 at 12/14/18 7:30 PM:
------------------------------------------------------------------
Also instead of just catching the exceptions, we should ensure we fail if an
exception is thrown. e.g. catch block changes a flag from false to true, then
we assert that it's true.
edit:
Just to add to my previous comments,
ITestAbfsFileSystemContractMkdir>AbstractContractMkdirTest.testMkdirSlashHandling
fails with this patch. Make sure you run all the ABFS tests to check for
regressions.
I did some playing with these same APIs trying to make a file that ended with a
slash. It does actually fail explicitly on the server-side (instead of silently
losing the period like happens with trailing periods), and it is blocked by
other code or otherwise valid (like when specifying a destination directory).
So I think we can simply ignore trailing slashes.
was (Author: mackrorysd):
Also instead of just catching the exceptions, we should ensure we fail if an
exception is thrown. e.g. catch block changes a flag from false to true, then
we assert that it's true.
> ABFS: Throw IllegalArgumentException when Directory/File name ends with a
> period(.)
> -----------------------------------------------------------------------------------
>
> Key: HADOOP-15860
> URL: https://issues.apache.org/jira/browse/HADOOP-15860
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: fs/adl
> Affects Versions: 3.2.0
> Reporter: Sean Mackrory
> Assignee: Shweta
> Priority: Major
> Attachments: HADOOP-15860.001.patch, trailing-periods.patch
>
>
> If you create a directory with a trailing period (e.g. '/test.') the period
> is silently dropped, and will be listed as simply '/test'. '/test.test'
> appears to work just fine.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]