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 */ 018 019package org.apache.hadoop.hbase.replication.regionserver; 020 021import org.apache.hadoop.hbase.metrics.BaseSource; 022import org.apache.yetus.audience.InterfaceAudience; 023 024@InterfaceAudience.Private 025public interface MetricsReplicationSourceSource extends BaseSource { 026 027 public static final String SOURCE_SIZE_OF_LOG_QUEUE = "source.sizeOfLogQueue"; 028 public static final String SOURCE_AGE_OF_LAST_SHIPPED_OP = "source.ageOfLastShippedOp"; 029 public static final String SOURCE_SHIPPED_BATCHES = "source.shippedBatches"; 030 031 @Deprecated 032 /** @deprecated Use SOURCE_SHIPPED_BYTES instead */ 033 public static final String SOURCE_SHIPPED_KBS = "source.shippedKBs"; 034 public static final String SOURCE_SHIPPED_BYTES = "source.shippedBytes"; 035 public static final String SOURCE_SHIPPED_OPS = "source.shippedOps"; 036 037 public static final String SOURCE_LOG_READ_IN_BYTES = "source.logReadInBytes"; 038 public static final String SOURCE_LOG_READ_IN_EDITS = "source.logEditsRead"; 039 040 public static final String SOURCE_LOG_EDITS_FILTERED = "source.logEditsFiltered"; 041 042 public static final String SOURCE_SHIPPED_HFILES = "source.shippedHFiles"; 043 public static final String SOURCE_SIZE_OF_HFILE_REFS_QUEUE = "source.sizeOfHFileRefsQueue"; 044 045 public static final String SOURCE_CLOSED_LOGS_WITH_UNKNOWN_LENGTH = 046 "source.closedLogsWithUnknownFileLength"; 047 public static final String SOURCE_UNCLEANLY_CLOSED_LOGS = "source.uncleanlyClosedLogs"; 048 public static final String SOURCE_UNCLEANLY_CLOSED_IGNORED_IN_BYTES = 049 "source.ignoredUncleanlyClosedLogContentsInBytes"; 050 public static final String SOURCE_RESTARTED_LOG_READING = "source.restartedLogReading"; 051 public static final String SOURCE_REPEATED_LOG_FILE_BYTES = "source.repeatedLogFileBytes"; 052 public static final String SOURCE_COMPLETED_LOGS = "source.completedLogs"; 053 public static final String SOURCE_COMPLETED_RECOVERY_QUEUES = "source.completedRecoverQueues"; 054 055 void setLastShippedAge(long age); 056 void incrSizeOfLogQueue(int size); 057 void decrSizeOfLogQueue(int size); 058 void incrLogEditsFiltered(long size); 059 void incrBatchesShipped(int batches); 060 void incrOpsShipped(long ops); 061 void incrShippedBytes(long size); 062 void incrLogReadInBytes(long size); 063 void incrLogReadInEdits(long size); 064 void clear(); 065 long getLastShippedAge(); 066 int getSizeOfLogQueue(); 067 void incrHFilesShipped(long hfiles); 068 void incrSizeOfHFileRefsQueue(long size); 069 void decrSizeOfHFileRefsQueue(long size); 070 void incrUnknownFileLengthForClosedWAL(); 071 void incrUncleanlyClosedWALs(); 072 void incrBytesSkippedInUncleanlyClosedWALs(final long bytes); 073 void incrRestartedWALReading(); 074 void incrRepeatedFileBytes(final long bytes); 075 void incrCompletedWAL(); 076 void incrCompletedRecoveryQueue(); 077}