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