Search in sources :

Example 1 with StateChangelogStorageFactory

use of org.apache.flink.runtime.state.changelog.StateChangelogStorageFactory in project flink by apache.

the class StateChangelogStorageLoaderTest method testLoadPluginImplementation.

@Test
@SuppressWarnings("rawtypes")
public void testLoadPluginImplementation() throws IOException {
    StateChangelogStorageFactory factory = new TestStateChangelogStorageFactory();
    PluginManager pluginManager = getPluginManager(singletonList(factory).iterator());
    StateChangelogStorageLoader.initialize(pluginManager);
    StateChangelogStorage loaded = StateChangelogStorageLoader.load(new Configuration(), createUnregisteredTaskManagerJobMetricGroup());
    assertTrue(loaded instanceof TestStateChangelogStorage);
}
Also used : PluginManager(org.apache.flink.core.plugin.PluginManager) StateChangelogStorageFactory(org.apache.flink.runtime.state.changelog.StateChangelogStorageFactory) Configuration(org.apache.flink.configuration.Configuration) StateChangelogStorage(org.apache.flink.runtime.state.changelog.StateChangelogStorage) Test(org.junit.Test)

Aggregations

Configuration (org.apache.flink.configuration.Configuration)1 PluginManager (org.apache.flink.core.plugin.PluginManager)1 StateChangelogStorage (org.apache.flink.runtime.state.changelog.StateChangelogStorage)1 StateChangelogStorageFactory (org.apache.flink.runtime.state.changelog.StateChangelogStorageFactory)1 Test (org.junit.Test)1