Apache Ignite:用于Ignite DataGrid的setNodeFilter不起作用

时间:2018-01-27 08:19:38

标签: apache ignite

我已将服务器和客户端peerClassLoadingEnabled标志设置为true。 我能够看到peerClassLoadingEnabled适用于计算任务。

但是,使用时在一组特定节点上创建缓存 CacheConfiguration.setNodeFilter(...),我在服务器端看到以下错误。

concurrency time(s) pre process TPS(r/s)    total TPS(r/s)
1           2.07    4837.17                 4837.17
2           2.51    3980.58                 7961.17
3           3.28    3047.68                 9143.03
4           4.02    2486.76                 9947.04
5           4.44    2249.94                 11249.71
6           4.76    2101.26                 12607.58
7           5.25    1903.69                 13325.82
8           5.71    1752.46                 14019.70

基于日志,它看起来DataNodeFilter类应该从客户端迁移到服务器并且找不到类。 cacheCfg.setNodeFilter(new DataNodeFilter());

我已启用上面提到的PeerClassLoading标志

有关为何会发生这种情况的任何想法吗?

1 个答案:

答案 0 :(得分:3)

不幸的是,对等类加载不适用于与之相关的任何内容 CacheConfiguration 。缓存配置通过发现消息分发,并且不会对其应用对等类加载。

此处的解决方法是使用可配置的节点过滤器,该过滤器将部署在所有节点上。例如, AttributeNodeFilter 在Ignite中可用。它可以根据配置的节点属性过滤掉节点。

相关问题