hadoop-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jerry Adair <Jerry.Ad...@sas.com>
Subject Hadoop WebHDFS Check Access method
Date Tue, 17 Feb 2015 00:52:44 GMT

In looking at the documentation for the Apache Hadoop 2.6.0 release (http://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-hdfs/WebHDFS.html),
under the "Other File System Operations" section, I see a method called "Check access".  When
I click on that link it takes me to an anchor further down the page that describes this method.
 It seems straightforward enough, but I found a problem.  I am writing to inquire about that

Specifically, in the specification for the Check access method, there is a reference to the
FileSystem class:

"See also: FileSystem.access"

However when you search through the FileSystem class definition documentation, there is no
method named "access".  Therefore I cannot determine exactly what this method is supposed
to do.  It seems obvious that it has something to do with ACLs, and I did find an access method
under the FileSystem class.  However I checked the Index for all of the classes and found

access(Path, FsAction)<https://hadoop.apache.org/docs/current/api/org/apache/hadoop/fs/AbstractFileSystem.html#access(org.apache.hadoop.fs.Path,%20org.apache.hadoop.fs.permission.FsAction)>
- Method in class org.apache.hadoop.fs.AbstractFileSystem<https://hadoop.apache.org/docs/current/api/org/apache/hadoop/fs/AbstractFileSystem.html>
The specification of this method matches that of FileContext.access(Path, FsAction)<https://hadoop.apache.org/docs/current/api/org/apache/hadoop/fs/FileContext.html#access(org.apache.hadoop.fs.Path,%20org.apache.hadoop.fs.permission.FsAction)>
except that an UnresolvedLinkException may be thrown if a symlink is encountered in the path.
access(Path, FsAction)<https://hadoop.apache.org/docs/current/api/org/apache/hadoop/fs/FileContext.html#access(org.apache.hadoop.fs.Path,%20org.apache.hadoop.fs.permission.FsAction)>
- Method in class org.apache.hadoop.fs.FileContext<https://hadoop.apache.org/docs/current/api/org/apache/hadoop/fs/FileContext.html>
Checks if the user can access a path.
access(Path, FsAction)<https://hadoop.apache.org/docs/current/api/org/apache/hadoop/fs/FileSystem.html#access(org.apache.hadoop.fs.Path,%20org.apache.hadoop.fs.permission.FsAction)>
- Method in class org.apache.hadoop.fs.FileSystem<https://hadoop.apache.org/docs/current/api/org/apache/hadoop/fs/FileSystem.html>
Checks if the user can access a path.
access(Path, FsAction)<https://hadoop.apache.org/docs/current/api/org/apache/hadoop/fs/FilterFileSystem.html#access(org.apache.hadoop.fs.Path,%20org.apache.hadoop.fs.permission.FsAction)>
- Method in class org.apache.hadoop.fs.FilterFileSystem<https://hadoop.apache.org/docs/current/api/org/apache/hadoop/fs/FilterFileSystem.html>

access(Path, FsAction)<https://hadoop.apache.org/docs/current/api/org/apache/hadoop/fs/viewfs/ViewFileSystem.html#access(org.apache.hadoop.fs.Path,%20org.apache.hadoop.fs.permission.FsAction)>
- Method in class org.apache.hadoop.fs.viewfs.ViewFileSystem<https://hadoop.apache.org/docs/current/api/org/apache/hadoop/fs/viewfs/ViewFileSystem.html>

access(Path, FsAction)<https://hadoop.apache.org/docs/current/api/org/apache/hadoop/fs/viewfs/ViewFs.html#access(org.apache.hadoop.fs.Path,%20org.apache.hadoop.fs.permission.FsAction)>
- Method in class org.apache.hadoop.fs.viewfs.ViewFs<https://hadoop.apache.org/docs/current/api/org/apache/hadoop/fs/viewfs/ViewFs.html>

The first three simply link to the corresponding class definition/specification page, but
none of them have an access method.  The last three do link to an access method description,
but they are (obviously) in a different class.  The parmlist of all of these method links
match the specification in the WebHDFS API, so I'm speculating that those descriptions would
suffice for an implementation of the method.

However what gives?  Why is there no access method in the FileSystem class as specified in
the WebHDFS documentation?

I noticed that the three classes where an access method is defined are all subclasses of either
FileSystem or AbstractFileSystem, so my guess would have been that they would inherit from
those two higher classes, not the other way around.

Anyway, I'd just like a little clarification.  I gotta be missing something.............


View raw message