@Test public void prepareConfiguration() throws Exception { UnderFileSystemConfiguration ufsConf = UnderFileSystemConfiguration.defaults(ConfigurationTestUtils.defaults()); org.apache.hadoop.conf.Configuration conf = HdfsUnderFileSystem.createConfiguration(ufsConf); Assert.assertEquals(ufsConf.get(PropertyKey.UNDERFS_HDFS_IMPL), conf.get("fs.hdfs.impl")); Assert.assertTrue(conf.getBoolean("fs.hdfs.impl.disable.cache", false)); }
public static Configuration createConfiguration(UnderFileSystemConfiguration conf) { Preconditions.checkNotNull(conf, "conf"); Configuration hdfsConf = new Configuration(); for (String path : conf.get(PropertyKey.UNDERFS_HDFS_CONFIGURATION).split(":")) { hdfsConf.addResource(new Path(path)); } String ufsHdfsImpl = conf.get(PropertyKey.UNDERFS_HDFS_IMPL); if (!StringUtils.isEmpty(ufsHdfsImpl)) { hdfsConf.set("fs.hdfs.impl", ufsHdfsImpl); } hdfsConf.set("fs.hdfs.impl.disable.cache", System.getProperty("fs.hdfs.impl.disable.cache", "true")); for (Map.Entry<String, String> entry : conf.getMountSpecificConf().entrySet()) { hdfsConf.set(entry.getKey(), entry.getValue()); } return hdfsConf; }
HdfsUnderFileSystem extends ConsistentUnderFileSystem implements AtomicFileOutputStreamCallback { public static Configuration createConfiguration(UnderFileSystemConfiguration conf) { Preconditions.checkNotNull(conf, "conf"); Configuration hdfsConf = new Configuration(); for (String path : conf.get(PropertyKey.UNDERFS_HDFS_CONFIGURATION).split(":")) { hdfsConf.addResource(new Path(path)); } String ufsHdfsImpl = conf.get(PropertyKey.UNDERFS_HDFS_IMPL); if (!StringUtils.isEmpty(ufsHdfsImpl)) { hdfsConf.set("fs.hdfs.impl", ufsHdfsImpl); } hdfsConf.set("fs.hdfs.impl.disable.cache", System.getProperty("fs.hdfs.impl.disable.cache", "true")); for (Map.Entry<String, String> entry : conf.getMountSpecificConf().entrySet()) { hdfsConf.set(entry.getKey(), entry.getValue()); } return hdfsConf; } }
HdfsUnderFileSystem extends ConsistentUnderFileSystem implements AtomicFileOutputStreamCallback { public static Configuration createConfiguration(UnderFileSystemConfiguration conf) { Preconditions.checkNotNull(conf, "conf"); Configuration hdfsConf = new Configuration(); for (String path : conf.get(PropertyKey.UNDERFS_HDFS_CONFIGURATION).split(":")) { hdfsConf.addResource(new Path(path)); } String ufsHdfsImpl = conf.get(PropertyKey.UNDERFS_HDFS_IMPL); if (!StringUtils.isEmpty(ufsHdfsImpl)) { hdfsConf.set("fs.hdfs.impl", ufsHdfsImpl); } hdfsConf.set("fs.hdfs.impl.disable.cache", System.getProperty("fs.hdfs.impl.disable.cache", "true")); for (Map.Entry<String, String> entry : conf.getMountSpecificConf().entrySet()) { hdfsConf.set(entry.getKey(), entry.getValue()); } return hdfsConf; } HdfsUnderFileSystem(AlluxioURI ufsUri, UnderFileSystemConfiguration conf,
      Configuration hdfsConf); }
HdfsUnderFileSystem extends ConsistentUnderFileSystem implements AtomicFileOutputStreamCallback { public static Configuration createConfiguration(UnderFileSystemConfiguration conf) { Preconditions.checkNotNull(conf, "conf"); Configuration hdfsConf = new Configuration(); for (String path : conf.get(PropertyKey.UNDERFS_HDFS_CONFIGURATION).split(":")) { hdfsConf.addResource(new Path(path)); } String ufsHdfsImpl = conf.get(PropertyKey.UNDERFS_HDFS_IMPL); if (!StringUtils.isEmpty(ufsHdfsImpl)) { hdfsConf.set("fs.hdfs.impl", ufsHdfsImpl); } hdfsConf.set("fs.hdfs.impl.disable.cache", System.getProperty("fs.hdfs.impl.disable.cache", "true")); for (Map.Entry<String, String> entry : conf.getMountSpecificConf().entrySet()) { hdfsConf.set(entry.getKey(), entry.getValue()); } return hdfsConf; } HdfsUnderFileSystem(AlluxioURI ufsUri, UnderFileSystemConfiguration conf,
      Configuration hdfsConf); static HdfsUnderFileSystem createInstance(AlluxioURI ufsUri,
      UnderFileSystemConfiguration conf); @Override String getUnderFSType(); static Configuration createConfiguration(UnderFileSystemConfiguration conf); @Override void cleanup(); @Override void close(); @Override OutputStream create(String path, CreateOptions options); @Override OutputStream createDirect(String path, CreateOptions options); @Override boolean deleteDirectory(String path, DeleteOptions options); @Override boolean deleteFile(String path); @Override boolean exists(String path); @Override Pair<AccessControlList, DefaultAccessControlList> getAclPair(String path); @Override void setAclEntries(String path, List<AclEntry> aclEntries); @Override long getBlockSizeByte(String path); @Override UfsDirectoryStatus getDirectoryStatus(String path); @Override List<String> getFileLocations(String path); @Override @Nullable List<String> getFileLocations(String path, FileLocationOptions options); @Override UfsFileStatus getFileStatus(String path); @Override long getSpace(String path, SpaceType type); @Override UfsStatus getStatus(String path); @Override boolean isDirectory(String path); @Override boolean isFile(String path); @Override @Nullable UfsStatus[] listStatus(String path); @Override void connectFromMaster(String host); @Override void connectFromWorker(String host); @Override boolean mkdirs(String path, MkdirsOptions options); @Override InputStream open(String path, OpenOptions options); @Override boolean renameDirectory(String src, String dst); @Override boolean renameFile(String src, String dst); @Override void setOwner(String path, String user, String group); @Override void setMode(String path, short mode); @Override boolean supportsFlush(); @Override boolean supportsActiveSync(); @Override SyncInfo getActiveSyncInfo(); @Override boolean startActiveSyncPolling(long txId); @Override boolean stopActiveSyncPolling(); @Override void startSync(AlluxioURI ufsUri); @Override void stopSync(AlluxioURI ufsUri); @Override boolean isSeekable(); }
HdfsUnderFileSystem extends ConsistentUnderFileSystem implements AtomicFileOutputStreamCallback { public static Configuration createConfiguration(UnderFileSystemConfiguration conf) { Preconditions.checkNotNull(conf, "conf"); Configuration hdfsConf = new Configuration(); for (String path : conf.get(PropertyKey.UNDERFS_HDFS_CONFIGURATION).split(":")) { hdfsConf.addResource(new Path(path)); } String ufsHdfsImpl = conf.get(PropertyKey.UNDERFS_HDFS_IMPL); if (!StringUtils.isEmpty(ufsHdfsImpl)) { hdfsConf.set("fs.hdfs.impl", ufsHdfsImpl); } hdfsConf.set("fs.hdfs.impl.disable.cache", System.getProperty("fs.hdfs.impl.disable.cache", "true")); for (Map.Entry<String, String> entry : conf.getMountSpecificConf().entrySet()) { hdfsConf.set(entry.getKey(), entry.getValue()); } return hdfsConf; } HdfsUnderFileSystem(AlluxioURI ufsUri, UnderFileSystemConfiguration conf,
      Configuration hdfsConf); static HdfsUnderFileSystem createInstance(AlluxioURI ufsUri,
      UnderFileSystemConfiguration conf); @Override String getUnderFSType(); static Configuration createConfiguration(UnderFileSystemConfiguration conf); @Override void cleanup(); @Override void close(); @Override OutputStream create(String path, CreateOptions options); @Override OutputStream createDirect(String path, CreateOptions options); @Override boolean deleteDirectory(String path, DeleteOptions options); @Override boolean deleteFile(String path); @Override boolean exists(String path); @Override Pair<AccessControlList, DefaultAccessControlList> getAclPair(String path); @Override void setAclEntries(String path, List<AclEntry> aclEntries); @Override long getBlockSizeByte(String path); @Override UfsDirectoryStatus getDirectoryStatus(String path); @Override List<String> getFileLocations(String path); @Override @Nullable List<String> getFileLocations(String path, FileLocationOptions options); @Override UfsFileStatus getFileStatus(String path); @Override long getSpace(String path, SpaceType type); @Override UfsStatus getStatus(String path); @Override boolean isDirectory(String path); @Override boolean isFile(String path); @Override @Nullable UfsStatus[] listStatus(String path); @Override void connectFromMaster(String host); @Override void connectFromWorker(String host); @Override boolean mkdirs(String path, MkdirsOptions options); @Override InputStream open(String path, OpenOptions options); @Override boolean renameDirectory(String src, String dst); @Override boolean renameFile(String src, String dst); @Override void setOwner(String path, String user, String group); @Override void setMode(String path, short mode); @Override boolean supportsFlush(); @Override boolean supportsActiveSync(); @Override SyncInfo getActiveSyncInfo(); @Override boolean startActiveSyncPolling(long txId); @Override boolean stopActiveSyncPolling(); @Override void startSync(AlluxioURI ufsUri); @Override void stopSync(AlluxioURI ufsUri); @Override boolean isSeekable();  }