|
Spring for Apache Hadoop | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.yarn.batch.item.HdfsFileSplitItemReader<T>
T
- the type of object returned as item readpublic class HdfsFileSplitItemReader<T>
Implementation of ItemReader
able
to read items from HDFS file splits.
Constructor Summary | |
---|---|
HdfsFileSplitItemReader()
Instantiates a new hdfs file split item reader. |
Method Summary | |
---|---|
void |
close()
|
boolean |
isSaveState()
The flag that determines whether to save internal state for restarts. |
void |
open(org.springframework.batch.item.ExecutionContext executionContext)
|
T |
read()
|
void |
setLineDataMapper(LineDataMapper<T> lineDataMapper)
Sets the line data mapper. |
void |
setResource(org.springframework.core.io.Resource resource)
|
void |
setSaveState(boolean saveState)
Set the flag that determines whether to save internal data for ExecutionContext . |
void |
setSplitLength(long splitLength)
Sets the split length. |
void |
setSplitStart(long splitStart)
Sets the split start. |
void |
update(org.springframework.batch.item.ExecutionContext executionContext)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HdfsFileSplitItemReader()
Method Detail |
---|
public void open(org.springframework.batch.item.ExecutionContext executionContext) throws org.springframework.batch.item.ItemStreamException
open
in interface org.springframework.batch.item.ItemStream
org.springframework.batch.item.ItemStreamException
public void update(org.springframework.batch.item.ExecutionContext executionContext) throws org.springframework.batch.item.ItemStreamException
update
in interface org.springframework.batch.item.ItemStream
org.springframework.batch.item.ItemStreamException
public void close() throws org.springframework.batch.item.ItemStreamException
close
in interface org.springframework.batch.item.ItemStream
org.springframework.batch.item.ItemStreamException
public T read() throws java.lang.Exception, org.springframework.batch.item.UnexpectedInputException, org.springframework.batch.item.ParseException, org.springframework.batch.item.NonTransientResourceException
read
in interface org.springframework.batch.item.ItemReader<T>
java.lang.Exception
org.springframework.batch.item.UnexpectedInputException
org.springframework.batch.item.ParseException
org.springframework.batch.item.NonTransientResourceException
public void setResource(org.springframework.core.io.Resource resource)
setResource
in interface org.springframework.batch.item.file.ResourceAwareItemReaderItemStream<T>
public void setLineDataMapper(LineDataMapper<T> lineDataMapper)
lineDataMapper
- the new line data mapperpublic void setSplitStart(long splitStart)
splitStart
- the new split startpublic void setSplitLength(long splitLength)
splitLength
- the new split lengthpublic void setSaveState(boolean saveState)
ExecutionContext
. Only switch this to false if you don't want to
save any state from this stream, and you don't need it to be restartable.
Always set it to false if the reader is being used in a concurrent
environment.
saveState
- flag value (default true).public boolean isSaveState()
|
Spring for Apache Hadoop | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |