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

    https://github.com/apache/flink/pull/6149#discussion_r195342365
  
    --- Diff: 
flink-core/src/main/java/org/apache/flink/core/fs/LimitedConnectionsFileSystem.java
 ---
    @@ -313,14 +313,22 @@ public int getNumberOfOpenInputStreams() {
         * Get the rate limitation on Input (bytes/s).
         */
        public long getRateLimitingInput(){
    -           return (long) inputRateLimiter.getRate();
    +           if (inputRateLimiter.isPresent()){
    --- End diff --
    
    Nitty nit (matter of taste): `return (long) 
inputRateLimiter.map(RateLimiter::getRate).getOrDefault(0)` if you prefer 
if/else I'm fine with that.
    
    Btw, `Optional` saved the day. Previously there were some missed null 
pointer exceptions :)


---

Reply via email to