|  | 
|  | 1 | +/** | 
|  | 2 | + * Licensed to the Apache Software Foundation (ASF) under one | 
|  | 3 | + * or more contributor license agreements.  See the NOTICE file | 
|  | 4 | + * distributed with this work for additional information | 
|  | 5 | + * regarding copyright ownership.  The ASF licenses this file | 
|  | 6 | + * to you under the Apache License, Version 2.0 (the | 
|  | 7 | + * "License"); you may not use this file except in compliance | 
|  | 8 | + * with the License.  You may obtain a copy of the License at | 
|  | 9 | + * | 
|  | 10 | + *     http://www.apache.org/licenses/LICENSE-2.0 | 
|  | 11 | + * | 
|  | 12 | + * Unless required by applicable law or agreed to in writing, software | 
|  | 13 | + * distributed under the License is distributed on an "AS IS" BASIS, | 
|  | 14 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 
|  | 15 | + * See the License for the specific language governing permissions and | 
|  | 16 | + * limitations under the License. | 
|  | 17 | + */ | 
|  | 18 | +package org.apache.hadoop.hbase.util; | 
|  | 19 | + | 
|  | 20 | +import java.util.ArrayList; | 
|  | 21 | + | 
|  | 22 | +import org.apache.yetus.audience.InterfaceAudience; | 
|  | 23 | +import org.apache.yetus.audience.InterfaceStability; | 
|  | 24 | + | 
|  | 25 | +@InterfaceAudience.Private | 
|  | 26 | +@InterfaceStability.Evolving | 
|  | 27 | +public interface HbckErrorReporter { | 
|  | 28 | + | 
|  | 29 | +  enum ERROR_CODE { | 
|  | 30 | +    UNKNOWN, NO_META_REGION, NULL_META_REGION, NO_VERSION_FILE, NOT_IN_META_HDFS, NOT_IN_META, | 
|  | 31 | +    NOT_IN_META_OR_DEPLOYED, NOT_IN_HDFS_OR_DEPLOYED, NOT_IN_HDFS, SERVER_DOES_NOT_MATCH_META, | 
|  | 32 | +    NOT_DEPLOYED, MULTI_DEPLOYED, SHOULD_NOT_BE_DEPLOYED, MULTI_META_REGION, RS_CONNECT_FAILURE, | 
|  | 33 | +    FIRST_REGION_STARTKEY_NOT_EMPTY, LAST_REGION_ENDKEY_NOT_EMPTY, DUPE_STARTKEYS, | 
|  | 34 | +    HOLE_IN_REGION_CHAIN, OVERLAP_IN_REGION_CHAIN, REGION_CYCLE, DEGENERATE_REGION, | 
|  | 35 | +    ORPHAN_HDFS_REGION, LINGERING_SPLIT_PARENT, NO_TABLEINFO_FILE, LINGERING_REFERENCE_HFILE, | 
|  | 36 | +    LINGERING_HFILELINK, WRONG_USAGE, EMPTY_META_CELL, EXPIRED_TABLE_LOCK, BOUNDARIES_ERROR, | 
|  | 37 | +    ORPHAN_TABLE_STATE, NO_TABLE_STATE, UNDELETED_REPLICATION_QUEUE, DUPE_ENDKEYS, | 
|  | 38 | +    UNSUPPORTED_OPTION, INVALID_TABLE | 
|  | 39 | +  } | 
|  | 40 | + | 
|  | 41 | +  void clear(); | 
|  | 42 | + | 
|  | 43 | +  void report(String message); | 
|  | 44 | + | 
|  | 45 | +  void reportError(String message); | 
|  | 46 | + | 
|  | 47 | +  void reportError(ERROR_CODE errorCode, String message); | 
|  | 48 | + | 
|  | 49 | +  void reportError(ERROR_CODE errorCode, String message, HbckTableInfo table); | 
|  | 50 | + | 
|  | 51 | +  void reportError(ERROR_CODE errorCode, String message, HbckTableInfo table, HbckRegionInfo info); | 
|  | 52 | + | 
|  | 53 | +  void reportError(ERROR_CODE errorCode, String message, HbckTableInfo table, HbckRegionInfo info1, | 
|  | 54 | +      HbckRegionInfo info2); | 
|  | 55 | + | 
|  | 56 | +  int summarize(); | 
|  | 57 | + | 
|  | 58 | +  void detail(String details); | 
|  | 59 | + | 
|  | 60 | +  ArrayList<ERROR_CODE> getErrorList(); | 
|  | 61 | + | 
|  | 62 | +  void progress(); | 
|  | 63 | + | 
|  | 64 | +  void print(String message); | 
|  | 65 | + | 
|  | 66 | +  void resetErrors(); | 
|  | 67 | + | 
|  | 68 | +  boolean tableHasErrors(HbckTableInfo table); | 
|  | 69 | +} | 
0 commit comments