public abstract class ScopeFormat extends Object
User defined scope formats allow users to include or exclude certain identifiers from the scope. The scope for metrics belonging to the "Task" group could for example include the task attempt number (more fine grained identification), or exclude it (continuity of the namespace across failure and recovery).
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_SCOPE_JOB_COMPONENT
The default scope format for the job component:
"<job_name>" |
static String |
DEFAULT_SCOPE_JOBMANAGER_COMPONENT
The default scope format of the JobManager component:
"<host>.jobmanager" |
static String |
DEFAULT_SCOPE_JOBMANAGER_GROUP
The default scope format of JobManager metrics:
"<host>.jobmanager" |
static String |
DEFAULT_SCOPE_JOBMANAGER_JOB_GROUP
The default scope format for all job metrics on a jobmanager:
"<host>.jobmanager.<job_name>" |
static String |
DEFAULT_SCOPE_OPERATOR_COMPONENT
The default scope added by the operator component: "
|
static String |
DEFAULT_SCOPE_OPERATOR_GROUP
The default scope format for all operator metrics:
"<host>.taskmanager.<tm_id>.<job_name>.<operator_name>.<subtask_index>" |
static String |
DEFAULT_SCOPE_TASK_COMPONENT
Default scope of the task component:
"<task_name>.<subtask_index>" |
static String |
DEFAULT_SCOPE_TASK_GROUP
The default scope format for all task metrics:
"<host>.taskmanager.<tm_id>.<job_name>.<task_name>.<subtask_index>" |
static String |
DEFAULT_SCOPE_TASKMANAGER_COMPONENT
The default scope format of the TaskManager component:
"<host>.taskmanager.<tm_id>" |
static String |
DEFAULT_SCOPE_TASKMANAGER_GROUP
The default scope format of TaskManager metrics:
"<host>.taskmanager.<tm_id>" |
static String |
DEFAULT_SCOPE_TASKMANAGER_JOB_GROUP
The default scope format for all job metrics on a taskmanager:
"<host>.taskmanager.<tm_id>.<job_name>" |
static String |
SCOPE_HOST |
static String |
SCOPE_INHERIT_PARENT
If the scope format starts with this character, then the parent components scope
format will be used as a prefix.
|
static String |
SCOPE_JOB_ID |
static String |
SCOPE_JOB_NAME |
static String |
SCOPE_OPERATOR_NAME |
static String |
SCOPE_SEPARATOR |
static String |
SCOPE_TASK_ATTEMPT_ID |
static String |
SCOPE_TASK_ATTEMPT_NUM |
static String |
SCOPE_TASK_NAME |
static String |
SCOPE_TASK_SUBTASK_INDEX |
static String |
SCOPE_TASK_VERTEX_ID |
static String |
SCOPE_TASKMANAGER_ID |
Modifier | Constructor and Description |
---|---|
protected |
ScopeFormat(String format,
ScopeFormat parent,
String[] variables) |
Modifier and Type | Method and Description |
---|---|
protected static HashMap<String,Integer> |
arrayToMap(String[] array) |
static String |
asVariable(String scope)
Formats the given string to resemble a scope variable.
|
protected String[] |
bindVariables(String[] template,
String[] values) |
static String |
concat(CharacterFilter filter,
Character delimiter,
String... components)
Concatenates the given component names separated by the delimiter character.
|
static String |
concat(CharacterFilter filter,
String... components) |
static String |
concat(Character delimiter,
String... components) |
static String |
concat(String... components) |
protected String[] |
copyTemplate() |
String |
format() |
String |
toString() |
protected static String |
valueOrNull(Object value) |
public static final String SCOPE_INHERIT_PARENT
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.
public static final String SCOPE_SEPARATOR
public static final String SCOPE_HOST
public static final String DEFAULT_SCOPE_JOBMANAGER_COMPONENT
"<host>.jobmanager"
public static final String DEFAULT_SCOPE_JOBMANAGER_GROUP
"<host>.jobmanager"
public static final String SCOPE_TASKMANAGER_ID
public static final String DEFAULT_SCOPE_TASKMANAGER_COMPONENT
"<host>.taskmanager.<tm_id>"
public static final String DEFAULT_SCOPE_TASKMANAGER_GROUP
"<host>.taskmanager.<tm_id>"
public static final String SCOPE_JOB_ID
public static final String SCOPE_JOB_NAME
public static final String DEFAULT_SCOPE_JOB_COMPONENT
"<job_name>"
public static final String DEFAULT_SCOPE_JOBMANAGER_JOB_GROUP
"<host>.jobmanager.<job_name>"
public static final String DEFAULT_SCOPE_TASKMANAGER_JOB_GROUP
"<host>.taskmanager.<tm_id>.<job_name>"
public static final String SCOPE_TASK_VERTEX_ID
public static final String SCOPE_TASK_NAME
public static final String SCOPE_TASK_ATTEMPT_ID
public static final String SCOPE_TASK_ATTEMPT_NUM
public static final String SCOPE_TASK_SUBTASK_INDEX
public static final String DEFAULT_SCOPE_TASK_COMPONENT
"<task_name>.<subtask_index>"
public static final String DEFAULT_SCOPE_TASK_GROUP
"<host>.taskmanager.<tm_id>.<job_name>.<task_name>.<subtask_index>"
public static final String SCOPE_OPERATOR_NAME
public static final String DEFAULT_SCOPE_OPERATOR_COMPONENT
public static final String DEFAULT_SCOPE_OPERATOR_GROUP
"<host>.taskmanager.<tm_id>.<job_name>.<operator_name>.<subtask_index>"
protected ScopeFormat(String format, ScopeFormat parent, String[] variables)
public String format()
protected final String[] copyTemplate()
public static String asVariable(String scope)
scope
- The string to formatpublic static String concat(CharacterFilter filter, String... components)
public static String concat(CharacterFilter filter, Character delimiter, String... components)
filter
- Character filter to be applied to the component namesdelimiter
- Delimiter to separate component namescomponents
- Array of component namesCopyright © 2014–2017 The Apache Software Foundation. All rights reserved.