code: private DataSink<T> setResources(ResourceSpec resources) {
  		Preconditions.checkNotNull(resources, "The resources must be not null.");
  		Preconditions.checkArgument(resources.isValid(), "The values in resources must be not less than 0.");
  
  		this.minResources = resources;
  		this.preferredResources = resources;
  
  		return this;
  	}
docs: Sets the resources for this data sink, and the minimum and preferred resources are the same by default.
  
  @param resources The resources for this data sink.
  @return The data sink with set minimum and preferred resources.