Class OutputStreamInputSplit

    • Constructor Detail

      • OutputStreamInputSplit

        public OutputStreamInputSplit​(OutputStream outputStream)
    • Method Detail

      • canWriteToLocation

        public boolean canWriteToLocation​(URI location)
        Description copied from interface: InputSplit
        Returns true if the given uri can be written to
        Specified by:
        canWriteToLocation in interface InputSplit
        Parameters:
        location - the location to determine
        Returns:
      • addNewLocation

        public String addNewLocation()
        Description copied from interface: InputSplit
        Add a new location with the name generated by this input split/
        Specified by:
        addNewLocation in interface InputSplit
      • addNewLocation

        public String addNewLocation​(String location)
        Description copied from interface: InputSplit
        Add a new location to this input split (this may do anything from updating an in memory location to creating a new file)
        Specified by:
        addNewLocation in interface InputSplit
        Parameters:
        location - the location to add
      • updateSplitLocations

        public void updateSplitLocations​(boolean reset)
        Description copied from interface: InputSplit
        Refreshes the split locations if needed in memory. (Think a few file gets added)
        Specified by:
        updateSplitLocations in interface InputSplit
      • needsBootstrapForWrite

        public boolean needsBootstrapForWrite()
        Description copied from interface: InputSplit
        Returns true if this InputSplit needs bootstrapping for writing. A simple example of needing bootstrapping is for FileSplit where there is only a directory existing, but no file to write to
        Specified by:
        needsBootstrapForWrite in interface InputSplit
        Returns:
        true if this input split needs bootstrapping for writing to or not
      • openOutputStreamFor

        public OutputStream openOutputStreamFor​(String location)
                                         throws Exception
        Description copied from interface: InputSplit
        Open an OutputStream for the given location. Note that the user is responsible for closing the associated output stream.
        Specified by:
        openOutputStreamFor in interface InputSplit
        Parameters:
        location - the location to open the output stream for
        Returns:
        the output input stream
        Throws:
        Exception
      • openInputStreamFor

        public InputStream openInputStreamFor​(String location)
                                       throws Exception
        Description copied from interface: InputSplit
        Open an InputStream for the given location. Note that the user is responsible for closing the associated input stream.
        Specified by:
        openInputStreamFor in interface InputSplit
        Parameters:
        location - the location to open the input stream for
        Returns:
        the opened input stream
        Throws:
        Exception
      • length

        public long length()
        Description copied from interface: InputSplit
        Length of the split
        Specified by:
        length in interface InputSplit
        Returns:
      • locations

        public URI[] locations()
        Description copied from interface: InputSplit
        Locations of the splits
        Specified by:
        locations in interface InputSplit
        Returns:
      • reset

        public void reset()
        Description copied from interface: InputSplit
        Reset the InputSplit without reinitializing it from scratch. In many cases, this is a no-op. For InputSplits that have randomization: reset should shuffle the order.
        Specified by:
        reset in interface InputSplit
      • resetSupported

        public boolean resetSupported()
        Specified by:
        resetSupported in interface InputSplit
        Returns:
        True if the reset() method is supported (or is a no-op), false otherwise. If false is returned, reset() may throw an exception