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