hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hadoop QA (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-11156) DelegateToFileSystem should implement getFsStatus(final Path f).
Date Tue, 30 Sep 2014 09:09:34 GMT

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

Hadoop QA commented on HADOOP-11156:

{color:red}-1 overall{color}.  Here are the results of testing the latest attachment 
  against trunk revision 0577eb3.

    {color:green}+1 @author{color}.  The patch does not contain any @author tags.

    {color:red}-1 tests included{color}.  The patch doesn't appear to include any new or modified
                        Please justify why no new tests are needed for this patch.
                        Also please list what manual steps were performed to verify this patch.

    {color:green}+1 javac{color}.  The applied patch does not increase the total number of
javac compiler warnings.

    {color:green}+1 javadoc{color}.  There were no new javadoc warning messages.

    {color:green}+1 eclipse:eclipse{color}.  The patch built with eclipse:eclipse.

    {color:green}+1 findbugs{color}.  The patch does not introduce any new Findbugs (version
2.0.3) warnings.

    {color:green}+1 release audit{color}.  The applied patch does not increase the total number
of release audit warnings.

    {color:green}+1 core tests{color}.  The patch passed unit tests in hadoop-common-project/hadoop-common.

    {color:green}+1 contrib tests{color}.  The patch passed contrib unit tests.

Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/4838//testReport/
Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/4838//console

This message is automatically generated.

> DelegateToFileSystem should implement getFsStatus(final Path f).
> ----------------------------------------------------------------
>                 Key: HADOOP-11156
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11156
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs
>            Reporter: zhihai xu
>            Assignee: zhihai xu
>         Attachments: HADOOP-11156.000.patch
> DelegateToFileSystem only implemented getFsStatus() and didn't implement getFsStatus(final
Path f). So if you call getFsStatus(final Path f), it will call  AbstractFileSystem.getFsStatus(final
Path f) which will also call DelegateToFileSystem.getFsStatus(). It should implement getFsStatus(final
Path f) to call fsImpl.getStatus(f) instead of calling fsImpl.getStatus() from getFsStatus().
> Also based on the following description for FileContext.getFsStatus:
> {code} 
> /**
>    * Returns a status object describing the use and capacity of the
>    * file system denoted by the Parh argument p.
>    * If the file system has multiple partitions, the
>    * use and capacity of the partition pointed to by the specified
>    * path is reflected.
>    * 
>    * @param f Path for which status should be obtained. null means the
>    * root partition of the default file system. 
>    *
>    * @return a FsStatus object
>    *
>    * @throws AccessControlException If access is denied
>    * @throws FileNotFoundException If <code>f</code> does not exist
>    * @throws UnsupportedFileSystemException If file system for <code>f</code>
>    *           not supported
>    * @throws IOException If an I/O error occurred
>    * 
>    * Exceptions applicable to file systems accessed over RPC:
>    * @throws RpcClientException If an exception occurred in the RPC client
>    * @throws RpcServerException If an exception occurred in the RPC server
>    * @throws UnexpectedServerException If server implementation throws 
>    *           undeclared exception to RPC server
>    */
>   public FsStatus getFsStatus(final Path f) throws AccessControlException,
>       FileNotFoundException, UnsupportedFileSystemException, IOException {
>     if (f == null) {
>       return defaultFS.getFsStatus();
>     }
>     final Path absF = fixRelativePart(f);
>     return new FSLinkResolver<FsStatus>() {
>       @Override
>       public FsStatus next(final AbstractFileSystem fs, final Path p) 
>         throws IOException, UnresolvedLinkException {
>         return fs.getFsStatus(p);
>       }
>     }.resolve(this, absF);
>   }
> {code}
> we should differentiate getFsStatus(final Path f) from getFsStatus() in DelegateToFileSystem.

This message was sent by Atlassian JIRA

View raw message