Class InstanceUtils


  • public class InstanceUtils
    extends Object
    • Method Detail

      • getHelixInstanceId

        public static String getHelixInstanceId​(Instance instance)
        Returns the Helix instance id (e.g. Server_localhost_1234) for the given instance.
      • getServerAdminEndpoint

        public static String getServerAdminEndpoint​(org.apache.helix.model.InstanceConfig instanceConfig)
      • getServerAdminEndpoint

        public static String getServerAdminEndpoint​(org.apache.helix.model.InstanceConfig instanceConfig,
                                                    String hostname,
                                                    String defaultProtocol)
      • toHelixInstanceConfig

        public static org.apache.helix.model.InstanceConfig toHelixInstanceConfig​(Instance instance)
        Returns the Helix InstanceConfig for the given instance.
      • updateHelixInstanceConfig

        public static void updateHelixInstanceConfig​(org.apache.helix.model.InstanceConfig instanceConfig,
                                                     Instance instance)
        Updates the Helix InstanceConfig with the given instance configuration. Leaves the fields not included in the instance configuration unchanged.