|
Spring for Apache Hadoop | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.yarn.batch.item.DataStoreItemReader<T>
T - the type of object returned as item readpublic class DataStoreItemReader<T>
Implementation of ItemReader able
to read items from HDFS file splits.
| Field Summary | |
|---|---|
static java.lang.String |
READ_POSITION
|
| Constructor Summary | |
|---|---|
DataStoreItemReader()
Instantiates a new data store item reader. |
|
DataStoreItemReader(DataStoreReader<T> dataStoreReader)
Instantiates a new data store 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 |
setDataStoreReader(DataStoreReader<T> dataStoreReader)
Sets the data store reader. |
void |
setLineDataMapper(LineDataMapper<T> lineDataMapper)
Sets the line data mapper. |
void |
setSaveState(boolean saveState)
Set the flag that determines whether to save internal data for ExecutionContext. |
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 |
| Field Detail |
|---|
public static final java.lang.String READ_POSITION
| Constructor Detail |
|---|
public DataStoreItemReader()
public DataStoreItemReader(DataStoreReader<T> dataStoreReader)
dataStoreReader - the data store reader| Method Detail |
|---|
public void open(org.springframework.batch.item.ExecutionContext executionContext)
throws org.springframework.batch.item.ItemStreamException
open in interface org.springframework.batch.item.ItemStreamorg.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.ItemStreamorg.springframework.batch.item.ItemStreamException
public void close()
throws org.springframework.batch.item.ItemStreamException
close in interface org.springframework.batch.item.ItemStreamorg.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.NonTransientResourceExceptionpublic void setLineDataMapper(LineDataMapper<T> lineDataMapper)
lineDataMapper - the new line data mapperpublic void setDataStoreReader(DataStoreReader<T> dataStoreReader)
dataStoreReader - the new data store readerpublic 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 | ||||||||