Where is the configuration file for HDFS in Hadoop 2.2.0?

后端 未结 4 1815
被撕碎了的回忆
被撕碎了的回忆 2021-01-07 23:09

I\'m studying Hadoop and currently I\'m trying to set up an Hadoop 2.2.0 single node. I downloaded the latest distribution, uncompressed it, now I\'m trying to set up the Ha

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-08 00:10

    These files are all found in the hadoop/conf directory.

    For setting HDFS you have to configure core-site.xml and hdfs-site.xml.

    HDFS works in two modes: distributed (multi-node cluster) and pseudo-distributed (cluster of one single machine).

    For the pseudo-distributed mode you have to configure:

    In core-site.xml:

    
    
      fs.default.name
      hdfs://localhost:8020
    
    

    In hdfs-site.xml:

    <-- storage directories for HDFS - the hadoop.tmp.dir property, whose default is /tmp/hadoop-${user.name} -->
    
        hadoop.tmp.dir
        /your-dir/
    
    

    Each property has its hardcoded default value.

    Please remember to set ssh password-less login for hadoop user before starting HDFS.

    P.S.

    It you download Hadoop from Apache, you can consider switching to a Hadoop distribution:

    Cloudera's CDH, HortonWorks or MapR.

    If you install Cloudera CDH or Hortonworks HDP you will find the files in /etc/hadoop/conf/.

提交回复
热议问题