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