ignite: java.lang.IndexOutOfBoundsException + Failed to wait for completion of partition map exchange

异常描述:

2018-06-06 14:24:02.932 ERROR 17364 --- [ange-worker-#42] .c.d.d.p.GridDhtPartitionsExchangeFuture : Failed to reinitialize local partitions (preloading will be stopped):
    ...
java.lang.IndexOutOfBoundsException: index 678
    ... org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:2279) [ignite-core-2.3.0.jar:2.3.0]
    at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110) [ignite-core-2.3.0.jar:2.3.0]
    at java.lang.Thread.run(Thread.java:745) [na:1.8.0_73]

2018-06-06 14:24:02.932  INFO 17364 --- [ange-worker-#42] .c.d.d.p.GridDhtPartitionsExchangeFuture : Finish exchange future [startVer=AffinityTopologyVersion [topVer=1, minorTopVer=1], resVer=null, err=java.lang.IndexOutOfBoundsException: index 678]
2018-06-06 14:24:02.941 ERROR 17364 --- [ange-worker-#42] .i.p.c.GridCachePartitionExchangeManager : Failed to wait for completion of partition map exchange (preloading will not start): GridDhtPartitionsExchangeFuture
...
org.apache.ignite.IgniteCheckedException: index 678
    at org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7252) ~[ignite-core-2.3.0.jar:2.3.0]
    ....
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:2279) ~[ignite-core-2.3.0.jar:2.3.0]
    ... 2 common frames omitted

出现这个情况的原因如下:

如果定义的缓存类型是REPLICATED模式,并且开启了持久化,后面将其改为PARTITIONED模式,并导入数据,后续重启的时候就会报这个错误。

比如下面这种情况:

default-config.xml

        <property name="cacheConfiguration">
            <list>
                <bean class="org.apache.ignite.configuration.CacheConfiguration">
                  ...
                    <property name="name" value="Test"/>
                    <property name="atomicityMode" value="ATOMIC"/>
                    <property name="cacheMode" value="REPLICATED"/>
                  ...
                </bean>
            </list>
        </property>
        ignite.destroyCache("Test");
        IgniteCache<Long, CommRate> cache = ignite.getOrCreateCache("Test");

当重新启动的时候,default-config.xml中的配置先生效,所以会出现这个问题。

解决办法就是在持久化模式下不要更改缓存模式,或者不要在配置文件中预定义缓存类型。

I can‘t reproduce your case. But the issue could occur if you had a REPLICATED cache and after some time changed it to PARTITIONED and for example call to getOrCreateCache keeping old cache name.

参考链接:

http://apache-ignite-users.70518.x6.nabble.com/Weird-index-out-bound-Exception-td14905.html

原文地址:https://www.cnblogs.com/cord/p/9226697.html

时间: 2024-11-02 23:51:25

ignite: java.lang.IndexOutOfBoundsException + Failed to wait for completion of partition map exchange的相关文章

hive脚本出现Error: java.lang.RuntimeException: Error in configuring object和Caused by: java.lang.IndexOutOfBoundsException: Index: 9, Size: 9

是在reduce阶段报的错误,详细错误信息是 朱传豪 19:04:48 Diagnostic Messages for this Task: Error: java.lang.RuntimeException: Error in configuring object at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:109) at org.apache.hadoop.util.ReflectionU

java.lang.IllegalStateException: Failed to load ApplicationContext

1.错误描述 INFO:2015-02-05 22:14:21[main] - Loading XML bean definitions from class path resource [applicationContext.xml] INFO:2015-02-05 22:14:22[main] - JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning INFO:2015-02-05

Spring的java.lang.IndexOutOfBoundsException: Remember that ordinal parameters are 1-based!异常处理方法

使用Spring提供的模板类HibernateDaoSupport,如果单纯的使用'命名参数'的形式编写HQL语句如: 1 public class UserDaoImpl extends HibernateDaoSupport implements IUser { 2 3 4 @Override 5 public User login(String userName, String pwd) { 6 String hql="from User as u where u.username=:us

滑动RecyclerView时出现异常: java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid item position 6(offset:6).state:30

RecyclerView 存在的一个明显的 bug 一直没有修复: java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid item position… 重现的方法是:使用 RecyclerView 加官方下拉刷新的时候,如果绑定的 List 对象在更新数据之前进行了 clear,而这时用户紧接着迅速上滑 RV,就会造成崩溃,而且异常不会报到你的代码上,属于RV内部错误.初次猜测是,当你 clear 了 list

junit测试时,出现java.lang.IllegalStateException: Failed to load ApplicationContext

课程设计要求进行junit测试,我是在已经做好的ssh项目上做的测试,测试类代码如下 package com.zhang.web.services; import static org.junit.Assert.*; import org.junit.After; import org.junit.Before; import org.junit.Test; import javax.annotation.Resource; import org.junit.runner.RunWith; im

报错: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

描述:使用Hibernate登陆验证时故意输入没有的用户名,所产生的错误. 错误代码: ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 /*      * 根据客户的用户名查找客户信息      */     @Override     public User getUserByUserName(String userName) {         String hql="from User where userName=?";         Session s

【Spring】java.lang.IndexOutOfBoundsException: Index: 256, Size: 256

Spring接受前台的数据超过256出现如下异常: org.springframework.beans.InvalidPropertyException: Invalid property 'specificationValues[256]' of bean class [com.sencloud.entity.Specification]: Index of out of bounds in property path 'specificationValues[256]'; nested ex

RecycleView Bug:java.lang.IndexOutOfBoundsException: Inconsistency detected.

今天使用RecyclerView时,上下两个RecyclerView,在实现下拉刷新时,报错: java.lang.IndexOutOfBoundsException: Inconsistency detected.   Invalid view holder adapter positionViewHolder{56798b2 position=2 id=-1, oldPos=2, pLpos:-1 scrap [attachedScrap] tmpDetached no parent} 在网

listview 遇到问题java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0

开发的时候 遇到 java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0 这个异常有时候会有,有时候正常 不太好捕捉 猜测 已经把数据给了list,然后让主线程去显示:接着后台继续获取数据.那也许有可能主线程还是没刷新完,后台又把新数据给过来了 所以 猜测 是刷新头部出现的问题 也就是 news.clear(); news.addAll(0, refreshNewData); newsAdapter.notifyDataSe