Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4911#discussion_r154500054
  
    --- Diff: 
flink-core/src/main/java/org/apache/flink/api/common/operators/ResourceSpec.java
 ---
    @@ -83,18 +102,23 @@ public ResourceSpec(double cpuCores, int 
heapMemoryInMB) {
         * @param directMemoryInMB The size of the java nio direct memory, in 
megabytes.
         * @param nativeMemoryInMB The size of the native memory, in megabytes.
         * @param stateSizeInMB The state size for storing in checkpoint.
    +    * @param extendedResources The extended resources, associated with the 
resource manager used
         */
        public ResourceSpec(
                        double cpuCores,
                        int heapMemoryInMB,
                        int directMemoryInMB,
                        int nativeMemoryInMB,
    -                   int stateSizeInMB) {
    +                   int stateSizeInMB,
    +                   Resource... extendedResources) {
    --- End diff --
    
    I think we have far too many constructors to create a `ResourceSpec`. I 
would suggest to offer a single constructor plus a builder for the 
`ResourceSpec`. This builder should in the initial version only allow to set a 
GPU resource and no other resources. Moreover, we should make this constructor 
protected.


---

Reply via email to