[
https://issues.apache.org/jira/browse/HADOOP-9652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13728130#comment-13728130
]
Colin Patrick McCabe commented on HADOOP-9652:
----------------------------------------------
I tested this on a Solaris derivative (OpenIndiana) and verified that the
fallback path for LocalFileSystem worked. It works!
{code}
public static String[] getCheckProcessIsAliveCommand(String pid) {
- return Shell.WINDOWS ?
+ return WINDOWS ?
new String[] { Shell.WINUTILS, "task", "isAlive", pid } :
{code}
Let's make these cleanup changes in a separate JIRA to keep the diff down.
In {{RawLocalFileSystem}}, I think we should have a static final boolean that
caches the information about whether we are using the fallback path. That also
would make the code a little clearer-- it's otherwise not terribly clear why we
do something different for linux and freebsd.
{code}
+ @Deprecated
static class RawLocalFileStatus extends FileStatus {
/* We can add extra fields here. It breaks at least CopyFiles.FilePair().
* We recognize if the information is already loaded by check if
@@ -697,6 +706,7 @@ public void createSymlink(Path target, Path link, boolean
createParent)
* the given path does not refer to a symlink or there is an error
* accessing the symlink.
*/
+ @Deprecated
private String readLink(Path p) {
{code}
Can we rename these something that indicates that they're part of the fallback
path? I think {{RawLocalFileSystem#RawLocalFileStatus}} should be renamed to
something like {{DeprecatedLocalFileStatus}}.
In general, everything that's only part of the fallback path should be somehow
indicated.
I filed https://issues.apache.org/jira/browse/HDFS-5062 to address the existing
{{bash -c}} in {{org.apache.hadoop.fs.Df}}
> RawLocalFs#getFileLinkStatus does not fill in the link owner and mode
> ---------------------------------------------------------------------
>
> Key: HADOOP-9652
> URL: https://issues.apache.org/jira/browse/HADOOP-9652
> Project: Hadoop Common
> Issue Type: Bug
> Reporter: Colin Patrick McCabe
> Assignee: Andrew Wang
> Fix For: 2.3.0
>
> Attachments: hadoop-9452-1.patch, hadoop-9652-2.patch,
> hadoop-9652-3.patch, hadoop-9652-4.patch
>
>
> {{RawLocalFs#getFileLinkStatus}} does not actually get the owner and mode of
> the symlink, but instead uses the owner and mode of the symlink target. If
> the target can't be found, it fills in bogus values (the empty string and
> FsPermission.getDefault) for these.
> Symlinks have an owner distinct from the owner of the target they point to,
> and getFileLinkStatus ought to expose this.
> In some operating systems, symlinks can have a permission other than 0777.
> We ought to expose this in RawLocalFilesystem and other places, although we
> don't necessarily have to support this behavior in HDFS.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira