@Override public void clearTableRegionCache(byte[] tableName) throws SQLException { connection.clearRegionCache(tableName); }
/** * Explicitly clears the region cache to fetch the latest value from META. * This is a power user function: avoid unless you know the ramifications. */ public void clearRegionCache() { this.connection.clearRegionCache(); }
@Override public void clearErrors(int threadID) { try { System.err.println("Clearing region cache in threadId " + threadID); HConnection hm = table.getConnection(); hm.clearRegionCache(); } catch (Throwable e) { e.printStackTrace(); return; } }
@Override protected Void postOperationResult(final Void result, final long deadlineTs) throws IOException, TimeoutException { // Delete cached information to prevent clients from using old locations getAdmin().getConnection().clearRegionCache(tableName); LOG.info("Deleted " + tableName); return result; }
HConnection hconn = this.tableNameToHConnectionMap.get(tableName); try { hconn.clearRegionCache(); hconn.close(); } catch (IOException ioe) {
protected void truncateTable(byte[] tableName) throws IOException { HBaseAdmin admin = new HBaseAdmin(conf); HTableDescriptor desc = admin.getTableDescriptor(tableName); admin.disableTable(tableName); admin.deleteTable(tableName); admin.createTable(desc); connection.clearRegionCache(tableName); admin.close(); }
this.connection.clearRegionCache(tableName); LOG.info("Deleted " + Bytes.toString(tableName));