private DataStreamSink < T > 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." ) ; transformation . setResources ( minResources , preferredResources ) ; return this ; }
Sets the minimum and preferred resources for this sink and the lower and upper resource limits will be considered in resource resize feature for future plan .