siddhantsangwan commented on pull request #2893:
URL: https://github.com/apache/ozone/pull/2893#issuecomment-992686094


   > I think the root problem is that some values of 
ContainerBalancerConfiguration are dependent on other configurations, like 
"size.entering.target.max" is depending on "OZONE_SCM_CONTAINER_SIZE_DEFAULT", 
but the current ConfigGroup annotation doesn't support this requirement.
   
   Yeah. I can think of the following solutions:
   
   1. Add a static method that accepts `OzoneConfiguration` and returns a 
`ContainerBalancerConfiguration` by calling a private constructor. This 
constructor can initialize our special configs if we pass the 
`OzoneConfiguration` from the static method. We will also need to check if 
these values have already been set in `ozone-site.xml` to avoid overriding them.
   > may be we can add a static build function to 
ContainerBalancerConfiguration class to build and initialize a 
ContainerBalancerConfiguration instance
   
   This seems similar to what @JacksonYao287 is suggesting.
   
   2. Maybe we can initialize these special values in their respective getters 
instead? Again, we'll first need to ensure these configs haven't already been 
set.
   3. Maybe we could simplify it and just put default values in the `@Config` 
annotations? For example, 70 minutes for iteration interval, 26GB for max size 
entering target etc. @lokeshj1703 what do you think?


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



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

Reply via email to