elek opened a new pull request #834: Hdds 3101. Depend on lightweight 
ConfigurationSource interface instead of Hadoop Configuration
URL: https://github.com/apache/hadoop-ozone/pull/834
 
 
   ## What changes were proposed in this pull request?
   
   To make it possible to create different client jars compiled with different 
version of Hadoop we need clear and Hadoop independent `hdds-common` (and 
`hdds-client`) projects.
   
   (For more details about the motivation, check 
[this](https://lists.apache.org/thread.html/rd0ea00f958368e888db1947eb71e514fb977df0b7baaad928ac50e94%40%3Cozone-dev.hadoop.apache.org%3E)
 design doc.)
   
   Our current blocker is the usage of `org.apache.hadoop.conf.Configuration`. 
Configuration class is a heavyweight object from `hadoop-common` which 
introduce a lot of unnecessary dependencies. It also violates multiple OOP 
principles, for example the **Dependency inversion** principle (most of the 
time we don't need all the methods, it would be enough to depend on a reduced 
set of the methods)
   
   To make our components more independent I propose to depend on a lightweight 
`ConfigurationSource` interface which includes all the required `getXXX` 
methods from the existing `Configuration`. OzoneConfiguration can implement 
that interface (and with older Hadoop we can create direct adapters).
   
   Other motivation: Some of the used helper classes (related to the storage / 
time units) are not available in Hadoop 2.7. With this approach we can use any 
old Hadoop configuration as the only required method would be the `.get` method.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-3101
   
   ## How was this patch tested?
   
   https://github.com/elek/hadoop-ozone/actions/runs/79732132

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to