public abstract class StoreObjectSupport extends LifecycleObjectSupport
Constructor and Description |
---|
StoreObjectSupport(org.apache.hadoop.conf.Configuration configuration,
org.apache.hadoop.fs.Path basePath,
CodecInfo codec)
Instantiates a new abstract store support.
|
Modifier and Type | Method and Description |
---|---|
protected void |
doStart()
Subclasses may implement this method with the start behaviour.
|
protected void |
doStop()
Subclasses may implement this method with the stop behaviour.
|
protected void |
flushTimeout()
Handle flush timeout.
|
CodecInfo |
getCodec()
Gets the codec.
|
org.apache.hadoop.conf.Configuration |
getConfiguration()
Gets the configuration.
|
org.apache.hadoop.fs.Path |
getPath()
Gets the path.
|
protected void |
handleTimeout()
Handle idle timeout.
|
boolean |
isCompressed()
Checks if is compressed.
|
protected void |
onInit()
Subclasses may implement this for initialization logic.
|
void |
resetIdleTimeout()
Reset idle timeout.
|
void |
setCloseTimeout(long closeTimeout)
Sets the close timeout.
|
void |
setFlushTimeout(long flushTimeout)
Sets the flush timeout.
|
void |
setIdleTimeout(long idleTimeout)
Sets the idle timeout.
|
afterPropertiesSet, getBeanFactory, getPhase, getStoreEventPublisher, getTaskExecutor, getTaskScheduler, isAutoStartup, isRunning, setAutoStartup, setBeanFactory, setPhase, setStoreEventPublisher, setTaskExecutor, setTaskScheduler, start, stop, stop
public StoreObjectSupport(org.apache.hadoop.conf.Configuration configuration, org.apache.hadoop.fs.Path basePath, CodecInfo codec)
configuration
- the hadoop configurationbasePath
- the hdfs pathcodec
- the compression codec infoprotected void onInit() throws java.lang.Exception
LifecycleObjectSupport
InitializingBean
phase.
Implementor should always call super method not to break initialization chain.onInit
in class LifecycleObjectSupport
java.lang.Exception
- if error occurred during initprotected void doStart()
LifecycleObjectSupport
LifecycleObjectSupport.lifecycleLock
.doStart
in class LifecycleObjectSupport
protected void doStop()
LifecycleObjectSupport
LifecycleObjectSupport.lifecycleLock
.doStop
in class LifecycleObjectSupport
public org.apache.hadoop.conf.Configuration getConfiguration()
public org.apache.hadoop.fs.Path getPath()
public CodecInfo getCodec()
public boolean isCompressed()
public void setIdleTimeout(long idleTimeout)
idleTimeout
- the new idle timeoutpublic void setCloseTimeout(long closeTimeout)
closeTimeout
- the new close timeoutpublic void setFlushTimeout(long flushTimeout)
flushTimeout
- the new flush timeoutpublic void resetIdleTimeout()
protected void handleTimeout()
protected void flushTimeout()