code: public static void main(String[] argv) throws Exception {
      org.apache.hadoop.hdfs.DnsMonitorSecurityManager.setTheManager();
      StringUtils.startupShutdownMessage(SecondaryNameNode.class, argv, LOG);
      Configuration tconf = new Configuration();
      try {
        argv = DFSUtil.setGenericConf(argv, tconf);
      } catch (IllegalArgumentException e) {
        System.err.println(e.getMessage());
        printUsage("");
        return;
      }
      if (argv.length >= 1) {
        SecondaryNameNode secondary = new SecondaryNameNode(tconf);
        int ret = secondary.processArgs(argv);
        System.exit(ret);
      }
  
      // Create a never ending deamon
      Daemon checkpointThread = new Daemon(new SecondaryNameNode(tconf)); 
      checkpointThread.start();
    }
docs: main() has some simple utility methods.
  @param argv Command line parameters.
  @exception Exception if the filesystem does not exist.