What is the method for uploading files using the Hadoop command line interface?
The method to upload files using the Hadoop command line is by using the command hadoop fs -put. Specifically, the usage is as follows:
hadoop fs -put <本地文件路径> <HDFS目标文件路径>
For example, to upload the local file /home/user/localfile.txt to the path /user/hadoop/hdfsfile.txt in HDFS, you can use the following command:
hadoop fs -put /home/user/localfile.txt /user/hadoop/hdfsfile.txt