public static void main(String[] args) { StateStorageTool tool = new StateStorageTool(); OptionSet options = tool.parser().parse(args); MapConfig config = tool.loadConfig(options); String path = tool.getPath(); StorageRecovery storageRecovery = new StorageRecovery(config, path); storageRecovery.run(); } }
public static void main(String[] args) { StateStorageTool tool = new StateStorageTool(); OptionSet options = tool.parser().parse(args); MapConfig config = tool.loadConfig(options); String path = tool.getPath(); StorageRecovery storageRecovery = new StorageRecovery(config, path); storageRecovery.run(); } }
public static void main(String[] args) { StateStorageTool tool = new StateStorageTool(); OptionSet options = tool.parser().parse(args); MapConfig config = tool.loadConfig(options); String path = tool.getPath(); StorageRecovery storageRecovery = new StorageRecovery(config, path); storageRecovery.run(); } }
public static void main(String[] args) { StateStorageTool tool = new StateStorageTool(); OptionSet options = tool.parser().parse(args); MapConfig config = tool.loadConfig(options); String path = tool.getPath(); StorageRecovery storageRecovery = new StorageRecovery(config, path); storageRecovery.run(); } }
@Test public void testStorageEngineReceivedAllValues() { MockCoordinatorStreamSystemFactory.enableMockConsumerCache(); StorageRecovery storageRecovery = new StorageRecovery(config, path); storageRecovery.run(); // because the stream has two partitions assertEquals(2, MockStorageEngine.incomingMessageEnvelopes.size()); assertEquals(msg, MockStorageEngine.incomingMessageEnvelopes.get(0)); assertEquals(msg, MockStorageEngine.incomingMessageEnvelopes.get(1)); // correct path is passed to the store engine String expectedStoreDir = String.format("%s/state/%s/Partition_", path, STORE_NAME); String actualStoreDir = MockStorageEngine.storeDir.toString(); assertEquals(expectedStoreDir, actualStoreDir.substring(0, actualStoreDir.length() - 1)); }
public static void main(String[] args) { StateStorageTool tool = new StateStorageTool(); OptionSet options = tool.parser().parse(args); MapConfig config = tool.loadConfig(options); String path = tool.getPath(); StorageRecovery storageRecovery = new StorageRecovery(config, path); storageRecovery.run(); } }