HDFS-14451. Incorrect header or version mismatch log message. Contributed by Shweta.
Signed-off-by: Wei-Chiu Chuang <weichiu@apache.org>
This commit is contained in:
parent
460ba7fb14
commit
93d7630062
|
@ -2234,10 +2234,16 @@ public abstract class Server {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!RpcConstants.HEADER.equals(dataLengthBuffer)
|
if(!RpcConstants.HEADER.equals(dataLengthBuffer)) {
|
||||||
|| version != CURRENT_VERSION) {
|
LOG.warn("Incorrect RPC Header length from {}:{} "
|
||||||
|
+ "expected length: {} got length: {}",
|
||||||
|
hostAddress, remotePort, RpcConstants.HEADER, dataLengthBuffer);
|
||||||
|
setupBadVersionResponse(version);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if (version != CURRENT_VERSION) {
|
||||||
//Warning is ok since this is not supposed to happen.
|
//Warning is ok since this is not supposed to happen.
|
||||||
LOG.warn("Incorrect header or version mismatch from " +
|
LOG.warn("Version mismatch from " +
|
||||||
hostAddress + ":" + remotePort +
|
hostAddress + ":" + remotePort +
|
||||||
" got version " + version +
|
" got version " + version +
|
||||||
" expected version " + CURRENT_VERSION);
|
" expected version " + CURRENT_VERSION);
|
||||||
|
|
Loading…
Reference in New Issue