2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
19 package org
.apache
.hadoop
.hbase
.procedure2
;
21 import org
.apache
.hadoop
.hbase
.metrics
.Counter
;
22 import org
.apache
.hadoop
.hbase
.metrics
.Histogram
;
23 import org
.apache
.yetus
.audience
.InterfaceAudience
;
26 * With this interface, the procedure framework provides means to collect following set of metrics
27 * per procedure type for all procedures:
29 * <li>Count of submitted procedure instances</li>
30 * <li>Time histogram for successfully completed procedure instances</li>
31 * <li>Count of failed procedure instances</li>
34 * Please implement this interface to return appropriate metrics.
36 @InterfaceAudience.Private
37 public interface ProcedureMetrics
{
39 * @return Total number of instances submitted for a type of a procedure
41 Counter
getSubmittedCounter();
44 * @return Histogram of runtimes for all successfully completed instances of a type of a procedure
46 Histogram
getTimeHisto();
49 * @return Total number of instances failed for a type of a procedure
51 Counter
getFailedCounter();