Package smile.io

Interface HadoopInput


public interface HadoopInput
Static methods that return the InputStream/Reader of a HDFS/S3. Local files, HTTP and FTP URLs are supported too.
  • Method Summary

    Static Methods
    Modifier and Type
    Method
    Description
    static org.apache.parquet.io.InputFile
    file(String path)
    Returns the Parquet's InputFile instance of a file path or URI.
    reader(String path)
    Returns the reader of a file path or URI.
    reader(String path, Charset charset)
    Returns the reader of a file path or URI.
    stream(String path)
    Returns the reader of a file path or URI.
  • Method Details

    • reader

      static BufferedReader reader(String path) throws IOException, URISyntaxException
      Returns the reader of a file path or URI.
      Parameters:
      path - the input file path.
      Returns:
      the file reader.
      Throws:
      IOException - when fails to read the file.
      URISyntaxException - when the file path syntax is wrong.
    • reader

      static BufferedReader reader(String path, Charset charset) throws IOException, URISyntaxException
      Returns the reader of a file path or URI.
      Parameters:
      path - the input file path.
      charset - the charset of file.
      Returns:
      the file reader.
      Throws:
      IOException - when fails to read the file.
      URISyntaxException - when the file path syntax is wrong.
    • stream

      static InputStream stream(String path) throws IOException
      Returns the reader of a file path or URI.
      Parameters:
      path - the input file path.
      Returns:
      the file input stream.
      Throws:
      IOException - when fails to read the file.
    • file

      static org.apache.parquet.io.InputFile file(String path) throws IOException
      Returns the Parquet's InputFile instance of a file path or URI.
      Parameters:
      path - the input file path.
      Returns:
      Parquet's InputFile.
      Throws:
      IOException - when fails to read the file.