Java Code Examples for org.apache.flink.metrics.CharacterFilter#filterCharacters()
The following examples show how to use
org.apache.flink.metrics.CharacterFilter#filterCharacters() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbstractMetricGroup.java From flink with Apache License 2.0 | 6 votes |
/** * Returns the fully qualified metric name using the configured delimiter for the reporter with the given index, for example * {@code "host-7.taskmanager-2.window_word_count.my-mapper.metricName"}. * * @param metricName metric name * @param filter character filter which is applied to the scope components if not null. * @param reporterIndex index of the reporter whose delimiter should be used * @param delimiter delimiter to use * @return fully qualified metric name */ public String getMetricIdentifier(String metricName, CharacterFilter filter, int reporterIndex, char delimiter) { if (scopeStrings.length == 0 || (reporterIndex < 0 || reporterIndex >= scopeStrings.length)) { String newScopeString; if (filter != null) { newScopeString = ScopeFormat.concat(filter, delimiter, scopeComponents); metricName = filter.filterCharacters(metricName); } else { newScopeString = ScopeFormat.concat(delimiter, scopeComponents); } return newScopeString + delimiter + metricName; } else { if (scopeStrings[reporterIndex] == null) { if (filter != null) { scopeStrings[reporterIndex] = ScopeFormat.concat(filter, delimiter, scopeComponents); } else { scopeStrings[reporterIndex] = ScopeFormat.concat(delimiter, scopeComponents); } } if (filter != null) { metricName = filter.filterCharacters(metricName); } return scopeStrings[reporterIndex] + delimiter + metricName; } }
Example 2
Source File: OperatorMetricGroup.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
@Override protected QueryScopeInfo.OperatorQueryScopeInfo createQueryServiceMetricInfo(CharacterFilter filter) { return new QueryScopeInfo.OperatorQueryScopeInfo( this.parent.parent.jobId.toString(), this.parent.vertexId.toString(), this.parent.subtaskIndex, filter.filterCharacters(this.operatorName)); }
Example 3
Source File: OperatorMetricGroup.java From flink with Apache License 2.0 | 5 votes |
@Override protected QueryScopeInfo.OperatorQueryScopeInfo createQueryServiceMetricInfo(CharacterFilter filter) { return new QueryScopeInfo.OperatorQueryScopeInfo( this.parent.parent.jobId.toString(), this.parent.vertexId.toString(), this.parent.subtaskIndex, filter.filterCharacters(this.operatorName)); }
Example 4
Source File: OperatorMetricGroup.java From flink with Apache License 2.0 | 5 votes |
@Override protected QueryScopeInfo.OperatorQueryScopeInfo createQueryServiceMetricInfo(CharacterFilter filter) { return new QueryScopeInfo.OperatorQueryScopeInfo( this.parent.parent.jobId.toString(), this.parent.vertexId.toString(), this.parent.subtaskIndex, filter.filterCharacters(this.operatorName)); }
Example 5
Source File: GenericMetricGroup.java From Flink-CEPplus with Apache License 2.0 | 4 votes |
@Override protected String getGroupName(CharacterFilter filter) { return filter.filterCharacters(name); }
Example 6
Source File: GenericMetricGroup.java From flink with Apache License 2.0 | 4 votes |
@Override protected String getGroupName(CharacterFilter filter) { return filter.filterCharacters(name); }
Example 7
Source File: GenericMetricGroup.java From flink with Apache License 2.0 | 4 votes |
@Override protected String getGroupName(CharacterFilter filter) { return filter.filterCharacters(name); }