Hadoop单机模式配置

下载Hadoop

解压

sudo tar -zxvf hadoop-3.1.3.tar.gz -C /usr/local
cd /usr/local
sudo mv hadoop-3.1.3 hadoop
sudo chown -R hadoop ./hadoop

单机模式配置:

cd /usr/local/hadoop
./bin/hadoop jar ./share/hadoop/mapreduce/hadoop-mapreduce-examples-3.1.3.jar

把统计结果输出到/usr/local/hadoop/output文件中

cd /usr/local/hadoop
mkdir input
cp ./etc/hadoop/*.xml ./input
./bin/hadoop jar ./share/hadoop/mapreduce/hadoop-mapreduce-examples-3.1.3.jar grep ./input ./output 'dfs[a-z.]+'
cat ./output/*

删除output

rm -r ./output

你可能感兴趣的:(hadoop,eclipse,大数据)