在CentOS上测试Hadoop HDFS配置的步骤如下:
hdfs namenode -format
./sbin/start-dfs.sh
./sbin/stop-dfs.sh
使用以下命令检查HDFS的状态,确保NameNode和DataNode都在运行:
hdfs dfsadmin -report
hdfs dfs -mkdir /testDir
hdfs dfs -put /local/path/to/file.txt /hdfs/path/
hdfs dfs -get /hdfs/path/file.txt /local/path/to/download
hdfs dfs -ls /
hdfs fs -test -e /hdfs/path/to/file
辰迅云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
推荐阅读: centos挂载磁盘空间不足