hadoop02

潇潇暮鱼鱼發表於2024-04-09

1.配置檔案

hadoop的預設配置檔案都在$HADOOP_HOME/share下,先讀取這個預設值,再讀取etc中使用者配置的值,使用者配置的值將覆蓋預設值

cd $HADOOP_HOME/share
mkdir -p /data/test
find -name "*-default.xml" -exec cp {} ~/data/test \;

在hdfs-default.xml中查詢dfs.blocksize,可以看到值為128M

<property>
  <name>dfs.blocksize</name>
  <value>134217728</value>
  <description>
      The default block size for new files, in bytes.
      You can use the following suffix (case insensitive):
      k(kilo), m(mega), g(giga), t(tera), p(peta), e(exa) to specify the size (such as 128k, 512m, 1g, etc.),
      Or provide complete size in bytes (such as 134217728 for 128 MB).
  </description>
</property>