hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gokulakannan M <gok...@huawei.com>
Subject will HBase detect NN failure?
Date Mon, 07 Mar 2011 09:50:42 GMT
Hi All,


            In HBase 0.90 I have seen that it has a fault tolerant behavior
of triggering lease recovery and closing the file when the writer dies in
the middle. Yet does hbase have any workaround/recovery when Namenode is
restarted in the middle of the file write(possibly the HLog file , after
some syncs)???

            I faced a problem in the above scenario. When the NN is
restarted(but not DN), the following code goes into infinite loop as lease
recovery is not at all happening. But once the DN is restarted, the file can
be recovered successfully(I think the DN is not sending those partial blocks
in blocksBeingWritten to NN when only NN is restarted).         


               // Recover the files lease if necessary
boolean recovered = false;
while (!recovered) {
  try {
    FSDataOutputStream out = fs.append(logfiles[i].getPath());
    recovered = true;
  } catch (IOException e) {
    if (LOG.isDebugEnabled()) {
      LOG.debug("Triggering lease recovery.");
    try {
    } catch (InterruptedException ex) {
      // ignore it and try again









  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message