本文整理了Java中org.apache.gobblin.metrics.Tag.toString()
方法的一些代码示例,展示了Tag.toString()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Tag.toString()
方法的具体详情如下:
包路径:org.apache.gobblin.metrics.Tag
类名称:Tag
方法名:toString
暂无
代码示例来源:origin: apache/incubator-gobblin
/**
* Add a {@link Tag} to a {@link org.apache.gobblin.configuration.State} with key {@link #METRICS_STATE_CUSTOM_TAGS}.
*
* <p>
* {@link org.apache.gobblin.metrics.Tag}s under this key can later be parsed using the method {@link #getCustomTagsFromState}.
* </p>
*
* @param state {@link org.apache.gobblin.configuration.State} state to add the tag to.
* @param tag {@link Tag} to add.
*/
public static void addCustomTagToState(State state, Tag<?> tag) {
state.appendToListProp(METRICS_STATE_CUSTOM_TAGS, tag.toString());
}
代码示例来源:origin: apache/incubator-gobblin
/**
* Add a {@link List} of {@link Tag}s to a {@link org.apache.gobblin.configuration.State} with key {@link #METRICS_STATE_CUSTOM_TAGS}.
*
* <p>
* {@link org.apache.gobblin.metrics.Tag}s under this key can later be parsed using the method {@link #getCustomTagsFromState}.
* </p>
*
* @param state {@link org.apache.gobblin.configuration.State} state to add the tag to.
* @param tags list of {@link Tag}s to add.
*/
public static void addCustomTagToState(State state, List<? extends Tag<?>> tags) {
for (Tag<?> tag : tags) {
state.appendToListProp(METRICS_STATE_CUSTOM_TAGS, tag.toString());
}
}
代码示例来源:origin: apache/incubator-gobblin
@Test(dependsOnMethods = "testAddTags")
public void testMetricNamePrefix() {
Assert.assertEquals(
this.tagged.metricNamePrefix(false), MetricRegistry.name(JOB_ID, Integer.toString(PROJECT_VERSION)));
Assert.assertEquals(
this.tagged.metricNamePrefix(true),
MetricRegistry.name(this.tagged.getTags().get(0).toString(), this.tagged.getTags().get(1).toString()));
}
}
代码示例来源:origin: org.apache.gobblin/gobblin-metrics
/**
* Add a {@link Tag} to a {@link org.apache.gobblin.configuration.State} with key {@link #METRICS_STATE_CUSTOM_TAGS}.
*
* <p>
* {@link org.apache.gobblin.metrics.Tag}s under this key can later be parsed using the method {@link #getCustomTagsFromState}.
* </p>
*
* @param state {@link org.apache.gobblin.configuration.State} state to add the tag to.
* @param tag {@link Tag} to add.
*/
public static void addCustomTagToState(State state, Tag<?> tag) {
state.appendToListProp(METRICS_STATE_CUSTOM_TAGS, tag.toString());
}
代码示例来源:origin: org.apache.gobblin/gobblin-metrics
/**
* Add a {@link List} of {@link Tag}s to a {@link org.apache.gobblin.configuration.State} with key {@link #METRICS_STATE_CUSTOM_TAGS}.
*
* <p>
* {@link org.apache.gobblin.metrics.Tag}s under this key can later be parsed using the method {@link #getCustomTagsFromState}.
* </p>
*
* @param state {@link org.apache.gobblin.configuration.State} state to add the tag to.
* @param tags list of {@link Tag}s to add.
*/
public static void addCustomTagToState(State state, List<? extends Tag<?>> tags) {
for (Tag<?> tag : tags) {
state.appendToListProp(METRICS_STATE_CUSTOM_TAGS, tag.toString());
}
}
内容来源于网络,如有侵权,请联系作者删除!