Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-14363

Inconsistent default block location in FileSystem javadoc

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • None
    • 3.0.0-alpha4
    • fs
    • None

    Description

      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()) };
        }
      

      Attachments

        1. HADOOP-14363.001.patch
          0.8 kB
          Chen Liang

        Activity

          People

            vagarychen Chen Liang
            liuml07 Mingliang Liu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: