[
https://issues.jboss.org/browse/ISPN-7019?page=com.atlassian.jira.plugin....
]
John Sanda updated ISPN-7019:
-----------------------------
Description:
In order to use memory based eviction, cache entries have to be stored as binary, e.g.,
{noformat}
<infinispan>
<cache-container default-cache="default">
<transport cluster="HawkularMetrics"/>
<distributed-cache name="rawData" mode="ASYNC" >
<groups enabled="true"/>
<store-as-binary/>
<eviction size="2576980377" strategy="LRU"
type="MEMORY"/>
<persistence passivation="true">
<leveldb-store path="/tmp/hawkular-metrics/jni/raw/data"
shared="false" preload="false">
<expiration path="/tmp/hawkular-metrics/jni/raw/expired"/>
<compression type="NONE" />
<implementation type="JAVA"/>
<write-behind/>
</leveldb-store>
</persistence>
</distributed-cache>
</cache-container>
</infinispan>
{noformat}
Without the {{store-as-binary}}, you get exceptions like:
{noformat}
java.lang.IllegalArgumentException: Size of Class class
org.hawkular.metrics.core.service.cache.MetricKey cannot be determined using given entry
size calculator :class
org.infinispan.container.entries.MarshalledValueEntrySizeCalculator
at
org.infinispan.container.entries.PrimitiveEntrySizeCalculator.handleObject(PrimitiveEntrySizeCalculator.java:91)
~[infinispan-core-8.1.0.Final.jar:8.1.0.Final]
{noformat}
when trying to store cache entries. This configuration setting should be more clearly
documented and/or have the exception mention it as well.
was:
In order to use memory based eviction, cache entries have to be stored as binary, e.g.,
{noformat}
<infinispan>
<cache-container default-cache="default">
<transport cluster="HawkularMetrics"/>
<distributed-cache name="rawData" mode="ASYNC" >
<groups enabled="true"/>
<store-as-binary/>
<eviction size="2576980377" strategy="LRU"
type="MEMORY"/>
<persistence passivation="true">
<leveldb-store path="/tmp/hawkular-metrics/jni/raw/data"
shared="false" preload="false">
<expiration path="/tmp/hawkular-metrics/jni/raw/expired"/>
<compression type="NONE" />
<implementation type="JAVA"/>
<write-behind/>
</leveldb-store>
</persistence>
</distributed-cache>
</cache-container>
</infinispan>
{noformat}
Without the {{store-as-binary}}, you get exceptions like:
{noformat}
ava.lang.IllegalArgumentException: Size of Class class
org.hawkular.metrics.core.service.cache.MetricKey cannot be determined using given entry
size calculator :class
org.infinispan.container.entries.MarshalledValueEntrySizeCalculator
at
org.infinispan.container.entries.PrimitiveEntrySizeCalculator.handleObject(PrimitiveEntrySizeCalculator.java:91)
~[infinispan-core-8.1.0.Final.jar:8.1.0.Final]
{noformat}
when trying to store cache entries. This configuration setting should be more clearly
documented and/or have the exception mention it as well.
Need better docs for memory-based eviction
------------------------------------------
Key: ISPN-7019
URL:
https://issues.jboss.org/browse/ISPN-7019
Project: Infinispan
Issue Type: Task
Reporter: John Sanda
Priority: Minor
In order to use memory based eviction, cache entries have to be stored as binary, e.g.,
{noformat}
<infinispan>
<cache-container default-cache="default">
<transport cluster="HawkularMetrics"/>
<distributed-cache name="rawData" mode="ASYNC" >
<groups enabled="true"/>
<store-as-binary/>
<eviction size="2576980377" strategy="LRU"
type="MEMORY"/>
<persistence passivation="true">
<leveldb-store path="/tmp/hawkular-metrics/jni/raw/data"
shared="false" preload="false">
<expiration path="/tmp/hawkular-metrics/jni/raw/expired"/>
<compression type="NONE" />
<implementation type="JAVA"/>
<write-behind/>
</leveldb-store>
</persistence>
</distributed-cache>
</cache-container>
</infinispan>
{noformat}
Without the {{store-as-binary}}, you get exceptions like:
{noformat}
java.lang.IllegalArgumentException: Size of Class class
org.hawkular.metrics.core.service.cache.MetricKey cannot be determined using given entry
size calculator :class
org.infinispan.container.entries.MarshalledValueEntrySizeCalculator
at
org.infinispan.container.entries.PrimitiveEntrySizeCalculator.handleObject(PrimitiveEntrySizeCalculator.java:91)
~[infinispan-core-8.1.0.Final.jar:8.1.0.Final]
{noformat}
when trying to store cache entries. This configuration setting should be more clearly
documented and/or have the exception mention it as well.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)