[
https://issues.apache.org/jira/browse/HADOOP-7284?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13035080#comment-13035080
]
Sanjay Radia commented on HADOOP-7284:
--------------------------------------
Good question. Yes and no.
If you recall, when I did FileContext and AbstractFileSystem, the home
directory came from the server side. Our current default of /user/<uname> is
used for FileSystem since it has no notion of a server defaults.
Enter Viewfs -- there is no notion of a server side. Also a viewfs could have
mount points to different file systems; so I can't pick the ss defaults for
home directory from any one of them.
This hit home when i tried to run the tests because the mac and linux and hdfs
have different home directory pathname.
SO the test exposed a real problem in the system design by the fact that our
tests run on different platforms and hence different file systems.
I haven't figured out what is the cleanest way to fix this (but I give a
suggestion below that I will file as a jira).
The intermediate solution is that the person configuring the view file system
will create a mount point for /user or /Users etc depending on what he wants
as the default home dir. So I simply coded a rule in viewfilesystem impl, for
now, to see if it has mount point of /user or /Users etc, till we figure out a
better solution.
Here is proposal on which I am going to shortly file a jira: let the viewfs
config indicate the home directory. In a sense
it is like a SS default. Should this simply be a key in the config or something
else (like pick it up from a hdfs?)
I could have made the tests work by simply not using a mount point and test
path starting with "/user" or "/Users" but then it does not test our most
common usecase. BTW I plan to add a test to HDFS also.
"
> Trash and shell's rm does not work for viewfs
> ---------------------------------------------
>
> Key: HADOOP-7284
> URL: https://issues.apache.org/jira/browse/HADOOP-7284
> Project: Hadoop Common
> Issue Type: Bug
> Reporter: Sanjay Radia
> Assignee: Sanjay Radia
> Fix For: 0.23.0
>
> Attachments: trash1.patch, trash2.patch
>
>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira