@Override
    public PDone apply(PCollection<Integer> input) {
      // Apply an operation so that this is a composite transform.
      input.apply(Count.<Integer>perElement());

      return PDone.in(input.getPipeline());
    }
예제 #2
0
 @Override
 public PDone apply(PCollection<T> input) {
   if (topic == null) {
     throw new IllegalStateException("need to set the topic of a PubsubIO.Write transform");
   }
   return PDone.in(input.getPipeline());
 }