[ https://issues.apache.org/jira/browse/HBASE-6411?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13421478#comment-13421478 ]
Alex Baranau commented on HBASE-6411: ------------------------------------- bq. Normally such method is annotated with @Before Right. I actually got this idea not to place it in @Before from one of the existing tests. The benefit is that you can place in the test class other tests that does not require cluster startup. Otherwise (if cluster startup is in @Before) it will be always started. Does it make sense to you? bq. If TestMasterMetrics is placed in master.metrics package, the following method can be package-private: Right. Again, I think by example, placed it in master package. It also accesses package-private getter from HMaster. So in any case we'll need to make this or that one you mentioned public. As we are likely to manipulate HMaster a lot in this unit-test, I think it makes more sense to leave test class in master package. Fixed other things. Also extracted MetricsRegistry implementation. And this made me thinking about the following. It might makes sense to have different registries: StaticMetricsRegistry and DynamicMetricsRegistry. The latter one allows dynamically adding/removing metrics. This way where it is not needed StaticMetricsRegistry can be used and its implementation will be more efficient (no need for it to be thread-safe). Thoughts? Had to give different name than MetricsRegistry to the one I added, since I had to put it into hadoop.metrics2.lib package. Btw, Q to Elliott about the initial patch: I see you changed the existing "old" MasterMetrics, but I think we were discussing somewhere that we need to keep it for some time. Am I missing smth? > Move Master Metrics to metrics 2 > -------------------------------- > > Key: HBASE-6411 > URL: https://issues.apache.org/jira/browse/HBASE-6411 > Project: HBase > Issue Type: Sub-task > Reporter: Elliott Clark > Assignee: Elliott Clark > Attachments: HBASE-6411-0.patch, HBASE-6411-1.patch, > HBASE-6411_concept.patch > > > Move Master Metrics to metrics 2 -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira