I have a little bit confusion with HDFS default block size.. I have set block size to 64 MB.. I am importing data from Microsoft SQL Server to HDFS via SQOOP (Database with approximately 500 tables). HDFS showing total blocks as 2150 and average block size as (2165057 B) i.e. 2 MB approximately.. But I have default block size set to 64 MB.. Then why HDFS has taken block size as 2 MB ?????

Hi Jing,
Thanks for your reply.
Yes my files are pretty much smaller approximately ( > 1MB in size). As I am putting more files in HDFS ,the average block size is decreasing.. previously it was 2 MB now its showing 1 MB.. I didn’t get that..

Hi Swapnil,
I guess most of your files are not big (< 64MB)? Currently in HDFS, different files will not share the same block, thus each small file will still occupy a block. This makes your block size smaller than the full block size, i.e., 64MB.
...

I guess most of your files are not big (< 64MB)? Currently in HDFS, different files will not share the same block, thus each small file will still occupy a block. This makes your block size smaller than the full block size, i.e., 64MB.