/** * Try to get the HA state of the node at the given address. This * function is guaranteed to be "quick" -- ie it has a short timeout * and no retries. Its only purpose is to avoid fencing a node that * has already restarted. */ boolean tryGracefulFence(HAServiceTarget svc) { HAServiceProtocol proxy = null; try { proxy = svc.getProxy(gracefulFenceConf, gracefulFenceTimeout); proxy.transitionToStandby(createReqInfo()); return true; } catch (ServiceFailedException sfe) { LOG.warn("Unable to gracefully make {} standby ({})", svc, sfe.getMessage()); } catch (IOException ioe) { LOG.warn("Unable to gracefully make {} standby (unable to connect)", svc, ioe); } finally { if (proxy != null) { RPC.stopProxy(proxy); } } return false; }
} catch (ServiceFailedException sfe) { LOG.error("Unable to make {} active ({}). Failing back.", toSvc, sfe.getMessage()); failed = true; cause = sfe;
/** * Try to get the HA state of the node at the given address. This * function is guaranteed to be "quick" -- ie it has a short timeout * and no retries. Its only purpose is to avoid fencing a node that * has already restarted. */ boolean tryGracefulFence(HAServiceTarget svc) { HAServiceProtocol proxy = null; try { proxy = svc.getProxy(gracefulFenceConf, gracefulFenceTimeout); proxy.transitionToStandby(createReqInfo()); return true; } catch (ServiceFailedException sfe) { LOG.warn("Unable to gracefully make " + svc + " standby (" + sfe.getMessage() + ")"); } catch (IOException ioe) { LOG.warn("Unable to gracefully make " + svc + " standby (unable to connect)", ioe); } finally { if (proxy != null) { RPC.stopProxy(proxy); } } return false; }
/** * Try to get the HA state of the node at the given address. This * function is guaranteed to be "quick" -- ie it has a short timeout * and no retries. Its only purpose is to avoid fencing a node that * has already restarted. */ boolean tryGracefulFence(HAServiceTarget svc) { HAServiceProtocol proxy = null; try { proxy = svc.getProxy(gracefulFenceConf, gracefulFenceTimeout); proxy.transitionToStandby(createReqInfo()); return true; } catch (ServiceFailedException sfe) { LOG.warn("Unable to gracefully make " + svc + " standby (" + sfe.getMessage() + ")"); } catch (IOException ioe) { LOG.warn("Unable to gracefully make " + svc + " standby (unable to connect)", ioe); } finally { if (proxy != null) { RPC.stopProxy(proxy); } } return false; }
/** * Try to get the HA state of the node at the given address. This * function is guaranteed to be "quick" -- ie it has a short timeout * and no retries. Its only purpose is to avoid fencing a node that * has already restarted. */ boolean tryGracefulFence(HAServiceTarget svc) { HAServiceProtocol proxy = null; try { proxy = svc.getProxy(gracefulFenceConf, gracefulFenceTimeout); proxy.transitionToStandby(createReqInfo()); return true; } catch (ServiceFailedException sfe) { LOG.warn("Unable to gracefully make " + svc + " standby (" + sfe.getMessage() + ")"); } catch (IOException ioe) { LOG.warn("Unable to gracefully make " + svc + " standby (unable to connect)", ioe); } finally { if (proxy != null) { RPC.stopProxy(proxy); } } return false; }
/** * Try to get the HA state of the node at the given address. This * function is guaranteed to be "quick" -- ie it has a short timeout * and no retries. Its only purpose is to avoid fencing a node that * has already restarted. */ boolean tryGracefulFence(HAServiceTarget svc) { HAServiceProtocol proxy = null; try { proxy = svc.getProxy(gracefulFenceConf, gracefulFenceTimeout); proxy.transitionToStandby(createReqInfo()); return true; } catch (ServiceFailedException sfe) { LOG.warn("Unable to gracefully make " + svc + " standby (" + sfe.getMessage() + ")"); } catch (IOException ioe) { LOG.warn("Unable to gracefully make " + svc + " standby (unable to connect)", ioe); } finally { if (proxy != null) { RPC.stopProxy(proxy); } } return false; }
} catch (ServiceFailedException sfe) { LOG.error("Unable to make " + toSvc + " active (" + sfe.getMessage() + "). Failing back."); failed = true; cause = sfe;
} catch (ServiceFailedException sfe) { LOG.error("Unable to make " + toSvc + " active (" + sfe.getMessage() + "). Failing back."); failed = true; cause = sfe;
} catch (ServiceFailedException sfe) { LOG.error("Unable to make " + toSvc + " active (" + sfe.getMessage() + "). Failing back."); failed = true; cause = sfe;
} catch (ServiceFailedException sfe) { LOG.error("Unable to make " + toSvc + " active (" + sfe.getMessage() + "). Failing back."); failed = true; cause = sfe;