org.springframework.data.hadoop.store.output
Class AbstractDataStreamWriter
java.lang.Object
org.springframework.data.hadoop.store.support.LifecycleObjectSupport
org.springframework.data.hadoop.store.support.StoreObjectSupport
org.springframework.data.hadoop.store.support.OutputStoreObjectSupport
org.springframework.data.hadoop.store.output.AbstractDataStreamWriter
- All Implemented Interfaces:
- Aware, BeanFactoryAware, InitializingBean, Lifecycle, Phased, SmartLifecycle
- Direct Known Subclasses:
- OutputStreamWriter, TextFileWriter
public abstract class AbstractDataStreamWriter
- extends OutputStoreObjectSupport
A AbstractDataStreamWriter is a base implementation handling
streams with a raw hdfs files.
- Author:
- Janne Valkealahti
| 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 |
AbstractDataStreamWriter
public AbstractDataStreamWriter(Configuration configuration,
Path basePath,
CodecInfo codec)
- Instantiates a new abstract data stream writer.
- Parameters:
configuration - the hadoop configurationbasePath - the hdfs pathcodec - the compression codec info
getOutput
protected StreamsHolder<OutputStream> getOutput()
throws IOException
- Gets the output.
- Returns:
- the output
- Throws:
IOException - Signals that an I/O exception has occurred.
getPosition
protected long getPosition(StreamsHolder<OutputStream> holder)
throws IOException
- Gets the current stream writing position.
- Parameters:
holder - the holder for output streams
- Returns:
- the position
- Throws:
IOException - Signals that an I/O exception has occurred.