Esempio n. 1
0
    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' ])
Esempio n. 2
0
 def metadata(self):
     return Metadata(name=self.name, istreams=[], ostreams=self.ostreams)
Esempio n. 3
0
 def metadata(self):
     return Metadata(name='coinbase-indx', istreams=[], ostreams=['btcusd'])
Esempio n. 4
0
 def metadata(self):
     return Metadata(name='first', istreams=[], ostreams=["outstream"])
Esempio n. 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'])
Esempio n. 7
0
 def metadata(self):
     return Metadata(name="gatherer",
                     istreams=["nothing_going_here"],
                     ostreams=[])
Esempio n. 8
0
 def metadata(self):
     return Metadata(
         name='something',
         istreams=[],
         ostreams=["outputstream"])
Esempio n. 9
0
 def metadata(self):
     return Metadata(name=self.name,
                     istreams=[],
                     ostreams=["nothing_going_here"])
Esempio n. 10
0
 def metadata(self):
     return Metadata(name='sentence-generator',
                     istreams=[],
                     ostreams=['sentences'])
Esempio n. 11
0
 def metadata(self):
     return Metadata(
         name='BayesianChangepointDetection',
         istreams=self.istream,
         ostreams=self.ostream)
Esempio n. 12
0
 def metadata(self):
     return Metadata(name='coinbase-price-printer',
                     istreams=['btcusd'],
                     ostreams=[])
Esempio n. 13
0
 def metadata(self):
     return Metadata(name='word-counter',
                     istreams=[('words', StreamGrouping.GROUP_BY)],
                     ostreams=[])
Esempio n. 14
0
 def metadata(self):
     return Metadata(name='final',
                     istreams=[("outstream", StreamGrouping.GROUP_BY)],
                     ostreams=[])