File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
external/flume/src/main/scala/org/apache/spark/streaming/flume Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -33,20 +33,20 @@ object EventTransformer extends Logging {
33
33
Array [Byte ]) = {
34
34
val bodyLength = in.readInt()
35
35
val bodyBuff = new Array [Byte ](bodyLength)
36
- in.read (bodyBuff)
36
+ in.readFully (bodyBuff)
37
37
38
38
val numHeaders = in.readInt()
39
39
val headers = new java.util.HashMap [CharSequence , CharSequence ]
40
40
41
41
for (i <- 0 until numHeaders) {
42
42
val keyLength = in.readInt()
43
43
val keyBuff = new Array [Byte ](keyLength)
44
- in.read (keyBuff)
44
+ in.readFully (keyBuff)
45
45
val key : String = Utils .deserialize(keyBuff)
46
46
47
47
val valLength = in.readInt()
48
48
val valBuff = new Array [Byte ](valLength)
49
- in.read (valBuff)
49
+ in.readFully (valBuff)
50
50
val value : String = Utils .deserialize(valBuff)
51
51
52
52
headers.put(key, value)
You can’t perform that action at this time.
0 commit comments