YARN-2992. ZKRMStateStore crashes due to session expiry. Contributed by Karthik Kambatla

(cherry picked from commit 1454efe5d4)
This commit is contained in:
Jian He 2014-12-26 17:59:58 -08:00
parent fc3e810a19
commit ca0349b87a
2 changed files with 6 additions and 0 deletions

View File

@ -257,6 +257,9 @@ Release 2.7.0 - UNRELEASED
YARN-2988. Graph#save() may leak file descriptors. (Ted Yu via ozawa)
YARN-2992. ZKRMStateStore crashes due to session expiry. (Karthik Kambatla
via jianhe)
Release 2.6.0 - 2014-11-18
INCOMPATIBLE CHANGES

View File

@ -1056,6 +1056,8 @@ public class ZKRMStateStore extends RMStateStore {
switch (code) {
case CONNECTIONLOSS:
case OPERATIONTIMEOUT:
case SESSIONEXPIRED:
case SESSIONMOVED:
return true;
default:
break;
@ -1084,6 +1086,7 @@ public class ZKRMStateStore extends RMStateStore {
if (shouldRetry(ke.code()) && ++retry < numRetries) {
LOG.info("Retrying operation on ZK. Retry no. " + retry);
Thread.sleep(zkRetryInterval);
createConnection();
continue;
}
LOG.info("Maxed out ZK retries. Giving up!");