Source:
<code>public TabletServers getParticipatingTabletServers(@PathParam("tableId") String tableId) throws Exception { Instance instance = Monitor.getContext().getInstance(); TreeSet<String> locs = new TreeSet<>(); if (RootTable.ID.equals(tableId)) { locs.add(instance.getRootTabletLocation()); } else { String systemTableName = MetadataTable.ID.equals(tableId) ? RootTable.NAME : MetadataTable.NAME; MetaDataTableScanner scanner = new MetaDataTableScanner(Monitor.getContext(), new Range(KeyExtent.getMetadataEntry(tableId, new Text()), KeyExtent.getMetadataEntry(tableId, null)), systemTableName); while (scanner.hasNext()) { TabletLocationState state = scanner.next(); if (state.current != null) { try { locs.add(state.current.hostPort()); <START> } catch (Exception ex) <END> } } scanner.close(); } TabletServers tabletServers = new TabletServers(Monitor.getMmi().tServerInfo.size()); List<TabletServerStatus> tservers = new ArrayList<>(); if (Monitor.getMmi() != null) { for (TabletServerStatus tss : Monitor.getMmi().tServerInfo) { try { if (tss.name != null && locs.contains(tss.name)) tservers.add(tss); } catch (Exception ex) { } } } for (TabletServerStatus status : tservers) { if (status == null) status = NO_STATUS; TableInfo summary = TableInfoUtil.summarizeTableStats(status); if (tableId != null) summary = status.tableMap.get(tableId); if (summary == null) continue; TabletServer tabletServerInfo = new TabletServer(); tabletServerInfo.updateTabletServerInfo(status, summary); tabletServers.addTablet(tabletServerInfo); } return tabletServers; }</code><technical_language>If exception handling server, throw exception client. is ugly hidden</technical_language>

Target:
public TabletServers getParticipatingTabletServers(@PathParam("tableId") String tableId) throws Exception { Instance instance = Monitor.getContext().getInstance(); TabletServers tabletServers = new TabletServers(Monitor.getMmi().tServerInfo.size()); TreeSet<String> locs = new TreeSet<>(); if (RootTable.ID.equals(tableId)) { locs.add(instance.getRootTabletLocation()); } else { String systemTableName = MetadataTable.ID.equals(tableId) ? RootTable.NAME : MetadataTable.NAME; MetaDataTableScanner scanner = new MetaDataTableScanner(Monitor.getContext(), new Range(KeyExtent.getMetadataEntry(tableId, new Text()), KeyExtent.getMetadataEntry(tableId, null)), systemTableName); while (scanner.hasNext()) { TabletLocationState state = scanner.next(); if (state.current != null) { try { locs.add(state.current.hostPort()); } catch (Exception ex) { scanner.close(); return tabletServers; } } } scanner.close(); } List<TabletServerStatus> tservers = new ArrayList<>(); if (Monitor.getMmi() != null) { for (TabletServerStatus tss : Monitor.getMmi().tServerInfo) { try { if (tss.name != null && locs.contains(tss.name)) tservers.add(tss); } catch (Exception ex) { return tabletServers; } } } for (TabletServerStatus status : tservers) { if (status == null) status = NO_STATUS; TableInfo summary = TableInfoUtil.summarizeTableStats(status); if (tableId != null) summary = status.tableMap.get(tableId); if (summary == null) continue; TabletServer tabletServerInfo = new TabletServer(); tabletServerInfo.updateTabletServerInfo(status, summary); tabletServers.addTablet(tabletServerInfo); } return tabletServers; }