Can I use batch mode when I use HadoopInputFormat as input of StreamExecutionEnvironment.createInput ? If not , why ? If yes, how?

Viewed 36

I'm using Flink 1.13. I want to use batch mode of StreamingExecutionEnvironment to process HBase snapshot data file.

Job job = Job.getInstance(conf);
TableSnapshotInputFormat.setInput(job, snapshotName, new Path(restoreDir));

HadoopInputFormat<ImmutableBytesWritable, Result> input = HadoopInputs.createHadoopInput(
  new TableSnapshotInputFormat(), ImmutableBytesWritable.class, Result.class, job);

env.createInput(
  input,
  TypeInformation.of(new TypeHint<Tuple2<ImmutableBytesWritable, Result>>() {}))

...

When I used code above, it threw exception:

org.apache.flink.client.program.ProgramInvocationException: The main method caused an error: Detected an UNBOUNDED source with the 'execution.runtime-mode' set to 'BATCH'. This combination is not allowed, please set the 'execution.runtime-mode' to STREAMING or AUTOMATIC

0 Answers
Related