List of usage examples for org.apache.hadoop.hdfs MiniDFSCluster getURI
public URI getURI()
From source file:org.apache.sentry.binding.solr.HdfsTestUtil.java
License:Apache License
public static String getDataDir(MiniDFSCluster dfsCluster, String dataDir) throws IOException { URI uri = dfsCluster.getURI(); String dir = uri.toString() + "/" + new File(dataDir).toString().replaceAll(":", "_").replaceAll("/", "_"); return dir;// w w w . j a v a2 s. c o m }
From source file:org.apache.solr.cloud.hdfs.HdfsTestUtil.java
License:Apache License
public static String getDataDir(MiniDFSCluster dfsCluster, String dataDir) throws IOException { if (dataDir == null) { return null; }/* ww w . j a v a 2 s . co m*/ URI uri = dfsCluster.getURI(); String dir = uri.toString() + "/" + new File(dataDir).toString().replaceAll(":", "_").replaceAll("/", "_"); return dir; }