HDFS-3555. idle client socket triggers DN ERROR log (should be INFO or DEBUG). Contributed by Andy Isaacson. (harsh)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1359619 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
11782dd3a5
commit
e0f96aa249
|
@ -287,6 +287,9 @@ Branch-2 ( Unreleased changes )
|
||||||
HDFS-3067. NPE in DFSInputStream.readBuffer if read is repeated on
|
HDFS-3067. NPE in DFSInputStream.readBuffer if read is repeated on
|
||||||
corrupted block. (Henry Robinson via atm)
|
corrupted block. (Henry Robinson via atm)
|
||||||
|
|
||||||
|
HDFS-3555. idle client socket triggers DN ERROR log
|
||||||
|
(should be INFO or DEBUG). (Andy Isaacson via harsh)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
HDFS-2982. Startup performance suffers when there are many edit log
|
HDFS-2982. Startup performance suffers when there are many edit log
|
||||||
|
|
|
@ -28,6 +28,7 @@ import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.net.SocketException;
|
import java.net.SocketException;
|
||||||
|
import java.net.SocketTimeoutException;
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.nio.channels.FileChannel;
|
import java.nio.channels.FileChannel;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
@ -493,6 +494,14 @@ class BlockSender implements java.io.Closeable {
|
||||||
out.write(buf, 0, dataOff + dataLen);
|
out.write(buf, 0, dataOff + dataLen);
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
if (e instanceof SocketTimeoutException) {
|
||||||
|
/*
|
||||||
|
* writing to client timed out. This happens if the client reads
|
||||||
|
* part of a block and then decides not to read the rest (but leaves
|
||||||
|
* the socket open).
|
||||||
|
*/
|
||||||
|
LOG.info("BlockSender.sendChunks() exception: ", e);
|
||||||
|
} else {
|
||||||
/* Exception while writing to the client. Connection closure from
|
/* Exception while writing to the client. Connection closure from
|
||||||
* the other end is mostly the case and we do not care much about
|
* the other end is mostly the case and we do not care much about
|
||||||
* it. But other things can go wrong, especially in transferTo(),
|
* it. But other things can go wrong, especially in transferTo(),
|
||||||
|
@ -506,6 +515,7 @@ class BlockSender implements java.io.Closeable {
|
||||||
if (!ioem.startsWith("Broken pipe") && !ioem.startsWith("Connection reset")) {
|
if (!ioem.startsWith("Broken pipe") && !ioem.startsWith("Connection reset")) {
|
||||||
LOG.error("BlockSender.sendChunks() exception: ", e);
|
LOG.error("BlockSender.sendChunks() exception: ", e);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
throw ioeToSocketException(e);
|
throw ioeToSocketException(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue