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 } 070 071 void clear(); 072 073 void report(String message); 074 075 void reportError(String message); 076 077 void reportError(ERROR_CODE errorCode, String message); 078 079 void reportError(ERROR_CODE errorCode, String message, HbckTableInfo table); 080 081 void reportError(ERROR_CODE errorCode, String message, HbckTableInfo table, HbckRegionInfo info); 082 083 void reportError(ERROR_CODE errorCode, String message, HbckTableInfo table, HbckRegionInfo info1, 084 HbckRegionInfo info2); 085 086 int summarize(); 087 088 void detail(String details); 089 090 ArrayList<ERROR_CODE> getErrorList(); 091 092 void progress(); 093 094 void print(String message); 095 096 void resetErrors(); 097 098 boolean tableHasErrors(HbckTableInfo table); 099}