Package org.apache.hadoop.metrics

Examples of org.apache.hadoop.metrics.MetricsContext


      JobConf conf = getJobConf();
      String sessionId = conf.getSessionId();
      // Initiate Java VM Metrics
      JvmMetrics.init("TaskTracker", sessionId);
      // Create a record for Task Tracker metrics
      MetricsContext context = MetricsUtil.getContext("mapred");
      metricsRecord = MetricsUtil.createRecord(context, "tasktracker");
      metricsRecord.setTag("sessionId", sessionId);
      context.registerUpdater(this);
    }
View Full Code Here


    JobTrackerMetrics(JobTracker tracker, JobConf conf) {
      String sessionId = conf.getSessionId();
      // Initiate JVM Metrics
      JvmMetrics.init("JobTracker", sessionId);
      // Create a record for map-reduce metrics
      MetricsContext context = MetricsUtil.getContext("mapred");
      metricsRecord = MetricsUtil.createRecord(context, "jobtracker");
      metricsRecord.setTag("sessionId", sessionId);
      this.tracker = tracker;
      context.registerUpdater(this);
    }
View Full Code Here

    private int numFilesOpened = 0;
    private int numFilesRenamed = 0;
    private int numFilesListed = 0;
     
    NameNodeMetrics() {
      MetricsContext metricsContext = MetricsUtil.getContext("dfs");
      metricsRecord = MetricsUtil.createRecord(metricsContext, "namenode");
      metricsContext.registerUpdater(this);
    }
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

      }
    } finally {
      for (VersionedProtocol proxy : proxiesCreated) {
        RPC.stopProxy(proxy);
      }
      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

    private int failedOutputs = 0;
    private int successOutputs = 0;
    private int httpQueueLen = 0;
    private ThreadPoolExecutor nettyWorkerThreadPool = null;
    ShuffleServerMetrics(JobConf conf) {
      MetricsContext context = MetricsUtil.getContext("mapred");
      shuffleMetricsRecord =
                           MetricsUtil.createRecord(context, "shuffleOutput");
      this.shuffleMetricsRecord.setTag("sessionId", conf.getSessionId());
      context.registerUpdater(this);
    }
View Full Code Here

    JobConf conf = tt.getJobConf();
    String sessionId = conf.getSessionId();
    // Initiate Java VM Metrics
    JvmMetrics.init("TaskTracker", sessionId);
    // Create a record for Task Tracker metrics
    MetricsContext context = MetricsUtil.getContext("mapred");
    metricsRecord = MetricsUtil.createRecord(context, "tasktracker"); //guaranteed never null
    metricsRecord.setTag("sessionId", sessionId);
    context.registerUpdater(this);
  }
View Full Code Here

  public TaskErrorCollector(Configuration conf) {
    errorCountsQueue = new LinkedList<Map<TaskError, Integer>>();
    startTimeQueue = new LinkedList<Long>();
    errorCountsMetrics = new HashMap<TaskError, MetricsTimeVaryingLong>();
    MetricsContext context = MetricsUtil.getContext("mapred");
    metricsRecord = MetricsUtil.createRecord(context, "taskerror");
    registry = new MetricsRegistry();
    windowLength = conf.getInt(WINDOW_LENGTH_KEY, WINDOW_LENGTH);
    numWindows = conf.getInt(NUM_WINDOWS_KEY, NUM_WINDOWS);

    context.registerUpdater(this);

    String configFilePath = conf.get(CONFIG_FILE_KEY);
    if (configFilePath == null) {
      // Search the class path if it is not configured
      URL u = TaskErrorCollector.class.getClassLoader().getResource(ERROR_XML);
View Full Code Here

    this.mapFailuresPercent = conf.getMaxMapTaskFailuresPercent();
    this.reduceFailuresPercent = conf.getMaxReduceTaskFailuresPercent();
    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 int numFailedFetches = 0;
      private int numSuccessFetches = 0;
      private long numBytes = 0;
      private int numThreadsBusy = 0;
      ShuffleClientMetrics(JobConf conf) {
        MetricsContext metricsContext = MetricsUtil.getContext("mapred");
        this.shuffleMetrics =
          MetricsUtil.createRecord(metricsContext, "shuffleInput");
        this.shuffleMetrics.setTag("user", conf.getUser());
        this.shuffleMetrics.setTag("jobName", conf.getJobName());
        this.shuffleMetrics.setTag("jobId", ReduceTask.this.getJobID().toString());
        this.shuffleMetrics.setTag("taskId", getTaskID().toString());
        this.shuffleMetrics.setTag("sessionId", conf.getSessionId());
        metricsContext.registerUpdater(this);
      }
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.