在Ubuntu上管理Hadoop数据存储主要涉及以下几个方面:
~/.bashrc或/etc/profile文件,添加Hadoop的HADOOP_HOME和PATH环境变量。hdfs namenode -format
start-dfs.sh
start-yarn.sh
hdfs dfsadmin命令查看集群状态。hdfs dfsadmin -report
hdfs dfs命令上传和下载文件。hdfs dfs -put /local/path/file /hdfs/path/
hdfs dfs -get /hdfs/path/file /local/path/
hdfs dfsadmin -report
yarn node命令查看NodeManager的状态。yarn node -list
yarn application命令监控应用程序的资源使用情况。yarn application -list
hdfs-site.xml中配置数据块的副本因子以提高数据的可靠性。<property>
<name>dfs.replication</name>
<value>3</value>
</property>
kinit hadoop