Spring for Apache Hadoop

org.springframework.data.hadoop.store.output
Class AbstractSequenceFileWriter

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.OutputStoreObjectSupport
              extended by org.springframework.data.hadoop.store.output.AbstractSequenceFileWriter
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:
TextSequenceFileWriter

public abstract class AbstractSequenceFileWriter
extends OutputStoreObjectSupport

A AbstractSequenceFileWriter is a base implementation handling writes with a SequenceFile.

Author:
Janne Valkealahti

Constructor Summary
AbstractSequenceFileWriter(org.apache.hadoop.conf.Configuration configuration, org.apache.hadoop.fs.Path basePath, CodecInfo codec)
          Instantiates a new abstract sequence file writer.
 
Method Summary
protected  SequenceFileWriterHolder<org.apache.hadoop.io.SequenceFile.Writer> getOutput()
          Gets the output.
protected  long getPosition(org.apache.hadoop.io.SequenceFile.Writer writer)
           
 
Methods inherited from class org.springframework.data.hadoop.store.support.OutputStoreObjectSupport
getOutputContext, getResolvedPath, onInit, renameFile, setFileNamingStrategy, setInWritingPrefix, setInWritingSuffix, setOverwrite, setRolloverStrategy, setWritePosition
 
Methods inherited from class org.springframework.data.hadoop.store.support.StoreObjectSupport
doStart, doStop, getCodec, getConfiguration, getPath, handleIdleTimeout, isCompressed, 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

AbstractSequenceFileWriter

public AbstractSequenceFileWriter(org.apache.hadoop.conf.Configuration configuration,
                                  org.apache.hadoop.fs.Path basePath,
                                  CodecInfo codec)
Instantiates a new abstract sequence file writer.

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

getOutput

protected SequenceFileWriterHolder<org.apache.hadoop.io.SequenceFile.Writer> getOutput()
                                                                                throws java.io.IOException
Gets the output.

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

getPosition

protected long getPosition(org.apache.hadoop.io.SequenceFile.Writer writer)
                    throws java.io.IOException
Throws:
java.io.IOException

Spring for Apache Hadoop