Class ResourceCompiler


  • public class ResourceCompiler
    extends Object
    This class does full or partial program recompilation based on given runtime program. It uses the methods provided by hops.recompile.Recompiler). It keeps a state of the current recompilation phase in order to decide when to do full recompilation and when not.
    • Constructor Detail

      • ResourceCompiler

        public ResourceCompiler()
    • Method Detail

      • doFullRecompilation

        public static Program doFullRecompilation​(Program program,
                                                  long driverMemory,
                                                  int driverCores)
        Recompiling a given program for resource optimization for single node execution
        Parameters:
        program - program to be recompiled
        driverMemory - target driver memory
        driverCores - target driver threads/cores
        Returns:
        the recompiled program as a new Program instance
      • doFullRecompilation

        public static Program doFullRecompilation​(Program program,
                                                  long driverMemory,
                                                  int driverCores,
                                                  int numberExecutors,
                                                  long executorMemory,
                                                  int executorCores)
        Recompiling a given program for resource optimization for Spark execution
        Parameters:
        program - program to be recompiled
        driverMemory - target driver memory
        driverCores - target driver threads/cores
        numberExecutors - target number of executor nodes
        executorMemory - target executor memory
        executorCores - target executor threads/cores
        Returns:
        the recompiled program as a new Program instance
      • setDriverConfigurations

        public static void setDriverConfigurations​(long nodeMemory,
                                                   int nodeNumCores)
      • setExecutorConfigurations

        public static void setExecutorConfigurations​(int numExecutors,
                                                     long nodeMemory,
                                                     int nodeNumCores)
      • setSingleNodeExecution

        public static void setSingleNodeExecution()