public void refreshHFiles(final TableName tableName) throws Throwable { try (Table table = connection.getTable(tableName)) { refreshHFiles(table); } }
@Override public int run(String[] args) throws Exception { if (args.length != 1) { String message = "When there are multiple HBase clusters are sharing a common root dir, " + "especially for read replica cluster (see detail in HBASE-18477), please consider to " + "use this tool manually sync the flushed HFiles from the source cluster."; message += "\nUsage: " + this.getClass().getName() + " tableName"; System.out.println(message); return -1; } final TableName tableName = TableName.valueOf(args[0]); try { refreshHFiles(tableName); } catch (Throwable t) { LOG.error("Refresh HFiles from table " + tableName.getNameAsString() + " failed: ", t); return -1; } return 0; }
private void callRefreshRegionHFilesEndPoint() throws IOException { try { RefreshHFilesClient refreshHFilesClient = new RefreshHFilesClient(CONF); refreshHFilesClient.refreshHFiles(TABLE_NAME); } catch (RetriesExhaustedException rex) { if (rex.getCause() instanceof IOException) throw new IOException(); } catch (Throwable ex) { LOG.error(ex.toString(), ex); fail("Couldn't call the RefreshRegionHFilesEndpoint"); } }
public void refreshHFiles(final TableName tableName) throws Throwable { try (Table table = connection.getTable(tableName)) { refreshHFiles(table); } }
private void callRefreshRegionHFilesEndPoint() throws IOException { try { RefreshHFilesClient refreshHFilesClient = new RefreshHFilesClient(CONF); refreshHFilesClient.refreshHFiles(TABLE_NAME); } catch (RetriesExhaustedException rex) { if (rex.getCause() instanceof IOException) throw new IOException(); } catch (Throwable ex) { LOG.error(ex.toString(), ex); fail("Couldn't call the RefreshRegionHFilesEndpoint"); } }
private void callRefreshRegionHFilesEndPoint() throws IOException { try { RefreshHFilesClient refreshHFilesClient = new RefreshHFilesClient(CONF); refreshHFilesClient.refreshHFiles(TABLE_NAME); } catch (RetriesExhaustedException rex) { if (rex.getCause() instanceof IOException) throw new IOException(); } catch (Throwable ex) { LOG.error(ex.toString(), ex); fail("Couldn't call the RefreshRegionHFilesEndpoint"); } }