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

    https://github.com/apache/spark/pull/16989#discussion_r115407998
  
    --- Diff: 
common/network-common/src/main/java/org/apache/spark/network/server/OneForOneStreamManager.java
 ---
    @@ -95,6 +95,14 @@ public ManagedBuffer getChunk(long streamId, int 
chunkIndex) {
       }
     
       @Override
    +  public ManagedBuffer openStream(String streamChunkId) {
    +    String[] array = streamChunkId.split("_");
    --- End diff --
    
    Instead of spread the parsing logic, it is better to externalize this into 
a pair of methods - one to create streamChunkId given streamId and chunkIndex 
and another to retrieve it.
    If we have to change delimiter or add other logic, it will be more easier 
to manage the change.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to