This message was deleted.
# general
s
This message was deleted.
x
Copy code
String SYSTEM_STORE_NAME_PREFIX = "venice_system_store_";
^ this might be what you are lookin for
z
Yup, that's it
k
Thanks @Xin(Adam) Chen. Would concatenating this with storeName yield the pattern that you had in mind? @Zac Policzer?
z
It'll be something like:
Copy code
venice_system_store_<system_store_name>_<storeName>
k
Gotcha. Thank you.
Hey @Zac Policzer, I'm a bit confused on where you're getting
system_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:
Copy code
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));
Actually, I think I figured it out. I'm using
getSystemStoreName
and I'm using it within the pattern to compare it with the store name that comes from
getClusterStores
. How does this look?
Copy code
// 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));
z
I think I that looks right
k
Alright. I’ll go ahead and open a PR. Thanks for the help. @Zac Policzer
z
No, thank YOU!
❤️ 1
k
I'll try to open it tomorrow. I'm waiting on my MacBook delivery so I can run the integration tests.
🎉 1