Bucketing设置时间

val sink = new BucketingSinkString
sink.setBucketer(new DateTimeBucketer[String](“yyyy-MM-dd–HHmm”, ZoneId.of(“America/Los_Angeles”)))
sink.setWriter(new SequenceFileWriterIntWritable, Text)
sink.setBatchSize(1024 * 1024 * 400) // this is 400 MB,
sink.setBatchRolloverInterval(20 * 60 * 1000); // this is 20 mins
input.addSink(sink)

你可能感兴趣的:(Scala)