@Test public void testReportTablesExtraRegionsOneExtra() throws Exception { ResultScanner mockedRS = Mockito.mock(ResultScanner.class); Mockito.when(this.mockedTable.getScanner(Mockito.any(Scan.class))).thenReturn(mockedRS); List<Cell> cells = new ArrayList<>(); cells.add(createCellForTableState(TableName.valueOf("test-tbl"))); Result result = Result.create(cells); Mockito.when(mockedRS.next()).thenReturn(result,(Result)null); Map<TableName, List<RegionInfo>> report = fixer.reportTablesExtraRegions(null); assertEquals("Should had returned 1 extra region.", 1,report.size()); }
public Map<TableName,List<RegionInfo>> reportTablesExtraRegions(final List<String> namespacesOrTables) throws IOException { InternalMetaChecker<RegionInfo> extraChecker = new InternalMetaChecker<>(); return extraChecker.reportTablesRegions(namespacesOrTables, this::findExtraRegionsInMETA); }
FsRegionsMetaRecoverer implements Closeable { public Map<TableName,List<RegionInfo>> reportTablesExtraRegions(final List<String> namespacesOrTables) throws IOException { InternalMetaChecker<RegionInfo> extraChecker = new InternalMetaChecker<>(); return extraChecker.reportTablesRegions(namespacesOrTables, this::findExtraRegionsInMETA); } }
FsRegionsMetaRecoverer implements Closeable { public Map<TableName,List<RegionInfo>> reportTablesExtraRegions(final List<String> namespacesOrTables) throws IOException { InternalMetaChecker<RegionInfo> extraChecker = new InternalMetaChecker<>(); return extraChecker.reportTablesRegions(namespacesOrTables, this::findExtraRegionsInMETA); } FsRegionsMetaRecoverer(Configuration configuration);   FsRegionsMetaRecoverer(Configuration configuration, Connection connection, FileSystem fileSystem); }
FsRegionsMetaRecoverer implements Closeable { public Map<TableName,List<RegionInfo>> reportTablesExtraRegions(final List<String> namespacesOrTables) throws IOException { InternalMetaChecker<RegionInfo> extraChecker = new InternalMetaChecker<>(); return extraChecker.reportTablesRegions(namespacesOrTables, this::findExtraRegionsInMETA); } 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 { public Map<TableName,List<RegionInfo>> reportTablesExtraRegions(final List<String> namespacesOrTables) throws IOException { InternalMetaChecker<RegionInfo> extraChecker = new InternalMetaChecker<>(); return extraChecker.reportTablesRegions(namespacesOrTables, this::findExtraRegionsInMETA); } 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();  }