code: private static void checkParallelismPreconditions(OperatorState operatorState, ExecutionJobVertex executionJobVertex) {
  		//----------------------------------------max parallelism preconditions-------------------------------------
  
  		if (operatorState.getMaxParallelism() < executionJobVertex.getParallelism()) {
  			throw new IllegalStateException("The state for task " + executionJobVertex.getJobVertexId() +
  				" can not be restored. The maximum parallelism (" + operatorState.getMaxParallelism() +
  				") of the restored state is lower than the configured parallelism (" + executionJobVertex.getParallelism() +
  				"). Please reduce the parallelism of the task to be lower or equal to the maximum parallelism."
  			);
  		}
  
  		// check that the number of key groups have not changed or if we need to override it to satisfy the restored state
  		if (operatorState.getMaxParallelism() != executionJobVertex.getMaxParallelism()) {
  
  			if (!executionJobVertex.isMaxParallelismConfigured()) {
  				// if the max parallelism was not explicitly specified by the user, we derive it from the state
  
  				LOG.debug("Overriding maximum parallelism for JobVertex {} from {} to {}",
  					executionJobVertex.getJobVertexId(), executionJobVertex.getMaxParallelism(), operatorState.getMaxParallelism());
  
  				executionJobVertex.setMaxParallelism(operatorState.getMaxParallelism());
  			} else {
  				// if the max parallelism was explicitly specified, we complain on mismatch
  				throw new IllegalStateException("The maximum parallelism (" +
  					operatorState.getMaxParallelism() + ") with which the latest " +
  					"checkpoint of the execution job vertex " + executionJobVertex +
  					" has been taken and the current maximum parallelism (" +
  					executionJobVertex.getMaxParallelism() + ") changed. This " +
  					"is currently not supported.");
  			}
  		}
  	}
docs: Verifies conditions in regards to parallelism and maxParallelism that must be met when restoring state.
  
  @param operatorState      state to restore
  @param executionJobVertex task for which the state should be restored