use of io.druid.metadata.MetadataStorageConnector in project druid by druid-io.
the class ResetCluster method resetMetadataStore.
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);
}
}
use of io.druid.metadata.MetadataStorageConnector in project druid by druid-io.
the class CreateTables method run.
@Override
public void run() {
final Injector injector = makeInjector();
MetadataStorageConnector dbConnector = injector.getInstance(MetadataStorageConnector.class);
dbConnector.createDataSourceTable();
dbConnector.createPendingSegmentsTable();
dbConnector.createSegmentTable();
dbConnector.createRulesTable();
dbConnector.createConfigTable();
dbConnector.createTaskTables();
dbConnector.createAuditTable();
dbConnector.createSupervisorsTable();
}
Aggregations