code: private O setResources(ResourceSpec minResources, ResourceSpec preferredResources) {
  		Preconditions.checkNotNull(minResources, "The min resources must be not null.");
  		Preconditions.checkNotNull(preferredResources, "The preferred resources must be not null.");
  
  		Preconditions.checkArgument(minResources.isValid() && preferredResources.isValid() && minResources.lessThanOrEqual(preferredResources),
  				"The values in resources must be not less than 0 and the preferred resources must be greater than the min resources.");
  
  		this.minResources = minResources;
  		this.preferredResources = preferredResources;
  
  		@SuppressWarnings("unchecked")
  		O returnType = (O) this;
  		return returnType;
  	}
docs: Sets the minimum and preferred resources for this operator. This overrides the default resources.
  The lower and upper resource limits will be considered in dynamic resource resize feature for future plan.
  
  @param minResources The minimum resources for this operator.
  @param preferredResources The preferred resources for this operator.
  @return The operator with set minimum and preferred resources.