Let us see how we can override properties while running commands such as hadoop fs. Let us first review properties files such as core-site.xml and hdfs-site.xml.
- We can override any non-final property using -Dproperty_name=property_value as part of hadoop fs command.
- We can also use options such as -fs to override Namenode URI
- We can also change replication factor using subcommand -setrep
- Some of the properties might have been defined as final as part of the properties files such as core-site.xml or hdfs-site.xml. -D will not have any impact in that case.
- When it comes to Cloudera Manager, we are not supposed to override properties by updating files – instead, we need to use something called Safety Valve that comes as part of Cloudera Manager.