org.apache.hadoop.metrics.util.MetricsRegistry Java Examples
The following examples show how to use
org.apache.hadoop.metrics.util.MetricsRegistry.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TaskErrorCollector.java From RDFS with Apache License 2.0 | 5 votes |
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); if (u != null) { configFilePath = u.getPath(); } } if (configFilePath == null) { LOG.warn("No " + CONFIG_FILE_KEY + " given in conf. " + TaskErrorCollector.class.getSimpleName() + " will see every error as UNKNOWN_ERROR."); knownErrors = Collections.emptyMap(); } else { knownErrors = parseConfigFile(configFilePath); } createMetrics(); sinceStartErrorCounts = createErrorCountsMap(); }
Example #2
Source File: RpcActivityMBean.java From RDFS with Apache License 2.0 | 5 votes |
/** * * @param mr - the metrics registry that has all the metrics * @param serviceName - the service name for the rpc service * @param port - the rpc port. */ public RpcActivityMBean(final MetricsRegistry mr, final String serviceName, final String port) { super(mr, "Rpc layer statistics"); mbeanName = MBeanUtil.registerMBean(serviceName, "RpcActivityForPort" + port, this); }
Example #3
Source File: DataNodeActivityMBean.java From RDFS with Apache License 2.0 | 5 votes |
public DataNodeActivityMBean(final MetricsRegistry mr, final String storageId) { super(mr, "Activity statistics at the DataNode"); String storageName; if (storageId.equals("")) {// Temp fix for the uninitialized storage storageName = "UndefinedStorageId" + rand.nextInt(); } else { storageName = storageId; } mbeanName = MBeanUtil.registerMBean("DataNode", "DataNodeActivity-" + storageName, this); }
Example #4
Source File: SepMetrics.java From hbase-indexer with Apache License 2.0 | 5 votes |
public SepMetrics(String recordName) { this.recordName = recordName; metricsRegistry = new MetricsRegistry(); sepProcessingRate = new MetricsTimeVaryingRate("sepProcessed", metricsRegistry); lastTimestampInputProcessed = new MetricsLongValue("lastSepTimestamp", metricsRegistry); context = MetricsUtil.getContext("repository"); metricsRecord = MetricsUtil.createRecord(context, recordName); context.registerUpdater(this); mbean = new SepMetricsMXBean(this.metricsRegistry); }
Example #5
Source File: RpcActivityMBean.java From hadoop-gpu with Apache License 2.0 | 5 votes |
/** * * @param mr - the metrics registry that has all the metrics * @param serviceName - the service name for the rpc service * @param port - the rpc port. */ public RpcActivityMBean(final MetricsRegistry mr, final String serviceName, final String port) { super(mr, "Rpc layer statistics"); mbeanName = MBeanUtil.registerMBean(serviceName, "RpcActivityForPort" + port, this); }
Example #6
Source File: DataNodeActivityMBean.java From hadoop-gpu with Apache License 2.0 | 5 votes |
public DataNodeActivityMBean(final MetricsRegistry mr, final String storageId) { super(mr, "Activity statistics at the DataNode"); String storageName; if (storageId.equals("")) {// Temp fix for the uninitialized storage storageName = "UndefinedStorageId" + rand.nextInt(); } else { storageName = storageId; } mbeanName = MBeanUtil.registerMBean("DataNode", "DataNodeActivity-" + storageName, this); }
Example #7
Source File: NameNodeActivtyMBean.java From RDFS with Apache License 2.0 | 4 votes |
protected NameNodeActivtyMBean(final MetricsRegistry mr) { super(mr, "Activity statistics at the NameNode"); mbeanName = MBeanUtil.registerMBean("NameNode", "NameNodeActivity", this); }
Example #8
Source File: HighTideNodeActivityMBean.java From RDFS with Apache License 2.0 | 4 votes |
protected HighTideNodeActivityMBean(final MetricsRegistry mr) { super(mr, "Activity statistics at the HighTideNode"); mbeanName = MBeanUtil.registerMBean("HighTideNode", "HighTideNodeActivity", this); }
Example #9
Source File: SepMetrics.java From hbase-indexer with Apache License 2.0 | 4 votes |
public SepMetricsMXBean(MetricsRegistry registry) { super(registry, "HBase Side-Effect Processor Metrics"); mbeanName = MBeanUtil.registerMBean("SEP", recordName, this); }
Example #10
Source File: NameNodeActivtyMBean.java From hadoop-gpu with Apache License 2.0 | 4 votes |
protected NameNodeActivtyMBean(final MetricsRegistry mr) { super(mr, "Activity statistics at the NameNode"); mbeanName = MBeanUtil.registerMBean("NameNode", "NameNodeActivity", this); }