Package org.apache.accumulo.core.conf
Class DeprecatedPropertyUtil
- java.lang.Object
-
- org.apache.accumulo.core.conf.DeprecatedPropertyUtil
-
public class DeprecatedPropertyUtil extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DeprecatedPropertyUtil.PropertyRenamer
-
Field Summary
Fields Modifier and Type Field Description static DeprecatedPropertyUtil.PropertyRenamer
MASTER_MANAGER_RENAMER
protected static List<DeprecatedPropertyUtil.PropertyRenamer>
renamers
Ordered list of renamers
-
Constructor Summary
Constructors Constructor Description DeprecatedPropertyUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
getReplacementName(String propertyName, BiConsumer<org.slf4j.Logger,String> loggerActionOnReplace)
Checks ifpropertyName
is a deprecated property name and return its replacement name, if one is available, or the original name if no replacement is available.
-
-
-
Field Detail
-
MASTER_MANAGER_RENAMER
public static final DeprecatedPropertyUtil.PropertyRenamer MASTER_MANAGER_RENAMER
-
renamers
protected static final List<DeprecatedPropertyUtil.PropertyRenamer> renamers
Ordered list of renamers
-
-
Method Detail
-
getReplacementName
public static String getReplacementName(String propertyName, BiConsumer<org.slf4j.Logger,String> loggerActionOnReplace)
Checks ifpropertyName
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 nameloggerActionOnReplace
- the action to execute, if not null, if a replacement name was found- Returns:
- either the replacement for
propertyName
, orpropertyName
if the property is not deprecated
-
-