Class PruneBasedEnumerator


  • public class PruneBasedEnumerator
    extends Enumerator
    • Constructor Detail

    • Method Detail

      • preprocessing

        public void preprocessing()
        Description copied from class: Enumerator
        Called once to enumerate the search space for VM instances for driver or executor nodes. These instances are being represented as
        Specified by:
        preprocessing in class Enumerator
      • processing

        public void processing()
        Description copied from class: Enumerator
        Called once after preprocessing to fill the pool with optimal solutions by parsing the enumerated search space. Within its execution the number of potential executor nodes is being estimated (enumerated) dynamically for each parsed executor instance.
        Overrides:
        processing in class Enumerator
      • estimateRangeExecutors

        public ArrayList<Integer> estimateRangeExecutors​(int driverCores,
                                                         long executorMemory,
                                                         int executorCores)
        Description copied from class: Enumerator
        Estimates the minimum and maximum number of executors based on given VM instance characteristics, the enumeration strategy and the user-defined configurations
        Specified by:
        estimateRangeExecutors in class Enumerator
        Parameters:
        driverCores - CPU cores for the currently evaluated driver node
        executorMemory - memory of currently evaluated executor node
        executorCores - CPU cores of currently evaluated executor node
        Returns:
        - [min, max]
      • combineHash

        public static long combineHash​(long executorMemory,
                                       int cores)
        Ensures unique mapping for a combination of node memory and number of executor cores due to the discrete nature of the node memory given in bytes. The smallest margin for cloud instances would be around 500MB ~ 500*1024^2 bytes, what is by far larger than the maximum number of executors core physically possible.
        Parameters:
        executorMemory - node memory in bytes
        cores - number virtual cores (physical threads) for the node
        Returns:
        hash value
      • isInvalidConfiguration

        public static boolean isInvalidConfiguration​(double[] estimates)
      • hasSparkInstructions

        public static boolean hasSparkInstructions​(Program program)
        Checks for Spark instruction in the given runtime program. It excludes from the check instructions for reblock operations and for caching since these are not always remove from the runtime program even their outputs are never used and ignored at execution.
        Parameters:
        program - runtime program
        Returns:
        boolean to mark if the execution would execute any Spark operation