View Javadoc

1   /*
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
9    *
10   *     http://www.apache.org/licenses/LICENSE-2.0
11   *
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.
17   */
18  
19  package org.apache.hadoop.hbase.metrics;
20  
21  /**
22   * Common interface for metrics source implementations which need to track individual exception
23   * types thrown or received.
24   */
25  public interface ExceptionTrackingSource extends BaseSource {
26    String EXCEPTIONS_NAME="exceptions";
27    String EXCEPTIONS_DESC="Exceptions caused by requests";
28    String EXCEPTIONS_TYPE_DESC="Number of requests that resulted in the specified type of Exception";
29    String EXCEPTIONS_OOO_NAME="exceptions.OutOfOrderScannerNextException";
30    String EXCEPTIONS_BUSY_NAME="exceptions.RegionTooBusyException";
31    String EXCEPTIONS_UNKNOWN_NAME="exceptions.UnknownScannerException";
32    String EXCEPTIONS_SCANNER_RESET_NAME="exceptions.ScannerResetException";
33    String EXCEPTIONS_SANITY_NAME="exceptions.FailedSanityCheckException";
34    String EXCEPTIONS_MOVED_NAME="exceptions.RegionMovedException";
35    String EXCEPTIONS_NSRE_NAME="exceptions.NotServingRegionException";
36    String EXCEPTIONS_MULTI_TOO_LARGE_NAME = "exceptions.multiResponseTooLarge";
37    String EXCEPTIONS_MULTI_TOO_LARGE_DESC = "A response to a multi request was too large and the " +
38        "rest of the requests will have to be retried.";
39    String EXCEPTIONS_CALL_QUEUE_TOO_BIG = "exceptions.callQueueTooBig";
40    String EXCEPTIONS_CALL_QUEUE_TOO_BIG_DESC = "Call queue is full";
41  
42    void exception();
43  
44    /**
45     * Different types of exceptions
46     */
47    void outOfOrderException();
48    void failedSanityException();
49    void movedRegionException();
50    void notServingRegionException();
51    void unknownScannerException();
52    void scannerResetException();
53    void tooBusyException();
54    void multiActionTooLargeException();
55    void callQueueTooBigException();
56  }