Class SupervisorUtils


  • public class SupervisorUtils
    extends Object
    • Constructor Detail

      • SupervisorUtils

        public SupervisorUtils()
    • Method Detail

      • resetInstance

        public static void resetInstance()
      • getNumaIdForPort

        public static String getNumaIdForPort​(Integer port,
                                              Map<String,​Object> supervisorConf)
        getNumaIdForPort for a specific supervisor.
        Parameters:
        port - port
        supervisorConf - supervisorConf
        Returns:
        getNumaIdForPort
      • getNumaPorts

        public static Set<Integer> getNumaPorts​(Map<String,​Object> supervisorConf)
        gets the set of all configured numa ports for a specific supervisor.
        Parameters:
        supervisorConf - supervisorConf
        Returns:
        set of all numa ports
      • shouldUncompressBlob

        public static boolean shouldUncompressBlob​(Map<String,​Object> blobInfo)
        Given the blob information returns the value of the uncompress field, handling it being a boolean value, or if it's not specified then returns false.
      • blobNeedsWorkerRestart

        public static boolean blobNeedsWorkerRestart​(Map<String,​Object> blobInfo)
        Given the blob information returns the value of the workerRestart field, handling it being a boolean value, or if it's not specified then returns false.
        Parameters:
        blobInfo - the info for the blob.
        Returns:
        true if the blob needs a worker restart by way of the callback else false.
      • blobstoreMapToLocalresources

        public static List<LocalResource> blobstoreMapToLocalresources​(Map<String,​Map<String,​Object>> blobstoreMap)
        Returns a list of LocalResources based on the blobstore-map passed in.
      • getNumaMap

        public static Map<String,​Object> getNumaMap​(Map<String,​Object> stormConf)
        Return supervisor numa configuration.
        Parameters:
        stormConf - stormConf
        Returns:
        getNumaMap