org.apache.flink.runtime.testtasks.FailingBlockingInvokable Java Examples

The following examples show how to use org.apache.flink.runtime.testtasks.FailingBlockingInvokable. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BlobsCleanupITCase.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
@Nonnull
private JobGraph createJobGraph(TestCase testCase, int numTasks) {
	JobVertex source = new JobVertex("Source");
	if (testCase == TestCase.JOB_FAILS || testCase == TestCase.JOB_IS_CANCELLED) {
		source.setInvokableClass(FailingBlockingInvokable.class);
	} else {
		source.setInvokableClass(NoOpInvokable.class);
	}
	source.setParallelism(numTasks);

	return new JobGraph("BlobCleanupTest", source);
}
 
Example #2
Source File: BlobsCleanupITCase.java    From flink with Apache License 2.0 5 votes vote down vote up
@Nonnull
private JobGraph createJobGraph(TestCase testCase, int numTasks) {
	JobVertex source = new JobVertex("Source");
	if (testCase == TestCase.JOB_FAILS || testCase == TestCase.JOB_IS_CANCELLED) {
		source.setInvokableClass(FailingBlockingInvokable.class);
	} else {
		source.setInvokableClass(NoOpInvokable.class);
	}
	source.setParallelism(numTasks);

	return new JobGraph("BlobCleanupTest", source);
}
 
Example #3
Source File: BlobsCleanupITCase.java    From flink with Apache License 2.0 5 votes vote down vote up
@Nonnull
private JobGraph createJobGraph(TestCase testCase, int numTasks) {
	JobVertex source = new JobVertex("Source");
	if (testCase == TestCase.JOB_FAILS) {
		source.setInvokableClass(FailingBlockingInvokable.class);
	} else if (testCase == TestCase.JOB_IS_CANCELLED) {
		source.setInvokableClass(BlockingNoOpInvokable.class);
	} else {
		source.setInvokableClass(NoOpInvokable.class);
	}
	source.setParallelism(numTasks);

	return new JobGraph(new JobID(0, testCase.ordinal()), "BlobCleanupTest", source);
}