Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19476#discussion_r144869423
  
    --- Diff: 
core/src/main/scala/org/apache/spark/storage/BlockManagerMasterEndpoint.scala 
---
    @@ -422,6 +425,13 @@ class BlockManagerMasterEndpoint(
         if (blockLocations.containsKey(blockId)) 
blockLocations.get(blockId).toSeq else Seq.empty
       }
     
    +  private def getLocationsAndStatus(
    +      blockId: BlockId): (Seq[BlockManagerId], Option[BlockStatus]) = {
    --- End diff --
    
    shall we create a class for location and status? e.g.
    ```
    case class BlockLocationsAndStatus(locations: Seq[BlockManagerId], status: 
BlockStatus) {
      assert(locations.nonEmpty)
    }
    ```
    Then this method can return `Option[BlockLocationsAndStatus]`


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to