use of org.apache.jackrabbit.oak.upgrade.cli.node.TarNodeStore in project jackrabbit-oak by apache.
the class RepositorySidegrade method verify.
private void verify() {
final NodeState sourceRoot;
final NodeState targetRoot;
if (source instanceof TarNodeStore && target instanceof TarNodeStore) {
sourceRoot = ((TarNodeStore) source).getSuperRoot();
targetRoot = ((TarNodeStore) target).getSuperRoot();
} else {
sourceRoot = source.getRoot();
targetRoot = target.getRoot();
}
final NodeState reportingSource = ReportingNodeState.wrap(sourceRoot, new LoggingReporter(LOG, "Verifying", LOG_NODE_COPY, -1));
LOG.info("Verifying whether repositories are identical");
if (targetRoot.compareAgainstBaseState(reportingSource, new LoggingEqualsDiff(LOG, "/"))) {
LOG.info("Verification result: both repositories are identical");
} else {
LOG.warn("Verification result: repositories are not identical");
}
}
Aggregations