Search

Can we create multiple files in HDFS with different block sizes?



Yes. HDFS provides api to specify block size at the time of file creation. Below is the method signature:
public FSDataOutputStream create(Path f, boolean overwrite, int bufferSize, short replication, long blockSize) throws IOException;