Package org.apache.hadoop.metrics

Examples of org.apache.hadoop.metrics.MetricsContext


                       : StringUtils.stringifyException(tCause);
        umbilical.fatalError(taskid, cause);
      }
    } finally {
      RPC.stopProxy(umbilical);
      MetricsContext metricsContext = MetricsUtil.getContext("mapred");
      metricsContext.close();
      // Shutting down log4j of the child-vm...
      // This assumes that on return from Task.run()
      // there is no more logging done.
      LogManager.shutdown();
    }
View Full Code Here


      this.runningMapLimit = conf.getRunningMapLimit();
      this.runningReduceLimit = conf.getRunningReduceLimit();

      this.maxTaskFailuresPerTracker = conf.getMaxTaskFailuresPerTracker();

      MetricsContext metricsContext = MetricsUtil.getContext("mapred");
      this.jobMetrics = MetricsUtil.createRecord(metricsContext, "job");
      this.jobMetrics.setTag("user", conf.getUser());
      this.jobMetrics.setTag("sessionId", conf.getSessionId());
      this.jobMetrics.setTag("jobName", conf.getJobName());
      this.jobMetrics.setTag("jobId", jobId.toString());
View Full Code Here

  private final MetricsRecord metricsRecord;
  private static Log LOG = LogFactory.getLog(HBaseRpcMetrics.class);
  private final HBaseRPCStatistics rpcStatistics;

  public HBaseRpcMetrics(String hostName, String port) {
    MetricsContext context = MetricsUtil.getContext("rpc");
    metricsRecord = MetricsUtil.createRecord(context, "metrics");

    metricsRecord.setTag("port", port);

    LOG.info("Initializing RPC Metrics with hostName="
        + hostName + ", port=" + port);

    context.registerUpdater(this);

    initMethods(HMasterInterface.class);
    initMethods(HMasterRegionInterface.class);
    initMethods(HRegionInterface.class);
    rpcStatistics = new HBaseRPCStatistics(this.registry, hostName, port);
View Full Code Here

   */
  public final MetricsHistogram updatesBlockedSecondsHighWater = new MetricsHistogram(
      "updatesBlockedSecondsHighWater",registry);

  public RegionServerMetrics() {
    MetricsContext context = MetricsUtil.getContext("hbase");
    metricsRecord = MetricsUtil.createRecord(context, "regionserver");
    String name = Thread.currentThread().getName();
    metricsRecord.setTag("RegionServer", name);
    context.registerUpdater(this);
    // Add jvmmetrics.
    JvmMetrics.init("RegionServer", name);
    // Add Hbase Info metrics
    HBaseInfo.init();

View Full Code Here

  private final MetricsRecord metricsRecord;
  private static Log LOG = LogFactory.getLog(HBaseRpcMetrics.class);
  private final HBaseRPCStatistics rpcStatistics;

  public HBaseRpcMetrics(String hostName, String port) {
    MetricsContext context = MetricsUtil.getContext("rpc");
    metricsRecord = MetricsUtil.createRecord(context, "metrics");

    metricsRecord.setTag("port", port);

    LOG.info("Initializing RPC Metrics with hostName="
        + hostName + ", port=" + port);

    context.registerUpdater(this);

    initMethods(HMasterInterface.class);
    initMethods(HMasterRegionInterface.class);
    initMethods(HRegionInterface.class);
    rpcStatistics = new HBaseRPCStatistics(this.registry, hostName, port);
View Full Code Here

    namesystem = ns;
    initialize(conf);
  }
   
  private void initialize(Configuration conf) {
    MetricsContext metricsContext = MetricsUtil.getContext("dfs");
    directoryMetrics = MetricsUtil.createRecord(metricsContext, "FSDirectory");
    directoryMetrics.setTag("sessionId", conf.get("session.id"));
  }
View Full Code Here

  /** Time it takes to finish cloneSnapshotTime() */
  final PersistentMetricsTimeVaryingRate snapshotCloneTime =
    new PersistentMetricsTimeVaryingRate("snapshotCloneTime", registry);

  public MasterMetrics(final String name) {
    MetricsContext context = MetricsUtil.getContext("hbase");
    metricsRecord = MetricsUtil.createRecord(context, "master");
    metricsRecord.setTag("Master", name);
    context.registerUpdater(this);
    JvmMetrics.init("Master", name);
    HBaseInfo.init();

    // expose the MBean for metrics
    masterStatistics = new MasterStatistics(this.registry);
View Full Code Here

    this.reduceFailuresPercent = conf.getMaxReduceTaskFailuresPercent();
       
    JobHistory.JobInfo.logSubmitted(jobid, conf.getJobName(), conf.getUser(),
                                    System.currentTimeMillis(), jobFile);
       
    MetricsContext metricsContext = MetricsUtil.getContext("mapred");
    this.jobMetrics = metricsContext.createRecord("job");
    this.jobMetrics.setTag("user", conf.getUser());
    this.jobMetrics.setTag("jobName", conf.getJobName());
  }
View Full Code Here

      // hostnames
      this.uniqueHosts = new HashSet<String>();
     
      this.lastPollTime = 0;
     
      MetricsContext metricsContext = MetricsUtil.getContext("mapred");
      this.shuffleMetrics =
        MetricsUtil.createRecord(metricsContext, "shuffleInput");
      this.shuffleMetrics.setTag("user", conf.getUser());

      // Seed the random number generator with a reasonably globally unique seed
View Full Code Here

  /**
   * Constructor used to register the metrics
   * @param id Name of the source this class is monitoring
   */
  public ReplicationSourceMetrics(String id) {
    MetricsContext context = MetricsUtil.getContext("hbase");
    String name = Thread.currentThread().getName();
    metricsRecord = MetricsUtil.createRecord(context, "replication");
    metricsRecord.setTag("RegionServer", name);
    context.registerUpdater(this);
    try {
      id = URLEncoder.encode(id, "UTF8");
    } catch (UnsupportedEncodingException e) {
      id = "CAN'T ENCODE UTF8";
    }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.metrics.MetricsContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.