@Override public RunCatalogScanResponse runCatalogScan(RpcController c, RunCatalogScanRequest req) throws ServiceException { try { master.checkInitialized(); return ResponseConverter.buildRunCatalogScanResponse(master.catalogJanitorChore.scan()); } catch (IOException ioe) { throw new ServiceException(ioe); } }
@Override public RunCatalogScanResponse runCatalogScan(RpcController c, RunCatalogScanRequest req) throws ServiceException { try { return ResponseConverter.buildRunCatalogScanResponse(catalogJanitorChore.scan()); } catch (IOException ioe) { throw new ServiceException(ioe); } }
/** * Creates a response for the catalog scan request * @return A RunCatalogScanResponse */ public static RunCatalogScanResponse buildRunCatalogScanResponse(int numCleaned) { return RunCatalogScanResponse.newBuilder().setScanResult(numCleaned).build(); }