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.replication.regionserver; 019 020import org.apache.hadoop.hbase.metrics.BaseSource; 021import org.apache.yetus.audience.InterfaceAudience; 022 023@InterfaceAudience.Private 024public interface MetricsReplicationSourceSource extends BaseSource { 025 026 public static final String SOURCE_SIZE_OF_LOG_QUEUE = "source.sizeOfLogQueue"; 027 public static final String SOURCE_AGE_OF_LAST_SHIPPED_OP = "source.ageOfLastShippedOp"; 028 public static final String SOURCE_SHIPPED_BATCHES = "source.shippedBatches"; 029 public static final String SOURCE_FAILED_BATCHES = "source.failedBatches"; 030 031 public static final String SOURCE_SHIPPED_BYTES = "source.shippedBytes"; 032 public static final String SOURCE_SHIPPED_OPS = "source.shippedOps"; 033 034 public static final String SOURCE_LOG_READ_IN_BYTES = "source.logReadInBytes"; 035 public static final String SOURCE_LOG_READ_IN_EDITS = "source.logEditsRead"; 036 037 public static final String SOURCE_LOG_EDITS_FILTERED = "source.logEditsFiltered"; 038 039 public static final String SOURCE_SHIPPED_HFILES = "source.shippedHFiles"; 040 public static final String SOURCE_SIZE_OF_HFILE_REFS_QUEUE = "source.sizeOfHFileRefsQueue"; 041 042 public static final String SOURCE_CLOSED_LOGS_WITH_UNKNOWN_LENGTH = 043 "source.closedLogsWithUnknownFileLength"; 044 public static final String SOURCE_UNCLEANLY_CLOSED_LOGS = "source.uncleanlyClosedLogs"; 045 public static final String SOURCE_UNCLEANLY_CLOSED_IGNORED_IN_BYTES = 046 "source.ignoredUncleanlyClosedLogContentsInBytes"; 047 public static final String SOURCE_RESTARTED_LOG_READING = "source.restartedLogReading"; 048 public static final String SOURCE_REPEATED_LOG_FILE_BYTES = "source.repeatedLogFileBytes"; 049 public static final String SOURCE_COMPLETED_LOGS = "source.completedLogs"; 050 public static final String SOURCE_COMPLETED_RECOVERY_QUEUES = "source.completedRecoverQueues"; 051 public static final String SOURCE_FAILED_RECOVERY_QUEUES = "source.failedRecoverQueues"; 052 // This is to track the num of replication sources getting initialized 053 public static final String SOURCE_INITIALIZING = "source.numInitializing"; 054 055 void setLastShippedAge(long age); 056 057 void incrSizeOfLogQueue(int size); 058 059 void decrSizeOfLogQueue(int size); 060 061 void incrLogEditsFiltered(long size); 062 063 void incrBatchesShipped(int batches); 064 065 void incrFailedBatches(); 066 067 void incrOpsShipped(long ops); 068 069 void incrShippedBytes(long size); 070 071 void incrLogReadInBytes(long size); 072 073 void incrLogReadInEdits(long size); 074 075 void clear(); 076 077 long getLastShippedAge(); 078 079 int getSizeOfLogQueue(); 080 081 void incrHFilesShipped(long hfiles); 082 083 void incrSizeOfHFileRefsQueue(long size); 084 085 void decrSizeOfHFileRefsQueue(long size); 086 087 void incrUnknownFileLengthForClosedWAL(); 088 089 void incrUncleanlyClosedWALs(); 090 091 long getUncleanlyClosedWALs(); 092 093 void incrBytesSkippedInUncleanlyClosedWALs(final long bytes); 094 095 void incrRestartedWALReading(); 096 097 void incrRepeatedFileBytes(final long bytes); 098 099 void incrCompletedWAL(); 100 101 void incrCompletedRecoveryQueue(); 102 103 void incrFailedRecoveryQueue(); 104 105 long getWALEditsRead(); 106 107 long getShippedOps(); 108 109 long getEditsFiltered(); 110 111 void setOldestWalAge(long age); 112 113 long getOldestWalAge(); 114 115 void incrSourceInitializing(); 116 117 void decrSourceInitializing(); 118 119 int getSourceInitializing(); 120}