Get a few lines of HDFS data

前端 未结 9 1821
一整个雨季
一整个雨季 2021-02-04 02:17

I am having a 2 GB data in my HDFS.

Is it possible to get that data randomly. Like we do in the Unix command line

cat iris2.cs         


        
9条回答
  •  感情败类
    2021-02-04 03:08

    hdfs dfs -cat yourFile | shuf -n 
    

    Will do the trick for you.Though its not available on mac os. You can get installed GNU coreutils.

提交回复
热议问题