Interface IRepacking

  • All Superinterfaces:
    AutoCloseable

    @LimitedPrivate
    @Unstable
    public interface IRepacking
    extends AutoCloseable
    Packing algorithm for adding and/or removing component instances from an existing packing plan Packing hints like number of containers may be passed through scheduler config.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void close()
      This is to for disposing or cleaning up any internal state.
      void initialize​(Config config, org.apache.heron.api.generated.TopologyAPI.Topology topology)
      Initialize the packing algorithm with the static config and the associated topology
      PackingPlan repack​(PackingPlan currentPackingPlan, int containers, Map<String,​Integer> componentChanges)
      Generates a new packing given an existing packing and component changes Packing algorithm output generates instance id and container id.
      PackingPlan repack​(PackingPlan currentPackingPlan, Map<String,​Integer> componentChanges)
      Generates a new packing given an existing packing and component changes Packing algorithm output generates instance id and container id.
    • Method Detail

      • initialize

        void initialize​(Config config,
                        org.apache.heron.api.generated.TopologyAPI.Topology topology)
        Initialize the packing algorithm with the static config and the associated topology
        Parameters:
        config - topology config
        topology - topology to repack
      • repack

        PackingPlan repack​(PackingPlan currentPackingPlan,
                           Map<String,​Integer> componentChanges)
                    throws PackingException
        Generates a new packing given an existing packing and component changes Packing algorithm output generates instance id and container id.
        Parameters:
        currentPackingPlan - Existing packing plan
        componentChanges - Map < componentName, new component parallelism > that contains the parallelism for each component whose parallelism has changed.
        Returns:
        PackingPlan describing the new packing plan.
        Throws:
        PackingException - if the packing plan can not be generated
      • repack

        PackingPlan repack​(PackingPlan currentPackingPlan,
                           int containers,
                           Map<String,​Integer> componentChanges)
                    throws PackingException
        Generates a new packing given an existing packing and component changes Packing algorithm output generates instance id and container id.
        Parameters:
        currentPackingPlan - Existing packing plan
        componentChanges - Map < componentName, new component parallelism > that contains the parallelism for each component whose parallelism has changed.
        containers - < the new number of containers for the topology specified by the user
        Returns:
        PackingPlan describing the new packing plan.
        Throws:
        PackingException - if the packing plan can not be generated
      • close

        void close()
        This is to for disposing or cleaning up any internal state. Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect.
        Specified by:
        close in interface AutoCloseable