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.util;
019
020import java.util.ArrayList;
021
022import org.apache.yetus.audience.InterfaceAudience;
023
024/**
025 * Used by {@link HBaseFsck} reporting system.
026 * @deprecated Since 2.3.0. To be removed in hbase4. Use HBCK2 instead. Remove when
027 *   {@link HBaseFsck} is removed.
028 */
029@Deprecated
030@InterfaceAudience.Private
031public interface HbckErrorReporter {
032  enum ERROR_CODE {
033    UNKNOWN, NO_META_REGION, NULL_META_REGION, NO_VERSION_FILE, NOT_IN_META_HDFS, NOT_IN_META,
034    NOT_IN_META_OR_DEPLOYED, NOT_IN_HDFS_OR_DEPLOYED, NOT_IN_HDFS, SERVER_DOES_NOT_MATCH_META,
035    NOT_DEPLOYED, MULTI_DEPLOYED, SHOULD_NOT_BE_DEPLOYED, MULTI_META_REGION, RS_CONNECT_FAILURE,
036    FIRST_REGION_STARTKEY_NOT_EMPTY, LAST_REGION_ENDKEY_NOT_EMPTY, DUPE_STARTKEYS,
037    HOLE_IN_REGION_CHAIN, OVERLAP_IN_REGION_CHAIN, REGION_CYCLE, DEGENERATE_REGION,
038    ORPHAN_HDFS_REGION, LINGERING_SPLIT_PARENT, NO_TABLEINFO_FILE, LINGERING_REFERENCE_HFILE,
039    LINGERING_HFILELINK, WRONG_USAGE, EMPTY_META_CELL, EXPIRED_TABLE_LOCK, BOUNDARIES_ERROR,
040    ORPHAN_TABLE_STATE, NO_TABLE_STATE, UNDELETED_REPLICATION_QUEUE, DUPE_ENDKEYS,
041    UNSUPPORTED_OPTION, INVALID_TABLE
042  }
043
044  void clear();
045
046  void report(String message);
047
048  void reportError(String message);
049
050  void reportError(ERROR_CODE errorCode, String message);
051
052  void reportError(ERROR_CODE errorCode, String message, HbckTableInfo table);
053
054  void reportError(ERROR_CODE errorCode, String message, HbckTableInfo table, HbckRegionInfo info);
055
056  void reportError(ERROR_CODE errorCode, String message, HbckTableInfo table, HbckRegionInfo info1,
057      HbckRegionInfo info2);
058
059  int summarize();
060
061  void detail(String details);
062
063  ArrayList<ERROR_CODE> getErrorList();
064
065  void progress();
066
067  void print(String message);
068
069  void resetErrors();
070
071  boolean tableHasErrors(HbckTableInfo table);
072}