code: public static DataNode createDataNode(String args[], Configuration conf) 
      throws IOException {
      DataNode dn = instantiateDataNode(args, conf);
      if (dn != null) {
        dn.runDatanodeDaemon();
      }
      return dn;
    }
docs: Instantiate & Start a single datanode daemon and wait for it to finish.
  If this thread is specifically interrupted, it will stop waiting.