@Override public void drop() throws IOException { try (HBaseDDLExecutor ddlExecutor = ddlExecutorFactory.get()) { tableUtil.dropTable(ddlExecutor, tableId); } }
@Override public void drop() throws IOException { try (HBaseDDLExecutor ddlExecutor = ddlExecutorFactory.get()) { tableUtil.dropTable(ddlExecutor, tableId); } }
@Override public void drop() throws IOException { try (HBaseDDLExecutor ddlExecutor = ddlExecutorFactory.get()) { tableUtil.dropTable(ddlExecutor, tableId); } }
@Override public void drop() throws IOException { try (HBaseDDLExecutor ddlExecutor = ddlExecutorFactory.get()) { tableUtil.dropTable(ddlExecutor, tableId); } }
/** * Deletes all tables in the specified namespace that satisfy the given {@link Predicate}. * * @param ddlExecutor the {@link HBaseAdmin} to use to communicate with HBase * @param namespaceId namespace for which the tables are being deleted * @param hConf The {@link Configuration} instance * @param predicate The {@link Predicate} to decide whether to drop a table or not * @throws IOException */ public void deleteAllInNamespace(HBaseDDLExecutor ddlExecutor, String namespaceId, Configuration hConf, Predicate<TableId> predicate) throws IOException { try (HBaseAdmin admin = new HBaseAdmin(hConf)) { for (TableId tableId : listTablesInNamespace(admin, namespaceId)) { if (predicate.apply(tableId)) { dropTable(ddlExecutor, tableId); } } } }
/** * Deletes all tables in the specified namespace that satisfy the given {@link Predicate}. * * @param ddlExecutor the {@link HBaseAdmin} to use to communicate with HBase * @param namespaceId namespace for which the tables are being deleted * @param hConf The {@link Configuration} instance * @param predicate The {@link Predicate} to decide whether to drop a table or not * @throws IOException */ public void deleteAllInNamespace(HBaseDDLExecutor ddlExecutor, String namespaceId, Configuration hConf, Predicate<TableId> predicate) throws IOException { try (HBaseAdmin admin = new HBaseAdmin(hConf)) { for (TableId tableId : listTablesInNamespace(admin, namespaceId)) { if (predicate.apply(tableId)) { dropTable(ddlExecutor, tableId); } } } }
private void drop(TableId tableId) throws IOException { try (HBaseDDLExecutor ddlExecutor = ddlExecutorFactory.get(); HBaseAdmin admin = new HBaseAdmin(hConf)) { if (tableUtil.tableExists(admin, tableId)) { tableUtil.dropTable(ddlExecutor, tableId); } } }
@Override protected void dropTable(TableId tableId) throws IOException { try (HBaseDDLExecutor ddlExecutor = ddlExecutorFactory.get(); HBaseAdmin admin = new HBaseAdmin(hConf)) { TableId hBaseTableId = tableUtil.createHTableId(new NamespaceId(tableId.getNamespace()), tableId.getTableName()); if (tableUtil.tableExists(admin, hBaseTableId)) { tableUtil.dropTable(ddlExecutor, hBaseTableId); } } }
@Override public synchronized void dropAllInNamespace(NamespaceId namespace) throws IOException { try (HBaseDDLExecutor executor = ddlExecutorFactory.get(); HBaseAdmin admin = new HBaseAdmin(hConf)) { TableId tableId = StreamUtils.getStateStoreTableId(namespace); TableId hbaseTableId = tableUtil.createHTableId(new NamespaceId(tableId.getNamespace()), tableId.getTableName()); if (tableUtil.tableExists(admin, hbaseTableId)) { tableUtil.dropTable(executor, hbaseTableId); } } } }
private void drop(TableId tableId) throws IOException { HBaseTableUtil tableUtil = getTableUtil(); TableId hTableId = tableUtil.createHTableId(new NamespaceId(tableId.getNamespace()), tableId.getTableName()); tableUtil.dropTable(ddlExecutor, hTableId); }