|
Spring for Apache Hadoop | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.data.hadoop.store.support.LifecycleObjectSupport
org.springframework.data.hadoop.store.support.StoreObjectSupport
org.springframework.data.hadoop.store.support.OutputStoreObjectSupport
public abstract class OutputStoreObjectSupport
A OutputStoreObjectSupport is meant to be used from a store
DataWriter implementations by keeping current writing state.
| Constructor Summary | |
|---|---|
OutputStoreObjectSupport(org.apache.hadoop.conf.Configuration configuration,
org.apache.hadoop.fs.Path basePath,
CodecInfo codec)
Instantiates a new abstract output store support. |
|
| Method Summary | |
|---|---|
OutputContext |
getOutputContext()
Gets the strategy context. |
protected org.apache.hadoop.fs.Path |
getResolvedPath()
Gets the resolved path. |
protected void |
onInit()
Subclasses may implement this for initialization logic. |
protected void |
renameFile(org.apache.hadoop.fs.Path path)
Rename file using prefix and suffix settings. |
void |
setFileNamingStrategy(FileNamingStrategy fileNamingStrategy)
Sets the file naming strategy. |
void |
setInWritingPrefix(java.lang.String prefix)
Sets the in writing prefix. |
void |
setInWritingSuffix(java.lang.String suffix)
Sets the in writing suffix. |
void |
setOverwrite(boolean overwrite)
Sets the flag indicating if written files may be overwritten. |
void |
setRolloverStrategy(RolloverStrategy rolloverStrategy)
Sets the rollover strategy. |
protected void |
setWritePosition(long position)
Sets the write position. |
| Methods inherited from class org.springframework.data.hadoop.store.support.StoreObjectSupport |
|---|
doStart, doStop, getCodec, getConfiguration, getPath, handleIdleTimeout, isCompressed, resetIdleTimeout, setIdleTimeout |
| 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 |
| Constructor Detail |
|---|
public OutputStoreObjectSupport(org.apache.hadoop.conf.Configuration configuration,
org.apache.hadoop.fs.Path basePath,
CodecInfo codec)
configuration - the hadoop configurationbasePath - the hdfs pathcodec - the compression codec info| Method Detail |
|---|
protected void onInit()
throws java.lang.Exception
LifecycleObjectSupportInitializingBean phase.
Implementor should always call super method not to break initialization chain.
onInit in class StoreObjectSupportjava.lang.Exceptionpublic OutputContext getOutputContext()
public void setFileNamingStrategy(FileNamingStrategy fileNamingStrategy)
StrategyContext.
fileNamingStrategy - the new file naming strategypublic void setRolloverStrategy(RolloverStrategy rolloverStrategy)
StrategyContext.
rolloverStrategy - the new rollover strategypublic void setInWritingSuffix(java.lang.String suffix)
suffix - the new in writing suffixpublic void setInWritingPrefix(java.lang.String prefix)
prefix - the new in writing prefixpublic void setOverwrite(boolean overwrite)
FALSE meaning StoreException
is thrown if file is about to get overwritten.
overwrite - the new overwriteprotected org.apache.hadoop.fs.Path getResolvedPath()
protected void setWritePosition(long position)
position - the new write positionprotected void renameFile(org.apache.hadoop.fs.Path path)
path - the path to rename
|
Spring for Apache Hadoop | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||