Java Code Examples for org.apache.flink.api.java.ExecutionEnvironment#setDegreeOfParallelism()
The following examples show how to use
org.apache.flink.api.java.ExecutionEnvironment#setDegreeOfParallelism() .
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: CSVToParquet.java From parquet-flinktacular with Apache License 2.0 | 6 votes |
public static void main(String[] args) throws Exception { if(!parseParameters(args)) { return; } int splitNumber = 4; final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment(); env.setDegreeOfParallelism(splitNumber); createCustomers(env); env.execute("convert customers"); final ExecutionEnvironment env2 = ExecutionEnvironment.getExecutionEnvironment(); env2.setDegreeOfParallelism(splitNumber); createOrders(env2); env2.execute("convert orders"); final ExecutionEnvironment env3 = ExecutionEnvironment.getExecutionEnvironment(); env3.setDegreeOfParallelism(splitNumber); createLineitems(env3); env3.execute("convert lineitems"); }
Example 2
Source File: CSVToParquet.java From parquet-flinktacular with Apache License 2.0 | 6 votes |
public static void main(String[] args) throws Exception { if (!parseParameters(args)) { return; } int splitNumber = 4; final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment(); env.setDegreeOfParallelism(splitNumber); createStoreSales(env); env.execute("convert store sales"); final ExecutionEnvironment env2 = ExecutionEnvironment.getExecutionEnvironment(); env2.setDegreeOfParallelism(splitNumber); createItem(env2); env2.execute("convert items"); final ExecutionEnvironment env3 = ExecutionEnvironment.getExecutionEnvironment(); env3.setDegreeOfParallelism(splitNumber); createDateDim(env3); env3.execute("convert datedims"); }