Hide Forgot
We use the RHQ database plugin to query for various metrics. However, it's missing some functionality and does not work against some specialty databases like Hive (for example) where 'count(*)' can take a long time. Changes: 1. Don't use count(*) for table discovery. It is much better to discover a table using a select statement that only considers the first row. 2. If a table name is not configured avoid discovery entirely. 3. Support for column data, where metrics can appear in a column format such as: metric1 m2 m3 ------- --- ---- 2 42 9.0 4. Availability checks are skipped if the table name is not set. This is a placeholder for a patch.
triage 2/27/2012 mfoley, asantos, crouch, loleary
Created attachment 570666 [details] based on commit 53715248896279279af299e56cdf6d7918a7dcb9
Created attachment 570667 [details] unit tests for database plugin using H2 Database This is another patch in a series of two. You want to change the tests to use the new Arquillian setup. I would be curious to see how well Arquillian works compared to my test class.
Elias, I have applied the patches to my local repo. As you wrote the patch some time ago, the code diverged and the patch did not apply cleanly. Can you please have a look at the code committed In the ComponentTest you shut down the PC in after() @AfterTest protected void after() throws Exception { for (ResourceComponent c : components.keySet()) c.stop(); PluginContainer.getInstance().shutdown(); <<--- here } This makes the PC throw a NPE on next invocation of PC.shutdown(), as the PC_internal configuration object gets nulled out. When I disable above call, the test runs fine, but I fear this will only work as long as there is only one test. Could you have a look too? I've attached my diff - check it?
Created attachment 596229 [details] Heiko's diff
Looks great. I wrote this "ComponentTest" back when the Arquillian stuff wasn't available, so if you wanted to port it to that it might be better.
I committed above patch to master as rev 26959a31d8 Rewriting to Arquillian isn't in for me right now. Thanks Elias!
Bulk closing of items that are on_qa and in old RHQ releases, which are out for a long time and where the issue has not been re-opened since.