Hadoop fs lookup for block size?

前端 未结 5 734
悲哀的现实
悲哀的现实 2021-02-05 12:22

In Hadoop fs how to lookup the block size for a particular file?

I was primarily interested in a command line, something like:

hadoop fs ... hdfs://fs1.d         


        
5条回答
  •  遥遥无期
    2021-02-05 13:10

    Try to code below

    path=hdfs://a/b/c
    
    size=`hdfs dfs -count ${path} | awk '{print $3}'`
    echo $size
    

提交回复
热议问题