Package org.apache.heron.spi.packing
Interface IPacking
-
- All Superinterfaces:
AutoCloseable
@LimitedPrivate @Unstable public interface IPacking extends AutoCloseable
Packing algorithm to use for packing multiple instances into containers. Packing hints like number of containers may be passed through scheduler config. Configs might contain settings for the number of containers requested or the amount of instance or container resources to allocate. Implementations may choose to ignore some or all of these settings as needed, since they could be contradictory, or not all possible to be achieved based on the algorithm.
-
-
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 accumulated by the uploadervoid
initialize(Config config, org.apache.heron.api.generated.TopologyAPI.Topology topology)
Initialize the packing algorithm with the static config and the topologyPackingPlan
pack()
Called by scheduler to generate container packing.
-
-
-
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 topology
-
pack
PackingPlan pack() throws PackingException
Called by scheduler to generate container packing. Packing algorithm output generates instance id and container id.- Returns:
- PackingPlan describing the job to schedule.
- Throws:
PackingException
- if the packing plan can not be generated
-
close
void close()
This is to for disposing or cleaning up any internal state accumulated by the uploaderCloses 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 interfaceAutoCloseable
-
-