Class CountProductSalesWindowing.CountSalesQuantity
java.lang.Object
org.apache.flink.streaming.examples.dsv2.windowing.CountProductSalesWindowing.CountSalesQuantity
- All Implemented Interfaces:
Serializable,org.apache.flink.api.common.functions.Function,org.apache.flink.datastream.api.extension.window.function.OneInputWindowStreamProcessFunction<CountProductSalesWindowing.Order,,CountProductSalesWindowing.ProductSales> org.apache.flink.datastream.api.extension.window.function.WindowProcessFunction,org.apache.flink.datastream.api.function.ProcessFunction
- Enclosing class:
- CountProductSalesWindowing
public static class CountProductSalesWindowing.CountSalesQuantity
extends Object
implements org.apache.flink.datastream.api.extension.window.function.OneInputWindowStreamProcessFunction<CountProductSalesWindowing.Order,CountProductSalesWindowing.ProductSales>
Count sales quantity per product.
We will obtain all orders and calculate the total sales quantity for each product when window trigger.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonTrigger(org.apache.flink.datastream.api.common.Collector<CountProductSalesWindowing.ProductSales> output, org.apache.flink.datastream.api.context.PartitionedContext<CountProductSalesWindowing.ProductSales> ctx, org.apache.flink.datastream.api.extension.window.context.OneInputWindowContext<CountProductSalesWindowing.Order> windowContext) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.flink.datastream.api.extension.window.function.OneInputWindowStreamProcessFunction
onClear, onLateRecord, onRecordMethods inherited from interface org.apache.flink.datastream.api.function.ProcessFunction
close, declareWatermarks, usesStatesMethods inherited from interface org.apache.flink.datastream.api.extension.window.function.WindowProcessFunction
useWindowStates
-
Constructor Details
-
CountSalesQuantity
public CountSalesQuantity()
-
-
Method Details
-
onTrigger
public void onTrigger(org.apache.flink.datastream.api.common.Collector<CountProductSalesWindowing.ProductSales> output, org.apache.flink.datastream.api.context.PartitionedContext<CountProductSalesWindowing.ProductSales> ctx, org.apache.flink.datastream.api.extension.window.context.OneInputWindowContext<CountProductSalesWindowing.Order> windowContext) throws Exception - Specified by:
onTriggerin interfaceorg.apache.flink.datastream.api.extension.window.function.OneInputWindowStreamProcessFunction<CountProductSalesWindowing.Order,CountProductSalesWindowing.ProductSales> - Throws:
Exception
-