Class ConfigUtils


  • public class ConfigUtils
    extends Object
    • Constructor Detail

      • ConfigUtils

        public ConfigUtils()
    • Method Detail

      • getClientConfigStr

        public static String getClientConfigStr​(String configData)
      • getPropertyBackwardCompatibleWay

        public static String getPropertyBackwardCompatibleWay​(String newPropertyKey)
        Some old configuration properties are not configurable in zookeeper configuration file zoo.cfg. To make these properties configurable in zoo.cfg old properties are prepended with zookeeper. For example prop.x.y.z changed to zookeeper.prop.x.y.z. But for backward compatibility both prop.x.y.z and zookeeper.prop.x.y.z should be supported. This method first gets value from new property, if first property is not configured then gets value from old property
        Parameters:
        newPropertyKey - new property key which starts with zookeeper.
        Returns:
        either new or old system property value. Null if none of the properties are set.