1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.hadoop.hbase.master;
20
21 import org.apache.commons.logging.Log;
22 import org.apache.commons.logging.LogFactory;
23 import org.apache.hadoop.hbase.classification.InterfaceAudience;
24 import org.apache.hadoop.hbase.classification.InterfaceStability;
25 import org.apache.hadoop.hbase.CompatibilitySingletonFactory;
26 import org.apache.hadoop.hbase.master.MetricsMasterSource;
27 import org.apache.hadoop.hbase.master.MetricsMasterSourceFactory;
28 import org.apache.hadoop.hbase.master.MetricsMasterWrapper;
29
30
31
32
33
34
35
36
37 @InterfaceStability.Evolving
38 @InterfaceAudience.Private
39 public class MetricsMaster {
40 private static final Log LOG = LogFactory.getLog(MetricsMaster.class);
41 private MetricsMasterSource masterSource;
42
43 public MetricsMaster(MetricsMasterWrapper masterWrapper) {
44 masterSource = CompatibilitySingletonFactory.getInstance(MetricsMasterSourceFactory.class).create(masterWrapper);
45 }
46
47
48 public MetricsMasterSource getMetricsSource() {
49 return masterSource;
50 }
51
52
53
54
55 public void incrementRequests(final long inc) {
56 masterSource.incRequests(inc);
57 }
58 }