hdfs-deprecated icon indicating copy to clipboard operation
hdfs-deprecated copied to clipboard

Include fs.defaultFS and fs.default.name in core-site.xml

Open rolandomanrique opened this issue 9 years ago • 2 comments

Include fs.defaultFS and fs.default.name in core-site.xml to allow dfs commands without providing full site name in the command. Running hdfs dfs -ls / instead of hdfs dfs -ls hdfs://hdfs/

Xml in core-site.xml should look like this:

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
    <property>
        <name>fs.defaultFS</name>
        <value>hdfs://${frameworkName}</value>
    </property>
    <property>
        <name>fs.default.name</name>
        <value>hdfs://${frameworkName}</value>
    </property>
</configuration>

rolandomanrique avatar Mar 20 '15 23:03 rolandomanrique

This is do-able on a case-by-case basis now. Just place a core-site.xml in your conf directory. The templating commands are the only component that could be automated. Feel free to edit the ConfigServer.java file with changes and submit a PR.

abhay-agarwal avatar Mar 23 '15 23:03 abhay-agarwal

@abhay-agarwal, they are referring to distributing core-site.xml with configserver and hdfs://${frameworkName} set so the user can run hadoop fs -ls / without specifying the framework name.

elingg avatar Mar 25 '15 22:03 elingg