Skip to content

Commit

Permalink
Fix review comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
Victsm committed Sep 23, 2020
1 parent 90d6329 commit 2bdf800
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,8 @@ public String getID() {
} catch (IOException ioe) {
// No exception will be thrown here. req.meta.nioByteBuffer will not throw IOException
// because it's a NettyManagedBuffer. This try-catch block is to make compiler happy.
logger.error("Error in handling failure while invoking RpcHandler#receive() on RPC id "
+ req.requestId, e);
logger.error("Error in handling failure while invoking RpcHandler#receive() on RPC id {}",
req.requestId, e);
} finally {
req.meta.release();
}
Expand Down Expand Up @@ -296,7 +296,7 @@ private void processOneWayMessage(OneWayMessage req) {
/**
* Make a full copy of a nio ByteBuffer.
*/
private ByteBuffer cloneBuffer(ByteBuffer buf) {
private static ByteBuffer cloneBuffer(ByteBuffer buf) {
ByteBuffer clone = ByteBuffer.allocate(buf.capacity());
clone.put(buf.duplicate());
clone.flip();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* and logged.
* Note: {@link RetryingBlockFetcher} will delegate the exception to this handler only when
* - remaining retries < max retries
* - exception is either an IOException or SaslException
* - exception is an IOException
*/

public interface ErrorHandler {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import java.io.File;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
import com.google.common.base.Throwables;
import org.junit.Test;

import static org.junit.Assert.*;

import org.apache.spark.network.shuffle.protocol.PushBlockStream;
import org.apache.spark.network.util.JavaUtils;

import static org.junit.Assert.*;

public class BlockPushExceptionSuite {

@Test
Expand Down

0 comments on commit 2bdf800

Please sign in to comment.