Spring for Apache Hadoop

org.springframework.data.hadoop.store.strategy.naming
Interface FileNamingStrategy

All Known Implementing Classes:
AbstractFileNamingStrategy, ChainedFileNamingStrategy, CodecFileNamingStrategy, RollingFileNamingStrategy, StaticFileNamingStrategy

public interface FileNamingStrategy

Strategy interface for components naming files.

Author:
Janne Valkealahti

Method Summary
 org.apache.hadoop.fs.Path init(org.apache.hadoop.fs.Path path)
          Initialises a starting state of a 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.
 

Method Detail

resolve

org.apache.hadoop.fs.Path resolve(org.apache.hadoop.fs.Path path)
Resolve a current filename.

Returns:
the filename

reset

void reset()
Resets the strategy. This method should be called to prepare next filename in case strategy doesn't know how to do it automatically.


init

org.apache.hadoop.fs.Path init(org.apache.hadoop.fs.Path path)
Initialises a starting state of a strategy. Implementor of this method needs to check the final part of the Path 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.

Parameters:
path - the path
Returns:
the path

setCodecInfo

void setCodecInfo(CodecInfo codecInfo)
Sets the codec info.

Parameters:
codecInfo - the new codec info

Spring for Apache Hadoop