|
25 | 25 | import org.apache.flink.api.java.tuple.Tuple2;
|
26 | 26 | import org.apache.flink.runtime.jobgraph.JobGraph;
|
27 | 27 | import org.apache.flink.runtime.jobgraph.JobVertex;
|
28 |
| -import org.apache.flink.runtime.jobgraph.tasks.CheckpointCoordinatorConfiguration; |
29 | 28 | import org.apache.flink.streaming.api.datastream.DataStream;
|
30 | 29 | import org.apache.flink.streaming.api.datastream.DataStreamSink;
|
31 | 30 | import org.apache.flink.streaming.api.datastream.IterativeStream;
|
@@ -631,63 +630,6 @@ public void close() {
|
631 | 630 | }
|
632 | 631 | }
|
633 | 632 |
|
634 |
| - @SuppressWarnings("deprecation") |
635 |
| - @Test |
636 |
| - public void testWithCheckPointing() throws Exception { |
637 |
| - int numRetries = 5; |
638 |
| - int timeoutScale = 1; |
639 |
| - |
640 |
| - for (int numRetry = 0; numRetry < numRetries; numRetry++) { |
641 |
| - try { |
642 |
| - StreamExecutionEnvironment env = |
643 |
| - StreamExecutionEnvironment.getExecutionEnvironment(); |
644 |
| - |
645 |
| - try { |
646 |
| - createIteration(env, timeoutScale); |
647 |
| - env.execute(); |
648 |
| - |
649 |
| - // this statement should never be reached |
650 |
| - fail(); |
651 |
| - } catch (UnsupportedOperationException e) { |
652 |
| - // expected behaviour |
653 |
| - } |
654 |
| - |
655 |
| - // Test force checkpointing |
656 |
| - |
657 |
| - try { |
658 |
| - createIteration(env, timeoutScale); |
659 |
| - env.enableCheckpointing( |
660 |
| - CheckpointCoordinatorConfiguration.MINIMAL_CHECKPOINT_TIME, |
661 |
| - org.apache.flink.streaming.api.CheckpointingMode.EXACTLY_ONCE, |
662 |
| - false); |
663 |
| - env.execute(); |
664 |
| - |
665 |
| - // this statement should never be reached |
666 |
| - fail(); |
667 |
| - } catch (UnsupportedOperationException e) { |
668 |
| - // expected behaviour |
669 |
| - } |
670 |
| - |
671 |
| - createIteration(env, timeoutScale); |
672 |
| - env.enableCheckpointing( |
673 |
| - CheckpointCoordinatorConfiguration.MINIMAL_CHECKPOINT_TIME, |
674 |
| - org.apache.flink.streaming.api.CheckpointingMode.EXACTLY_ONCE, |
675 |
| - true); |
676 |
| - env.getStreamGraph().getJobGraph(); |
677 |
| - |
678 |
| - break; // success |
679 |
| - } catch (Throwable t) { |
680 |
| - LOG.info("Run " + (numRetry + 1) + "/" + numRetries + " failed", t); |
681 |
| - |
682 |
| - if (numRetry >= numRetries - 1) { |
683 |
| - throw t; |
684 |
| - } else { |
685 |
| - timeoutScale *= 2; |
686 |
| - } |
687 |
| - } |
688 |
| - } |
689 |
| - } |
690 |
| - |
691 | 633 | private void createIteration(StreamExecutionEnvironment env, int timeoutScale) {
|
692 | 634 | env.enableCheckpointing();
|
693 | 635 |
|
|
0 commit comments