public abstract class HdfsAtomicDataAccessor extends Plugin implements ReadAccessor
Modifier and Type | Field and Description |
---|---|
protected java.io.InputStream |
inp |
Constructor and Description |
---|
HdfsAtomicDataAccessor(InputData input)
Constructs a HdfsAtomicDataAccessor object.
|
Modifier and Type | Method and Description |
---|---|
void |
closeForRead()
Closes the access stream when finished reading the file
|
boolean |
isThreadSafe()
Checks if the plugin is thread safe or not, based on inputData.
|
boolean |
openForRead()
Opens the file using the non-splittable API for HADOOP HDFS file access
This means that instead of using a FileInputFormat for access, we use a
Java stream.
|
OneRow |
readNextObject()
Fetches one record from the file.
|
public HdfsAtomicDataAccessor(InputData input)
input
- all input parameters coming from the clientpublic boolean openForRead() throws java.lang.Exception
openForRead
in interface ReadAccessor
java.lang.Exception
- if opening the resource failedpublic OneRow readNextObject() throws java.io.IOException
readNextObject
in interface ReadAccessor
OneRow
record as a Java object. Returns null if none.java.io.IOException
public void closeForRead() throws java.lang.Exception
closeForRead
in interface ReadAccessor
java.lang.Exception
- if closing the resource failedpublic boolean isThreadSafe()
Plugin
isThreadSafe
in class Plugin