HBASE-11594 Unhandled NoNodeException in distributed log replay mode (Jeffrey Zhong)

This commit is contained in:
Andrew Purtell 2014-08-01 09:37:56 -07:00
parent 19e9b8aa52
commit b727d1e181
1 changed files with 32 additions and 24 deletions

View File

@ -145,6 +145,7 @@ import org.apache.hadoop.metrics.util.MBeanUtil;
import org.apache.hadoop.util.ReflectionUtils; import org.apache.hadoop.util.ReflectionUtils;
import org.apache.hadoop.util.StringUtils; import org.apache.hadoop.util.StringUtils;
import org.apache.zookeeper.KeeperException; import org.apache.zookeeper.KeeperException;
import org.apache.zookeeper.KeeperException.NoNodeException;
import org.apache.zookeeper.data.Stat; import org.apache.zookeeper.data.Stat;
import com.google.common.annotations.VisibleForTesting; import com.google.common.annotations.VisibleForTesting;
@ -2852,6 +2853,8 @@ public class HRegionServer extends HasThread implements
minSeqIdForLogReplay = storeSeqIdForReplay; minSeqIdForLogReplay = storeSeqIdForReplay;
} }
} }
try {
long lastRecordedFlushedSequenceId = -1; long lastRecordedFlushedSequenceId = -1;
String nodePath = ZKUtil.joinZNode(this.zooKeeper.recoveringRegionsZNode, String nodePath = ZKUtil.joinZNode(this.zooKeeper.recoveringRegionsZNode,
region.getEncodedName()); region.getEncodedName());
@ -2876,7 +2879,12 @@ public class HRegionServer extends HasThread implements
LOG.debug("Update last flushed sequence id of region " + region.getEncodedName() + " for " LOG.debug("Update last flushed sequence id of region " + region.getEncodedName() + " for "
+ previousRSName); + previousRSName);
} else { } else {
LOG.warn("Can't find failed region server for recovering region " + region.getEncodedName()); LOG.warn("Can't find failed region server for recovering region " +
region.getEncodedName());
}
} catch (NoNodeException ignore) {
LOG.debug("Region " + region.getEncodedName() +
" must have completed recovery because its recovery znode has been removed", ignore);
} }
} }