Package org.apache.flink.api.java

Examples of org.apache.flink.api.java.ExecutionEnvironment.execute()


               .equalTo(4)
               .with(new T3T5BCJoin())
               .withBroadcastSet(intDs, "ints");
       
        joinDs.writeAsCsv(resultPath);
        env.execute();
       
        // return expected result
        return "Hi,Hallo,55\n" +
            "Hi,Hallo Welt wie,55\n" +
            "Hello,Hallo Welt,55\n" +
View Full Code Here


               )
               .equalTo(0)
               .with(new CustT3Join());

        joinDs.writeAsCsv(resultPath);
        env.execute();

        // return expected result
        return "Hi,Hi\n" +
            "Hello,Hello\n" +
            "Hello world,Hello\n";
View Full Code Here

               .projectFirst(0)
               .projectSecond(4,1)
               .types(String.class, Long.class, String.class, Integer.class, Long.class, Long.class);
       
        joinDs.writeAsCsv(resultPath);
        env.execute();
       
        // return expected result
        return "Hi,1,Hallo,1,1,1\n" +
            "Hello,2,Hallo Welt,2,2,2\n" +
            "Hello world,2,Hallo Welt,3,2,2\n";
View Full Code Here

               .projectSecond(4,1)
               .projectFirst(0)
               .types(String.class, String.class, Long.class, Long.class, Long.class, Integer.class);
       
        joinDs.writeAsCsv(resultPath);
        env.execute();
       
        // return expected result
        return "Hallo,Hi,1,1,1,1\n" +
            "Hallo Welt,Hello,2,2,2,2\n" +
            "Hallo Welt,Hello world,2,2,2,3\n";
View Full Code Here

                     }
                   })
               .with(new T3CustJoin());
       
        joinDs.writeAsCsv(resultPath);
        env.execute();
       
        // return expected result
        return "Hi,Hello\n" +
            "Hello,Hello world\n" +
            "Hello world,Hello world\n";
View Full Code Here

                     }
                   }
                );
                                       
        joinDs.writeAsCsv(resultPath);
        env.execute();
       
        // return expected result
        return "1,0,Hi,1,0,Hi\n" +
            "2,1,Hello,2,1,Hello\n" +
            "2,1,Hello,2,2,Hello world\n" +
View Full Code Here

                }
              })
               .with(new T3T5FlatJoin());
       
        joinDs.writeAsCsv(resultPath);
        env.execute();
       
        // return expected result
        return "Hi,Hallo\n" +
            "Hello,Hallo Welt\n" +
            "Hello world,Hallo Welt wie gehts?\n" +
View Full Code Here

        DataSet<Tuple7<Integer, String, Integer, Integer, Long, String, Long>> ds2 = CollectionDataSets.getSmallTuplebasedDataSet(env);
        DataSet<Tuple2<POJO, Tuple7<Integer, String, Integer, Integer, Long, String, Long> >> joinDs =
            ds1.join(ds2).where("nestedPojo.longNumber").equalTo("f6");
       
        joinDs.writeAsCsv(resultPath);
        env.execute();
       
        // return expected result
        return "1 First (10,100,1000,One) 10000,(1,First,10,100,1000,One,10000)\n" +
             "2 Second (20,200,2000,Two) 20000,(2,Second,20,200,2000,Two,20000)\n" +
             "3 Third (30,300,3000,Three) 30000,(3,Third,30,300,3000,Three,30000)\n";
View Full Code Here

        DataSet<Tuple7<Integer, String, Integer, Integer, Long, String, Long>> ds2 = CollectionDataSets.getSmallTuplebasedDataSet(env);
        DataSet<Tuple2<POJO, Tuple7<Integer, String, Integer, Integer, Long, String, Long> >> joinDs =
            ds1.join(ds2).where("nestedPojo.longNumber").equalTo(6); // <--- difference!
       
        joinDs.writeAsCsv(resultPath);
        env.execute();
       
        // return expected result
        return "1 First (10,100,1000,One) 10000,(1,First,10,100,1000,One,10000)\n" +
             "2 Second (20,200,2000,Two) 20000,(2,Second,20,200,2000,Two,20000)\n" +
             "3 Third (30,300,3000,Three) 30000,(3,Third,30,300,3000,Three,30000)\n";
View Full Code Here

        DataSet<Tuple2<POJO, Tuple7<Integer, String, Integer, Integer, Long, String, Long> >> joinDs =
            ds1.join(ds2).where("nestedPojo.longNumber", "number", "str").equalTo("f6","f0","f1");
       
        joinDs.writeAsCsv(resultPath);
        env.setDegreeOfParallelism(1);
        env.execute();
       
        // return expected result
        return "1 First (10,100,1000,One) 10000,(1,First,10,100,1000,One,10000)\n" +
             "2 Second (20,200,2000,Two) 20000,(2,Second,20,200,2000,Two,20000)\n" +
             "3 Third (30,300,3000,Three) 30000,(3,Third,30,300,3000,Three,30000)\n";
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.