use of org.apache.hadoop.fs.viewfs.TestChRootedFileSystem.MockFileSystem in project hadoop by apache.
the class TestViewFileSystemDelegation method setupMockFileSystem.
private static FileSystem setupMockFileSystem(Configuration conf, URI uri) throws Exception {
String scheme = uri.getScheme();
conf.set("fs." + scheme + ".impl", MockFileSystem.class.getName());
FileSystem fs = FileSystem.get(uri, conf);
ConfigUtil.addLink(conf, "/mounts/" + scheme, uri);
return ((MockFileSystem) fs).getRawFileSystem();
}
Aggregations