You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2020/10/05 08:49:27 UTC
[GitHub] [hbase] virajjasani edited a comment on pull request #2454: HBASE-24628 Region normalizer now respects a rate limit
virajjasani edited a comment on pull request #2454:
URL: https://github.com/apache/hbase/pull/2454#issuecomment-703493303
As for `TestMasterChoreScheduled` test, it tries to retrieve all default (unconditional) chores of HMaster by retrieving singleton objects of chores using reflection from `HMaster.class`.
With the current refactored PR, we should facilitate retrieval of `regionNormalizerChore` from `RegionNormalizerManager.class` using reflection in `TestMasterChoreScheduled` (`class` as well as `targetObj` as args should be helpful) because IMHO, HMaster anyways should not be one place for defining all chores objects :
```
private E getChoreObj(String fieldName, Class cls, Object targetObj)
throws NoSuchFieldException, IllegalAccessException {
Field masterField = cls.getDeclaredField(fieldName);
masterField.setAccessible(true);
E choreFieldVal = (E) masterField.get(targetObj);
return choreFieldVal;
}
```
----------------------------------------------------------------
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:
users@infra.apache.org