Spring for Apache Hadoop

org.springframework.data.hadoop.store.input
Class TextSequenceFileReader

java.lang.Object
  extended by org.springframework.data.hadoop.store.support.LifecycleObjectSupport
      extended by org.springframework.data.hadoop.store.support.StoreObjectSupport
          extended by org.springframework.data.hadoop.store.input.AbstractSequenceFileReader
              extended by org.springframework.data.hadoop.store.input.TextSequenceFileReader
All Implemented Interfaces:
java.io.Closeable, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.InitializingBean, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle, DataReader<java.lang.String>, DataStoreReader<java.lang.String>

public class TextSequenceFileReader
extends AbstractSequenceFileReader
implements DataStoreReader<java.lang.String>

A TextSequenceFileReader is a DataStoreReader implementation able to read Strings from a SequenceFile.

Author:
Janne Valkealahti

Constructor Summary
TextSequenceFileReader(org.apache.hadoop.conf.Configuration configuration, org.apache.hadoop.fs.Path basePath, CodecInfo codec)
          Instantiates a new text sequence file reader.
 
Method Summary
 void close()
           
 java.lang.String read()
          Read next entity from a reader.
 
Methods inherited from class org.springframework.data.hadoop.store.input.AbstractSequenceFileReader
getInput
 
Methods inherited from class org.springframework.data.hadoop.store.support.StoreObjectSupport
doStart, doStop, getCodec, getConfiguration, getPath, handleIdleTimeout, isCompressed, onInit, resetIdleTimeout, setIdleTimeout
 
Methods inherited from class org.springframework.data.hadoop.store.support.LifecycleObjectSupport
afterPropertiesSet, getBeanFactory, getPhase, getStoreEventPublisher, getTaskExecutor, getTaskScheduler, isAutoStartup, isRunning, setAutoStartup, setBeanFactory, setPhase, setStoreEventPublisher, setTaskExecutor, setTaskScheduler, start, stop, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextSequenceFileReader

public TextSequenceFileReader(org.apache.hadoop.conf.Configuration configuration,
                              org.apache.hadoop.fs.Path basePath,
                              CodecInfo codec)
Instantiates a new text sequence file reader.

Parameters:
configuration - the hadoop configuration
basePath - the hdfs path
codec - the compression codec info
Method Detail

close

public void close()
           throws java.io.IOException
Specified by:
close in interface java.io.Closeable
Throws:
java.io.IOException

read

public java.lang.String read()
                      throws java.io.IOException
Description copied from interface: DataReader
Read next entity from a reader.

Specified by:
read in interface DataReader<java.lang.String>
Returns:
the entity or null
Throws:
java.io.IOException - if an I/O error occurs

Spring for Apache Hadoop