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 */
018
019package org.apache.hadoop.hbase.metrics;
020
021import org.apache.yetus.audience.InterfaceAudience;
022
023/**
024 * Common interface for metrics source implementations which need to track individual exception
025 * types thrown or received.
026 */
027@InterfaceAudience.Private
028public interface ExceptionTrackingSource extends BaseSource {
029  String EXCEPTIONS_NAME="exceptions";
030  String EXCEPTIONS_DESC="Exceptions caused by requests";
031  String EXCEPTIONS_TYPE_DESC="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
045  void exception();
046
047  /**
048   * Different types of exceptions
049   */
050  void outOfOrderException();
051  void failedSanityException();
052  void movedRegionException();
053  void notServingRegionException();
054  void unknownScannerException();
055  void scannerResetException();
056  void tooBusyException();
057  void multiActionTooLargeException();
058  void callQueueTooBigException();
059}