public class DataStoreWriterFactoryBean extends Object implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.FactoryBean<org.springframework.cloud.stream.app.hdfs.hadoop.store.DataStoreWriter<String>>, org.springframework.beans.factory.BeanFactoryAware, org.springframework.context.SmartLifecycle
FactoryBean
creating a DataStoreWriter
. Created writer will be either
PartitionTextFileWriter
or TextFileWriter
depending whether partition
path expression is set.Constructor and Description |
---|
DataStoreWriterFactoryBean() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
void |
destroy() |
org.springframework.cloud.stream.app.hdfs.hadoop.store.DataStoreWriter<String> |
getObject() |
Class<?> |
getObjectType() |
int |
getPhase() |
boolean |
isAutoStartup() |
boolean |
isRunning() |
boolean |
isSingleton() |
void |
setAutoStartup(boolean autoStartup) |
void |
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) |
void |
setConfiguration(org.apache.hadoop.conf.Configuration configuration) |
void |
setPhase(int phase) |
void |
setProperties(HdfsSinkProperties properties) |
void |
setTaskExecutor(org.springframework.core.task.TaskExecutor taskExecutor) |
void |
setTaskScheduler(org.springframework.scheduling.TaskScheduler taskScheduler) |
void |
start() |
void |
stop() |
void |
stop(Runnable runnable) |
public void destroy() throws Exception
destroy
in interface org.springframework.beans.factory.DisposableBean
Exception
public org.springframework.cloud.stream.app.hdfs.hadoop.store.DataStoreWriter<String> getObject() throws Exception
public Class<?> getObjectType()
getObjectType
in interface org.springframework.beans.factory.FactoryBean<org.springframework.cloud.stream.app.hdfs.hadoop.store.DataStoreWriter<String>>
public boolean isSingleton()
isSingleton
in interface org.springframework.beans.factory.FactoryBean<org.springframework.cloud.stream.app.hdfs.hadoop.store.DataStoreWriter<String>>
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
@Autowired public void setConfiguration(org.apache.hadoop.conf.Configuration configuration)
@Autowired public void setProperties(HdfsSinkProperties properties)
@Autowired public void setTaskScheduler(@Qualifier(value="hdfsSinkTaskScheduler") org.springframework.scheduling.TaskScheduler taskScheduler)
@Autowired public void setTaskExecutor(@Qualifier(value="TASK_EXECUTOR_BEAN") org.springframework.core.task.TaskExecutor taskExecutor)
public void setPhase(int phase)
public void setAutoStartup(boolean autoStartup)
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) throws org.springframework.beans.BeansException
setBeanFactory
in interface org.springframework.beans.factory.BeanFactoryAware
org.springframework.beans.BeansException
public void start()
start
in interface org.springframework.context.Lifecycle
public void stop()
stop
in interface org.springframework.context.Lifecycle
public boolean isRunning()
isRunning
in interface org.springframework.context.Lifecycle
public boolean isAutoStartup()
isAutoStartup
in interface org.springframework.context.SmartLifecycle
public void stop(Runnable runnable)
stop
in interface org.springframework.context.SmartLifecycle
public int getPhase()
getPhase
in interface org.springframework.context.Phased
getPhase
in interface org.springframework.context.SmartLifecycle
Copyright © 2020 Pivotal Software, Inc.. All rights reserved.