Class HdfsInputStream

java.lang.Object
org.apache.camel.component.hdfs.HdfsInputStream
All Implemented Interfaces:
Closeable, AutoCloseable

public class HdfsInputStream extends Object implements Closeable
  • Constructor Details

    • HdfsInputStream

      protected HdfsInputStream()
  • Method Details

    • createInputStream

      public static HdfsInputStream createInputStream(String hdfsPath, org.apache.camel.component.hdfs.HdfsInfoFactory hdfsInfoFactory)
      Parameters:
      hdfsPath -
      hdfsInfoFactory -
      Returns:
    • close

      public final void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException
    • next

      public final long next(Holder<Object> key, Holder<Object> value)
      Reads next record/chunk specific to give file type.
      Parameters:
      key -
      value -
      Returns:
      number of bytes read. 0 is correct number of bytes (empty file), -1 indicates no record was read
    • hasNext

      public final boolean hasNext()
    • getNumOfReadBytes

      public final long getNumOfReadBytes()
    • getNumOfReadMessages

      public final long getNumOfReadMessages()
    • getActualPath

      public final String getActualPath()
    • getChunkSize

      public final int getChunkSize()
    • getIn

      public final Closeable getIn()
    • isOpened

      public boolean isOpened()
    • isStreamDownload

      public boolean isStreamDownload()