@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(); } }
@Override public void sinkCleanup( FlowProcess<? extends Properties> flowProcess, SinkCall<PrintWriter, OutputStream> sinkCall) { sinkCall.getContext().flush(); sinkCall.setContext(null); }