3 Replies Latest reply on Dec 11, 2013 12:51 AM by gu zhang

    How to rebuild index in client-server mode in infinispan 6.0 final?

    gu zhang Newbie

      How to rebuild index in client-server mode in infinispan 6.0 final?

      Automatic indexing performance is too low, so I want to manually index.

      records:5,000,000

      config:

              <subsystem xmlns="urn:infinispan:server:core:5.3" default-cache-container="local">

                  <cache-container name="local" default-cache="default">

                      <local-cache name="default" start="EAGER">

                          <locking isolation="NONE" acquire-timeout="30000" concurrency-level="1000" striping="false"/>

                          <transaction mode="NONE"/>

                          <indexing index="LOCAL">

                              <property name="hibernate.search.indexing_strategy">manual</property>

                              <property name="hibernate.search.jmx_enabled">true</property>

                          </indexing>

      ....

      ======================

      then I call mbean MassIndexer

      Java Code:

              JMXServiceURL url = new JMXServiceURL(

                      "service:jmx:remoting-jmx://127.0.0.1:9999");

       

              JMXConnector jmxc = JMXConnectorFactory.connect(url);

              MBeanServerConnection mBeanServer = jmxc.getMBeanServerConnection();

       

              ObjectName objName = new ObjectName("jboss.infinispan:type=Query,manager=\"local\",cache=\"default\",component=MassIndexer");

              logger.info("##objName:" + objName);

          

              mBeanServer.invoke(objName, "start",null,null);

       

      ======================

      but the mbean invoke exception:NullPointerException:

      2013-12-09 17:06:49,388 [                          main] DataGridManager                INFO  ##objName:jboss.infinispan:type=Query,manager="local",cache="default",component=MassIndexer

      Exception in thread "main" javax.management.MBeanException

          at org.infinispan.jmx.ResourceDMBean.invoke(ResourceDMBean.java:273)

          at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)

          at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:762)

          at org.jboss.as.jmx.PluggableMBeanServerImpl$TcclMBeanServer.invoke(PluggableMBeanServerImpl.java:527)

          at org.jboss.as.jmx.PluggableMBeanServerImpl.invoke(PluggableMBeanServerImpl.java:263)

          at org.jboss.remotingjmx.protocol.v2.ServerProxy$InvokeHandler.handle(ServerProxy.java:915)

          at org.jboss.remotingjmx.protocol.v2.ServerCommon$MessageReciever$1.run(ServerCommon.java:152)

          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)

          at java.lang.Thread.run(Thread.java:662)

      Caused by: java.lang.reflect.InvocationTargetException

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

          at java.lang.reflect.Method.invoke(Method.java:597)

          at org.infinispan.jmx.ResourceDMBean.invoke(ResourceDMBean.java:271)

          ... 9 more

      Caused by: org.infinispan.commons.CacheException: java.util.concurrent.ExecutionException: java.lang.NullPointerException

          at org.infinispan.distexec.mapreduce.MapReduceTask.execute(MapReduceTask.java:360)

          at org.infinispan.query.impl.massindex.MapReduceMassIndexer.start(MapReduceMassIndexer.java:25)

          ... 14 more

      Caused by: java.util.concurrent.ExecutionException: java.lang.NullPointerException

          at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)

          at java.util.concurrent.FutureTask.get(FutureTask.java:83)

          at org.infinispan.distexec.mapreduce.MapReduceTask$TaskPart.get(MapReduceTask.java:845)

          at org.infinispan.distexec.mapreduce.MapReduceTask.executeMapPhaseWithLocalReduction(MapReduceTask.java:492)

          at org.infinispan.distexec.mapreduce.MapReduceTask.execute(MapReduceTask.java:358)

          ... 15 more

      Caused by: java.lang.NullPointerException

          at org.infinispan.query.impl.massindex.IndexingMapper.map(IndexingMapper.java:38)

          at org.infinispan.distexec.mapreduce.MapReduceManagerImpl.map(MapReduceManagerImpl.java:181)

          at org.infinispan.distexec.mapreduce.MapReduceManagerImpl.mapAndCombineForLocalReduction(MapReduceManagerImpl.java:89)

          at org.infinispan.distexec.mapreduce.MapReduceTask$MapTaskPart.invokeMapCombineLocallyForLocalReduction(MapReduceTask.java:955)

          at org.infinispan.distexec.mapreduce.MapReduceTask$MapTaskPart.access$300(MapReduceTask.java:894)

          at org.infinispan.distexec.mapreduce.MapReduceTask$MapTaskPart$2.call(MapReduceTask.java:926)

          at org.infinispan.distexec.mapreduce.MapReduceTask$MapTaskPart$2.call(MapReduceTask.java:922)

          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)

          at java.util.concurrent.FutureTask.run(FutureTask.java:138)

          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)

          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)

          at java.util.concurrent.FutureTask.run(FutureTask.java:138)

          ... 3 more