Class ScopeFormat

    • Field Detail

      • SCOPE_INHERIT_PARENT

        public static final String SCOPE_INHERIT_PARENT
        If the scope format starts with this character, then the parent components scope format will be used as a prefix.

        For example, if the TaskManager's job format is "*.<job_name>", and the TaskManager format is "<host>", then the job's metrics will have "<host>.<job_name>" as their scope.

        See Also:
        Constant Field Values
      • SCOPE_HOST

        public static final String SCOPE_HOST
      • SCOPE_TASKMANAGER_ID

        public static final String SCOPE_TASKMANAGER_ID
      • SCOPE_JOB_ID

        public static final String SCOPE_JOB_ID
      • SCOPE_JOB_NAME

        public static final String SCOPE_JOB_NAME
      • SCOPE_TASK_VERTEX_ID

        public static final String SCOPE_TASK_VERTEX_ID
      • SCOPE_TASK_NAME

        public static final String SCOPE_TASK_NAME
      • SCOPE_TASK_ATTEMPT_ID

        public static final String SCOPE_TASK_ATTEMPT_ID
      • SCOPE_TASK_ATTEMPT_NUM

        public static final String SCOPE_TASK_ATTEMPT_NUM
      • SCOPE_TASK_SUBTASK_INDEX

        public static final String SCOPE_TASK_SUBTASK_INDEX
      • SCOPE_OPERATOR_ID

        public static final String SCOPE_OPERATOR_ID
      • SCOPE_OPERATOR_NAME

        public static final String SCOPE_OPERATOR_NAME
    • Method Detail

      • format

        public String format()
      • copyTemplate

        protected final String[] copyTemplate()
      • bindVariables

        protected final String[] bindVariables​(String[] template,
                                               String[] values)
      • asVariable

        public static String asVariable​(String scope)
        Formats the given string to resemble a scope variable.
        Parameters:
        scope - The string to format
        Returns:
        The formatted string
      • concat

        public static String concat​(CharacterFilter filter,
                                    Character delimiter,
                                    String... components)
        Concatenates the given component names separated by the delimiter character. Additionally the character filter is applied to all component names.
        Parameters:
        filter - Character filter to be applied to the component names
        delimiter - Delimiter to separate component names
        components - Array of component names
        Returns:
        The concatenated component name
      • valueOrNull

        protected static String valueOrNull​(Object value)