Spring for Apache Hadoop

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

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.support.InputStoreObjectSupport
              extended by org.springframework.data.hadoop.store.input.AbstractDataStreamReader
All Implemented Interfaces:
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
Direct Known Subclasses:
TextFileReader

public class AbstractDataStreamReader
extends InputStoreObjectSupport

A AbstractDataStreamReader is a base implementation handling streams with a raw hdfs files.

Author:
Janne Valkealahti

Nested Class Summary
protected static class AbstractDataStreamReader.ReaderHelper<T,V>
          Reader helper hiding complexity of working with input streams.
 
Constructor Summary
AbstractDataStreamReader(org.apache.hadoop.conf.Configuration configuration, org.apache.hadoop.fs.Path basePath, CodecInfo codec)
          Instantiates a new abstract data stream reader.
AbstractDataStreamReader(org.apache.hadoop.conf.Configuration configuration, org.apache.hadoop.fs.Path basePath, CodecInfo codec, Split split)
          Instantiates a new abstract data stream reader.
 
Method Summary
protected  StreamsHolder<java.io.InputStream> getInput()
          Creates a holder wrapping input stream.
 
Methods inherited from class org.springframework.data.hadoop.store.support.InputStoreObjectSupport
getInputContext, getSplit
 
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

AbstractDataStreamReader

public AbstractDataStreamReader(org.apache.hadoop.conf.Configuration configuration,
                                org.apache.hadoop.fs.Path basePath,
                                CodecInfo codec)
Instantiates a new abstract data stream reader.

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

AbstractDataStreamReader

public AbstractDataStreamReader(org.apache.hadoop.conf.Configuration configuration,
                                org.apache.hadoop.fs.Path basePath,
                                CodecInfo codec,
                                Split split)
Instantiates a new abstract data stream reader.

Parameters:
configuration - the configuration
basePath - the base path
codec - the compression codec info
split - the input split
Method Detail

getInput

protected StreamsHolder<java.io.InputStream> getInput()
                                               throws java.io.IOException
Creates a holder wrapping input stream.

Returns:
the holder for streams
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

Spring for Apache Hadoop