Hadoop上传helloword.txt文件

   1、创建helloword.txt输入3行内容。

   2、在系统中打开hadoop 

        start-dfs.sh  start-yarn.sh

  3、把本地计算机中的计算机中的helloword.txt上传到服务器中

       4、创建目录/user/root/filetest  

            hdfs dfs -mkdir p /user/root/filetest

       5、把helloword.txt上传到HDFS目录中

            hdfs dfs -moveFromLocal /simple/helloword.txt /user/root/filetest

       6、查看文件上传是否成功

   

       7、成功后查看显示内容  

       hdfs dfs -cat /user/root/filetest/helloword.txt

   

posted @ 2020-04-14 21:43  爱吃韭菜  阅读(1130)  评论(0编辑  收藏  举报