Skip to content
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.

Expanding the Framework

Tim Victor edited this page Dec 2, 2017 · 14 revisions

If you'd like to add functionality to the framework there are some good places to start.

Providing input

You could use any existing InputFormat or SourceFunction, or write your own, to feed data flows with input. But if you just like to create a new way of defining a list of input records, implement the Input or EventTimeInput interface.

Verification of output

The output of data flows is verified by implementing an OutputVerifier. If you just wan't to verify the output once at the end, extend: SimpleOutputVerifier:

class Verifier<String> extends SimpleOutputVerifier<String> {
	@Override
	public void verify(List<String> output) throws Exception {
        	if(!output.contains("cheese")) 
                     throw new AssertionError("there's no cheese!");
	}      
}

Finished triggers

Write a custom VerifyFinishedTrigger to provide a new condition for finishing a verification early.