Github user pwendell commented on the pull request:

    https://github.com/apache/spark/pull/1486#issuecomment-54919185
  
    Hey I had one other thought about the design here. We can do this in a 
subsequent patch, but it could be nice to make `TaskLocation` a case class and 
have it be serializable to/from a string.
    
    In the past we did this in locations where we had to go through a string 
but wanted to add type safety:
    
https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/storage/BlockId.scala
    
    Then you can have sub classes for each one that we need such as:
    `ExecutorCacheTaskLocation`, `HDFSCacheTaskLocation`, `HostTaskLocation`.
    
    And they can have prefixes similar to `BlockID's` and if there is no prefix 
it will be delimited as a `HostTaskLocation`.



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