org.springframework.data.hadoop.store.output
Class TextSequenceFileWriter
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.AbstractSequenceFileWriter
org.springframework.data.hadoop.store.output.TextSequenceFileWriter
- All Implemented Interfaces:
- java.io.Closeable, java.io.Flushable, 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, DataStoreWriter<java.lang.String>, DataWriter<java.lang.String>
public class TextSequenceFileWriter
- extends AbstractSequenceFileWriter
- implements DataStoreWriter<java.lang.String>
A TextSequenceFileWriter
is a DataStoreWriter
implementation
able to write String
s into a SequenceFile
.
- Author:
- Janne Valkealahti
Constructor Summary |
TextSequenceFileWriter(org.apache.hadoop.conf.Configuration configuration,
org.apache.hadoop.fs.Path basePath,
CodecInfo codec)
Instantiates a new text sequence file writer. |
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 |
TextSequenceFileWriter
public TextSequenceFileWriter(org.apache.hadoop.conf.Configuration configuration,
org.apache.hadoop.fs.Path basePath,
CodecInfo codec)
- Instantiates a new text sequence file writer.
- Parameters:
configuration
- the hadoop configurationbasePath
- the hdfs pathcodec
- the compression codec info
flush
public void flush()
throws java.io.IOException
- Specified by:
flush
in interface java.io.Flushable
- Throws:
java.io.IOException
close
public void close()
throws java.io.IOException
- Specified by:
close
in interface java.io.Closeable
- Throws:
java.io.IOException
write
public void write(java.lang.String entity)
throws java.io.IOException
- Description copied from interface:
DataWriter
- Write an entity.
- Specified by:
write
in interface DataWriter<java.lang.String>
- Throws:
java.io.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