Class DeprecatedPropertyUtil


  • public class DeprecatedPropertyUtil
    extends Object
    • Constructor Detail

      • DeprecatedPropertyUtil

        public DeprecatedPropertyUtil()
    • Method Detail

      • getReplacementName

        public static String getReplacementName​(String propertyName,
                                                BiConsumer<org.slf4j.Logger,​String> loggerActionOnReplace)
        Checks if propertyName is a deprecated property name and return its replacement name, if one is available, or the original name if no replacement is available. If a property has a replacement that itself was replaced, this method will return the final recommended property, after processing each replacement in order. If the final name has changed from the original name, the logging action is triggered with a provided logger, the original name, and the replacement name.

        This is expected to be used only with system properties stored in the SiteConfiguration and ZooConfiguration, and not for per-table or per-namespace configuration in ZooKeeper.

        Parameters:
        propertyName - the name of the potentially deprecated property to check for a replacement name
        loggerActionOnReplace - the action to execute, if not null, if a replacement name was found
        Returns:
        either the replacement for propertyName, or propertyName if the property is not deprecated