Skip to content

Commit f72775e

Browse files
committed
Revert "testing-only: use read and error when mismatched"
This reverts commit 6a0fb22.
1 parent 884bd64 commit f72775e

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

sql/core/src/main/scala/org/apache/spark/sql/execution/python/streaming/TransformWithStateInPySparkStateServer.scala

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -208,14 +208,7 @@ class TransformWithStateInPySparkStateServer(
208208
private def parseProtoMessage(): StateRequest = {
209209
val messageLen = inputStream.readInt()
210210
val messageBytes = new Array[Byte](messageLen)
211-
val readBytes = inputStream.read(messageBytes)
212-
// inputStream.readFully(messageBytes)
213-
// val readBytes = messageLen
214-
if (readBytes != messageLen) {
215-
throw new Exception(s"TESTING: Failed to read message bytes: expected $messageLen bytes, " +
216-
s"but only read $readBytes bytes")
217-
}
218-
211+
inputStream.readFully(messageBytes)
219212
StateRequest.parseFrom(ByteString.copyFrom(messageBytes))
220213
}
221214

0 commit comments

Comments
 (0)