use of org.apache.beam.sdk.nexmark.model.AuctionPrice in project beam by apache.
the class Query2 method expand.
@Override
public PCollection<AuctionPrice> expand(PCollection<Event> events) {
return events.apply(NexmarkQueryUtil.JUST_BIDS).apply(Filter.by(bid -> bid.auction % this.auctionSkip == 0)).apply(name + ".Project", ParDo.of(new DoFn<Bid, AuctionPrice>() {
@ProcessElement
public void processElement(ProcessContext c) {
Bid bid = c.element();
c.output(new AuctionPrice(bid.auction, bid.price));
}
}));
}
Aggregations