Class FileInputSplit

    • Constructor Detail

      • FileInputSplit

        public FileInputSplit​(int num,
                              Path file,
                              long start,
                              long length,
                              String[] hosts)
        Constructs a split with host information.
        Parameters:
        num - the number of this input split
        file - the file name
        start - the position of the first byte in the file to process
        length - the number of bytes in the file to process (-1 is flag for "read whole file")
        hosts - the list of hosts containing the block, possibly null
    • Method Detail

      • getPath

        public Path getPath()
        Returns the path of the file containing this split's data.
        Returns:
        the path of the file containing this split's data.
      • getStart

        public long getStart()
        Returns the position of the first byte in the file to process.
        Returns:
        the position of the first byte in the file to process
      • getLength

        public long getLength()
        Returns the number of bytes in the file to process.
        Returns:
        the number of bytes in the file to process