Class SimpleFileNameFormat
java.lang.Object
org.apache.storm.hdfs.bolt.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
prepare
(Map<String, Object> conf, TopologyContext topologyContext) support parameters:
$TIME - current time. usewithTimeFormat
to format.
$NUM - rotation number
$HOST - local host name
$COMPONENT - component id
$TASK - task idwithTimeFormat
(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
$COMPONENT - component id
$TASK - task id- Parameters:
name
- file name
-
withTimeFormat
-