当前位置: 首页>>代码示例>>Java>>正文


Java JvmMetrics.create方法代码示例

本文整理汇总了Java中org.apache.hadoop.metrics2.source.JvmMetrics.create方法的典型用法代码示例。如果您正苦于以下问题:Java JvmMetrics.create方法的具体用法?Java JvmMetrics.create怎么用?Java JvmMetrics.create使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.hadoop.metrics2.source.JvmMetrics的用法示例。


在下文中一共展示了JvmMetrics.create方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: start

import org.apache.hadoop.metrics2.source.JvmMetrics; //导入方法依赖的package包/类
/**
 * Start listening for edits via RPC.
 */
public void start() throws IOException {
  Preconditions.checkState(!isStarted(), "JN already running");
  
  validateAndCreateJournalDir(localDir);
  
  DefaultMetricsSystem.initialize("JournalNode");
  JvmMetrics.create("JournalNode",
      conf.get(DFSConfigKeys.DFS_METRICS_SESSION_ID_KEY),
      DefaultMetricsSystem.instance());

  InetSocketAddress socAddr = JournalNodeRpcServer.getAddress(conf);
  SecurityUtil.login(conf, DFSConfigKeys.DFS_JOURNALNODE_KEYTAB_FILE_KEY,
      DFSConfigKeys.DFS_JOURNALNODE_KERBEROS_PRINCIPAL_KEY, socAddr.getHostName());
  
  registerJNMXBean();
  
  httpServer = new JournalNodeHttpServer(conf, this);
  httpServer.start();

  httpServerURI = httpServer.getServerURI().toString();

  rpcServer = new JournalNodeRpcServer(conf, this);
  rpcServer.start();
}
 
开发者ID:naver,项目名称:hadoop,代码行数:28,代码来源:JournalNode.java

示例2: start

import org.apache.hadoop.metrics2.source.JvmMetrics; //导入方法依赖的package包/类
/**
 * Start listening for edits via RPC.
 */
public void start() throws IOException {
  Preconditions.checkState(!isStarted(), "JN already running");
  
  validateAndCreateJournalDir(localDir);
  
  DefaultMetricsSystem.initialize("JournalNode");
  JvmMetrics.create("JournalNode",
      conf.get(DFSConfigKeys.DFS_METRICS_SESSION_ID_KEY),
      DefaultMetricsSystem.instance());

  InetSocketAddress socAddr = JournalNodeRpcServer.getAddress(conf);
  SecurityUtil.login(conf, DFSConfigKeys.DFS_JOURNALNODE_KEYTAB_FILE_KEY,
      DFSConfigKeys.DFS_JOURNALNODE_USER_NAME_KEY, socAddr.getHostName());
  
  httpServer = new JournalNodeHttpServer(conf, this);
  httpServer.start();

  rpcServer = new JournalNodeRpcServer(conf, this);
  rpcServer.start();
}
 
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:24,代码来源:JournalNode.java

示例3: start

import org.apache.hadoop.metrics2.source.JvmMetrics; //导入方法依赖的package包/类
/**
 * Start listening for edits via RPC.
 */
public void start() throws IOException {
  Preconditions.checkState(!isStarted(), "JN already running");
  
  validateAndCreateJournalDir(localDir);
  
  DefaultMetricsSystem.initialize("JournalNode");
  JvmMetrics.create("JournalNode",
      conf.get(DFSConfigKeys.DFS_METRICS_SESSION_ID_KEY),
      DefaultMetricsSystem.instance());

  InetSocketAddress socAddr = JournalNodeRpcServer.getAddress(conf);
  SecurityUtil.login(conf, DFSConfigKeys.DFS_JOURNALNODE_KEYTAB_FILE_KEY,
      DFSConfigKeys.DFS_JOURNALNODE_USER_NAME_KEY, socAddr.getHostName());
  
  registerJNMXBean();
  
  httpServer = new JournalNodeHttpServer(conf, this);
  httpServer.start();

  rpcServer = new JournalNodeRpcServer(conf, this);
  rpcServer.start();
}
 
开发者ID:chendave,项目名称:hadoop-TCP,代码行数:26,代码来源:JournalNode.java

示例4: start

import org.apache.hadoop.metrics2.source.JvmMetrics; //导入方法依赖的package包/类
/**
 * Start listening for edits via RPC.
 */
public void start() throws IOException {
  Preconditions.checkState(!isStarted(), "JN already running");
  
  validateAndCreateJournalDir(localDir);
  
  DefaultMetricsSystem.initialize("JournalNode");
  JvmMetrics.create("JournalNode",
      conf.get(DFSConfigKeys.DFS_METRICS_SESSION_ID_KEY),
      DefaultMetricsSystem.instance());

  InetSocketAddress socAddr = JournalNodeRpcServer.getAddress(conf);
  SecurityUtil.login(conf, DFSConfigKeys.DFS_JOURNALNODE_KEYTAB_FILE_KEY,
      DFSConfigKeys.DFS_JOURNALNODE_USER_NAME_KEY, socAddr.getHostName());
  
  registerJNMXBean();
  
  httpServer = new JournalNodeHttpServer(conf, this);
  httpServer.start();

  httpServerURI = httpServer.getServerURI().toString();

  rpcServer = new JournalNodeRpcServer(conf, this);
  rpcServer.start();
}
 
开发者ID:Seagate,项目名称:hadoop-on-lustre2,代码行数:28,代码来源:JournalNode.java

示例5: create

import org.apache.hadoop.metrics2.source.JvmMetrics; //导入方法依赖的package包/类
public static Nfs3Metrics create(Configuration conf, String gatewayName) {
  String sessionId = conf.get(DFSConfigKeys.DFS_METRICS_SESSION_ID_KEY);
  MetricsSystem ms = DefaultMetricsSystem.instance();
  JvmMetrics jm = JvmMetrics.create(gatewayName, sessionId, ms);

  // Percentile measurement is [50th,75th,90th,95th,99th] currently 
  int[] intervals = conf
      .getInts(NfsConfigKeys.NFS_METRICS_PERCENTILES_INTERVALS_KEY);
  return ms.register(new Nfs3Metrics(gatewayName, sessionId, intervals, jm));
}
 
开发者ID:naver,项目名称:hadoop,代码行数:11,代码来源:Nfs3Metrics.java

示例6: create

import org.apache.hadoop.metrics2.source.JvmMetrics; //导入方法依赖的package包/类
public static NameNodeMetrics create(Configuration conf, NamenodeRole r) {
  String sessionId = conf.get(DFSConfigKeys.DFS_METRICS_SESSION_ID_KEY);
  String processName = r.toString();
  MetricsSystem ms = DefaultMetricsSystem.instance();
  JvmMetrics jm = JvmMetrics.create(processName, sessionId, ms);
  
  // Percentile measurement is off by default, by watching no intervals
  int[] intervals = 
      conf.getInts(DFSConfigKeys.DFS_METRICS_PERCENTILES_INTERVALS_KEY);
  return ms.register(new NameNodeMetrics(processName, sessionId,
      intervals, jm));
}
 
开发者ID:naver,项目名称:hadoop,代码行数:13,代码来源:NameNodeMetrics.java

示例7: create

import org.apache.hadoop.metrics2.source.JvmMetrics; //导入方法依赖的package包/类
public static DataNodeMetrics create(Configuration conf, String dnName) {
  String sessionId = conf.get(DFSConfigKeys.DFS_METRICS_SESSION_ID_KEY);
  MetricsSystem ms = DefaultMetricsSystem.instance();
  JvmMetrics jm = JvmMetrics.create("DataNode", sessionId, ms);
  String name = "DataNodeActivity-"+ (dnName.isEmpty()
      ? "UndefinedDataNodeName"+ DFSUtil.getRandom().nextInt() 
          : dnName.replace(':', '-'));

  // Percentile measurement is off by default, by watching no intervals
  int[] intervals = 
      conf.getInts(DFSConfigKeys.DFS_METRICS_PERCENTILES_INTERVALS_KEY);
  
  return ms.register(name, null, new DataNodeMetrics(name, sessionId,
      intervals, jm));
}
 
开发者ID:naver,项目名称:hadoop,代码行数:16,代码来源:DataNodeMetrics.java

示例8: create

import org.apache.hadoop.metrics2.source.JvmMetrics; //导入方法依赖的package包/类
public static DataNodeMetrics create(Configuration conf, String dnName) {
  String sessionId = conf.get(DFSConfigKeys.DFS_METRICS_SESSION_ID_KEY);
  MetricsSystem ms = DefaultMetricsSystem.instance();
  JvmMetrics jm = JvmMetrics.create("DataNode", sessionId, ms);
  String name = "DataNodeActivity-"+ (dnName.isEmpty()
      ? "UndefinedDataNodeName"+ ThreadLocalRandom.current().nextInt()
          : dnName.replace(':', '-'));

  // Percentile measurement is off by default, by watching no intervals
  int[] intervals = 
      conf.getInts(DFSConfigKeys.DFS_METRICS_PERCENTILES_INTERVALS_KEY);
  
  return ms.register(name, null, new DataNodeMetrics(name, sessionId,
      intervals, jm));
}
 
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:16,代码来源:DataNodeMetrics.java

示例9: create

import org.apache.hadoop.metrics2.source.JvmMetrics; //导入方法依赖的package包/类
public static ProxyMetrics create(Configuration conf) {
    String sessionId = conf.get(DFSConfigKeys.DFS_METRICS_SESSION_ID_KEY);
    String processName = "NNPROXY";
    MetricsSystem ms = DefaultMetricsSystem.instance();
    JvmMetrics jm = JvmMetrics.create(processName, sessionId, ms);

    return ms.register(new ProxyMetrics(processName, sessionId, jm));
}
 
开发者ID:bytedance,项目名称:nnproxy,代码行数:9,代码来源:ProxyMetrics.java

示例10: create

import org.apache.hadoop.metrics2.source.JvmMetrics; //导入方法依赖的package包/类
public static Nfs3Metrics create(Configuration conf, String gatewayName) {
  String sessionId = conf.get(DFSConfigKeys.DFS_METRICS_SESSION_ID_KEY);
  MetricsSystem ms = DefaultMetricsSystem.instance();
  JvmMetrics jm = JvmMetrics.create(gatewayName, sessionId, ms);

  // Percentile measurement is [,,,] by default 
  int[] intervals = conf.getInts(conf.get(
      NfsConfigKeys.NFS_METRICS_PERCENTILES_INTERVALS_KEY,
      NfsConfigKeys.NFS_METRICS_PERCENTILES_INTERVALS_DEFAULT));
  return ms.register(new Nfs3Metrics(gatewayName, sessionId, intervals, jm));
}
 
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:12,代码来源:Nfs3Metrics.java

示例11: create

import org.apache.hadoop.metrics2.source.JvmMetrics; //导入方法依赖的package包/类
public static NameNodeMetrics create(Configuration conf, NamenodeRole r) {
  String sessionId = conf.get(DFSConfigKeys.DFS_METRICS_SESSION_ID_KEY);
  String processName = r.toString();
  MetricsSystem ms = DefaultMetricsSystem.instance();
  JvmMetrics.create(processName, sessionId, ms);
  
  // Percentile measurement is off by default, by watching no intervals
  int[] intervals = 
      conf.getInts(DFSConfigKeys.DFS_METRICS_PERCENTILES_INTERVALS_KEY);
  return ms.register(new NameNodeMetrics(processName, sessionId, intervals));
}
 
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:12,代码来源:NameNodeMetrics.java

示例12: create

import org.apache.hadoop.metrics2.source.JvmMetrics; //导入方法依赖的package包/类
public static DataNodeMetrics create(Configuration conf, String dnName) {
  String sessionId = conf.get(DFSConfigKeys.DFS_METRICS_SESSION_ID_KEY);
  MetricsSystem ms = DefaultMetricsSystem.instance();
  JvmMetrics.create("DataNode", sessionId, ms);
  String name = "DataNodeActivity-"+ (dnName.isEmpty()
      ? "UndefinedDataNodeName"+ DFSUtil.getRandom().nextInt() 
          : dnName.replace(':', '-'));

  // Percentile measurement is off by default, by watching no intervals
  int[] intervals = 
      conf.getInts(DFSConfigKeys.DFS_METRICS_PERCENTILES_INTERVALS_KEY);
  
  return ms.register(name, null, new DataNodeMetrics(name, sessionId,
      intervals));
}
 
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:16,代码来源:DataNodeMetrics.java

示例13: init

import org.apache.hadoop.metrics2.source.JvmMetrics; //导入方法依赖的package包/类
synchronized void init(String name) {
  if (inited) return;
  inited = true;
  DefaultMetricsSystem.initialize(HBASE_METRICS_SYSTEM_NAME);
  jvmMetricsSource = JvmMetrics.create(name, "", DefaultMetricsSystem.instance());

}
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:8,代码来源:BaseSourceImpl.java

示例14: create

import org.apache.hadoop.metrics2.source.JvmMetrics; //导入方法依赖的package包/类
public static NameNodeMetrics create(Configuration conf, NamenodeRole r) {
  String sessionId = conf.get(DFSConfigKeys.DFS_METRICS_SESSION_ID_KEY);
  String processName = r.toString();
  MetricsSystem ms = DefaultMetricsSystem.instance();
  JvmMetrics.create(processName, sessionId, ms);
  
  // Percentile measurement is off by default, by watching no intervals
  int[] intervals =
      conf.getInts(DFSConfigKeys.DFS_METRICS_PERCENTILES_INTERVALS_KEY);
  return ms.register(new NameNodeMetrics(processName, sessionId, intervals));
}
 
开发者ID:hopshadoop,项目名称:hops,代码行数:12,代码来源:NameNodeMetrics.java

示例15: create

import org.apache.hadoop.metrics2.source.JvmMetrics; //导入方法依赖的package包/类
public static DataNodeMetrics create(Configuration conf, String dnName) {
  String sessionId = conf.get(DFSConfigKeys.DFS_METRICS_SESSION_ID_KEY);
  MetricsSystem ms = DefaultMetricsSystem.instance();
  JvmMetrics.create("DataNode", sessionId, ms);
  String name = "DataNodeActivity-" + (dnName.isEmpty() ?
      "UndefinedDataNodeName" + DFSUtil.getRandom().nextInt() :
      dnName.replace(':', '-'));

  // Percentile measurement is off by default, by watching no intervals
  int[] intervals =
      conf.getInts(DFSConfigKeys.DFS_METRICS_PERCENTILES_INTERVALS_KEY);
  
  return ms
      .register(name, null, new DataNodeMetrics(name, sessionId, intervals));
}
 
开发者ID:hopshadoop,项目名称:hops,代码行数:16,代码来源:DataNodeMetrics.java


注:本文中的org.apache.hadoop.metrics2.source.JvmMetrics.create方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。