1.localhost:50070 图形化界面 离线查看
可以查看hdfs文件目录的结构,副本数,block大小,文件的大小,但是不能查看文件的内容,要是查看文件的内容的话,得把文件给下载下来
2.通过命令行终端实现在线查看文件内容
[root@cdp101 bin]# hdfs dfs -ls
Found 5 items
drwx------ - hive hive 0 2022-03-17 15:00 .Trash
drwxrwxr-x - hive hive 0 2022-04-21 10:05 .flink
drwxr-xr-x - hive hive 0 2022-02-22 18:31 .sparkStaging
drwx------ - hive hive 0 2022-04-12 09:31 .staging
drwxrwxrwt - hive hive 0 2022-03-23 16:29 warehouse
[root@cdp101 bin]# hdfs dfs -cat ./warehouse/test.db/page_activity_qa/*
cat: `warehouse/test.db/page_activity_qa/p_data_day=+292275056-05-17': Is a directory
cat: `warehouse/test.db/page_activity_qa/p_data_day=2021-07-21': Is a directory
cat: `warehouse/test.db/page_activity_qa/p_data_day=2021-07-22': Is a directory
cat: `warehouse/test.db/page_activity_qa/p_data_day=2022-04-18': Is a directory
cat: `warehouse/test.db/page_activity_qa/p_data_day=2022-04-19': Is a directory
cat: `warehouse/test.db/page_activity_qa/p_data_day=2022-04-20': Is a directory
cat: `warehouse/test.db/page_activity_qa/p_data_day=2022-04-21': Is a directory
参考:https://blog.csdn.net/qq_924485343/article/details/116274277
|