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

Owen O'Malley commented on HADOOP-7099:
---------------------------------------

Ah, of course. You'll need to re-write the path to have a file: schema before 
you delegate it down. In the long term, it probably makes sense to have support 
for that in FilterFileSystem. Notably:

{code}
protected Path modifyPathForInnerFileSystem(Path path) throws IOException {
  return path;
}
{code}

And then in FilterFileSystem all of the default bodies should call that method 
to transform the path before passing the path to the nested file system.

> Make RawLocalFileSystem more friendly to sub-classing
> -----------------------------------------------------
>
>                 Key: HADOOP-7099
>                 URL: https://issues.apache.org/jira/browse/HADOOP-7099
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs
>    Affects Versions: 0.23.0
>            Reporter: Noah Watkins
>            Priority: Minor
>             Fix For: 0.23.0
>
>         Attachments: HADOOP-7099.patch
>
>
> This patch does 3 things that makes sub-classing RawLocalFileSystem easier.
> First, it adds a constructor that allows a sub-class to avoid calling 
> getInitialWorkingDirectory(). This is important because if a sub-class has an 
> initially null uri (prior to initialize() being called), then 
> getInitialWorkingDirectory() will cause a NullPointerException when it tries 
> to work with the FS's uri.
> Second, allows subclasses to modify the working directory.
> The third thing this patch does is change loadPermissions to not pass the URI 
> object to the File(URI) constructor, but rather pass the string 
> representation of the path. This is important because URI's that are not 
> using the "file" scheme will cause the File(URI) constructor to throw an 
> exception.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to