List of usage examples for org.apache.hadoop.hdfs HdfsConfiguration get
public String get(String name)
name property, null if no such property exists. From source file:org.testifyproject.resource.hdfs.MiniDFSResource.java
License:Apache License
@Override public LocalResourceInstance<MiniDFSCluster, DistributedFileSystem> start(TestContext testContext, LocalResource localResource, HdfsConfiguration config) throws Exception { String hdfsDirectory = config.get(MiniDFSCluster.HDFS_MINIDFS_BASEDIR); fileSystemUtil.recreateDirectory(hdfsDirectory); config.set(MiniDFSCluster.HDFS_MINIDFS_BASEDIR, hdfsDirectory); MiniDFSCluster.Builder builder = new MiniDFSCluster.Builder(config); hdfsCluster = builder.build();/* w w w .j a v a 2s .c o m*/ fileSystem = hdfsCluster.getFileSystem(); return LocalResourceInstanceBuilder.builder().resource(hdfsCluster).client(fileSystem).build("hdfs", localResource); }