|
|||||||||
| 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 String |
READ_POSITION
|
| Constructor Summary | |
|---|---|
DataStoreItemReader()
Instantiates a new data store item reader. |
|
DataStoreItemReader(org.springframework.data.hadoop.store.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(ExecutionContext executionContext)
|
T |
read()
|
void |
setDataStoreReader(org.springframework.data.hadoop.store.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(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 String READ_POSITION
| Constructor Detail |
|---|
public DataStoreItemReader()
public DataStoreItemReader(org.springframework.data.hadoop.store.DataStoreReader<T> dataStoreReader)
dataStoreReader - the data store reader| Method Detail |
|---|
public void open(ExecutionContext executionContext)
throws ItemStreamException
open in interface ItemStreamItemStreamException
public void update(ExecutionContext executionContext)
throws ItemStreamException
update in interface ItemStreamItemStreamException
public void close()
throws ItemStreamException
close in interface ItemStreamItemStreamException
public T read()
throws Exception,
UnexpectedInputException,
ParseException,
NonTransientResourceException
read in interface ItemReader<T>Exception
UnexpectedInputException
ParseException
NonTransientResourceExceptionpublic void setLineDataMapper(LineDataMapper<T> lineDataMapper)
lineDataMapper - the new line data mapperpublic void setDataStoreReader(org.springframework.data.hadoop.store.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()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||