Slackbot
12/01/2023, 4:45 AMXin(Adam) Chen
12/01/2023, 6:05 PMString SYSTEM_STORE_NAME_PREFIX = "venice_system_store_";
^ this might be what you are lookin forZac Policzer
12/01/2023, 7:44 PMKoorous Vargha
12/01/2023, 7:46 PMZac Policzer
12/01/2023, 7:47 PMvenice_system_store_<system_store_name>_<storeName>Koorous Vargha
12/01/2023, 7:48 PMKoorous Vargha
12/02/2023, 12:09 AMsystem_store_name from and what string we're comparing the pattern against.
This is what I have right now, but I'm comparing the name of the system store with a string that contains a substring of the system store name which should never return True:
Stream<String> allSrcStoreNames = srcControllerClient.getClusterStores(srcClusterName).stream().filter(storeInfo -> storeInfo.getName().matches(SYSTEM_STORE_NAME_PREFIX + storeInfo.getName() + "_" + storeName));
Stream<String> allDestStoreNames = destControllerClient.getClusterStores(destClusterName).stream().filter(storeInfo -> storeInfo.getName().matches(SYSTEM_STORE_NAME_PREFIX + storeInfo.getName() + "_" + storeName));
allSrcStoreNames.forEach(srcStorename -> printMigrationStatus(srcControllerClient, srcStorename));
allDestStoreNames.forEach(destStorename -> printMigrationStatus(destControllerClient, destStorename));Koorous Vargha
12/02/2023, 12:41 AMgetSystemStoreName and I'm using it within the pattern to compare it with the store name that comes from getClusterStores.
How does this look?
// Check the migration status for all source and destination system stores
String systemStoreType = getRequiredArgument(cmd, Arg.SYSTEM_STORE_TYPE, Command.BACKFILL_SYSTEM_STORES);
Stream<String> allSrcStoreNames = srcControllerClient.getClusterStores(srcClusterName).stream().filter(storeInfo -> storeInfo.getName().matches(SYSTEM_STORE_NAME_PREFIX + getSystemStoreName(storeInfo, systemStoreType) + "_" + storeName));
Stream<String> allDestStoreNames = destControllerClient.getClusterStores(destClusterName).stream().filter(storeInfo -> storeInfo.getName().matches(SYSTEM_STORE_NAME_PREFIX + getSystemStoreName(storeInfo, systemStoreType) + "_" + storeName));
allSrcStoreNames.forEach(srcStorename -> printMigrationStatus(srcControllerClient, srcStorename));
allDestStoreNames.forEach(destStorename -> printMigrationStatus(destControllerClient, destStorename));Zac Policzer
12/02/2023, 12:47 AMKoorous Vargha
12/02/2023, 12:49 AMZac Policzer
12/02/2023, 12:51 AMKoorous Vargha
12/02/2023, 1:07 AM