Re: Execution environments for testing: local vs collection vs mini cluster
Posted by
Biao Liu on
URL: http://deprecated-apache-flink-user-mailing-list-archive.369.s1.nabble.com/Execution-environments-for-testing-local-vs-collection-vs-mini-cluster-tp28926p28927.html
Hi Juan,
I'm not sure what you really want. Before giving some suggestions, could you answer the questions below first?
1. Do you want to write a unit test (or integration test) case for your project or for Flink? Or just want to run your job locally?
2. Which mode do you want to test? DataStream or DataSet?
Hi,
- StreamExecutionEnvironment.createLocalEnvironment and ExecutionEnvironment.createLocalEnvironment create an execution environment running on a single JVM using different threads.
- CollectionEnvironment runs on a single JVM on a single thread.
- I haven't found not much documentation on the Mini Cluster, but it sounds similar to the Hadoop MiniCluster. If that is then case, then it would run on many local JVMs, each of them running multiple threads.
Which test execution environment is recommended for each test use case? For example I don't see why would I use CollectionEnvironment when I have the local environment available and running on several threads, what is a good use case for CollectionEnvironment?
Are all these 3 environments supported equality, or maybe some of them is expected to be deprecated?
Are there any additional execution environments that could be useful for testing on a single host?
Thanks,
Juan