此配置在2.0 版
中无效<!-- Enable off-heap storage with unlimited size. -->
<property name="offHeapMaxMemory" value="0"/>
错误:
WARNING: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'grid.cfg' defined in URL [file:/home/ignite/sample-cache.xml]: Cannot create inner bean
'org.apache.ignite.configuration.CacheConfiguration#4cc0edeb' of type [org.apache.ignite.configuration.CacheConfiguration] while setting bean
property 'cacheConfiguration' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with
name 'org.apache.ignite.configuration.CacheConfiguration#4cc0edeb' defined in URL [file:/home/ignite/sample-cache.xml]: Error setting property
values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'offHeapMaxMemory' of bean class
[org.apache.ignite.configuration.CacheConfiguration]: Bean property 'offHeapMaxMemory' is not writable or has an invalid setter method. Does the
parameter type of the setter match the return type of the getter?
Visor SnapShot
Time of the snapshot: 07/07/17, 16:54:35
+===========================================================================================================================+
| Name(@) | Mode | Nodes | Entries (Heap / Off-heap) | Hits | Misses | Reads | Writes |
+===========================================================================================================================+
| txnCache(@c0) | PARTITIONED | 1 | min: 2917681 (2917681 / 0) | min: 0 | min: 0 | min: 0 | min: 0 |
| | | | avg: 2917681.00 (2917681.00 / 0.00) | avg: 0.00 | avg: 0.00 | avg: 0.00 | avg: 0.00 |
| | | | max: 2917681 (2917681 / 0) | max: 0 | max: 0 | max: 0 | max: 0 |
+---------------------------------------------------------------------------------------------------------------------------+
Cache 'txnCache(@c0)':
+--------------------------------------------------------------+
| Name(@) | txnCache(@c0) |
| Nodes | 1 |
| Total size Min/Avg/Max | 2917681 / 2917681.00 / 2917681 |
| Heap size Min/Avg/Max | 2917681 / 2917681.00 / 2917681 |
| Off-heap size Min/Avg/Max | 0 / 0.00 / 0 |
+--------------------------------------------------------------+
Nodes for: txnCache(@c0)
+============================================================================================================+
| Node ID8(@), IP | CPUs | Heap Used | CPU Load | Up Time | Size | Hi/Mi/Rd/Wr |
+============================================================================================================+
| 924C5A56(@n0), 10.0.2.55 | 2 | 8.93 % | 93.83 % | 00:12:31:969 | Total: 2917681 | Hi: 0 |
| | | | | | Heap: 2917681 | Mi: 0 |
| | | | | | Off-Heap: 0 | Rd: 0 |
| | | | | | Off-Heap Memory: 0 | Wr: 0 |
+------------------------------------------------------------------------------------------------------------+
'Hi' - Number of cache hits.
'Mi' - Number of cache misses.
'Rd' - number of cache reads.
'Wr' - Number of cache writes.
Aggregated queries metrics:
Minimum execution time: 00:00:00:000
Maximum execution time: 00:00:00:000
Average execution time: 00:00:00:000
Total number of executions: 0
Total number of failures: 0
Visor快照将 Off-Heap / Off-Heap-Memory显示为0 。在文档中,默认情况下启用默认的默认关闭堆。在存储堆外之前是否有任何阈值?我该如何配置?
答案 0 :(得分:1)
自2.0以来,CacheConfiguration中没有offHeapMaxMemory属性。
是的,因为版本2.0默认将存储数据缓存在堆外。 您可以查看:
cache.size(CachePeekMode.OFFHEAP))
但是,遮阳板没有正确计算&#34;堆外条目计数&#34;公制,但这已经修复,将在2.1版中提供