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

    https://github.com/apache/spark/pull/1058#discussion_r13726181
  
    --- Diff: core/src/main/scala/org/apache/spark/storage/BlockManager.scala 
---
    @@ -782,15 +765,16 @@ private[spark] class BlockManager(
         for (peer: BlockManagerId <- cachedPeers) {
           val start = System.nanoTime
           data.rewind()
    -      logDebug("Try to replicate BlockId " + blockId + " once; The size of 
the data is "
    -        + data.limit() + " Bytes. To node: " + peer)
    -      if (!BlockManagerWorker.syncPutBlock(PutBlock(blockId, data, tLevel),
    -        new ConnectionManagerId(peer.host, peer.port))) {
    -        logError("Failed to call syncPutBlock to " + peer)
    +      logDebug(s"Try to replicate $blockId once; The size of the data is 
${data.limit()} Bytes. " +
    +        s"To node: $peer")
    +      val syncPutBlockSuccess = BlockManagerWorker.syncPutBlock(
    --- End diff --
    
    This one might be nicer to break out:
    
    ```
    val cmId = new ConnectionManagerId(peer.host, peer.port)
    val putBlock = PutBlock(blockId, data, tLevel)
    val syncPutBlockSuccess = BlockManagerWorker.syncPutBlock(cmId, putBlock)
    ```
    
    That's the same number of lines and it's more clear.


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

Reply via email to