Class Config

  • All Implemented Interfaces:
    Serializable

    public final class Config
    extends Object
    implements Serializable
    Config is the way users configure the execution of the topology. Things like streamlet delivery semantics, resources used, as well as user-defined key/value pairs are passed on to the topology runner via this class.
    See Also:
    Serialized Form
    • Method Detail

      • defaultConfig

        public static Config defaultConfig()
        Sets the topology to use the default configuration: 100 megabytes of RAM per container, 1.0 CPUs per container, at-most-once delivery semantics, and the Kryo serializer.
      • newBuilder

        public static Config.Builder newBuilder()
        Returns a new Config.Builder that can be used to create a configuration object for Streamlet API topologies
      • getHeronConfig

        public Config getHeronConfig()
      • getPerContainerCpu

        public double getPerContainerCpu()
        Gets the CPU used per topology container
        Returns:
        the per-container CPU as a double
      • getPerContainerRam

        public long getPerContainerRam()
        Gets the RAM used per topology container as a number of bytes
        Returns:
        the per-container RAM in bytes
      • getPerContainerRamAsBytes

        public long getPerContainerRamAsBytes()
        Gets the RAM used per topology container as a number of bytes
        Returns:
        the per-container RAM in bytes
      • getPerContainerRamAsMegabytes

        public long getPerContainerRamAsMegabytes()
        Gets the RAM used per topology container as a number of megabytes
        Returns:
        the per-container RAM in megabytes
      • getPerContainerRamAsGigabytes

        public long getPerContainerRamAsGigabytes()
        Gets the RAM used per topology container as a number of gigabytes
        Returns:
        the per-container RAM in gigabytes
      • getDeliverySemantics

        public Config.DeliverySemantics getDeliverySemantics()
        Gets the delivery semantics applied to the topology
        Returns:
        the delivery semantics as an enum
      • getSerializer

        public Config.Serializer getSerializer()
        Gets the serializer used by the topology
        Returns:
        the serializer as an enum