public class ChainedFileNamingStrategy extends java.lang.Object implements FileNamingStrategy
FileNamingStrategy chaining other strategies.| Constructor and Description |
|---|
ChainedFileNamingStrategy()
Instantiates a new chained rollover strategy.
|
ChainedFileNamingStrategy(java.util.List<? extends FileNamingStrategy> strategies)
Instantiates a new chained rollover strategy.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<? extends FileNamingStrategy> |
getStrategies()
Gets the strategies.
|
org.apache.hadoop.fs.Path |
init(org.apache.hadoop.fs.Path path)
Initialises a starting state of a strategy.
|
void |
register(FileNamingStrategy strategy)
Register a new strategy.
|
void |
reset()
Resets the strategy.
|
org.apache.hadoop.fs.Path |
resolve(org.apache.hadoop.fs.Path path)
Resolve a current filename.
|
void |
setCodecInfo(CodecInfo codecInfo)
Sets the codec info.
|
void |
setStrategies(java.util.List<? extends FileNamingStrategy> strategies)
Sets the list of strategies.
|
public ChainedFileNamingStrategy()
public ChainedFileNamingStrategy(java.util.List<? extends FileNamingStrategy> strategies)
strategies - the strategiespublic org.apache.hadoop.fs.Path resolve(org.apache.hadoop.fs.Path path)
FileNamingStrategyresolve in interface FileNamingStrategypublic void reset()
FileNamingStrategyreset in interface FileNamingStrategypublic org.apache.hadoop.fs.Path init(org.apache.hadoop.fs.Path path)
FileNamingStrategyPath and
remove it's own handled part if possible. Returned Path
is then passed into next strategy for it to able to
do its own initialisation logic.
Path passed to this method may be null indicating
that no further processing should be done or simply we don't
have information about the initialised path.
init in interface FileNamingStrategypath - the pathpublic void setCodecInfo(CodecInfo codecInfo)
FileNamingStrategysetCodecInfo in interface FileNamingStrategycodecInfo - the new codec infopublic void setStrategies(java.util.List<? extends FileNamingStrategy> strategies)
strategies - the new strategiespublic void register(FileNamingStrategy strategy)
strategy - the strategypublic java.util.List<? extends FileNamingStrategy> getStrategies()