001/*
002 * Licensed to the Apache Software Foundation (ASF) under one
003 * or more contributor license agreements.  See the NOTICE file
004 * distributed with this work for additional information
005 * regarding copyright ownership.  The ASF licenses this file
006 * to you under the Apache License, Version 2.0 (the
007 * "License"); you may not use this file except in compliance
008 * with the License.  You may obtain a copy of the License at
009 *
010 *     http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015 * See the License for the specific language governing permissions and
016 * limitations under the License.
017 */
018package org.apache.hadoop.hbase.metrics;
019
020import org.apache.yetus.audience.InterfaceAudience;
021
022/**
023 * Common interface for metrics source implementations which need to track individual exception
024 * types thrown or received.
025 */
026@InterfaceAudience.Private
027public interface ExceptionTrackingSource extends BaseSource {
028  String EXCEPTIONS_NAME = "exceptions";
029  String EXCEPTIONS_DESC = "Exceptions caused by requests";
030  String EXCEPTIONS_TYPE_DESC =
031    "Number of requests that resulted in the specified type of Exception";
032  String EXCEPTIONS_OOO_NAME = "exceptions.OutOfOrderScannerNextException";
033  String EXCEPTIONS_BUSY_NAME = "exceptions.RegionTooBusyException";
034  String EXCEPTIONS_UNKNOWN_NAME = "exceptions.UnknownScannerException";
035  String EXCEPTIONS_SCANNER_RESET_NAME = "exceptions.ScannerResetException";
036  String EXCEPTIONS_SANITY_NAME = "exceptions.FailedSanityCheckException";
037  String EXCEPTIONS_MOVED_NAME = "exceptions.RegionMovedException";
038  String EXCEPTIONS_NSRE_NAME = "exceptions.NotServingRegionException";
039  String EXCEPTIONS_MULTI_TOO_LARGE_NAME = "exceptions.multiResponseTooLarge";
040  String EXCEPTIONS_MULTI_TOO_LARGE_DESC = "A response to a multi request was too large and the "
041    + "rest of the requests will have to be retried.";
042  String EXCEPTIONS_CALL_QUEUE_TOO_BIG = "exceptions.callQueueTooBig";
043  String EXCEPTIONS_CALL_QUEUE_TOO_BIG_DESC = "Call queue is full";
044  String EXCEPTIONS_QUOTA_EXCEEDED = "exceptions.quotaExceeded";
045  String EXCEPTIONS_RPC_THROTTLING = "exceptions.rpcThrottling";
046  String EXCEPTIONS_CALL_DROPPED = "exceptions.callDropped";
047  String EXCEPTIONS_CALL_TIMED_OUT = "exceptions.callTimedOut";
048  String EXCEPTIONS_REQUEST_TOO_BIG = "exceptions.requestTooBig";
049  String OTHER_EXCEPTIONS = "exceptions.otherExceptions";
050
051  void exception();
052
053  /**
054   * Different types of exceptions
055   */
056  void outOfOrderException();
057
058  void failedSanityException();
059
060  void movedRegionException();
061
062  void notServingRegionException();
063
064  void unknownScannerException();
065
066  void scannerResetException();
067
068  void tooBusyException();
069
070  void multiActionTooLargeException();
071
072  void callQueueTooBigException();
073
074  void quotaExceededException();
075
076  void rpcThrottlingException();
077
078  void callDroppedException();
079
080  void callTimedOut();
081
082  void requestTooBigException();
083
084  void otherExceptions();
085}