Package org.apache.camel.component.hdfs
Class HdfsInputStream
java.lang.Object
org.apache.camel.component.hdfs.HdfsInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidclose()static HdfsInputStreamcreateInputStream(String hdfsPath, org.apache.camel.component.hdfs.HdfsInfoFactory hdfsInfoFactory) final Stringfinal intfinal CloseablegetIn()final longfinal longfinal booleanhasNext()booleanisOpened()booleanfinal longReads next record/chunk specific to give file type.
-
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
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
next
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
-
getChunkSize
public final int getChunkSize() -
getIn
-
isOpened
public boolean isOpened() -
isStreamDownload
public boolean isStreamDownload()
-