HDFS-14755. [Dynamometer] Enhance compatibility of Dynamometer with branch-2 builds. Contributed by Takanobu Asanuma.
This commit is contained in:
parent
61b2df2331
commit
63c295e298
|
@ -109,8 +109,10 @@ public class SimulatedDataNodes extends Configured implements Tool {
|
|||
}
|
||||
System.out.println("DataNodes will connect to NameNode at " + nameNodeAdr);
|
||||
|
||||
System.setProperty(MiniDFSCluster.PROP_TEST_BUILD_DATA,
|
||||
DataNode.getStorageLocations(getConf()).get(0).getUri().getPath());
|
||||
String loc = DataNode.getStorageLocations(getConf()).get(0).toString();
|
||||
loc = loc.substring(loc.indexOf("]") + 1); // delete storage type
|
||||
String path = new URI(loc).getPath();
|
||||
System.setProperty(MiniDFSCluster.PROP_TEST_BUILD_DATA, path);
|
||||
SimulatedFSDataset.setFactory(getConf());
|
||||
getConf().setLong(SimulatedFSDataset.CONFIG_PROPERTY_CAPACITY,
|
||||
STORAGE_CAPACITY);
|
||||
|
|
Loading…
Reference in New Issue