Ejemplo n.º 1
0
        /// <summary>
        /// Send late arriving data to the side output identified by the given <param name="outputTag"></param>.
        /// Data is considered late after the watermark has passed the end of the window plus the allowed lateness set using <see cref="AllowedLateness"/>.
        /// </summary>
        /// <param name="outputTag"></param>
        /// <returns></returns>
        public AllWindowedStream <TElement, TWindow> SideOutputLateData(OutputTag <TElement> outputTag)
        {
            Preconditions.CheckNotNull(outputTag, "Side output tag must not be null.");

            _lateDataOutputTag = _input.ExecutionEnvironment.Clean(outputTag);
            return(this);
        }
Ejemplo n.º 2
0
            public void Output <T>(OutputTag <T> outputTag, T value)
            {
                if (outputTag == null)
                {
                    throw new IllegalArgumentException("OutputTag must not be null.");
                }

                _output.Collect(outputTag, new StreamRecord <T>(value, Window.MaxTimestamp));
            }
Ejemplo n.º 3
0
        public void Collect <T>(OutputTag <T> outputTag, StreamRecord <T> record)
        {
            if (_outputTag == null || !_outputTag.Equals(outputTag))
            {
                // we are not responsible for emitting to the side-output specified by this OutputTag.
                return;
            }

            PushToRecordWriter(record);
        }
Ejemplo n.º 4
0
        public StreamEdge(StreamNode sourceVertex, StreamNode targetVertex, int typeNumber,
                          IList <string> selectedNames, StreamPartitioner <object> outputPartitioner, OutputTag <object> outputTag,
                          ShuffleMode shuffleMode)
        {
            SourceId           = sourceVertex.Id;
            TargetId           = targetVertex.Id;
            TypeNumber         = typeNumber;
            SelectedNames      = selectedNames;
            OutputPartitioner  = outputPartitioner;
            OutputTag          = outputTag;
            SourceOperatorName = sourceVertex.OperatorName;
            TargetOperatorName = targetVertex.OperatorName;
            ShuffleMode        = Preconditions.CheckNotNull(shuffleMode);

            EdgeId = sourceVertex + "_" + targetVertex + "_" + typeNumber + "_" + selectedNames + "_" + outputPartitioner;
        }
Ejemplo n.º 5
0
        public RecordWriterOutput(
            RecordWriter <SerializationDelegate <StreamElement> > recordWriter,
            TypeSerializer <TOutput> outSerializer,
            OutputTag <TOutput> outputTag,
            IStreamStatusProvider streamStatusProvider)
        {
            Preconditions.CheckNotNull(recordWriter);

            _outputTag            = outputTag;
            _streamStatusProvider = streamStatusProvider;

            if (outSerializer != null)
            {
                var outRecordSerializer = new StreamElementSerializer <TOutput>(outSerializer);
                _serializationDelegate = new SerializationDelegate <StreamElement>(outRecordSerializer);
            }

            _streamStatusProvider = Preconditions.CheckNotNull(streamStatusProvider);
        }
Ejemplo n.º 6
0
 /// <summary>
 /// Emits a record to the side output identified.
 /// </summary>
 /// <typeparam name="T">The record type.</typeparam>
 /// <param name="outputTag">Identifies the side output to emit to.</param>
 /// <param name="value">The record to emit.</param>
 public abstract void Output <T>(OutputTag <T> outputTag, T value);
 public SideOutputTransformation(Transformation <T> input, OutputTag <T> tag)
     : base("SideOutput", tag.TypeInfo, input.Parallelism)
 {
     Input     = input;
     OutputTag = tag;
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Send late arriving data to the side output identified by the given <see cref="OutputTag{T}"/>. Data is considered late after the watermark has passed the end of the window plus the allowed lateness set using <see cref="AllowedLateness"/>.
 /// </summary>
 /// <param name="outputTag"></param>
 /// <returns></returns>
 public WindowedStream <TElement, TKey, TWindow> SideOutputLateData(OutputTag <TElement> outputTag)
 {
     return(null);
 }
Ejemplo n.º 9
0
 public StreamEdge(StreamNode sourceVertex, StreamNode targetVertex, int typeNumber,
                   List <string> selectedNames, StreamPartitioner <object> outputPartitioner, OutputTag <object> outputTag)
     : this(sourceVertex,
            targetVertex,
            typeNumber,
            selectedNames,
            outputPartitioner,
            outputTag,
            ShuffleMode.Undefined)
 {
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Emits a record to the side output identified.
 /// </summary>
 /// <typeparam name="TRecord"></typeparam>
 /// <param name="outputTag">Identifies the side output to emit to.</param>
 /// <param name="value">value The record to emit.</param>
 public abstract void Output <TRecord>(OutputTag <TRecord> outputTag, TRecord value);