How to change the replication factor of data which is already stored in HDFS?
Answer Posted / Balram Singh
To change the replication factor for data that is already stored in HDFS, you can use the `dfs.replication` property in the Hadoop configuration. However, it's important to note that changing the replication factor for existing files will not take effect until a new namespace edit is created and applied. Here's an example of how to set the replication factor using the command line:
```bash
hadoop dfs -setfqpn /path/to/directory <replication-factor>
```
Replace `<replication-factor>` with the desired number of replicas, and `/path/to/directory` with the path to the directory or file for which you want to change the replication factor.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
No New Questions to Answer in this Category !! You can
Post New Questions
Answer Questions in Different Category