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_r295654659
 
 

 ##########
 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:
   Yes, I think the other public methods in `IOManager` could also be static if 
so.
   But I wonder it might not belong to the scope this PR. How about refactoring 
it if needed future?

----------------------------------------------------------------
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

Reply via email to