public class StoreWriterFactoryBean
extends java.lang.Object
implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.FactoryBean<org.springframework.data.hadoop.store.DataStoreWriter<?>>, org.springframework.beans.factory.BeanFactoryAware, org.springframework.context.Lifecycle, org.springframework.integration.expression.IntegrationEvaluationContextAware
FactoryBean creating a DataStoreWriter. Created writer will be either
PartitionTextFileWriter or TextFileWriter depending whether partition
path expression is set.| Constructor and Description |
|---|
StoreWriterFactoryBean() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
void |
destroy() |
org.springframework.data.hadoop.store.DataStoreWriter<?> |
getObject() |
java.lang.Class<?> |
getObjectType() |
boolean |
isRunning() |
boolean |
isSingleton() |
void |
setBasePath(org.apache.hadoop.fs.Path basePath)
Sets the base path for the writer.
|
void |
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) |
void |
setCloseTimeout(long closeTimeout)
Sets the close timeout for the writer.
|
void |
setCodec(org.springframework.data.hadoop.store.codec.CodecInfo codec)
Sets the codec for the writer.
|
void |
setConfiguration(org.apache.hadoop.conf.Configuration configuration)
Sets the hadoop configuration for the writer.
|
void |
setFileOpenAttempts(int fileOpenAttempts)
Sets the file open attempts for the writer.
|
void |
setIdleTimeout(long idleTimeout)
Sets the idle timeout for the writer.
|
void |
setIntegrationEvaluationContext(org.springframework.expression.EvaluationContext evaluationContext) |
void |
setInUsePrefix(java.lang.String inUsePrefix)
Sets the in use prefix for the writer.
|
void |
setInUseSuffix(java.lang.String inUseSuffix)
Sets the in use suffix for the writer.
|
void |
setNamingStrategy(org.springframework.data.hadoop.store.strategy.naming.FileNamingStrategy fileNamingStrategy)
Sets the naming strategy.
|
void |
setOverwrite(boolean overwrite)
Sets the file overwrite flag for the writer.
|
void |
setPartitionExpression(java.lang.String partitionExpression)
Sets the partition expression.
|
void |
setRolloverStrategy(org.springframework.data.hadoop.store.strategy.rollover.RolloverStrategy rolloverStrategy)
Sets the rollover strategy.
|
void |
start() |
void |
stop() |
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
throws org.springframework.beans.BeansException
setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAwareorg.springframework.beans.BeansExceptionpublic org.springframework.data.hadoop.store.DataStoreWriter<?> getObject()
throws java.lang.Exception
getObject in interface org.springframework.beans.factory.FactoryBean<org.springframework.data.hadoop.store.DataStoreWriter<?>>java.lang.Exceptionpublic java.lang.Class<?> getObjectType()
getObjectType in interface org.springframework.beans.factory.FactoryBean<org.springframework.data.hadoop.store.DataStoreWriter<?>>public boolean isSingleton()
isSingleton in interface org.springframework.beans.factory.FactoryBean<org.springframework.data.hadoop.store.DataStoreWriter<?>>public void destroy()
throws java.lang.Exception
destroy in interface org.springframework.beans.factory.DisposableBeanjava.lang.Exceptionpublic void afterPropertiesSet()
throws java.lang.Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanjava.lang.Exceptionpublic boolean isRunning()
isRunning in interface org.springframework.context.Lifecyclepublic void start()
start in interface org.springframework.context.Lifecyclepublic void stop()
stop in interface org.springframework.context.Lifecyclepublic void setIntegrationEvaluationContext(org.springframework.expression.EvaluationContext evaluationContext)
setIntegrationEvaluationContext in interface org.springframework.integration.expression.IntegrationEvaluationContextAwarepublic void setConfiguration(org.apache.hadoop.conf.Configuration configuration)
configuration - the new configurationpublic void setBasePath(org.apache.hadoop.fs.Path basePath)
basePath - the new base pathpublic void setCodec(org.springframework.data.hadoop.store.codec.CodecInfo codec)
codec - the new codecpublic void setIdleTimeout(long idleTimeout)
idleTimeout - the new idle timeoutpublic void setCloseTimeout(long closeTimeout)
closeTimeout - the new close timeoutpublic void setInUseSuffix(java.lang.String inUseSuffix)
inUseSuffix - the new in use suffixpublic void setInUsePrefix(java.lang.String inUsePrefix)
inUsePrefix - the new in use prefixpublic void setOverwrite(boolean overwrite)
overwrite - the new overwritepublic void setPartitionExpression(java.lang.String partitionExpression)
PartitionTextFileWriter
or TextFileWriter. Validity of this spel expression
is not checked in this factory, thus any non empty string will
result creation of PartitionTextFileWriter.partitionExpression - the new partition expressionpublic void setFileOpenAttempts(int fileOpenAttempts)
fileOpenAttempts - the new file open attemptspublic void setNamingStrategy(org.springframework.data.hadoop.store.strategy.naming.FileNamingStrategy fileNamingStrategy)
fileNamingStrategy - the new naming strategypublic void setRolloverStrategy(org.springframework.data.hadoop.store.strategy.rollover.RolloverStrategy rolloverStrategy)
rolloverStrategy - the new rollover strategy