org.springframework.data.hadoop.batch
Class HdfsItemReader<T>
java.lang.Object
org.springframework.batch.item.support.AbstractItemCountingItemStreamItemReader<T>
org.springframework.batch.item.file.FlatFileItemReader<T>
org.springframework.data.hadoop.batch.HdfsItemReader<T>
- Type Parameters:
T
- the generic type
- All Implemented Interfaces:
- ResourceAwareItemReaderItemStream<T>, ItemReader<T>, ItemStream, ItemStreamReader<T>, InitializingBean
public class HdfsItemReader<T>
- extends FlatFileItemReader<T>
Spring Batch ItemReader
implementation for Hadoop FileSystem
.
This class exists as it has to do the conversion manually since there's no pluggable
way to add another resource loader.
- Author:
- Costin Leau
Methods inherited from class org.springframework.batch.item.file.FlatFileItemReader |
afterPropertiesSet, doClose, doRead, jumpToItem, setBufferedReaderFactory, setComments, setEncoding, setLineMapper, setLinesToSkip, setRecordSeparatorPolicy, setResource, setSkippedLinesCallback, setStrict |
Methods inherited from class org.springframework.batch.item.support.AbstractItemCountingItemStreamItemReader |
close, getCurrentItemCount, getExecutionContextUserSupport, isSaveState, open, read, setCurrentItemCount, setMaxItemCount, setName, setSaveState, update |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.springframework.batch.item.ItemReader |
read |
HdfsItemReader
public HdfsItemReader(Configuration configuration)
- Instantiates a new hdfs item reader.
- Parameters:
configuration
- the configuration
HdfsItemReader
public HdfsItemReader(FileSystem fs)
- Instantiates a new hdfs item reader.
- Parameters:
fs
- the fs
HdfsItemReader
public HdfsItemReader(HdfsResourceLoader hdfsLoader)
- Instantiates a new hdfs item reader.
- Parameters:
hdfsLoader
- the hdfs loader
doOpen
protected void doOpen()
throws Exception
- Overrides:
doOpen
in class FlatFileItemReader<T>
- Throws:
Exception
setLocation
public void setLocation(String location)
- Sets the location.
- Parameters:
location
- the new location