Tencent Cloud Elastic MapReduce (EMR) Hadoop service has integrated COS. If you enable COS when purchasing an EMR cluster, you can manipulate the data stored in COS using common Hadoop commands as shown below:
hadoop fs -cat /usr/hive/warehouse/hivewithhdfs.db/record/data.txt
hadoop fs -chmod -R 777 /usr
hadoop fs -chown -R root:root /usr
hadoop fs -mkdir <paths>
hadoop fs -put <localsrc> ... <dst>
hadoop fs -copyFromLocal <localsrc> URI
hadoop fs -du URI [URI …]
hadoop fs -rm URI [URI …]
hadoop fs–setrep [-R] [-w] REP PATH [PATH …]
hadoop fsck <path> [-move | -delete | -openforwrite] [-files [-blocks [-locations | -racks]]]
For more HDFS commands, see the community documentation. If your cluster is a high-availability cluster (dual-namenode), you can see which namenode is active by running following commands:
hdfs haadmin -getServiceState nn1
hdfs dfsadmin -report
hdfs dfsadmin -safemode leave
Was this page helpful?