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.ipc;
019
020import org.apache.hadoop.hbase.metrics.ExceptionTrackingSource;
021import org.apache.yetus.audience.InterfaceAudience;
022
023@InterfaceAudience.Private
024public interface MetricsHBaseServerSource extends ExceptionTrackingSource {
025  String AUTHORIZATION_SUCCESSES_NAME = "authorizationSuccesses";
026  String AUTHORIZATION_SUCCESSES_DESC = "Number of authorization successes.";
027  String AUTHORIZATION_FAILURES_NAME = "authorizationFailures";
028  String AUTHORIZATION_FAILURES_DESC = "Number of authorization failures.";
029  String AUTHENTICATION_SUCCESSES_NAME = "authenticationSuccesses";
030  String AUTHENTICATION_SUCCESSES_DESC = "Number of authentication successes.";
031  String AUTHENTICATION_FAILURES_NAME = "authenticationFailures";
032  String AUTHENTICATION_FAILURES_DESC = "Number of authentication failures.";
033  String AUTHENTICATION_FALLBACKS_NAME = "authenticationFallbacks";
034  String AUTHENTICATION_FALLBACKS_DESC = "Number of fallbacks to insecure authentication.";
035  String SENT_BYTES_NAME = "sentBytes";
036  String SENT_BYTES_DESC = "Number of bytes sent.";
037  String RECEIVED_BYTES_NAME = "receivedBytes";
038  String RECEIVED_BYTES_DESC = "Number of bytes received.";
039  String REQUEST_SIZE_NAME = "requestSize";
040  String REQUEST_SIZE_DESC = "Request size in bytes.";
041  String RESPONSE_SIZE_NAME = "responseSize";
042  String RESPONSE_SIZE_DESC = "Response size in bytes.";
043  String QUEUE_CALL_TIME_NAME = "queueCallTime";
044  String QUEUE_CALL_TIME_DESC = "Queue Call Time.";
045  String PROCESS_CALL_TIME_NAME = "processCallTime";
046  String PROCESS_CALL_TIME_DESC = "Processing call time.";
047  String TOTAL_CALL_TIME_NAME = "totalCallTime";
048  String TOTAL_CALL_TIME_DESC = "Total call time, including both queued and processing time.";
049  String QUEUE_SIZE_NAME = "queueSize";
050  String QUEUE_SIZE_DESC = "Number of bytes in the call queues; request has been read and "
051    + "parsed and is waiting to run or is currently being executed.";
052  String GENERAL_QUEUE_NAME = "numCallsInGeneralQueue";
053  String GENERAL_QUEUE_DESC = "Number of calls in the general call queue; "
054    + "parsed requests waiting in scheduler to be executed";
055  String PRIORITY_QUEUE_NAME = "numCallsInPriorityQueue";
056  String METAPRIORITY_QUEUE_NAME = "numCallsInMetaPriorityQueue";
057  String REPLICATION_QUEUE_NAME = "numCallsInReplicationQueue";
058  String REPLICATION_QUEUE_DESC = "Number of calls in the replication call queue waiting to be run";
059  String PRIORITY_QUEUE_DESC = "Number of calls in the priority call queue waiting to be run";
060  String METAPRIORITY_QUEUE_DESC = "Number of calls in the priority call queue waiting to be run";
061  String WRITE_QUEUE_NAME = "numCallsInWriteQueue";
062  String WRITE_QUEUE_DESC = "Number of calls in the write call queue; "
063    + "parsed requests waiting in scheduler to be executed";
064  String READ_QUEUE_NAME = "numCallsInReadQueue";
065  String READ_QUEUE_DESC = "Number of calls in the read call queue; "
066    + "parsed requests waiting in scheduler to be executed";
067  String SCAN_QUEUE_NAME = "numCallsInScanQueue";
068  String SCAN_QUEUE_DESC = "Number of calls in the scan call queue; "
069    + "parsed requests waiting in scheduler to be executed";
070  String NUM_OPEN_CONNECTIONS_NAME = "numOpenConnections";
071  String NUM_OPEN_CONNECTIONS_DESC = "Number of open connections.";
072  String NUM_ACTIVE_HANDLER_NAME = "numActiveHandler";
073  String NUM_ACTIVE_HANDLER_DESC = "Total number of active rpc handlers.";
074  String NUM_ACTIVE_GENERAL_HANDLER_NAME = "numActiveGeneralHandler";
075  String NUM_ACTIVE_GENERAL_HANDLER_DESC = "Number of active general rpc handlers.";
076  String NUM_ACTIVE_PRIORITY_HANDLER_NAME = "numActivePriorityHandler";
077  String NUM_ACTIVE_PRIORITY_HANDLER_DESC = "Number of active priority rpc handlers.";
078  String NUM_ACTIVE_REPLICATION_HANDLER_NAME = "numActiveReplicationHandler";
079  String NUM_ACTIVE_REPLICATION_HANDLER_DESC = "Number of active replication rpc handlers.";
080  String NUM_ACTIVE_WRITE_HANDLER_NAME = "numActiveWriteHandler";
081  String NUM_ACTIVE_WRITE_HANDLER_DESC = "Number of active write rpc handlers.";
082  String NUM_ACTIVE_READ_HANDLER_NAME = "numActiveReadHandler";
083  String NUM_ACTIVE_READ_HANDLER_DESC = "Number of active read rpc handlers.";
084  String NUM_ACTIVE_SCAN_HANDLER_NAME = "numActiveScanHandler";
085  String NUM_ACTIVE_SCAN_HANDLER_DESC = "Number of active scan rpc handlers.";
086  String NUM_GENERAL_CALLS_DROPPED_NAME = "numGeneralCallsDropped";
087  String NUM_GENERAL_CALLS_DROPPED_DESC =
088    "Total number of calls in general queue which " + "were dropped by CoDel RPC executor";
089  String NUM_LIFO_MODE_SWITCHES_NAME = "numLifoModeSwitches";
090  String NUM_LIFO_MODE_SWITCHES_DESC =
091    "Total number of calls in general queue which " + "were served from the tail of the queue";
092  // Direct Memory Usage metrics
093  String NETTY_DM_USAGE_NAME = "nettyDirectMemoryUsage";
094
095  String NETTY_DM_USAGE_DESC = "Current Netty direct memory usage.";
096
097  void authorizationSuccess();
098
099  void authorizationFailure();
100
101  void authenticationSuccess();
102
103  void authenticationFailure();
104
105  void authenticationFallback();
106
107  void sentBytes(long count);
108
109  void receivedBytes(int count);
110
111  void sentResponse(long count);
112
113  void receivedRequest(long count);
114
115  void dequeuedCall(int qTime);
116
117  void processedCall(int processingTime);
118
119  void queuedAndProcessedCall(int totalTime);
120}