LocalFileSink localFileSink,
RemotePrefixFormatter prefixFormatter,
int concurrentUpload,
boolean batchUpload) {
this.localFileSink = localFileSink;
this.prefixFormatter = prefixFormatter == null ? new DynamicRemotePrefixFormatter("date(yyyyMMdd)") : prefixFormatter;
this.batchUpload = batchUpload;
Preconditions.checkNotNull(localFileSink, "localFileSink is needed");
uploader = Executors.newFixedThreadPool(concurrentUpload == 0 ? 5 : concurrentUpload);