title: Pause/Resume Flink job during migrations
body: <p>I'm using <code>Apache Flink</code> to propagate updates from a given set of <code>Kafka</code> topics into an <code>Elasticsearch</code> cluster.</p>
  <p>The problem I'm facing is that sometimes the <code>Elasticsearch</code> cluster evolves and I have to <strong>(1)</strong> modify the mappings, <strong>(2)</strong> copy over the data...and by the time I have to point the <code>Flink</code> jobs to the new alias/index, there are plenty of updates that made it to the old index.</p>
  <p>So I wonder what's the best way to approach this. I can have downtime, but I would like to avoid this if possible. I was trying to make the <code>Flink</code> jobs to slowdown or pause the (<code>Kafka</code>) input sources until the migration finishes, but I didn't find any endpoint for this.</p>
  <blockquote>
  <p>The <code>Flink</code> jobs run in <strong>application</strong> mode.</p>
  </blockquote>
  <p>If anyone can shed some light on how to accomplish this: pause/resume the jobs via an API or something similar, I will really appreciate the input. The only constraint I have is around stopping the applications (as in stopping/killing pods): it's possible, but too troublesome due to access constraints to the <code>Kubernetes</code> clusters.</p>