1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.hadoop.hbase.client.metrics;
20
21 import java.util.concurrent.atomic.AtomicLong;
22
23 import org.apache.hadoop.hbase.classification.InterfaceAudience;
24 import org.apache.hadoop.hbase.classification.InterfaceStability;
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39 @InterfaceAudience.Public
40 @InterfaceStability.Evolving
41 public class ScanMetrics extends ServerSideScanMetrics {
42
43
44
45
46
47 public static final String RPC_CALLS_METRIC_NAME = "RPC_CALLS";
48 public static final String REMOTE_RPC_CALLS_METRIC_NAME = "REMOTE_RPC_CALLS";
49 public static final String MILLIS_BETWEEN_NEXTS_METRIC_NAME = "MILLIS_BETWEEN_NEXTS";
50 public static final String NOT_SERVING_REGION_EXCEPTION_METRIC_NAME = "NOT_SERVING_REGION_EXCEPTION";
51 public static final String BYTES_IN_RESULTS_METRIC_NAME = "BYTES_IN_RESULTS";
52 public static final String BYTES_IN_REMOTE_RESULTS_METRIC_NAME = "BYTES_IN_REMOTE_RESULTS";
53 public static final String REGIONS_SCANNED_METRIC_NAME = "REGIONS_SCANNED";
54 public static final String RPC_RETRIES_METRIC_NAME = "RPC_RETRIES";
55 public static final String REMOTE_RPC_RETRIES_METRIC_NAME = "REMOTE_RPC_RETRIES";
56
57
58
59
60 public final AtomicLong countOfRPCcalls = createCounter(RPC_CALLS_METRIC_NAME);
61
62
63
64
65 public final AtomicLong countOfRemoteRPCcalls = createCounter(REMOTE_RPC_CALLS_METRIC_NAME);
66
67
68
69
70 public final AtomicLong sumOfMillisSecBetweenNexts = createCounter(MILLIS_BETWEEN_NEXTS_METRIC_NAME);
71
72
73
74
75 public final AtomicLong countOfNSRE = createCounter(NOT_SERVING_REGION_EXCEPTION_METRIC_NAME);
76
77
78
79
80 public final AtomicLong countOfBytesInResults = createCounter(BYTES_IN_RESULTS_METRIC_NAME);
81
82
83
84
85 public final AtomicLong countOfBytesInRemoteResults = createCounter(BYTES_IN_REMOTE_RESULTS_METRIC_NAME);
86
87
88
89
90 public final AtomicLong countOfRegions = createCounter(REGIONS_SCANNED_METRIC_NAME);
91
92
93
94
95 public final AtomicLong countOfRPCRetries = createCounter(RPC_RETRIES_METRIC_NAME);
96
97
98
99
100 public final AtomicLong countOfRemoteRPCRetries = createCounter(REMOTE_RPC_RETRIES_METRIC_NAME);
101
102
103
104
105 public ScanMetrics() {
106 }
107 }