Exemple #1
0
  @Override
  public void sinkPrepare(
      FlowProcess<? extends Properties> flowProcess, SinkCall<PrintWriter, OutputStream> sinkCall) {
    sinkCall.setContext(createOutput(sinkCall.getOutput()));

    if (writeHeader) {
      Fields fields = sinkCall.getOutgoingEntry().getFields();
      delimitedParser.joinFirstLine(fields, sinkCall.getContext());

      sinkCall.getContext().println();
    }
  }
Exemple #2
0
 @Override
 public void sinkCleanup(
     FlowProcess<? extends Properties> flowProcess, SinkCall<PrintWriter, OutputStream> sinkCall) {
   sinkCall.getContext().flush();
   sinkCall.setContext(null);
 }