@Test public void testMissingRegionInfoQualifier() throws Exception { TableName table = TableName.valueOf("testMissingRegionInfoQualifier"); try { setupTable(table); final List<Delete> deletes = new LinkedList<Delete>(); HTable meta = new HTable(conf, HTableDescriptor.META_TABLEDESC.getTableName()); MetaScanner.metaScan(conf, new MetaScanner.MetaScannerVisitor() { @Override public boolean processRow(Result rowResult) throws IOException { HRegionInfo hri = MetaScanner.getHRegionInfo(rowResult); if (hri != null && !hri.getTable().isSystemTable()) { Delete delete = new Delete(rowResult.getRow()); delete.deleteColumn(HConstants.CATALOG_FAMILY, HConstants.REGIONINFO_QUALIFIER); deletes.add(delete); } return true; } @Override public void close() throws IOException { } }); meta.delete(deletes); meta.put(new Put(Bytes.toBytes(table + ",,1361911384013.810e28f59a57da91c66")).add( HConstants.CATALOG_FAMILY, HConstants.SERVER_QUALIFIER, Bytes.toBytes("node1:60020"))); meta.put(new Put(Bytes.toBytes(table + ",,1361911384013.810e28f59a57da91c66")).add( HConstants.CATALOG_FAMILY, HConstants.STARTCODE_QUALIFIER, Bytes.toBytes(1362150791183L))); meta.close(); HBaseFsck hbck = doFsck(conf, false); assertTrue(hbck.getErrors().getErrorList().contains(ERROR_CODE.EMPTY_META_CELL)); hbck = doFsck(conf, true); assertFalse(hbck.getErrors().getErrorList().contains(ERROR_CODE.EMPTY_META_CELL)); } finally { deleteTable(table); } }
public ErrorReporter getErrors() { return errors; }
HBaseFsck extends Configured { public ErrorReporter getErrors() { return errors; } }
HBaseFsck extends Configured { public ErrorReporter getErrors() { return errors; } HBaseFsck(Configuration conf);  HBaseFsck(Configuration conf, ExecutorService exec); }
HBaseFsck extends Configured { public ErrorReporter getErrors() { return errors; } HBaseFsck(Configuration conf);  HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegrityRepair(); int onlineConsistencyRepair(); int onlineHbck(); static byte[] keyOnly(byte[] b); void checkRegionBoundaries(); ErrorReporter getErrors(); void fixEmptyMetaCells(); void fixOrphanTables(); boolean rebuildMeta(boolean fix); void loadHdfsRegionDirs(); int mergeRegionDirs(Path targetRegionDir, HbckInfo contained); void dumpOverlapProblems(Multimap<byte[], HbckInfo> regions); void dumpSidelinedRegions(Map<Path, HbckInfo> regions); Multimap<byte[], HbckInfo> getOverlapGroups(
      TableName table); static void setDisplayFullReport(); void setFixTableLocks(boolean shouldFix); void setFixAssignments(boolean shouldFix); void setFixMeta(boolean shouldFix); void setFixEmptyMetaCells(boolean shouldFix); void setCheckHdfs(boolean checking); void setFixHdfsHoles(boolean shouldFix); void setFixTableOrphans(boolean shouldFix); void setFixHdfsOverlaps(boolean shouldFix); void setFixHdfsOrphans(boolean shouldFix); void setFixVersionFile(boolean shouldFix); boolean shouldFixVersionFile(); void setSidelineBigOverlaps(boolean sbo); boolean shouldSidelineBigOverlaps(); void setFixSplitParents(boolean shouldFix); void setFixReferenceFiles(boolean shouldFix); boolean shouldIgnorePreCheckPermission(); void setIgnorePreCheckPermission(boolean ignorePreCheckPermission); void setMaxMerge(int mm); int getMaxMerge(); void setMaxOverlapsToSideline(int mo); int getMaxOverlapsToSideline(); void includeTable(TableName table); void setTimeLag(long seconds); void setSidelineDir(String sidelineDir); HFileCorruptionChecker getHFilecorruptionChecker(); void setHFileCorruptionChecker(HFileCorruptionChecker hfcc); void setRetCode(int code); int getRetCode(); static void main(String[] args); HBaseFsck exec(ExecutorService exec, String[] args); static void debugLsr(Configuration conf,
      Path p); static void debugLsr(Configuration conf,
      Path p, ErrorReporter errors); }
HBaseFsck extends Configured { public ErrorReporter getErrors() { return errors; } HBaseFsck(Configuration conf);  HBaseFsck(Configuration conf, ExecutorService exec); void connect(); void offlineHdfsIntegrityRepair(); int onlineConsistencyRepair(); int onlineHbck(); static byte[] keyOnly(byte[] b); void checkRegionBoundaries(); ErrorReporter getErrors(); void fixEmptyMetaCells(); void fixOrphanTables(); boolean rebuildMeta(boolean fix); void loadHdfsRegionDirs(); int mergeRegionDirs(Path targetRegionDir, HbckInfo contained); void dumpOverlapProblems(Multimap<byte[], HbckInfo> regions); void dumpSidelinedRegions(Map<Path, HbckInfo> regions); Multimap<byte[], HbckInfo> getOverlapGroups(
      TableName table); static void setDisplayFullReport(); void setFixTableLocks(boolean shouldFix); void setFixAssignments(boolean shouldFix); void setFixMeta(boolean shouldFix); void setFixEmptyMetaCells(boolean shouldFix); void setCheckHdfs(boolean checking); void setFixHdfsHoles(boolean shouldFix); void setFixTableOrphans(boolean shouldFix); void setFixHdfsOverlaps(boolean shouldFix); void setFixHdfsOrphans(boolean shouldFix); void setFixVersionFile(boolean shouldFix); boolean shouldFixVersionFile(); void setSidelineBigOverlaps(boolean sbo); boolean shouldSidelineBigOverlaps(); void setFixSplitParents(boolean shouldFix); void setFixReferenceFiles(boolean shouldFix); boolean shouldIgnorePreCheckPermission(); void setIgnorePreCheckPermission(boolean ignorePreCheckPermission); void setMaxMerge(int mm); int getMaxMerge(); void setMaxOverlapsToSideline(int mo); int getMaxOverlapsToSideline(); void includeTable(TableName table); void setTimeLag(long seconds); void setSidelineDir(String sidelineDir); HFileCorruptionChecker getHFilecorruptionChecker(); void setHFileCorruptionChecker(HFileCorruptionChecker hfcc); void setRetCode(int code); int getRetCode(); static void main(String[] args); HBaseFsck exec(ExecutorService exec, String[] args); static void debugLsr(Configuration conf,
      Path p); static void debugLsr(Configuration conf,
      Path p, ErrorReporter errors); static final long DEFAULT_TIME_LAG; static final long DEFAULT_SLEEP_BEFORE_RERUN; }