@Override public void unableToMonitorLockNode(final Throwable e) { // ACCUMULO-3651 Changed level to error and added FATAL to message for slf4j compatibility Halt.halt(-1, new Runnable() { @Override public void run() { log.error("FATAL: No longer able to monitor master lock node", e); } }); }
public static void halt(final String msg, int status) { halt(status, new Runnable() { @Override public void run() { log.error("FATAL {}", msg); } }); }
@Override public void unableToMonitorLockNode(final Throwable e) { Halt.halt(1, new Runnable() { @Override public void run() { log.error("Lost ability to monitor tablet server lock, exiting.", e); } }); } };
@Override public void unableToMonitorLockNode(final Throwable e) { Halt.halt(-1, new Runnable() { @Override public void run() { log.error("No longer able to monitor Monitor lock node", e); } }); }
public static void halt(final String msg) { // ACCUMULO-3651 Changed level to error and added FATAL to message for slf4j compatibility halt(0, new Runnable() { @Override public void run() { log.error("FATAL {}", msg); } }); }
@Override public void unableToMonitorLockNode(final Throwable e) { // ACCUMULO-3651 Level changed to error and FATAL added to message for slf4j compatibility Halt.halt(-1, new Runnable() { @Override public void run() { log.error("FATAL: No longer able to monitor lock node ", e); } }); } };
@Override public void lostLock(final LockLossReason reason) { Halt.halt(serverStopRequested ? 0 : 1, new Runnable() { @Override public void run() { if (!serverStopRequested) log.error("Lost tablet server lock (reason = {}), exiting.", reason); gcLogger.logGCInfo(getConfiguration()); } }); }
@Override public void lostLock(LockLossReason reason) { Halt.halt("Master lock in zookeeper lost (reason = " + reason + "), exiting!", -1); }
@Override public void lostLock(LockLossReason reason) { Halt.halt("Monitor lock in zookeeper lost (reason = " + reason + "), exiting!", -1); }
@Override public void lostLock(LockLossReason reason) { Halt.halt("GC lock in zookeeper lost (reason = " + reason + "), exiting!", 1); }
@Override public synchronized void acquiredLock() { if (acquiredLock || failedToAcquireLock) { Halt.halt("Zoolock in unexpected state AL " + acquiredLock + " " + failedToAcquireLock, -1); } acquiredLock = true; notifyAll(); }
@Override public synchronized void acquiredLock() { log.debug("Acquired master lock"); if (acquiredLock || failedToAcquireLock) { Halt.halt("Zoolock in unexpected state AL " + acquiredLock + " " + failedToAcquireLock, -1); } acquiredLock = true; notifyAll(); }
@Override public synchronized void failedToAcquireLock(Exception e) { log.warn("Failed to get monitor lock " + e); if (acquiredLock) { Halt.halt("Zoolock in unexpected state FAL " + acquiredLock + " " + failedToAcquireLock, -1); } failedToAcquireLock = true; notifyAll(); }
@Override public synchronized void failedToAcquireLock(Exception e) { log.warn("Failed to get master lock", e); if (e instanceof NoAuthException) { String msg = "Failed to acquire master lock due to incorrect ZooKeeper authentication."; log.error("{} Ensure instance.secret is consistent across Accumulo configuration", msg, e); Halt.halt(msg, -1); } if (acquiredLock) { Halt.halt("Zoolock in unexpected state FAL " + acquiredLock + " " + failedToAcquireLock, -1); } failedToAcquireLock = true; notifyAll(); }
@Override public void run() { try { finalServer.serve(); } catch (Error e) { Halt.halt("Unexpected error in TThreadPoolServer " + e + ", halting.", 1); } } };
@Override public void run() { try { checkMounts(procFile); } catch (final Exception e) { Halt.halt(-42, new Runnable() { @Override public void run() { log.error("Exception while checking mount points, halting process", e); } }); } } };
@Override public void halt(TInfo tinfo, TCredentials credentials, String lock) throws ThriftSecurityException { checkPermission(credentials, lock, "halt"); Halt.halt(0, new Runnable() { @Override public void run() { log.info("Master requested tablet server halt"); gcLogger.logGCInfo(TabletServer.this.getConfiguration()); serverStopRequested = true; try { tabletServerLock.unlock(); } catch (Exception e) { log.error("Caught exception unlocking TabletServer lock", e); } } }); }
Halt.halt("Garbage collection may be interfering with lock keep-alive. Halting.", -1);
public synchronized void remove(TServerInstance server) { String zPath = null; for (Entry<String,TServerInfo> entry : current.entrySet()) { if (entry.getValue().instance.equals(server)) { zPath = entry.getKey(); break; } } if (zPath == null) return; current.remove(zPath); currentInstances.remove(server); log.info("Removing zookeeper lock for {}", server); String fullpath = context.getZooKeeperRoot() + Constants.ZTSERVERS + "/" + zPath; try { context.getZooReaderWriter().recursiveDelete(fullpath, SKIP); } catch (Exception e) { String msg = "error removing tablet server lock"; // ACCUMULO-3651 Changed level to error and added FATAL to message for slf4j compatibility log.error("FATAL: {}", msg, e); Halt.halt(msg, -1); } getZooCache().clear(fullpath); } }
log.error("Repeatedly failed to create WAL. Going to exit tabletserver.", t); Halt.halt("Experienced too many errors creating WALs, giving up", 1);