You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Mingliang Liu (JIRA)" <ji...@apache.org> on 2017/04/28 21:43:04 UTC

[jira] [Created] (HADOOP-14363) Inconsistent default block location in FileSystem javadoc

Mingliang Liu created HADOOP-14363:
--------------------------------------

             Summary: Inconsistent default block location in FileSystem javadoc
                 Key: HADOOP-14363
                 URL: https://issues.apache.org/jira/browse/HADOOP-14363
             Project: Hadoop Common
          Issue Type: Bug
          Components: fs
            Reporter: Mingliang Liu
            Assignee: Chen Liang
            Priority: Trivial


{code:title=FileSystem::getFileBlockLocations()}
..
   *
   * The default implementation returns an array containing one element:
   * <pre>
   * BlockLocation( { "localhost:50010" },  { "localhost" }, 0, file.getLen())
   * </pre>>
   *
   * @param file FilesStatus to get data from
   * @param start offset into the given file
   * @param len length for which to get locations for
   * @throws IOException IO failure
   */
  public BlockLocation[] getFileBlockLocations(FileStatus file,
      long start, long len) throws IOException {
    ...
    String[] name = {"localhost:9866"};
    String[] host = {"localhost"};
    return new BlockLocation[] {
      new BlockLocation(name, host, 0, file.getLen()) };
  }
{code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org