flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hagersaleh <loveallah1...@yahoo.com>
Subject Re: How can handles Exist ,not Exist query on flink
Date Mon, 20 Jul 2015 19:48:57 GMT
when write this code display error
 no interface expected here public static class MyCoGrouper extends
CoGroupFunction<Customer,Orders,Result> {

ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();

        DataSet<Customer> customers = getCustomerDataSet(env,mask,l,map);

        DataSet<Orders> orders= getOrdersDataSet(env,maskorder,l1,maporder);

        DataSet<Result> result =
customers.coGroup(orders).where(0).equalTo(1).with
            (new CoGroupFunction<Customer,Orders,Result>() {

        @Override
        public void coGroup(Iterator<Customer> leftElements,
                            Iterator<Orders> rightElements,
                           Collector<Result> out) throws Exception {

                 if(rightElements.hasNext()) {
           while(leftElements.hasNext()) {

        out.collect(new
Result(leftElements.next().f0,leftElements.next().f1,rightElements.next().f0
               ,rightElements.next().f1,rightElements.next().f2));

        }
        }

        }
        });



--
View this message in context: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/How-can-handles-Exist-not-Exist-query-on-flink-tp1939p2196.html
Sent from the Apache Flink User Mailing List archive. mailing list archive at Nabble.com.

Mime
View raw message