org.springframework.data.hadoop.store.output
Class OutputStreamWriter
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
org.springframework.data.hadoop.store.output.OutputStreamWriter
- All Implemented Interfaces:
- Closeable, Flushable, Aware, BeanFactoryAware, InitializingBean, Lifecycle, Phased, SmartLifecycle, DataStoreWriter<byte[]>, DataWriter<byte[]>
public class OutputStreamWriter
- extends AbstractDataStreamWriter
- implements DataStoreWriter<byte[]>
A OutputStreamWriter is a DataStoreWriter implementation
able to write byte[]s into 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 |
OutputStreamWriter
public OutputStreamWriter(Configuration configuration,
Path basePath,
CodecInfo codec)
- Instantiates a new output stream writer.
- Parameters:
configuration - the configurationbasePath - the base pathcodec - the codec
flush
public void flush()
throws IOException
- Specified by:
flush in interface Flushable
- Throws:
IOException
close
public void close()
throws IOException
- Specified by:
close in interface Closeable
- Throws:
IOException
write
public void write(byte[] entity)
throws IOException
- Description copied from interface:
DataWriter
- Write an entity.
- Specified by:
write in interface DataWriter<byte[]>
- Throws:
IOException - if an I/O error occurs
handleIdleTimeout
protected void handleIdleTimeout()
- Description copied from class:
StoreObjectSupport
- Handle idle timeout. This method should be overriden
to be notified of idle timeouts. Default implementation
doesn't do anything.
- Overrides:
handleIdleTimeout in class StoreObjectSupport