keith-turner commented on a change in pull request #1873:
URL: https://github.com/apache/accumulo/pull/1873#discussion_r561289289
##########
File path:
server/manager/src/main/java/org/apache/accumulo/master/upgrade/Upgrader9to10.java
##########
@@ -201,6 +204,39 @@ private void upgradeRootTabletMetadata(ServerContext ctx) {
delete(ctx, ZROOT_TABLET_PATH);
}
+ @SuppressWarnings("removal")
+ @Deprecated(since = "2.1.0", forRemoval = true)
+ private void renameMasterProps(ServerContext ctx) {
+ try {
+ // Figure out which props with the "master." prefix are set only in
Zookeeper. If
+ // a property exists in the config and is either not set in the site
config, or has
+ // a different value from the site config, then the property is set in
zookeeper
+ // and we want to upgrade.
+ HashMap<String,String> configProps = new HashMap<>();
+ HashMap<String,String> siteProps = new HashMap<>();
+ ctx.getConfiguration().getProperties(configProps,
+ p ->
p.startsWith(DeprecatedPropertyUtil.MasterPropertyRenamer.MASTER_PREFIX));
+ ctx.getSiteConfiguration().getProperties(siteProps,
+ p ->
p.startsWith(DeprecatedPropertyUtil.MasterPropertyRenamer.MASTER_PREFIX));
+ configProps.entrySet().removeIf(
+ e -> siteProps.containsKey(e.getKey()) &&
e.getValue().equals(siteProps.get(e.getKey())));
Review comment:
I missed that configProps was a union of the site config and ZK config,
I see what you are trying to do now.
> Is there another utility for retrieving ZK properties while ignoring the
contents of the site file
Looking around in the code, one way might be to create a ZooConfiguration
object directly with an empty parent.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]