use of org.apache.drill.exec.store.mock.MockBreakageStorage.MockBreakageStorageEngineConfig in project drill by apache.
the class ClusterMockStorageFixture method insertMockStorage.
/**
* This should be called after bits are started
* @param name the mock storage name we are going to create
*/
public void insertMockStorage(String name, boolean breakRegisterSchema) {
for (Drillbit bit : drillbits()) {
// Bit name and registration.
final StoragePluginRegistry pluginRegistry = bit.getContext().getStorage();
MockBreakageStorage plugin;
try {
MockBreakageStorageEngineConfig config = MockBreakageStorageEngineConfig.INSTANCE;
config.setEnabled(true);
pluginRegistry.put(name, config);
plugin = (MockBreakageStorage) pluginRegistry.getPlugin(name);
} catch (PluginException e) {
throw new IllegalStateException(e);
}
plugin.setBreakRegister(breakRegisterSchema);
}
}
Aggregations