use of org.apache.storm.starter.tools.Rankings in project storm by apache.
the class TotalRankingsBolt method updateRankingsWithTuple.
@Override
void updateRankingsWithTuple(Tuple tuple) {
Rankings rankingsToBeMerged = (Rankings) tuple.getValue(0);
super.getRankings().updateWith(rankingsToBeMerged);
super.getRankings().pruneZeroCounts();
}
use of org.apache.storm.starter.tools.Rankings in project storm by apache.
the class TotalRankingsBoltTest method mockRankingsTuple.
private Tuple mockRankingsTuple(Object obj, long count) {
Tuple tuple = MockTupleHelpers.mockTuple(ANY_NON_SYSTEM_COMPONENT_ID, ANY_NON_SYSTEM_STREAM_ID);
Rankings rankings = mock(Rankings.class);
when(tuple.getValue(0)).thenReturn(rankings);
return tuple;
}
use of org.apache.storm.starter.tools.Rankings in project jstorm by alibaba.
the class TotalRankingsBolt method updateRankingsWithTuple.
@Override
void updateRankingsWithTuple(Tuple tuple) {
Rankings rankingsToBeMerged = (Rankings) tuple.getValue(0);
super.getRankings().updateWith(rankingsToBeMerged);
super.getRankings().pruneZeroCounts();
}
use of org.apache.storm.starter.tools.Rankings in project jstorm by alibaba.
the class WindowTestTotalRankingsBolt method updateRankingsWithTuple.
@Override
void updateRankingsWithTuple(Tuple tuple) {
Rankings rankingsToBeMerged = (Rankings) tuple.getValue(0);
super.getRankings().updateWith(rankingsToBeMerged);
super.getRankings().pruneZeroCounts();
LOG.info("TotalRankingsBolt updateRankingsWithTuple " + getRankings());
}