List of usage examples for org.apache.hadoop.util StringUtils uriToString
public static String uriToString(URI[] uris)
From source file:common.DataNode.java
License:Apache License
/** Instantiate a single datanode object. This must be run by invoking * {@link DataNode#runDatanodeDaemon(DataNode)} subsequently. */// w ww . jav a 2s . c o m public static DataNode instantiateDataNode(String args[], Configuration conf) throws IOException { if (conf == null) conf = new HdfsConfiguration(); if (args != null) { // parse generic hadoop options GenericOptionsParser hParser = new GenericOptionsParser(conf, args); args = hParser.getRemainingArgs(); } 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); } Collection<URI> dataDirs = getStorageDirs(conf); dnThreadName = "DataNode: [" + StringUtils.uriToString(dataDirs.toArray(new URI[0])) + "]"; return makeInstance(dataDirs, conf); }