Skip to content

Commit 7d41884

Browse files
committed
Reapply the target fix
1 parent 7606f07 commit 7d41884

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

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

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -208,22 +208,7 @@ class TransformWithStateInPySparkStateServer(
208208
private def parseProtoMessage(): StateRequest = {
209209
val messageLen = inputStream.readInt()
210210
val messageBytes = new Array[Byte](messageLen)
211-
// inputStream.readFully(messageBytes)
212-
// inputStream.read(messageBytes)
213-
// /*
214-
val readBytes = inputStream.read(messageBytes)
215-
if (readBytes != messageLen) {
216-
throw new Exception(s"TESTING: Failed to read message bytes: expected $messageLen bytes, " +
217-
s"but only read $readBytes bytes")
218-
}
219-
/*
220-
else if (messageLen > 500) {
221-
val debug = StateRequest.parseFrom(ByteString.copyFrom(messageBytes))
222-
throw new Exception(s"Unexpectedly matched message length: $messageLen bytes, "
223-
// + s"debug: ${debug.toString}")
224-
)
225-
}
226-
*/
211+
inputStream.readFully(messageBytes)
227212
StateRequest.parseFrom(ByteString.copyFrom(messageBytes))
228213
}
229214

0 commit comments

Comments
 (0)