【问题标题】:Apache-Ignite integration as Hibernate 2nd level cache: What is the best way to look into ignite cache?Apache-Ignite 集成作为 Hibernate 2 级缓存:查看 ignite 缓存的最佳方法是什么?
【发布时间】:2016-12-03 12:03:17
【问题描述】:

有人可以告诉我检查 Apache-Ignite Hibernate 二级缓存是否正常工作的最佳方法吗?以及如何?

例如。 1.视觉虚拟机 2.休眠统计日志

我曾与 EHcache 合作过,我能够配置一个 Viusual VM Mbean 以获取如下统计信息:

<bean id="cacheManager"
    class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
    <property name="configLocation" value="classpath:/spring/ehcache.xml" />
    <property name="shared" value="true" />
</bean>

<!-- JMX for ehcache -->

<bean id="managementService" class="net.sf.ehcache.management.ManagementService"
    init-method="init" destroy-method="dispose">

    <constructor-arg ref="cacheManager" />
    <constructor-arg ref="mbeanServer" />
    <constructor-arg index="2" value="true" />
    <constructor-arg index="3" value="true" />
    <constructor-arg index="4" value="true" />
    <constructor-arg index="5" value="true" />

</bean>

<bean id="mbeanServer" class="org.springframework.jmx.support.MBeanServerFactoryBean">
    <property name="locateExistingServerIfPossible" value="true" />
</bean>

另外,Hibernate 统计打印输出 PUT/HIT/MISS 在日志中。

【问题讨论】:

    标签: hibernate spring-mvc caching gridgain ignite


    【解决方案1】:

    Ignite 也支持 JMX。要启用缓存的完整统计信息,请将以下属性添加到其配置中:

    <bean class="org.apache.ignite.configuration.CacheConfiguration">
        <property name="managementEnabled" value="true"/>
        <property name="statisticsEnabled" value="true"/>
    </bean>
    

    JMX 服务本身默认启用。在节点日志中找到此行以识别端口号(本例中为 49113):

    Remote Management [restart: on, REST: on, JMX (remote: on, port: 49113, auth: off, ssl: off)]
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-12-01
      • 2020-09-14
      • 2016-12-03
      • 1970-01-01
      • 2016-11-03
      • 2017-10-01
      • 2018-05-19
      • 2023-01-22
      相关资源
      最近更新 更多