mansehajsingh commented on code in PR #10:
URL: https://github.com/apache/polaris-tools/pull/10#discussion_r2056916228
##########
polaris-synchronizer/cli/src/main/java/org/apache/polaris/tools/sync/polaris/SyncPolarisCommand.java:
##########
@@ -120,11 +121,23 @@ public class SyncPolarisCommand implements
Callable<Integer> {
)
private boolean haltOnFailure;
+ @CommandLine.Option(
+ names = {"--catalog-name-regex"},
+ description = "If specified, only catalogs with names that match the
provided RegEx will be staged for " +
+ "synchronization. This applies to catalogs on both the
source and target."
+ )
+ private String catalogNameRegex;
+
@Override
public Integer call() throws Exception {
- SynchronizationPlanner sourceParityPlanner = new
SourceParitySynchronizationPlanner();
- SynchronizationPlanner modificationAwareSourceParityPlanner = new
ModificationAwarePlanner(sourceParityPlanner);
- SynchronizationPlanner accessControlAwarePlanner = new
AccessControlAwarePlanner(modificationAwareSourceParityPlanner);
+ SynchronizationPlanner planner = new SourceParitySynchronizationPlanner();
+ planner = new ModificationAwarePlanner(planner);
+
+ if (catalogNameRegex != null) {
+ planner = new CatalogNameFilterPlanner(catalogNameRegex, planner);
+ }
+
+ planner = new AccessControlAwarePlanner(planner);
Review Comment:
I am working on something that may make this a bit more clear and explicit.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]