List of usage examples for org.apache.hadoop.fs FileSystem getName
@Deprecated
public String getName()
From source file:cascading.tap.hadoop.Hadoop18TapUtil.java
License:Open Source License
/** used in AWS EMR to disable temp paths on some file systems, s3. */ private static boolean writeDirectlyToWorkingPath(JobConf conf, Path path) { FileSystem fs = getFSSafe(conf, path); if (fs == null) return false; boolean result = conf.getBoolean("mapred.output.direct." + fs.getClass().getSimpleName(), false); if (result)/* ww w . j av a2 s. c om*/ LOG.info("output direct is enabled for this fs: " + fs.getName()); return result; }
From source file:cascading.tap.hadoop.util.Hadoop18TapUtil.java
License:Open Source License
/** used in AWS EMR to disable temp paths on some file systems, s3. */ private static boolean writeDirectlyToWorkingPath(Configuration conf, Path path) { FileSystem fs = getFSSafe(conf, path); if (fs == null) return false; boolean result = conf.getBoolean("mapred.output.direct." + fs.getClass().getSimpleName(), false); if (result)//from ww w. j ava2 s . c o m LOG.info("output direct is enabled for this fs: " + fs.getName()); return result; }
From source file:org.apache.nutch.admin.system.SystemUtil.java
License:Apache License
public SystemUtil(Configuration configuration, Path instanceFolder) throws IOException { FileSystem fileSystem = FileSystem.get(configuration); if (!"local".equals(fileSystem.getName())) { DistributedFileSystem dfsfs = (DistributedFileSystem) fileSystem; DFSClient dfs = dfsfs.getClient(); //this.fDataNodesInfos = dfs.datanodeReport(); } else {//from www . j a v a2 s . c o m df(instanceFolder.toString()); //TODO find a way to get storageID and Xceiver //this.fDataNodesInfos = // new DatanodeInfo[] { new DatanodeDescriptor(new DatanodeID( // "local","storageId", 10000), this.capacity, this.available, 1)}; } }