kevinwilfong requested code review of "
HIVE-2619 [jira] Add hook to run in meatastore's endFunction which can collect more fb303 counters".
Reviewers: njain, heyongqiang, JIRA
I added a new type of listener called MetaStoreEndFunctionListener, which is called by endFunction in HMSHandler and takes the method's name, and whether it succeeded. I also overrode FacebookBase's getCounters method to include counters from these listeners.
These new listeners are configurable in the same way as EventListeners.
I had to modify endFunction and all calls to it to pass in whether or not the method succeeded.
I created an implementation of MetaStoreEndFunctionListener and verified it ran without exceptions, and it could add fb303 counters.
I also ran the unit tests.