/** * If the state store throws an error after recovery has been performed * then we can not trust it any more to reflect the NM state. We need to * mark the store and node unhealthy. * Errors during the recovery will cause a service failure and thus a NM * start failure. Do not need to mark the store unhealthy for those. * @param dbErr Exception */ private void markStoreUnHealthy(DBException dbErr) { // Always log the error here, we might not see the error in the caller LOG.error("Statestore exception: ", dbErr); // We have already been marked unhealthy so no need to do it again. if (!isHealthy) { return; } // Mark unhealthy, an out of band heartbeat will be sent and the state // will remain unhealthy (not recoverable). // No need to close the store: does not make any difference at this point. isHealthy = false; // We could get here before the nodeStatusUpdater is set NodeStatusUpdater nsu = getNodeStatusUpdater(); if (nsu != null) { nsu.reportException(dbErr); } }
e.getMessage())); context.getNodeStatusUpdater().reportException(e); return ret; } catch (Throwable e) {
e.getMessage())); getContext().getNodeStatusUpdater().reportException(e); return ret; } catch (Throwable e) {