Skip to content

Commit

Permalink
Fix codestyle errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
ooq committed Jul 15, 2015
1 parent b396bbd commit 247ec2b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
Expand Up @@ -106,7 +106,7 @@ public class RemoteBlockInStream extends BlockInStream {
private static final int MAX_REMOTE_READ_ATTEMPTS = 2;

/** A reference to the current reader so we can clear it after reading is finished. */
private static RemoteBlockReader mUnclearedReader = null;
private static RemoteBlockReader sUnclearedReader = null;

/**
* @param file the file the block belongs to
Expand Down Expand Up @@ -317,7 +317,7 @@ private static ByteBuffer retrieveByteBufferFromRemoteMachine(InetSocketAddress
RemoteBlockReader reader = RemoteBlockReader.Factory.createRemoteBlockReader(conf);
// always clear the previous reader before assigning it to a new one
clearReader();
mUnclearedReader = reader;
sUnclearedReader = reader;
return reader.readRemoteBlock(
address.getHostName(), address.getPort(), blockId, offset, length);
}
Expand Down Expand Up @@ -430,11 +430,11 @@ private boolean updateCurrentBuffer() throws IOException {
*/
private static boolean clearReader() {
boolean res = true;
if (mUnclearedReader != null) {
if (mUnclearedReader instanceof NettyRemoteBlockReader) {
return ((NettyRemoteBlockReader) mUnclearedReader).clearReadResponse();
if (sUnclearedReader != null) {
if (sUnclearedReader instanceof NettyRemoteBlockReader) {
return ((NettyRemoteBlockReader) sUnclearedReader).clearReadResponse();
}
mUnclearedReader = null;
sUnclearedReader = null;
}
return res;
}
Expand Down
Expand Up @@ -26,14 +26,14 @@
import io.netty.bootstrap.Bootstrap;
import io.netty.channel.Channel;
import io.netty.channel.ChannelFuture;

import tachyon.Constants;
import tachyon.client.RemoteBlockReader;
import tachyon.network.protocol.RPCBlockReadRequest;
import tachyon.network.protocol.RPCBlockReadResponse;
import tachyon.network.protocol.RPCErrorResponse;
import tachyon.network.protocol.RPCMessage;
import tachyon.network.protocol.RPCResponse;
import tachyon.network.protocol.databuffer.DataByteBuffer;

/**
* Read data from remote data server using Netty.
Expand Down
Expand Up @@ -20,6 +20,7 @@
import com.google.common.primitives.Shorts;

import io.netty.buffer.ByteBuf;

import tachyon.network.protocol.databuffer.DataBuffer;
import tachyon.network.protocol.databuffer.DataNettyBuffer;

Expand Down

0 comments on commit 247ec2b

Please sign in to comment.