Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase, mail # user - Slow region server recoveries

Copy link to this message
Re: Slow region server recoveries
Varun Sharma 2013-04-19, 10:46
Hi Nicholas,

Here is the failure scenario, I have dug up the logs.

A machine fails and stops accepting/transmitting traffic. The HMaster
starts the distributed split for 13 tasks. There are 12 region servers. 12
tasks succeed but the 13th one takes a looong time.

Zookeeper timeout is set to 30 seconds. Stale node timeout is 20 seconds.
Both patches are there.

a) Machine fails around 27:30
b) Master starts the split around 27:40 and submits the tasks. The one task
which fails seems to be the one which contains the WAL being currently
written to:

2013-04-19 00:27:44,325 INFO
org.apache.hadoop.hbase.regionserver.wal.HLogSplitter: Splitting hlog:

Basically this region server picks up the task but finds the length of this
file to be 0 and drops. This happens again

c) Finally another region server picks up the task but it ends up going to
the bad datanode which should not happen because of the stale node timeout)
Unfortunately it hits the 45 retries and a connect timeout of 20 seconds
every time. This delays recovery significantly. Now I guess reducing # of
retries to 1 is one possibility.
But then the namenode logs are very interesting.

d) Namenode seems to be in cyclic lease recovery loop until the node is
marked dead. There is this one last block which exhibits this.

2013-04-19 00:28:09,744 INFO BlockStateChange: BLOCK* blk_-*
ReplicaUnderConstruction[|RBW]]} recovery started,
2013-04-19 00:28:09,744 WARN org.apache.hadoop.hdfs.StateChange: DIR*
NameSystem.internalReleaseLease: File
has not been closed. Lease recovery is in progress. RecoveryId = 174413 for
block blk_-5723958680970112840_174056{blockUCState=UNDER_RECOVERY,

I see this over and over again in the logs until the datanode is marked
dead. It seems to be cycling through the replicas for this WAL block and
trying to add it to the recovery list. I looked at the code and it says:

      // Cannot close file right now, since the last block requires
      // This may potentially cause infinite loop in lease recovery
      // if there are no valid replicas on data-nodes.
                "DIR* NameSystem.internalReleaseLease: " +
                "File " + src + " has not been closed." +
               " Lease recovery is in progress. " +
                "RecoveryId = " + blockRecoveryId + " for block " +

Eventually for this block, we get

2013-04-19 00:41:20,736 INFO
*5723958680970112840_174056*, newgenerationstamp=174413,
newlength=119148648, newtargets=[,],
closeFile=true, deleteBlock=false)
2013-04-19 00:41:20,736 ERROR
org.apache.hadoop.security.UserGroupInformation: PriviledgedActionException
as:hdfs (auth:SIMPLE) cause:java.io.IOException: Block
not found
2013-04-19 00:41:20,736 INFO org.apache.hadoop.ipc.Server: IPC Server
handler 35 on 8020, call
from error: java.io.IOException: Block
not found

On the datanode side, i see a call for recover blocks - I see that a write
pipeline is there, which gets terminated with some socket timeouts...

00:28:11,471 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: NameNode
at ec2-107-20-237-30.compute-1.amazonaws.com/ calls

Not sure but this looks like a case where data could be lost   ?

On Fri, Apr 19, 2013 at 12:38 AM, Nicolas Liochon <[EMAIL PROTECTED]> wrote: