What is the difference between get_json_object and json_tuple functions in Hive?
February 2, 2022How to view the contents of a GZiped file in HDFS?
February 16, 2022Simple problem with a simple solution.
Solution
Use hdfs dfs -count to get the count of files and directories inside the directory.
[hirw@wk1 ~]$ hdfs dfs -count /user/hirw/course_data 1 0 0 /user/hirw/course_data
You will see 4 columns in the output – DIR_COUNT, FILE_COUNT, CONTENT_SIZE, PATHNAME
In this directory, we can see that the FILE_COUNT is 0 indicating the number of files is 0 in the directory.