flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zhijiangW <...@git.apache.org>
Subject [GitHub] flink pull request #5381: [FLINK-8523][network] Stop assigning floating buff...
Date Wed, 31 Jan 2018 09:20:29 GMT
Github user zhijiangW commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5381#discussion_r164993308
  
    --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/SingleInputGate.java
---
    @@ -485,6 +494,23 @@ public void requestPartitions() throws IOException, InterruptedException
{
     		}
     	}
     
    +	@Override
    +	public void blockInputChannel(int channelIndex) {
    +		InputChannel inputChannel = indexToInputChannelMap.get(channelIndex);
    +		if (inputChannel == null) {
    +			throw new IllegalStateException("Could not find input channel from the channel index
" + channelIndex);
    --- End diff --
    
    I referred to the other similar usage in `IllegalStateException`. If existing this condition
that `channelIndex` is correct but the mapping construction is wrong.
    
    I think `IllegalArgumentException` also makes sense. 


---

Mime
View raw message