Class SimpleFileNameFormat
java.lang.Object
org.apache.storm.hdfs.trident.format.SimpleFileNameFormat
- All Implemented Interfaces:
Serializable,FileNameFormat
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName(long rotation, long timeStamp) Returns the filename the HdfsBolt will create.getPath()voidsupport parameters:
$TIME - current time.withTimeFormat(String timeFormat)
-
Constructor Details
-
SimpleFileNameFormat
public SimpleFileNameFormat()
-
-
Method Details
-
getName
Description copied from interface:FileNameFormatReturns the filename the HdfsBolt will create.- Specified by:
getNamein interfaceFileNameFormat- Parameters:
rotation- the current file rotation number (incremented on every rotation)timeStamp- current time in milliseconds when the rotation occurs
-
getPath
- Specified by:
getPathin interfaceFileNameFormat
-
prepare
- Specified by:
preparein interfaceFileNameFormat
-
withPath
-
withName
support parameters:
$TIME - current time. usewithTimeFormatto format.
$NUM - rotation number
$HOST - local host name
$PARTITION - partition index- Parameters:
name- file name
-
withTimeFormat
-