def metadata(self):
        # istreams is an array that expects tuples of a type: (string, StreamGrouping).
        # In this example there are multiple istreams, therefore this computation is performing
        # a type of stream join.
        
        # The GROUP_BY enum instructs the framework that an aggregation by key is to be performed.
        # This ensures that records with the same key are always sent to the same instance of
        # this operator.

        # By aggregating two streams by key we can be assured that records from any stream emitted
        # on a particular provider will always be sent to the same instance of CtrCalculator.
        return Metadata(
            name='ctr-calculator',
            istreams=[ ('impressions', StreamGrouping.GROUP_BY),
                        ('clicks', StreamGrouping.GROUP_BY) ]
            ostreams=[ 'click_through_rate' ])
Beispiel #2
0
 def metadata(self):
     return Metadata(name=self.name, istreams=[], ostreams=self.ostreams)
Beispiel #3
0
 def metadata(self):
     return Metadata(name='coinbase-indx', istreams=[], ostreams=['btcusd'])
Beispiel #4
0
 def metadata(self):
     return Metadata(name='first', istreams=[], ostreams=["outstream"])
Beispiel #5
0
 def metadata(self):
     return Metadata(name='cyclical',
                     istreams=[("cycle", StreamGrouping.GROUP_BY)],
                     ostreams=["cycle"])
 def metadata(self):
     return Metadata(name='sentence-splitter',
                     istreams=['sentences'],
                     ostreams=['words'])
Beispiel #7
0
 def metadata(self):
     return Metadata(name="gatherer",
                     istreams=["nothing_going_here"],
                     ostreams=[])
Beispiel #8
0
 def metadata(self):
     return Metadata(
         name='something',
         istreams=[],
         ostreams=["outputstream"])
Beispiel #9
0
 def metadata(self):
     return Metadata(name=self.name,
                     istreams=[],
                     ostreams=["nothing_going_here"])
Beispiel #10
0
 def metadata(self):
     return Metadata(name='sentence-generator',
                     istreams=[],
                     ostreams=['sentences'])
Beispiel #11
0
 def metadata(self):
     return Metadata(
         name='BayesianChangepointDetection',
         istreams=self.istream,
         ostreams=self.ostream)
 def metadata(self):
     return Metadata(name='coinbase-price-printer',
                     istreams=['btcusd'],
                     ostreams=[])
Beispiel #13
0
 def metadata(self):
     return Metadata(name='word-counter',
                     istreams=[('words', StreamGrouping.GROUP_BY)],
                     ostreams=[])
Beispiel #14
0
 def metadata(self):
     return Metadata(name='final',
                     istreams=[("outstream", StreamGrouping.GROUP_BY)],
                     ostreams=[])