zhijiangW commented on a change in pull request #8646: [FLINK-12735][network] Make shuffle environment implementation independent with IOManager URL: https://github.com/apache/flink/pull/8646#discussion_r295729810
########## File path: flink-runtime/src/main/java/org/apache/flink/runtime/io/disk/iomanager/IOManager.java ########## @@ -120,41 +121,40 @@ public boolean isProperlyShutDown() { // ------------------------------------------------------------------------ /** - * Creates a new {@link FileIOChannel.ID} in one of the temp directories. Multiple - * invocations of this method spread the channels evenly across the different directories. + * Creates a new {@link ID} in one of the temp directories. Multiple invocations of this + * method spread the channels evenly across the different directories. * * @return A channel to a temporary directory. */ - public FileIOChannel.ID createChannel() { + public ID createChannel() { final int num = getNextPathNum(); - return new FileIOChannel.ID(this.paths[num], num, this.random); + return new ID(this.paths[num], num, this.random); } /** - * Creates a new {@link FileIOChannel.Enumerator}, spreading the channels in a round-robin fashion + * Creates a new {@link Enumerator}, spreading the channels in a round-robin fashion * across the temporary file directories. * * @return An enumerator for channels. */ - public FileIOChannel.Enumerator createChannelEnumerator() { - return new FileIOChannel.Enumerator(this.paths, this.random); + public Enumerator createChannelEnumerator() { + return new Enumerator(this.paths, this.random); } /** * Deletes the file underlying the given channel. If the channel is still open, this * call may fail. - * + * * @param channel The channel to be deleted. - * @throws IOException Thrown if the deletion fails. */ - public void deleteChannel(FileIOChannel.ID channel) throws IOException { + public void deleteChannel(ID channel) { Review comment: The other methods are also touched for the issue of removing the prefix import `FileIOChannel`, and the `IOException` actually happens in this method, so I removed it meanwhile. All the public methods in `IOManager` are used by instance atm, so if we only add static for this method, it seems a bit inconsistent. This PR is for removing legacy codes, so I think the static role should not belong to this scope. WDYT? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services