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

Hong Tang commented on HADOOP-4677:
-----------------------------------

{code:title=FileSystem.java|borderStyle=solid}
  public BlockLocation[] getFileBlockLocations(FileStatus file, 
      long start, long len) throws IOException {
    if (file == null) {
      return null;
    }
    String[] name = { "localhost:50010" };
    String[] host = { "localhost" };
    return new BlockLocation[] { new BlockLocation(name, host, 0, len) };
  }
{code}

The last statement return statement should either be 

"return new BlockLocation[] { new BlockLocation(name, host, 0, file.getLen()) 
};"

 or

 "return new BlockLocation[] { new BlockLocation(name, host, start, len) };"

> FileSystem.getFileBlockLocations() (aka default implementation for Local 
> FileSystem) incorrect.
> -----------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-4677
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4677
>             Project: Hadoop Core
>          Issue Type: Bug
>            Reporter: Hong Tang
>
> The default implementation of FileSystem.getFileBlockLocations(FileStatus 
> file, long start, long len) seems to be wrong.

-- 
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