@Test public void testFindExtraRegionsInMETAOneExtra() throws Exception { RegionInfo info = createRegionInMeta(Mockito.mock(ResultScanner.class)); List<RegionInfo> missingRegions = fixer.findExtraRegionsInMETA("test-tbl"); assertEquals("Should had returned 1 extra region", 1, missingRegions.size()); assertEquals(info.getEncodedName(),missingRegions.get(0).getEncodedName()); }
List<RegionInfo> findExtraRegionsInMETA(String table) throws IOException { InternalMetaChecker<RegionInfo> extraChecker = new InternalMetaChecker<>(); return extraChecker.checkRegionsInMETA(table, (regions,dirs) -> { ListUtils<RegionInfo, Path> utils = new ListUtils<>(); return utils.complement(regions, dirs, r -> r.getEncodedName(), d -> d.getName()); }); }
FsRegionsMetaRecoverer implements Closeable { List<RegionInfo> findExtraRegionsInMETA(String table) throws IOException { InternalMetaChecker<RegionInfo> extraChecker = new InternalMetaChecker<>(); return extraChecker.checkRegionsInMETA(table, (regions,dirs) -> { ListUtils<RegionInfo, Path> utils = new ListUtils<>(); return utils.complement(regions, dirs, r -> r.getEncodedName(), d -> d.getName()); }); } }
FsRegionsMetaRecoverer implements Closeable { List<RegionInfo> findExtraRegionsInMETA(String table) throws IOException { InternalMetaChecker<RegionInfo> extraChecker = new InternalMetaChecker<>(); return extraChecker.checkRegionsInMETA(table, (regions,dirs) -> { ListUtils<RegionInfo, Path> utils = new ListUtils<>(); return utils.complement(regions, dirs, r -> r.getEncodedName(), d -> d.getName()); }); } FsRegionsMetaRecoverer(Configuration configuration);   FsRegionsMetaRecoverer(Configuration configuration, Connection connection, FileSystem fileSystem); }
FsRegionsMetaRecoverer implements Closeable { List<RegionInfo> findExtraRegionsInMETA(String table) throws IOException { InternalMetaChecker<RegionInfo> extraChecker = new InternalMetaChecker<>(); return extraChecker.checkRegionsInMETA(table, (regions,dirs) -> { ListUtils<RegionInfo, Path> utils = new ListUtils<>(); return utils.complement(regions, dirs, r -> r.getEncodedName(), d -> d.getName()); }); } FsRegionsMetaRecoverer(Configuration configuration);   FsRegionsMetaRecoverer(Configuration configuration, Connection connection, FileSystem fileSystem); Map<TableName,List<Path>> reportTablesMissingRegions(final List<String> namespacesOrTables); Map<TableName,List<RegionInfo>> reportTablesExtraRegions(final List<String> namespacesOrTables); List<Future<List<String>>> addMissingRegionsInMetaForTables(
      List<String> nameSpaceOrTable); List<Future<List<String>>> removeExtraRegionsFromMetaForTables(
    List<String> nameSpaceOrTable); @Override void close(); }
FsRegionsMetaRecoverer implements Closeable { List<RegionInfo> findExtraRegionsInMETA(String table) throws IOException { InternalMetaChecker<RegionInfo> extraChecker = new InternalMetaChecker<>(); return extraChecker.checkRegionsInMETA(table, (regions,dirs) -> { ListUtils<RegionInfo, Path> utils = new ListUtils<>(); return utils.complement(regions, dirs, r -> r.getEncodedName(), d -> d.getName()); }); } FsRegionsMetaRecoverer(Configuration configuration);   FsRegionsMetaRecoverer(Configuration configuration, Connection connection, FileSystem fileSystem); Map<TableName,List<Path>> reportTablesMissingRegions(final List<String> namespacesOrTables); Map<TableName,List<RegionInfo>> reportTablesExtraRegions(final List<String> namespacesOrTables); List<Future<List<String>>> addMissingRegionsInMetaForTables(
      List<String> nameSpaceOrTable); List<Future<List<String>>> removeExtraRegionsFromMetaForTables(
    List<String> nameSpaceOrTable); @Override void close();  }