code: public static DataNode instantiateDataNode(String args[],
                                        Configuration conf) throws IOException {
      if (conf == null)
        conf = new Configuration();
      if (!parseArguments(args, conf)) {
        printUsage();
        return null;
      }
      if (conf.get("dfs.network.script") != null) {
        LOG.error("This configuration for rack identification is not supported" +
            " anymore. RackID resolution is handled by the NameNode.");
        System.exit(-1);
      }
      String[] dataDirs = getListOfDataDirs(conf);
          dnThreadName = "DataNode: [" +
                          StringUtils.arrayToString(dataDirs) + "]";
      return makeInstance(dataDirs, conf);
    }
docs: Instantiate a single datanode object. This must be run by invoking
  {@link DataNode#runDatanodeDaemon(DataNode)} subsequently.