List of usage examples for org.apache.hadoop.fs CommonConfigurationKeysPublic FS_DEFAULT_NAME_DEFAULT
String FS_DEFAULT_NAME_DEFAULT
To view the source code for org.apache.hadoop.fs CommonConfigurationKeysPublic FS_DEFAULT_NAME_DEFAULT.
Click Source Link
From source file:com.cloudera.oryx.common.servcomp.OryxConfiguration.java
License:Open Source License
private static void configure(Configuration conf) { if (!Namespaces.isLocalComputation() || !Namespaces.isLocalData()) { File hadoopConfDir = findHadoopConfDir(); addResource(hadoopConfDir, "core-site.xml", conf); addResource(hadoopConfDir, "hdfs-site.xml", conf); addResource(hadoopConfDir, "mapred-site.xml", conf); addResource(hadoopConfDir, "yarn-site.xml", conf); String fsDefaultFS = conf.get(CommonConfigurationKeysPublic.FS_DEFAULT_NAME_KEY); if (fsDefaultFS == null || fsDefaultFS.equals(CommonConfigurationKeysPublic.FS_DEFAULT_NAME_DEFAULT)) { // Standard config generated by Hadoop 2.0.x seemed to set fs.default.name instead of fs.defaultFS? conf.set(CommonConfigurationKeysPublic.FS_DEFAULT_NAME_KEY, conf.get("fs.default.name")); }/*from ww w . ja v a 2 s. c om*/ fixLzoCodecIssue(conf); } }
From source file:org.talend.components.simplefileio.runtime.sinks.UgiFileSinkBase.java
License:Open Source License
public UgiFileSinkBase(UgiDoAs doAs, String path, boolean overwrite, boolean mergeOutput, Class<? extends FileOutputFormat<K, V>> formatClass, ExtraHadoopConfiguration extraConfig) { super(path, mergeOutput, formatClass); this.doAs = doAs; this.overwrite = overwrite; this.extraConfig = extraConfig; // Ensure that the local filesystem is used if the path starts with the file:// schema. if (path.toLowerCase().startsWith("file:")) { this.extraConfig.set(CommonConfigurationKeysPublic.FS_DEFAULT_NAME_KEY, CommonConfigurationKeysPublic.FS_DEFAULT_NAME_DEFAULT); }//from w w w.jav a2 s . c o m }