Source:
public DependencyPair executePlanFragment(Map<Integer, List<VoltTable>> dependencies, long fragmentId, ParameterSet params, SystemProcedureExecutionContext context) { if (fragmentId == SysProcFragmentId.PF_shutdownSync) { VoltDB.instance().getHostMessenger().prepareForShutdown(); if (!m_failsafeArmed.getAndSet(true)) { m_failsafe.start(); VoltLogger voltLogger = new VoltLogger("HOST"); voltLogger.warn("******************************************************************************************"); voltLogger.warn("** VoltDB shutdown operation requested and in progress. Cluster will terminate shortly. **"); voltLogger.warn("******************************************************************************************\n"); } VoltTable rslt = new VoltTable(new ColumnInfo[] { new ColumnInfo("HA", VoltType.STRING) }); return new DependencyPair.TableDependencyPair(DEP_shutdownSync, rslt); } else if (fragmentId == SysProcFragmentId.PF_shutdownSyncDone) { VoltTable rslt = new VoltTable(new ColumnInfo[] { new ColumnInfo("HA", VoltType.STRING) }); return new DependencyPair.TableDependencyPair(DEP_shutdownSyncDone, rslt); } else if (fragmentId == SysProcFragmentId.PF_shutdownCommand) { Thread shutdownThread = new Thread() { @Override public void run() { boolean die = false; try { die = VoltDB.instance().shutdown(this); } catch (InterruptedException e) { new VoltLogger("HOST").error( "Exception while attempting to shutdown VoltDB from shutdown sysproc", e); } if (die) { VoltLogger voltLogger = new VoltLogger("HOST"); voltLogger.warn("******************************************************************************************"); voltLogger.warn("**************** VoltDB shutting down as requested by @Shutdown command. *****************"); voltLogger.warn("******************************************************************************************\n"); System.exit(0); } else { try { Thread.sleep(10000); } catch (InterruptedException e) } } }; shutdownThread.start(); } return null; }

Target:
public DependencyPair executePlanFragment(Map<Integer, List<VoltTable>> dependencies, long fragmentId, ParameterSet params, SystemProcedureExecutionContext context) { if (fragmentId == SysProcFragmentId.PF_shutdownSync) { VoltDB.instance().getHostMessenger().prepareForShutdown(); if (!m_failsafeArmed.getAndSet(true)) { m_failsafe.start(); VoltLogger voltLogger = new VoltLogger("HOST"); String msg = "VoltDB shutdown operation requested and in progress. Cluster will terminate shortly."; CoreUtils.PrintGoodLookingLog(voltLogger, msg, Level.WARN); } VoltTable rslt = new VoltTable(new ColumnInfo[] { new ColumnInfo("HA", VoltType.STRING) }); return new DependencyPair.TableDependencyPair(DEP_shutdownSync, rslt); } else if (fragmentId == SysProcFragmentId.PF_shutdownSyncDone) { VoltTable rslt = new VoltTable(new ColumnInfo[] { new ColumnInfo("HA", VoltType.STRING) }); return new DependencyPair.TableDependencyPair(DEP_shutdownSyncDone, rslt); } else if (fragmentId == SysProcFragmentId.PF_shutdownCommand) { Thread shutdownThread = new Thread() { @Override public void run() { boolean die = false; try { die = VoltDB.instance().shutdown(this); } catch (InterruptedException e) { new VoltLogger("HOST").error( "Exception while attempting to shutdown VoltDB from shutdown sysproc", e); } if (die) { VoltLogger voltLogger = new VoltLogger("HOST"); String msg = "VoltDB shutting down as requested by @Shutdown command."; CoreUtils.PrintGoodLookingLog(voltLogger, msg, Level.WARN); System.exit(0); } else { try { Thread.sleep(10000); } catch (InterruptedException e) } } }; shutdownThread.start(); } return null; }