Exemplo n.º 1
0
 public PCollection<VertexData> exec(PCollection<String> input, String sep) {
   return input
       .parallelDo(new TwoVerticesFn(sep), tableOf(strings(), pairs(strings(), ints())))
       .groupByKey()
       .parallelDo(
           new WriteVertexFn(),
           PTypes.jsonString(VertexData.class, WritableTypeFamily.getInstance()));
 }
Exemplo n.º 2
0
 @Test
 public void testWritables() throws IOException {
   run(new MRPipeline(CollectionsTest.class), WritableTypeFamily.getInstance());
 }
Exemplo n.º 3
0
 @Override
 public PTypeFamily getFamily() {
   return WritableTypeFamily.getInstance();
 }