Class SimpleFileNameFormat

    • Constructor Detail

      • SimpleFileNameFormat

        public SimpleFileNameFormat()
    • Method Detail

      • getName

        public String getName​(long rotation,
                              long timeStamp)
        Description copied from interface: FileNameFormat
        Returns the filename the HdfsBolt will create.
        Specified by:
        getName in interface FileNameFormat
        Parameters:
        rotation - the current file rotation number (incremented on every rotation)
        timeStamp - current time in milliseconds when the rotation occurs
      • withName

        public SimpleFileNameFormat withName​(String name)
        support parameters:
        $TIME - current time. use withTimeFormat to format.
        $NUM - rotation number
        $HOST - local host name
        $COMPONENT - component id
        $TASK - task id
        Parameters:
        name - file name