| 85 | * [發現] 根據 Hadoop 論壇的討論,發現其實 block size 是由使用者自己(Hadoop Client)決定的。 |
| 86 | {{{ |
| 87 | jazz@hadoop:~$ hadoop fs -D dfs.block.size=4194304 -cp /user/jazz/input/hadoop-default.xml /user/jazz/input/hadoop-default.xml.4M |
| 88 | jazz@hadoop:~$ hadoop fs -stat "filesize=%b block_size=%o filename=%n replication=%r" /user/jazz/input/hadoop-default.xml |
| 89 | filesize=40673 block_size=67108864 filename=hadoop-default.xml replication=1 |
| 90 | jazz@hadoop:~$ hadoop fs -stat "filesize=%b block_size=%o filename=%n replication=%r" /user/jazz/input/hadoop-default.xml.4M |
| 91 | filesize=40673 block_size=4194304 filename=hadoop-default.xml.4M replication=2 |
| 92 | jazz@hadoop:~$ hadoop fs -stat "filesize=%b block_size=%o filename=%n replication=%r" /user/jazz/input/hadoop-default.xml.new |
| 93 | filesize=40673 block_size=4096 filename=hadoop-default.xml.new replication=1 |
| 94 | }}} |