Class FlowConfig

    • Field Detail

      • CURRENT_TIME_LAST_SWITCHED_POLICY

        public static org.apache.beam.sdk.transforms.SerializableBiFunction<Long,​FlowDocuments.FlowData,​org.joda.time.Instant> CURRENT_TIME_LAST_SWITCHED_POLICY
        Returns a function that always return the current time instant.
      • minExporter

        public final int minExporter
        Exporter numbers are generated uniformly starting at minExporter.
      • numExporters

        public final int numExporters
      • minInterface

        public final int minInterface
        Interface numbers are generated uniformly starting at minInterface.
      • numInterfaces

        public final int numInterfaces
      • numProtocols

        public final int numProtocols
      • numApplications

        public final int numApplications
      • numHosts

        public final int numHosts
      • numEcns

        public final int numEcns
      • numDscps

        public final int numDscps
      • lastSwitched

        public final org.apache.beam.sdk.transforms.SerializableBiFunction<Long,​FlowDocuments.FlowData,​org.joda.time.Instant> lastSwitched
        A function that given the index of a generated flow returns its lastSwitched timestamp. The returned lastSwitched time instant is additionally randomized by a normal distribution. Note: Function implementations must not be referentially transparent. Function implementations may ignore the function parameter and simply return the current time instant.
      • clockSkew

        public final org.apache.beam.sdk.transforms.SerializableFunction<Integer,​org.joda.time.Duration> clockSkew
        A function that given a nodeId returns the clockSkew for that node.
      • lastSwitchedSigma

        public final org.joda.time.Duration lastSwitchedSigma
        LastSwitched timestamps are randomized by a normal distribution with the given sigma.
      • flowDurationLambda

        public final double flowDurationLambda
        Flow durations are calculated using an exponential distribution. The random value returned by the exponential distribution is the flow length in seconds.
    • Constructor Detail

      • FlowConfig

        public FlowConfig​(int minExporter,
                          int numExporters,
                          int minInterface,
                          int numInterfaces,
                          int numProtocols,
                          int numApplications,
                          int numHosts,
                          int numEcns,
                          int numDscps,
                          org.apache.beam.sdk.transforms.SerializableBiFunction<Long,​FlowDocuments.FlowData,​org.joda.time.Instant> lastSwitched,
                          org.apache.beam.sdk.transforms.SerializableFunction<Integer,​org.joda.time.Duration> clockSkew,
                          org.joda.time.Duration lastSwitchedSigma,
                          double flowDurationLambda)
      • FlowConfig

        public FlowConfig​(FlowGenOptions opts,
                          org.apache.beam.sdk.transforms.SerializableBiFunction<Long,​FlowDocuments.FlowData,​org.joda.time.Instant> lastSwitched,
                          org.apache.beam.sdk.transforms.SerializableFunction<Integer,​org.joda.time.Duration> clockSkew)
    • Method Detail

      • linearIncreasingLastSwitchedPolicy

        public static org.apache.beam.sdk.transforms.SerializableBiFunction<Long,​FlowDocuments.FlowData,​org.joda.time.Instant> linearIncreasingLastSwitchedPolicy​(org.joda.time.Instant start,
                                                                                                                                                                              org.joda.time.Duration step)
        Calculates the lastSwitched timestamp linearly starting at start and increasing by step for each index.
      • uniformInWindowLastSwitchedPolicy

        public static org.apache.beam.sdk.transforms.SerializableBiFunction<Long,​FlowDocuments.FlowData,​org.joda.time.Instant> uniformInWindowLastSwitchedPolicy​(FlowGenOptions opts)
        Calculates the lastSwitched timestamp uniformly distributed according to the configured start, window size, and number of flows per window.