本文整理汇总了Java中org.apache.hadoop.metrics2.source.JvmMetricsSource类的典型用法代码示例。如果您正苦于以下问题:Java JvmMetricsSource类的具体用法?Java JvmMetricsSource怎么用?Java JvmMetricsSource使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JvmMetricsSource类属于org.apache.hadoop.metrics2.source包,在下文中一共展示了JvmMetricsSource类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import org.apache.hadoop.metrics2.source.JvmMetricsSource; //导入依赖的package包/类
synchronized void init(String name) {
if (inited) return;
inited = true;
DefaultMetricsSystem.initialize(HBASE_METRICS_SYSTEM_NAME);
jvmMetricsSource = JvmMetricsSource.create(name, "");
}
示例2: TaskTrackerMetricsSource
import org.apache.hadoop.metrics2.source.JvmMetricsSource; //导入依赖的package包/类
public TaskTrackerMetricsSource(TaskTracker tt) {
super(tt);
String sessionId = tt.getJobConf().getSessionId();
JvmMetricsSource.create("TaskTracker", sessionId);
registry.setContext("mapred").tag("sessionId", "", sessionId);
}
示例3: JobTrackerMetricsSource
import org.apache.hadoop.metrics2.source.JvmMetricsSource; //导入依赖的package包/类
public JobTrackerMetricsSource(JobTracker jt, JobConf conf) {
super(jt, conf);
sessionId = conf.getSessionId();
registry.setContext("mapred").tag("sessionId", "", sessionId);
JvmMetricsSource.create("JobTracker", sessionId);
}
示例4: initMetrics
import org.apache.hadoop.metrics2.source.JvmMetricsSource; //导入依赖的package包/类
private static void initMetrics(String prefix, String procName,
String sessionId) {
DefaultMetricsSystem.initialize(prefix);
JvmMetricsSource.create(procName, sessionId);
}
示例5: NameNodeInstrumentation
import org.apache.hadoop.metrics2.source.JvmMetricsSource; //导入依赖的package包/类
NameNodeInstrumentation(Configuration conf) {
sessionId = conf.get("session.id");
JvmMetricsSource.create("NameNode", sessionId);
registry.setContext("dfs").tag("sessionId", "", sessionId);
}
示例6: DataNodeInstrumentation
import org.apache.hadoop.metrics2.source.JvmMetricsSource; //导入依赖的package包/类
public DataNodeInstrumentation(Configuration conf, String storageId) {
String sessionId = conf.get("session.id");
JvmMetricsSource.create("DataNode", sessionId);
registry.setContext("dfs").tag("sessionId", "", sessionId);
}