Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How to copy a file into HDFS with a different block size to that of existing block size configuration?



How to copy a file into HDFS with a different block size to that of existing block size configuratio..

Answer / Shamee Ahmad

To copy a file into HDFS with a different block size, you can use the `-D dfs.blocksize` command line option with the `hadoop cp` or `hadoop fs -copyFromLocal` commands. Here's an example:

```bash
hadoop fs -copyFromLocal /local/path/to/file hdfs://namenode:port/hdfs/destination-path -D dfs.blocksize=<custom-block-size>
```
Replace `<custom-block-size>` with the desired block size in bytes, and update the path components accordingly.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Apache HDFS Hadoop Distributed File System Interview Questions

Explain the process that overwrites the replication factors in HDFS?

1 Answers  


If a particular file is 50 mb, will the hdfs block still consume 64 mb as the default size?

1 Answers  


What is the command for archiving a group of files in hdfs.

1 Answers  


Describe HDFS Federation?

1 Answers  


What do you mean by metadata in Hadoop?

1 Answers  


Explain what is difference between an input split and hdfs block?

1 Answers  


How to remove safemode of namenode forcefully in HDFS?

1 Answers  


What happens when two users try to access to the same file in HDFS?

1 Answers  


What is a block?

1 Answers  


What is the throughput?

1 Answers  


Explain how indexing in hdfs is done?

1 Answers  


Can you modify the file present in hdfs?

1 Answers  


Categories