Github user vanzin commented on a diff in the pull request:
https://github.com/apache/spark/pull/21451#discussion_r198653427
--- Diff:
core/src/main/scala/org/apache/spark/network/netty/NettyBlockRpcServer.scala ---
@@ -73,10 +73,34 @@ class NettyBlockRpcServer(
}
val data = new
NioManagedBuffer(ByteBuffer.wrap(uploadBlock.blockData))
val blockId = BlockId(uploadBlock.blockId)
+ logInfo(s"Receiving replicated block $blockId with level ${level}
" +
+ s"from ${client.getSocketAddress}")
blockManager.putBlockData(blockId, data, level, classTag)
responseContext.onSuccess(ByteBuffer.allocate(0))
}
}
+ override def receiveStream(
+ client: TransportClient,
+ messageHeader: ByteBuffer,
+ responseContext: RpcResponseCallback): StreamCallbackWithID = {
+ val message =
BlockTransferMessage.Decoder.fromByteBuffer(messageHeader)
+ message match {
+ case uploadBlockStream: UploadBlockStream =>
+ val (level: StorageLevel, classTag: ClassTag[_]) = {
--- End diff --
Indentation is off here.
Using `.asInstanceOf[UploadBlockStream]` would achieve the same goal here
with less indentation, just with a different exception...
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]