Пример #1
0
        /// <summary>Creates a new instance of JvmMetrics</summary>
        private JvmMetrics(string processName, string sessionId, string recordName)
        {
            MetricsContext context = MetricsUtil.GetContext("jvm");

            metrics = MetricsUtil.CreateRecord(context, recordName);
            metrics.SetTag("processName", processName);
            metrics.SetTag("sessionId", sessionId);
            context.RegisterUpdater(this);
        }
Пример #2
0
        internal ShuffleClientMetrics(TaskAttemptID reduceId, JobConf jobConf)
        {
            this.numCopiers = jobConf.GetInt(MRJobConfig.ShuffleParallelCopies, 5);
            MetricsContext metricsContext = MetricsUtil.GetContext("mapred");

            this.shuffleMetrics = MetricsUtil.CreateRecord(metricsContext, "shuffleInput");
            this.shuffleMetrics.SetTag("user", jobConf.GetUser());
            this.shuffleMetrics.SetTag("jobName", jobConf.GetJobName());
            this.shuffleMetrics.SetTag("jobId", reduceId.GetJobID().ToString());
            this.shuffleMetrics.SetTag("taskId", reduceId.ToString());
            this.shuffleMetrics.SetTag("sessionId", jobConf.GetSessionId());
            metricsContext.RegisterUpdater(this);
        }
Пример #3
0
        public LocalJobRunnerMetrics(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");

            // record name is jobtracker for compatibility
            metricsRecord = MetricsUtil.CreateRecord(context, "jobtracker");
            metricsRecord.SetTag("sessionId", sessionId);
            context.RegisterUpdater(this);
        }