[infinispan-dev] configuration toProperties

Michal Linhard mlinhard at redhat.com
Tue Nov 19 08:47:32 EST 2013


please refer to the branch, I've rewritten the original config:
https://github.com/mlinhard/infinispan/tree/t_flatconfig

On 11/19/2013 02:45 PM, Michal Linhard wrote:
> Hi,
>
> This is a configuration output format feature proposal.
>
> I'd like to be able to flatten the infinispan cache configuration to
> flat properties style so that two configurations can be easily comparable
> in a view that displays sorted matching properties side by side to
> quickly spot differences.
>
> This is useful in our internal PerfRepo app where I do it so far by
> reflection, by patching the server or a radargun plugin by special
> addon, but this can lead to numerous errors. It would be much simpler
> and less error-prone process if we had it integrated in the upstream code.
>
> I proposed adding a method configuration.toProperties() that flattens
> properties of a configuration object
> (org.infinispan.configuration*Configuration) and produces
> java.util.Properties. The nested configuration objects under the main
> Configuration would recursively add their properties under an extended
> property prefix.
>
> I also added a possibility to specify --format=properties in the info
> command of the CLI so that the server responds with the property style
> configuration of the specific cache...
>
> https://github.com/mlinhard/infinispan/commit/d8360f7850b67956adfa29aca86dae9dfad5c22d
>
> (I didn't implement toProperties in all objects, cause it's quite a lot
> of changes that would be made in vain in case you don't like this
> approach, the commit just demonstrates how I'd like to go about it.)
>
> These properties would also be exposed via JMX as (example values)
> jboss.infinispan:type=Cache,name="testCache(dist_sync)",manager="default",component=Cache
> attribute "configurationProperties"
> jboss.infinispan:type=CacheManager,name="default",component=CacheManager
> attribute "globalConfigurationProperties"
> that could be converted by any JMX client back to java.util.Properties
>
> WDYT?
>
> m.
>


-- 
Michal Linhard
Quality Assurance Engineer
JBoss Datagrid

Red Hat Czech s.r.o.
Purkynova 99 612 45 Brno, Czech Republic
phone: +420 532 294 320 ext. 8262320
mobile: +420 728 626 363



More information about the infinispan-dev mailing list