Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Predicate for distributed query is executed on lite-member -> ClassNotFoundException #8849

Closed
Petikoch opened this issue Sep 6, 2016 · 1 comment

Comments

Projects
None yet
3 participants
@Petikoch
Copy link

commented Sep 6, 2016

Hi,

I'm trying to migrate our application from Hazelcast 2.6.10 to 3.7.1. We are using the reintroduced lite-member feature in some of the cluster-nodes (distributed executor service).

When we execute IMap#entrySet(Predicate ...) on a full-member (like with 2.6.10), we see that e.g. a com.hazelcast.map.impl.query.QueryOperation is executed on each lite-member with 3.7.1.

There are two issues with this:

  1. Since lite-members do not carry data, this is unnecessary and slows down the distributed query
  2. The lite-members do not have the particular Predicate implementation in their classpath, therefor there are errors like this:
06.09.2016 10:28:53 ERROR [hz._hzInstance_1_dev.generic-operation.thread-2] c.h.s.i.o.impl.OperationExecutorImpl              : [10.0.16.165]:12106 [dev] [3.7.1] Failed to process packet: Packet{flags=1, isResponse=false, isOperation=true, isEvent=false, partitionId=-1, conn=Connection[id=1, /10.0.16.165:52216->/10.0.16.165:12101, endpoint=[10.0.16.165]:12101, alive=true, type=MEMBER]} on hz._hzInstance_1_dev.generic-operation.thread-2
com.hazelcast.nio.serialization.HazelcastSerializationException: java.lang.ClassNotFoundException: ch.concordia.automiq2.grid.store.core.data.LongLongFromToPredicate
    at com.hazelcast.internal.serialization.impl.JavaDefaultSerializers$JavaSerializer.read(JavaDefaultSerializers.java:224)
    at com.hazelcast.internal.serialization.impl.StreamSerializerAdapter.read(StreamSerializerAdapter.java:46)
    at com.hazelcast.internal.serialization.impl.AbstractSerializationService.readObject(AbstractSerializationService.java:216)
    at com.hazelcast.internal.serialization.impl.ByteArrayObjectDataInput.readObject(ByteArrayObjectDataInput.java:600)
    at com.hazelcast.map.impl.query.QueryOperation.readInternal(QueryOperation.java:77)
    at com.hazelcast.spi.Operation.readData(Operation.java:513)
    at com.hazelcast.internal.serialization.impl.DataSerializableSerializer.read(DataSerializableSerializer.java:127)
    at com.hazelcast.internal.serialization.impl.DataSerializableSerializer.read(DataSerializableSerializer.java:52)
    at com.hazelcast.internal.serialization.impl.StreamSerializerAdapter.read(StreamSerializerAdapter.java:46)
    at com.hazelcast.internal.serialization.impl.AbstractSerializationService.toObject(AbstractSerializationService.java:172)
    at com.hazelcast.spi.impl.NodeEngineImpl.toObject(NodeEngineImpl.java:307)
    at com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.run(OperationRunnerImpl.java:381)
    at com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.process(OperationThread.java:117)
    at com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.run(OperationThread.java:102)
Caused by: java.lang.ClassNotFoundException: foo.bar.MyPredicateImpl42
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at com.hazelcast.nio.ClassLoaderUtil.tryLoadClass(ClassLoaderUtil.java:151)
    at com.hazelcast.nio.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:120)
    at com.hazelcast.nio.IOUtil$ClassLoaderAwareObjectInputStream.resolveClass(IOUtil.java:358)
    at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1613)
    at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1518)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1774)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:371)
    at com.hazelcast.internal.serialization.impl.JavaDefaultSerializers$JavaSerializer.read(JavaDefaultSerializers.java:219)
    ... 13 common frames omitted

Best regards from Switzerland,
Peti

@ahmetmircik ahmetmircik added this to the 3.7.2 milestone Sep 6, 2016

@ahmetmircik

This comment has been minimized.

Copy link
Member

commented Sep 6, 2016

@Petikoch thanks for reporting this, we will try to address it in next patch release.

@jerrinot jerrinot self-assigned this Sep 22, 2016

jerrinot added a commit to jerrinot/hazelcast that referenced this issue Sep 22, 2016

Do not send query operations to Lite Members
Fixes hazelcast#8849

Also the same fix applied for Replicated Map

jerrinot added a commit to jerrinot/hazelcast that referenced this issue Sep 22, 2016

Do not send query operations to Lite Members
Fixes hazelcast#8849

Also the same fix applied for Replicated Map

(cherry picked from commit af63a0c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.