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  @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  public static final String SOURCE_FAILED_RECOVERY_QUEUES = "source.failedRecoverQueues";
055  // This is to track the num of replication sources getting initialized
056  public static final String SOURCE_INITIALIZING = "source.numInitializing";
057
058  void setLastShippedAge(long age);
059
060  void incrSizeOfLogQueue(int size);
061
062  void decrSizeOfLogQueue(int size);
063
064  void incrLogEditsFiltered(long size);
065
066  void incrBatchesShipped(int batches);
067
068  void incrFailedBatches();
069
070  void incrOpsShipped(long ops);
071
072  void incrShippedBytes(long size);
073
074  void incrLogReadInBytes(long size);
075
076  void incrLogReadInEdits(long size);
077
078  void clear();
079
080  long getLastShippedAge();
081
082  int getSizeOfLogQueue();
083
084  void incrHFilesShipped(long hfiles);
085
086  void incrSizeOfHFileRefsQueue(long size);
087
088  void decrSizeOfHFileRefsQueue(long size);
089
090  void incrUnknownFileLengthForClosedWAL();
091
092  void incrUncleanlyClosedWALs();
093
094  long getUncleanlyClosedWALs();
095
096  void incrBytesSkippedInUncleanlyClosedWALs(final long bytes);
097
098  void incrRestartedWALReading();
099
100  void incrRepeatedFileBytes(final long bytes);
101
102  void incrCompletedWAL();
103
104  void incrCompletedRecoveryQueue();
105
106  void incrFailedRecoveryQueue();
107
108  long getWALEditsRead();
109
110  long getShippedOps();
111
112  long getEditsFiltered();
113
114  void setOldestWalAge(long age);
115
116  long getOldestWalAge();
117
118  void incrSourceInitializing();
119
120  void decrSourceInitializing();
121
122  int getSourceInitializing();
123}