Package eu.stratosphere.api.java

Examples of eu.stratosphere.api.java.ExecutionEnvironment.execute()


        DataSet<Tuple5<Integer, Long, Integer, String, Long>> ds = CollectionDataSets.getSmall5TupleDataSet(env);
        DataSet<Tuple5<Integer, Long, Integer, String, Long>> ds2 = CollectionDataSets.getSmall5TupleDataSet(env);
        DataSet<Tuple2<Integer, String>> crossDs = ds.crossWithTiny(ds2).with(new Tuple5Cross());
       
        crossDs.writeAsCsv(resultPath);
        env.execute();
       
        // return expected result
        return "0,HalloHallo\n" +
            "1,HalloHallo Welt\n" +
            "2,HalloHallo Welt wie\n" +
View Full Code Here


          .projectFirst(0)
          .projectSecond(4,1)
          .types(String.class, Long.class, String.class, Integer.class, Long.class, Long.class);

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

        // return expected result
        return "Hi,1,Hallo,1,1,1\n" +
          "Hi,1,Hallo Welt,1,2,2\n" +
          "Hi,1,Hallo Welt wie,1,1,3\n" +
View Full Code Here

            .projectSecond(4,1)
            .projectFirst(0)
            .types(String.class, String.class, Long.class, Long.class, Long.class, Integer.class);

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

          // return expected result
          return "Hallo,Hi,1,1,1,1\n" +
            "Hallo Welt,Hi,1,2,2,1\n" +
            "Hallo Welt wie,Hi,1,1,3,1\n" +
View Full Code Here

        DataSet<Tuple3<Integer, Long, String>> ds = CollectionDataSets.getSmall3TupleDataSet(env);
        DataSet<Tuple5<Integer, Long, Integer, String, Long>> ds2 = CollectionDataSets.getSmall5TupleDataSet(env);
        DataSet<Tuple2<Tuple3<Integer, Long, String>, Tuple5<Integer, Long, Integer, String, Long>>> crossDs = ds.cross(ds2);
       
        crossDs.writeAsCsv(resultPath);
        env.execute();
       
        // return expected result
        return "(1, 1, Hi),(2, 2, 1, Hallo Welt, 2)\n" +
            "(1, 1, Hi),(1, 1, 0, Hallo, 1)\n" +
            "(1, 1, Hi),(2, 3, 2, Hallo Welt wie, 1)\n" +
View Full Code Here

        DataSet<CustomType> ds = CollectionDataSets.getSmallCustomTypeDataSet(env);
        DataSet<CustomType> ds2 = CollectionDataSets.getSmallCustomTypeDataSet(env);
        DataSet<CustomType> crossDs = ds.cross(ds2).with(new CustomTypeCross());
       
        crossDs.writeAsText(resultPath);
        env.execute();
       
        // return expected result
        return "1,0,HiHi\n"
            + "2,1,HiHello\n"
            + "2,2,HiHello world\n"
View Full Code Here

        DataSet<Tuple5<Integer, Long, Integer, String, Long>> ds = CollectionDataSets.getSmall5TupleDataSet(env);
        DataSet<CustomType> ds2 = CollectionDataSets.getSmallCustomTypeDataSet(env);
        DataSet<Tuple3<Integer, Long, String>> crossDs = ds.cross(ds2).with(new MixedCross());
       
        crossDs.writeAsCsv(resultPath);
        env.execute();
       
        // return expected result
        return "2,0,HalloHi\n" +
            "3,0,HalloHello\n" +
            "3,0,HalloHello world\n" +
View Full Code Here

        DataSet<Tuple5<Integer, Long, Integer, String, Long>> ds = CollectionDataSets.get5TupleDataSet(env);
        DataSet<Tuple3<String, Long, Integer>> projDs = ds.
            project(3,4,2).types(String.class, Long.class, Integer.class);
        projDs.writeAsCsv(resultPath);
       
        env.execute();
        return "Hallo,1,0\n" +
            "Hallo Welt,2,1\n" +
            "Hallo Welt wie,1,2\n" +
            "Hallo Welt wie gehts?,2,3\n" +
            "ABC,2,4\n" +
View Full Code Here

       
        DataSet<Tuple3<Integer, Long, String>> ds = CollectionDataSets.get3TupleDataSet(env);
        DataSet<Tuple3<Integer, Long, String>> unionDs = ds.union(CollectionDataSets.get3TupleDataSet(env));
       
        unionDs.writeAsCsv(resultPath);
        env.execute();
       
        // return expected result
        return FULL_TUPLE_3_STRING + FULL_TUPLE_3_STRING;
      }
      case 2: {
View Full Code Here

            .union(CollectionDataSets.get3TupleDataSet(env))
            .union(CollectionDataSets.get3TupleDataSet(env))
            .union(CollectionDataSets.get3TupleDataSet(env));
       
        unionDs.writeAsCsv(resultPath);
        env.execute();
       
        // return expected result
        return FULL_TUPLE_3_STRING + FULL_TUPLE_3_STRING + FULL_TUPLE_3_STRING + FULL_TUPLE_3_STRING + FULL_TUPLE_3_STRING;
      }
      case 3: {
View Full Code Here

       
        DataSet<Tuple3<Integer, Long, String>> unionDs = CollectionDataSets.get3TupleDataSet(env)
          .union(empty);
     
        unionDs.writeAsCsv(resultPath);
        env.execute();
       
        // return expected result
        return FULL_TUPLE_3_STRING;       
      }
      default:
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.