Fixed Exception handling for fragmented Rabit 'print' tracker command. Fixed unit test. (#2081)

This commit is contained in:
Xin Yin
2017-03-05 15:40:59 -06:00
committed by Tianqi Chen
parent ab13fd72bd
commit 5b54b9437c
2 changed files with 10 additions and 5 deletions

View File

@@ -129,8 +129,8 @@ private[scala] class RabitWorkerHandler(host: String, worldSize: Int, tracker: A
Try(decodeCommand(readBuffer)) match {
case scala.util.Success(decodedCommand) =>
tracker ! decodedCommand
case scala.util.Failure(th: java.nio.BufferOverflowException) =>
// BufferOverflowException would occur if the message to print has not arrived yet.
case scala.util.Failure(th: java.nio.BufferUnderflowException) =>
// BufferUnderflowException would occur if the message to print has not arrived yet.
// Do nothing, wait for next Tcp.Received event
case scala.util.Failure(th: Throwable) => throw th
}