I think itβs not easy for you to fulfill your demand if all your files inside HDFS do not follow some conventions, for example. .txtfor text, .seqfro sequence and .parquetfor parquet file.
However, you can check your file manually using cat.
HDFS cat: hadoop dfs -cat /path/to/file | headto check, not a text file.
Parquet head : parquet tool head [option ...] / path / to / file
or write a program to read ....
source
share