Write the shutdown save snapshot terminus marker
507626
public static Runnable writeTerminusMarker(final String nonce, final NodeSettings paths, final VoltLogger logger) {
        final File f = new File(paths.getVoltDBRoot(), VoltDB.TERMINUS_MARKER);
        return new Runnable() {
            @Override
            public void run() {
                try(PrintWriter pw = new PrintWriter(new FileWriter(f), true)) {
                    pw.println(nonce);
                } catch (IOException e) {
                    throw new RuntimeException("Failed to create .complete file for " + f.getName(), e);
                }
            }
        };
    }
1168937
function msLostPointerCapture(inEvent) {
  const e = this.dispatcher.makeEvent('lostpointercapture', inEvent, inEvent);
  this.dispatcher.dispatchEvent(e);
}
1140878
def _save_to_checkpoint(self, filename):
        """"""
        command = 'checkpoint file {}'.format(filename)
        self.device.send_command(command)
959950
void markFailed() {
    // It's possible that the dag is killed before this method is called.
    assertRunningOrKilling();
    changeStatus(Status.FAILURE);
    for (final Node child : this.children) {
      child.cancel();
    }
    //todo: HappyRay support failure options "Finish Current Running" and "Cancel All"
    this.dag.updateDagStatus();
  }
432410
function() {
            if (_.keys(children).length == 0) {
              that.stop(process.exit);
            }
            else {
              setImmediate(checkExit);   // keep polling for safe shutdown.
            }
          }
893379
private void writeEndMark() throws IOException {
    intLEBuffer.putInt(0, 0);
    out.write(intLEBuffer.array());
    if (frameInfo.isEnabled(FLG.Bits.CONTENT_CHECKSUM)) {
      intLEBuffer.putInt(0, frameInfo.currentStreamHash());
      out.write(intLEBuffer.array());
    }
    frameInfo.finish();
  }
104369
@Override
    public CountDownLatch snapshotCompleted(SnapshotCompletionEvent event) {
        if (!event.truncationSnapshot || !event.didSucceed) {
            VoltDB.crashGlobalVoltDB("Failed to truncate command logs by snapshot",
                                     false, null);
        } else {
            m_truncationSnapshot = event.multipartTxnId;
            m_truncationSnapshotPerPartition = event.partitionTxnIds;
            m_replayAgent.returnAllSegments();
            changeState();
        }
        return new CountDownLatch(0);
    }
473000
static synchronized void shutDownHub() {
        LOGGER.entering();
        if (!isRunLocally()) {
            LOGGER.exiting();
            return;
        }

        // shutdown in reverse order
        Collections.reverse(toBoot);
        for (LocalServerComponent eachItem : toBoot) {
            eachItem.shutdown();
        }
        clearToBootList();
        LOGGER.exiting();
    }
391176
private void datanodeDump(PrintWriter out) {
    readLock();
    try {
      synchronized (datanodeMap) {
        out.println("Metasave: Number of datanodes: " + datanodeMap.size());
        for (Iterator<DatanodeDescriptor> it = datanodeMap.values().iterator(); it.hasNext();) {
          DatanodeDescriptor node = it.next();
          out.println(node.dumpDatanode());
        }
      }
    } finally {
      readUnlock();
    }
  }
657946
def _writeCloseFrame(self, reason=DISCONNECT.GO_AWAY):
        '''

        '''
        self.transport.writeClose(reason)
        self.transport.loseConnection()
        self.transport = None
142063
public static void shutdownActive(ExitCode exitCode, 
                                    String msg)
  {
    shutdownActive(ShutdownModeAmp.GRACEFUL, exitCode, msg, null);
  }
840138
private void writeClosingMark(boolean empty) throws IOException {
		if (empty) {
			writer.write(' ');
			writer.write('/');
		}
		writer.write('>');
	}
802670
def output(self, kind, line):
        ""
        self.destination.write(b''.join([
            self._cyan,
            b't=%07d' % (time.time() - self._t0),
            self._reset,
            self._kind_prefixes[kind],
            self.markers[kind],
            line,
            self._reset,
        ]))
        self.destination.flush()
1374964
def shutdown(self, exitcode=0, exitmsg=None):
        '''
        
        '''
        log.info('The salt-api is shutting down..')
        msg = 'The salt-api is shutdown. '
        if exitmsg is not None:
            exitmsg = msg + exitmsg
        else:
            exitmsg = msg.strip()
        super(SaltAPI, self).shutdown(exitcode, exitmsg)
753426
@Override
  public void preSave(String checkpointId) {
    System.out.println(String.format("Saving spout state at checkpoint %s", checkpointId));
  }
111414
public void shutdown() {
    shouldRun = false;
    try {
      if (infoServer != null) infoServer.stop();
    } catch (Exception e) {
      LOG.warn("Exception shutting down SecondaryNameNode", e);
    }
    try {
      if (checkpointImage != null) checkpointImage.close();
    } catch(IOException e) {
      LOG.warn(StringUtils.stringifyException(e));
    }
  }
411395
def touch(path, fatal=True, logger=None):
    
    return write(path, "", fatal=fatal, logger=logger)