You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by do...@apache.org on 2019/01/04 04:02:32 UTC
[spark] branch branch-2.4 updated: [MINOR][NETWORK][TEST] Fix
TransportFrameDecoderSuite to use ByteBuf instead of ByteBuffer
This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch branch-2.4
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-2.4 by this push:
new c0f4082 [MINOR][NETWORK][TEST] Fix TransportFrameDecoderSuite to use ByteBuf instead of ByteBuffer
c0f4082 is described below
commit c0f4082ef0c05aee9f31fb74509d023552de8469
Author: Dongjoon Hyun <do...@apache.org>
AuthorDate: Thu Jan 3 20:01:19 2019 -0800
[MINOR][NETWORK][TEST] Fix TransportFrameDecoderSuite to use ByteBuf instead of ByteBuffer
## What changes were proposed in this pull request?
`fireChannelRead` expects `io.netty.buffer.ByteBuf`.I checked that this is the only place which misuse `java.nio.ByteBuffer` in `network` module.
## How was this patch tested?
Pass the Jenkins with the existing tests.
Closes #23442 from dongjoon-hyun/SPARK-NETWORK-COMMON.
Authored-by: Dongjoon Hyun <do...@apache.org>
Signed-off-by: Dongjoon Hyun <do...@apache.org>
(cherry picked from commit 27e42c1de502da80fa3e22bb69de47fb00158174)
Signed-off-by: Dongjoon Hyun <do...@apache.org>
---
.../java/org/apache/spark/network/util/TransportFrameDecoderSuite.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/common/network-common/src/test/java/org/apache/spark/network/util/TransportFrameDecoderSuite.java b/common/network-common/src/test/java/org/apache/spark/network/util/TransportFrameDecoderSuite.java
index b53e413..7d40387 100644
--- a/common/network-common/src/test/java/org/apache/spark/network/util/TransportFrameDecoderSuite.java
+++ b/common/network-common/src/test/java/org/apache/spark/network/util/TransportFrameDecoderSuite.java
@@ -17,7 +17,6 @@
package org.apache.spark.network.util;
-import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
@@ -69,7 +68,7 @@ public class TransportFrameDecoderSuite {
decoder.channelRead(ctx, len);
decoder.channelRead(ctx, dataBuf);
verify(interceptor, times(interceptedReads)).handle(any(ByteBuf.class));
- verify(ctx).fireChannelRead(any(ByteBuffer.class));
+ verify(ctx).fireChannelRead(any(ByteBuf.class));
assertEquals(0, len.refCnt());
assertEquals(0, dataBuf.refCnt());
} finally {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org