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