HDFS-2267. DataXceiver thread name incorrect while waiting on op during keepalive. Contributed by Todd Lipcon.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1160873 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Todd Lipcon 2011-08-23 19:47:14 +00:00
parent 8af5c4b24a
commit b04aafee50
2 changed files with 5 additions and 2 deletions

View File

@ -986,6 +986,9 @@ Trunk (unreleased changes)
HDFS-1257. Fix a race condition on BlockManager.recentInvalidateSets.
(Eric Payne via szetszwo)
HDFS-2267. DataXceiver thread name incorrect while waiting on op during
keepalive. (todd)
BREAKDOWN OF HDFS-1073 SUBTASKS
HDFS-1521. Persist transaction ID on disk between NN restarts.

View File

@ -127,8 +127,6 @@ private void updateCurrentThreadName(String status) {
* Read/write data from/to the DataXceiverServer.
*/
public void run() {
updateCurrentThreadName("Waiting for operation");
int opsProcessed = 0;
Op op = null;
try {
@ -138,6 +136,8 @@ public void run() {
// This optimistic behaviour allows the other end to reuse connections.
// Setting keepalive timeout to 0 disable this behavior.
do {
updateCurrentThreadName("Waiting for operation #" + (opsProcessed + 1));
try {
if (opsProcessed != 0) {
assert socketKeepaliveTimeout > 0;