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  public static final String SOURCE_FAILED_RECOVERY_QUEUES = "source.failedRecoverQueues";
055
056  void setLastShippedAge(long age);
057  void incrSizeOfLogQueue(int size);
058  void decrSizeOfLogQueue(int size);
059  void incrLogEditsFiltered(long size);
060  void incrBatchesShipped(int batches);
061  void incrOpsShipped(long ops);
062  void incrShippedBytes(long size);
063  void incrLogReadInBytes(long size);
064  void incrLogReadInEdits(long size);
065  void clear();
066  long getLastShippedAge();
067  int getSizeOfLogQueue();
068  void incrHFilesShipped(long hfiles);
069  void incrSizeOfHFileRefsQueue(long size);
070  void decrSizeOfHFileRefsQueue(long size);
071  void incrUnknownFileLengthForClosedWAL();
072  void incrUncleanlyClosedWALs();
073  void incrBytesSkippedInUncleanlyClosedWALs(final long bytes);
074  void incrRestartedWALReading();
075  void incrRepeatedFileBytes(final long bytes);
076  void incrCompletedWAL();
077  void incrCompletedRecoveryQueue();
078  void incrFailedRecoveryQueue();
079}