コード例 #1
0
        public override void WriteToTopology(InternalTopologyBuilder builder)
        {
            string leftProcessorName          = JoinLeftParams.ProcessorName;
            string rightProcessorName         = JoinRightParams.ProcessorName;
            string windowedLeftProcessorName  = windowedLeftParams.ProcessorName;
            string windowedRightProcessorName = windowedRightParams.ProcessorName;

            builder.AddProcessor(leftProcessorName, JoinLeftParams.Processor, windowedLeftProcessorName);
            builder.AddProcessor(rightProcessorName, JoinRightParams.Processor, windowedRightProcessorName);
            builder.AddProcessor(JoinMergeParams.ProcessorName, JoinMergeParams.Processor, leftProcessorName, rightProcessorName);
            builder.AddStateStore(windowedLeftStoreBuilder, windowedLeftProcessorName, rightProcessorName);
            builder.AddStateStore(windowedRightStoreBuilder, windowedRightProcessorName, leftProcessorName);
        }
コード例 #2
0
        public override void WriteToTopology(InternalTopologyBuilder builder)
        {
            builder.AddProcessor(JoinLeftParams.ProcessorName, JoinLeftParams.Processor, LeftJoinSideName);
            builder.AddProcessor(JoinRightParams.ProcessorName, JoinRightParams.Processor, RightJoinSideName);
            builder.AddProcessor(JoinMergeParams.ProcessorName, JoinMergeProcessorSupplier, JoinLeftParams.ProcessorName, JoinRightParams.ProcessorName);

            builder.ConnectProcessorAndStateStore(JoinLeftParams.ProcessorName, leftStoreNames);
            builder.ConnectProcessorAndStateStore(JoinRightParams.ProcessorName, rightStoreNames);

            if (storeBuilder != null)
            {
                builder.AddStateStore(storeBuilder, JoinMergeParams.ProcessorName);
            }
        }
コード例 #3
0
 public override void WriteToTopology(InternalTopologyBuilder builder)
 {
     if (ProcessorParameters != null)
     {
         builder.AddInternalTopic(RepartitionTopic, NumberOfPartition);
         builder.AddProcessor(ProcessorParameters.ProcessorName, ProcessorParameters.Processor,
                              ParentNodeNames());
         builder.AddSinkOperator(
             new StaticTopicNameExtractor <K, V>(RepartitionTopic),
             SinkName,
             Produced <K, V> .Create(KeySerdes, ValueSerdes).WithPartitioner(StreamPartitioner),
             ProcessorParameters.ProcessorName);
         builder.AddSourceOperator(
             RepartitionTopic,
             SourceName,
             new ConsumedInternal <K, V>(SourceName, KeySerdes, ValueSerdes, new FailOnInvalidTimestamp()));
     }
     else
     {
         builder.AddInternalTopic(RepartitionTopic, NumberOfPartition);
         builder.AddSinkOperator(
             new StaticTopicNameExtractor <K, V>(RepartitionTopic),
             SinkName,
             Produced <K, V> .Create(KeySerdes, ValueSerdes).WithPartitioner(StreamPartitioner),
             ParentNodeNames());
         builder.AddSourceOperator(
             RepartitionTopic,
             SourceName,
             new ConsumedInternal <K, V>(SourceName, KeySerdes, ValueSerdes, new FailOnInvalidTimestamp()));
     }
 }
コード例 #4
0
        public override void WriteToTopology(InternalTopologyBuilder builder)
        {
            // TODO: we assume source KTables can only be timestamped-key-value stores for now.
            // should be expanded for other types of stores as well.
            StoreBuilder <State.TimestampedKeyValueStore <K, V> > storeBuilder = new TimestampedKeyValueStoreMaterializer <K, V>(materialized as Materialized <K, V, IKeyValueStore <Bytes, byte[]> >).Materialize();

            if (isGlobalKTable)
            {
                builder.AddGlobalStore(topicName, storeBuilder, sourceName, consumed, processorParameters);
            }
            else
            {
                builder.AddSourceOperator(this.topicName, sourceName, consumed);
                builder.AddProcessor(processorParameters.ProcessorName, processorParameters.Processor, sourceName);

                //// only add state store if the source KTable should be materialized
                KTableSource <K, V> ktableSource = (KTableSource <K, V>)processorParameters.Processor;
                if (ktableSource.QueryableName != null)
                {
                    builder.AddStateStore(storeBuilder, this.streamGraphNode);

                    // TODO :

                    //if (shouldReuseSourceTopicForChangelog)
                    //{
                    //    storeBuilder.withLoggingDisabled();
                    //    topologyBuilder.connectSourceStoreAndTopic(storeBuilder.name(), topicName);
                    //}
                }
            }
        }
コード例 #5
0
        public override void WriteToTopology(InternalTopologyBuilder builder)
        {
            // Stream - Table join (Global or KTable)
            builder.AddProcessor(processorParameters.ProcessorName, processorParameters.Processor, ParentNodeNames());

            // Steam - KTable join only
            if (!string.IsNullOrEmpty(otherJoinSideNodeName))
            {
                builder.ConnectProcessorAndStateStore(processorParameters.ProcessorName, storeNames);
            }
        }
コード例 #6
0
        public override void WriteToTopology(InternalTopologyBuilder builder)
        {
            builder.AddProcessor(ProcessorParameters.ProcessorName, ProcessorParameters.Processor, ParentNodeNames());

            if (storeNames != null && storeNames.Length > 0)
            {
                builder.ConnectProcessorAndStateStore(ProcessorParameters.ProcessorName, storeNames);
            }

            if (storeBuilder != null)
            {
                builder.AddStateStore(storeBuilder, ProcessorParameters.ProcessorName);
            }
        }