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
050  String UNWRITABLE_TIME_NAME = "unwritableTime";
051  String UNWRITABLE_TIME_DESC =
052    "Time where an channel was unwritable due to having too many outbound bytes";
053  String MAX_OUTBOUND_BYTES_EXCEEDED_NAME = "maxOutboundBytesExceeded";
054  String MAX_OUTBOUND_BYTES_EXCEEDED_DESC =
055    "Number of times a connection was closed because the channel outbound "
056      + "bytes exceeded the configured max.";
057  String QUEUE_SIZE_NAME = "queueSize";
058  String QUEUE_SIZE_DESC = "Number of bytes in the call queues; request has been read and "
059    + "parsed and is waiting to run or is currently being executed.";
060  String GENERAL_QUEUE_NAME = "numCallsInGeneralQueue";
061  String GENERAL_QUEUE_DESC = "Number of calls in the general call queue; "
062    + "parsed requests waiting in scheduler to be executed";
063  String PRIORITY_QUEUE_NAME = "numCallsInPriorityQueue";
064  String METAPRIORITY_QUEUE_NAME = "numCallsInMetaPriorityQueue";
065  String REPLICATION_QUEUE_NAME = "numCallsInReplicationQueue";
066  String REPLICATION_QUEUE_DESC = "Number of calls in the replication call queue waiting to be run";
067  String BULKLOAD_QUEUE_NAME = "numCallsInBulkLoadQueue";
068  String BULKLOAD_QUEUE_DESC = "Number of calls in the bulkload call queue waiting to be run";
069  String PRIORITY_QUEUE_DESC = "Number of calls in the priority call queue waiting to be run";
070  String METAPRIORITY_QUEUE_DESC = "Number of calls in the priority call queue waiting to be run";
071  String WRITE_QUEUE_NAME = "numCallsInWriteQueue";
072  String WRITE_QUEUE_DESC = "Number of calls in the write call queue; "
073    + "parsed requests waiting in scheduler to be executed";
074  String READ_QUEUE_NAME = "numCallsInReadQueue";
075  String READ_QUEUE_DESC = "Number of calls in the read call queue; "
076    + "parsed requests waiting in scheduler to be executed";
077  String SCAN_QUEUE_NAME = "numCallsInScanQueue";
078  String SCAN_QUEUE_DESC = "Number of calls in the scan call queue; "
079    + "parsed requests waiting in scheduler to be executed";
080  String NUM_OPEN_CONNECTIONS_NAME = "numOpenConnections";
081  String NUM_OPEN_CONNECTIONS_DESC = "Number of open connections.";
082  String NUM_ACTIVE_HANDLER_NAME = "numActiveHandler";
083  String NUM_ACTIVE_HANDLER_DESC = "Total number of active rpc handlers.";
084  String NUM_ACTIVE_GENERAL_HANDLER_NAME = "numActiveGeneralHandler";
085  String NUM_ACTIVE_GENERAL_HANDLER_DESC = "Number of active general rpc handlers.";
086  String NUM_ACTIVE_PRIORITY_HANDLER_NAME = "numActivePriorityHandler";
087  String NUM_ACTIVE_PRIORITY_HANDLER_DESC = "Number of active priority rpc handlers.";
088  String NUM_ACTIVE_REPLICATION_HANDLER_NAME = "numActiveReplicationHandler";
089  String NUM_ACTIVE_REPLICATION_HANDLER_DESC = "Number of active replication rpc handlers.";
090  String NUM_ACTIVE_BULKLOAD_HANDLER_NAME = "numActiveBulkLoadHandler";
091  String NUM_ACTIVE_BULKLOAD_HANDLER_DESC = "Number of active bulkload rpc handlers.";
092  String NUM_ACTIVE_WRITE_HANDLER_NAME = "numActiveWriteHandler";
093  String NUM_ACTIVE_WRITE_HANDLER_DESC = "Number of active write rpc handlers.";
094  String NUM_ACTIVE_READ_HANDLER_NAME = "numActiveReadHandler";
095  String NUM_ACTIVE_READ_HANDLER_DESC = "Number of active read rpc handlers.";
096  String NUM_ACTIVE_SCAN_HANDLER_NAME = "numActiveScanHandler";
097  String NUM_ACTIVE_SCAN_HANDLER_DESC = "Number of active scan rpc handlers.";
098  String NUM_GENERAL_CALLS_DROPPED_NAME = "numGeneralCallsDropped";
099  String NUM_GENERAL_CALLS_DROPPED_DESC =
100    "Total number of calls in general queue which " + "were dropped by CoDel RPC executor";
101  String NUM_LIFO_MODE_SWITCHES_NAME = "numLifoModeSwitches";
102  String NUM_LIFO_MODE_SWITCHES_DESC =
103    "Total number of calls in general queue which " + "were served from the tail of the queue";
104  // Direct Memory Usage metrics
105  String NETTY_DM_USAGE_NAME = "nettyDirectMemoryUsage";
106
107  String NETTY_DM_USAGE_DESC = "Current Netty direct memory usage.";
108  String NETTY_TOTAL_PENDING_OUTBOUND_NAME = "nettyTotalPendingOutboundBytes";
109  String NETTY_TOTAL_PENDING_OUTBOUND_DESC = "Current total bytes pending write to all channel";
110  String NETTY_MAX_PENDING_OUTBOUND_NAME = "nettyMaxPendingOutboundBytes";
111  String NETTY_MAX_PENDING_OUTBOUND_DESC = "Current maximum bytes pending write to any channel";
112
113  void authorizationSuccess();
114
115  void authorizationFailure();
116
117  void authenticationSuccess();
118
119  void authenticationFailure();
120
121  void authenticationFallback();
122
123  void sentBytes(long count);
124
125  void receivedBytes(int count);
126
127  void sentResponse(long count);
128
129  void receivedRequest(long count);
130
131  void dequeuedCall(int qTime);
132
133  void processedCall(int processingTime);
134
135  void queuedAndProcessedCall(int totalTime);
136
137  void unwritableTime(long unwritableTime);
138
139  void maxOutboundBytesExceeded();
140}