private String getSupervisorsTable() { return dbTables.get().getSupervisorTable(); } }
@Override public void createSupervisorsTable() { if (config.get().isCreateTables()) { createSupervisorsTable(tablesConfigSupplier.get().getSupervisorTable()); } }
@Override public Void withHandle(Handle handle) { handle.createStatement(StringUtils.format("DROP TABLE %s", tablesConfig.getSupervisorTable())) .execute(); return null; } }
private void resetMetadataStore(Injector injector) { log.info("==========================================================================="); log.info("Deleting all Records from Metadata Storage."); log.info("==========================================================================="); MetadataStorageConnector connector = injector.getInstance(MetadataStorageConnector.class); MetadataStorageTablesConfig tablesConfig = injector.getInstance(MetadataStorageTablesConfig.class); String[] tables = new String[]{ tablesConfig.getDataSourceTable(), tablesConfig.getPendingSegmentsTable(), tablesConfig.getSegmentsTable(), tablesConfig.getRulesTable(), tablesConfig.getConfigTable(), tablesConfig.getTasksTable(), tablesConfig.getTaskLockTable(), tablesConfig.getTaskLogTable(), tablesConfig.getAuditTable(), tablesConfig.getSupervisorTable() }; for (String table : tables) { connector.deleteAllRecords(table); } }
); Assert.assertEquals(props.getProperty("druid.metadata.storage.tables.dataSource"), config.getDataSourceTable()); Assert.assertEquals(props.getProperty("druid.metadata.storage.tables.supervisors"), config.getSupervisorTable());
tables.add(tablesConfig.getEntryTable(entryType)); tables.add(tablesConfig.getAuditTable()); tables.add(tablesConfig.getSupervisorTable());
private String getSupervisorsTable() { return dbTables.get().getSupervisorTable(); } }
@Override public void createSupervisorsTable() { if (config.get().isCreateTables()) { createSupervisorsTable(tablesConfigSupplier.get().getSupervisorTable()); } }
private void resetMetadataStore(Injector injector) { log.info("==========================================================================="); log.info("Deleting all Records from Metadata Storage."); log.info("==========================================================================="); MetadataStorageConnector connector = injector.getInstance(MetadataStorageConnector.class); MetadataStorageTablesConfig tablesConfig = injector.getInstance(MetadataStorageTablesConfig.class); String[] tables = new String[]{ tablesConfig.getDataSourceTable(), tablesConfig.getPendingSegmentsTable(), tablesConfig.getSegmentsTable(), tablesConfig.getRulesTable(), tablesConfig.getConfigTable(), tablesConfig.getTasksTable(), tablesConfig.getTaskLockTable(), tablesConfig.getTaskLogTable(), tablesConfig.getAuditTable(), tablesConfig.getSupervisorTable() }; for (String table : tables) { connector.deleteAllRecords(table); } }