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.metrics; 019 020import org.apache.yetus.audience.InterfaceAudience; 021 022/** 023 * Interface for sources that will export JvmPauseMonitor metrics 024 */ 025@InterfaceAudience.Private 026public interface JvmPauseMonitorSource { 027 028 String INFO_THRESHOLD_COUNT_KEY = "pauseInfoThresholdExceeded"; 029 String INFO_THRESHOLD_COUNT_DESC = "Count of INFO level pause threshold alerts"; 030 String WARN_THRESHOLD_COUNT_KEY = "pauseWarnThresholdExceeded"; 031 String WARN_THRESHOLD_COUNT_DESC = "Count of WARN level pause threshold alerts"; 032 033 String PAUSE_TIME_WITH_GC_KEY = "pauseTimeWithGc"; 034 String PAUSE_TIME_WITH_GC_DESC = "Histogram for excessive pause times with GC activity detected"; 035 036 String PAUSE_TIME_WITHOUT_GC_KEY = "pauseTimeWithoutGc"; 037 String PAUSE_TIME_WITHOUT_GC_DESC = 038 "Histogram for excessive pause times without GC activity detected"; 039 040 /** 041 * Increment the INFO level threshold exceeded count 042 * @param count the count 043 */ 044 void incInfoThresholdExceeded(int count); 045 046 /** 047 * Increment the WARN level threshold exceeded count 048 * @param count the count 049 */ 050 void incWarnThresholdExceeded(int count); 051 052 /** 053 * Update the pause time histogram where GC activity was detected. 054 * @param t time it took 055 */ 056 void updatePauseTimeWithGc(long t); 057 058 /** 059 * Update the pause time histogram where GC activity was not detected. 060 * @param t time it took 061 */ 062 void updatePauseTimeWithoutGc(long t); 063}