How to find the number of blocks for a file in Hadoop?

0 votes

Hi Team,

I have configured the Hadoop Cluster in the Local system. I want to know the number of blocks for a file in Hadoop. How can I do that?

Oct 13 in Big Data Hadoop by akhtar
• 33,370 points
132 views

1 answer to this question.

0 votes

Hi@akhtar,

You can use Hadoop file system command to know the blocks for the specific file. To view the blocks for the specific file you can use the below command.

$ hadoop fsck /path/to/file -files -blocks
answered Oct 13 by MD
• 79,190 points

Related Questions In Big Data Hadoop

0 votes
1 answer

How to find the number of blocks a hdfs file is divided into?

Yes. you can use the hadoop fsck command to do ...READ MORE

answered Nov 29, 2018 in Big Data Hadoop by Omkar
• 69,030 points
2,552 views
0 votes
1 answer

How to check the size of a file in Hadoop HDFS?

You can use the  hadoop fs -ls command to ...READ MORE

answered Nov 21, 2018 in Big Data Hadoop by Omkar
• 69,030 points
3,299 views
0 votes
1 answer

How to Modify the Maximum Number of Versions for a Column Family in Hbase?

Hey, The example uses HBase Shell to keep ...READ MORE

answered May 31, 2019 in Big Data Hadoop by Gitika
• 49,580 points
819 views
0 votes
1 answer

What is the command to find the free space in HDFS?

You can use dfsadmin which runs a ...READ MORE

answered Apr 29, 2018 in Big Data Hadoop by Shubham
• 13,450 points
670 views
0 votes
1 answer

How to find the used cache in HDFS

hdfs dfsadmin -report This command tells fs ...READ MORE

answered May 4, 2018 in Big Data Hadoop by Shubham
• 13,450 points
754 views
+1 vote
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,950 points
6,347 views
+1 vote
11 answers

hadoop fs -put command?

put syntax: put <localSrc> <dest> copy syntax: copyF ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Aditya
41,816 views
0 votes
1 answer

I have to ingest in hadoop cluster large number of files for testing , what is the best way to do it?

Hi@sonali, It depends on what kind of testing ...READ MORE

answered Jul 7 in Big Data Hadoop by MD
• 79,190 points
192 views
0 votes
1 answer

Change the owner and group of a file in Hadoop.

Hi@akhtar, You can use the Chown command. This ...READ MORE

answered Oct 1 in Big Data Hadoop by MD
• 79,190 points
70 views