001/**
002 *
003 * Licensed to the Apache Software Foundation (ASF) under one
004 * or more contributor license agreements.  See the NOTICE file
005 * distributed with this work for additional information
006 * regarding copyright ownership.  The ASF licenses this file
007 * to you under the Apache License, Version 2.0 (the
008 * "License"); you may not use this file except in compliance
009 * with the License.  You may obtain a copy of the License at
010 *
011 *     http://www.apache.org/licenses/LICENSE-2.0
012 *
013 * Unless required by applicable law or agreed to in writing, software
014 * distributed under the License is distributed on an "AS IS" BASIS,
015 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
016 * See the License for the specific language governing permissions and
017 * limitations under the License.
018 */
019
020package org.apache.hadoop.hbase.ipc;
021
022import org.apache.hadoop.hbase.metrics.ExceptionTrackingSource;
023import org.apache.yetus.audience.InterfaceAudience;
024
025@InterfaceAudience.Private
026public interface MetricsHBaseServerSource extends ExceptionTrackingSource {
027  String AUTHORIZATION_SUCCESSES_NAME = "authorizationSuccesses";
028  String AUTHORIZATION_SUCCESSES_DESC =
029      "Number of authorization successes.";
030  String AUTHORIZATION_FAILURES_NAME = "authorizationFailures";
031  String AUTHORIZATION_FAILURES_DESC =
032      "Number of authorization failures.";
033  String AUTHENTICATION_SUCCESSES_NAME = "authenticationSuccesses";
034  String AUTHENTICATION_SUCCESSES_DESC =
035      "Number of authentication successes.";
036  String AUTHENTICATION_FAILURES_NAME = "authenticationFailures";
037  String AUTHENTICATION_FAILURES_DESC =
038      "Number of authentication failures.";
039  String AUTHENTICATION_FALLBACKS_NAME = "authenticationFallbacks";
040  String AUTHENTICATION_FALLBACKS_DESC =
041      "Number of fallbacks to insecure authentication.";
042  String SENT_BYTES_NAME = "sentBytes";
043  String SENT_BYTES_DESC = "Number of bytes sent.";
044  String RECEIVED_BYTES_NAME = "receivedBytes";
045  String RECEIVED_BYTES_DESC = "Number of bytes received.";
046  String REQUEST_SIZE_NAME = "requestSize";
047  String REQUEST_SIZE_DESC = "Request size in bytes.";
048  String RESPONSE_SIZE_NAME = "responseSize";
049  String RESPONSE_SIZE_DESC = "Response size in bytes.";
050  String QUEUE_CALL_TIME_NAME = "queueCallTime";
051  String QUEUE_CALL_TIME_DESC = "Queue Call Time.";
052  String PROCESS_CALL_TIME_NAME = "processCallTime";
053  String PROCESS_CALL_TIME_DESC = "Processing call time.";
054  String TOTAL_CALL_TIME_NAME = "totalCallTime";
055  String TOTAL_CALL_TIME_DESC = "Total call time, including both queued and processing time.";
056  String QUEUE_SIZE_NAME = "queueSize";
057  String QUEUE_SIZE_DESC = "Number of bytes in the call queues; request has been read and " +
058    "parsed and is waiting to run or is currently being executed.";
059  String GENERAL_QUEUE_NAME = "numCallsInGeneralQueue";
060  String GENERAL_QUEUE_DESC = "Number of calls in the general call queue; " +
061    "parsed requests waiting in scheduler to be executed";
062  String PRIORITY_QUEUE_NAME = "numCallsInPriorityQueue";
063  String METAPRIORITY_QUEUE_NAME = "numCallsInMetaPriorityQueue";
064  String REPLICATION_QUEUE_NAME = "numCallsInReplicationQueue";
065  String REPLICATION_QUEUE_DESC =
066      "Number of calls in the replication call queue waiting to be run";
067  String PRIORITY_QUEUE_DESC = "Number of calls in the priority call queue waiting to be run";
068  String METAPRIORITY_QUEUE_DESC = "Number of calls in the priority call queue waiting to be run";
069  String WRITE_QUEUE_NAME = "numCallsInWriteQueue";
070  String WRITE_QUEUE_DESC = "Number of calls in the write call queue; " +
071    "parsed requests waiting in scheduler to be executed";
072  String READ_QUEUE_NAME = "numCallsInReadQueue";
073  String READ_QUEUE_DESC = "Number of calls in the read call queue; " +
074    "parsed requests waiting in scheduler to be executed";
075  String SCAN_QUEUE_NAME = "numCallsInScanQueue";
076  String SCAN_QUEUE_DESC = "Number of calls in the scan call queue; " +
077    "parsed requests waiting in scheduler to be executed";
078  String NUM_OPEN_CONNECTIONS_NAME = "numOpenConnections";
079  String NUM_OPEN_CONNECTIONS_DESC = "Number of open connections.";
080  String NUM_ACTIVE_HANDLER_NAME = "numActiveHandler";
081  String NUM_ACTIVE_HANDLER_DESC = "Number of active rpc handlers.";
082  String NUM_ACTIVE_WRITE_HANDLER_NAME = "numActiveWriteHandler";
083  String NUM_ACTIVE_WRITE_HANDLER_DESC = "Number of active write rpc handlers.";
084  String NUM_ACTIVE_READ_HANDLER_NAME = "numActiveReadHandler";
085  String NUM_ACTIVE_READ_HANDLER_DESC = "Number of active read rpc handlers.";
086  String NUM_ACTIVE_SCAN_HANDLER_NAME = "numActiveScanHandler";
087  String NUM_ACTIVE_SCAN_HANDLER_DESC = "Number of active scan rpc handlers.";
088  String NUM_GENERAL_CALLS_DROPPED_NAME = "numGeneralCallsDropped";
089  String NUM_GENERAL_CALLS_DROPPED_DESC = "Total number of calls in general queue which " +
090    "were dropped by CoDel RPC executor";
091  String NUM_LIFO_MODE_SWITCHES_NAME = "numLifoModeSwitches";
092  String NUM_LIFO_MODE_SWITCHES_DESC = "Total number of calls in general queue which " +
093    "were served from the tail of the queue";
094
095  void authorizationSuccess();
096
097  void authorizationFailure();
098
099  void authenticationSuccess();
100
101  void authenticationFailure();
102
103  void authenticationFallback();
104
105  void sentBytes(long count);
106
107  void receivedBytes(int count);
108
109  void sentResponse(long count);
110
111  void receivedRequest(long count);
112
113  void dequeuedCall(int qTime);
114
115  void processedCall(int processingTime);
116
117  void queuedAndProcessedCall(int totalTime);
118}