Example #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()));
 }
Example #2
0
 @Test
 public void testWritables() throws IOException {
   run(new MRPipeline(CollectionsTest.class), WritableTypeFamily.getInstance());
 }
Example #3
0
 @Override
 public PTypeFamily getFamily() {
   return WritableTypeFamily.getInstance();
 }