code: public StreamExecutionEnvironment setMaxParallelism(int maxParallelism) {
  		Preconditions.checkArgument(maxParallelism > 0 &&
  						maxParallelism <= KeyGroupRangeAssignment.UPPER_BOUND_MAX_PARALLELISM,
  				"maxParallelism is out of bounds 0 < maxParallelism <= " +
  						KeyGroupRangeAssignment.UPPER_BOUND_MAX_PARALLELISM + ". Found: " + maxParallelism);
  
  		config.setMaxParallelism(maxParallelism);
  		return this;
  	}
docs: Sets the maximum degree of parallelism defined for the program. The upper limit (inclusive)
  is Short.MAX_VALUE.
  
  <p>The maximum degree of parallelism specifies the upper limit for dynamic scaling. It also
  defines the number of key groups used for partitioned state.
  
  @param maxParallelism Maximum degree of parallelism to be used for the program.,
  with 0 < maxParallelism <= 2^15 - 1