001/* 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to you under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017package org.apache.hadoop.hbase.regionserver; 018 019import org.apache.yetus.audience.InterfaceAudience; 020 021/** 022 * Latency metrics for a specific table in a RegionServer. 023 */ 024@InterfaceAudience.Private 025public interface MetricsTableLatencies { 026 027 /** 028 * The name of the metrics 029 */ 030 String METRICS_NAME = "TableLatencies"; 031 032 /** 033 * The name of the metrics context that metrics will be under. 034 */ 035 String METRICS_CONTEXT = "regionserver"; 036 037 /** 038 * Description 039 */ 040 String METRICS_DESCRIPTION = "Metrics about Tables on a single HBase RegionServer"; 041 042 /** 043 * The name of the metrics context that metrics will be under in jmx 044 */ 045 String METRICS_JMX_CONTEXT = "RegionServer,sub=" + METRICS_NAME; 046 047 String GET_TIME = "getTime"; 048 String SCAN_TIME = "scanTime"; 049 String SCAN_SIZE = "scanSize"; 050 String PUT_TIME = "putTime"; 051 String PUT_BATCH_TIME = "putBatchTime"; 052 String DELETE_TIME = "deleteTime"; 053 String DELETE_BATCH_TIME = "deleteBatchTime"; 054 String INCREMENT_TIME = "incrementTime"; 055 String APPEND_TIME = "appendTime"; 056 057 /** 058 * Update the Put time histogram 059 * 060 * @param tableName The table the metric is for 061 * @param t time it took 062 */ 063 void updatePut(String tableName, long t); 064 065 /** 066 * Update the batch Put time histogram 067 * 068 * @param tableName The table the metric is for 069 * @param t time it took 070 */ 071 void updatePutBatch(String tableName, long t); 072 073 /** 074 * Update the Delete time histogram 075 * 076 * @param tableName The table the metric is for 077 * @param t time it took 078 */ 079 void updateDelete(String tableName, long t); 080 081 /** 082 * Update the batch Delete time histogram 083 * 084 * @param tableName The table the metric is for 085 * @param t time it took 086 */ 087 void updateDeleteBatch(String tableName, long t); 088 089 /** 090 * Update the Get time histogram . 091 * 092 * @param tableName The table the metric is for 093 * @param t time it took 094 */ 095 void updateGet(String tableName, long t); 096 097 /** 098 * Update the Increment time histogram. 099 * 100 * @param tableName The table the metric is for 101 * @param t time it took 102 */ 103 void updateIncrement(String tableName, long t); 104 105 /** 106 * Update the Append time histogram. 107 * 108 * @param tableName The table the metric is for 109 * @param t time it took 110 */ 111 void updateAppend(String tableName, long t); 112 113 /** 114 * Update the scan size. 115 * 116 * @param tableName The table the metric is for 117 * @param scanSize size of the scan 118 */ 119 void updateScanSize(String tableName, long scanSize); 120 121 /** 122 * Update the scan time. 123 * 124 * @param tableName The table the metric is for 125 * @param t time it took 126 */ 127 void updateScanTime(String tableName, long t); 128}