DataStream<String> dataStream = env.addSource(new SourceFunction<String>() {
private static final long serialVersionUID = 1L;
private volatile boolean isRunning = true;
private long count = 0;
@Override
public void run(SourceContext<String> out) throws Exception {
while (isRunning) {
count++;
if (count % 600000000 == 0) {
out.collect(String.valueOf(Math.floor(Math.random() * 100)));
}
}
}
@Override
public void cancel() {
isRunning = false;
}
});
dataStream.writeUsingOutputFormat(new HBaseOutputFormat());

最简单的一个dataframe,

相关文章:

  • 2022-12-23
  • 2021-06-05
  • 2021-08-12
  • 2021-07-29
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-09-23
  • 2021-08-08
  • 2021-11-30
  • 2021-10-20
  • 2021-07-02
  • 2021-10-07
相关资源
相似解决方案