Hello, Thin client doesn't have a peer class loader (and most probably will never have). To use predicates you should deploy classes for these predicates to Ignite nodes. Serializable interface for Person class will not help here.
пн, 18 окт. 2021 г. в 20:14, Prasad Kommoju <pkomm...@futurewei.com>: > Thanks for the tip but it did not help. Also, there was another suggestion > that Person should implement Serializable. The examples do not show this > requirement, I am going to try this too. > > > > > > > > --------------------- > > Regards, > > Prasad Kommoju > > > > *From:* Ilya Kazakov <kazakov.i...@gmail.com> > *Sent:* Sunday, October 17, 2021 8:41 PM > *To:* user@ignite.apache.org > *Subject:* Re: Problem with ScanQuery with filter on ClinetCache > > > > Hello, it looks like you should enable Peer Class Loading: > https://ignite.apache.org/docs/latest/code-deployment/peer-class-loading > <https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fignite.apache.org%2Fdocs%2Flatest%2Fcode-deployment%2Fpeer-class-loading&data=04%7C01%7Cpkommoju%40futurewei.com%7C4f39dc49aba048c2476708d991e92377%7C0fee8ff2a3b240189c753a1d5591fedc%7C1%7C0%7C637701252786814819%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=ICpGBEOwMQksq6mQAYXIJzrahT%2F3tv1vC5BZtmTjxNs%3D&reserved=0> > > > > -------------- > > Ilya Kazakov > > > > сб, 16 окт. 2021 г. в 02:47, Prasad Kommoju <pkomm...@futurewei.com>: > > > > Hi > > > > I am having trouble getting ScanQuery to work with a filter from thin > client. > > > > I have attached a working minimal reproduction program (IntelliJ project > zip export) , the ignite config file and the part of the ignite logfile > after running the query. The code is fashioned along the example in the > documentation. > > > > Here is the querying part of the code: > > > > … > > IgniteBiPredicate<String, Person> filter = > (key, p) -> p.getName().equals(srchName); > > try (QueryCursor<Cache.Entry<String, Person>> scnCursor = > personCache.query(new ScanQuery<>(filter))) { > scnCursor.forEach( > entry -> System.*out*.println(entry.getKey() + > " " + entry.getValue())); > } catch (Exception e) { > System.*out*.println("Scan query failed " + e.getMessage()); > } > > > > … > > > > Any help in pointing out the problem will be greatly appreciated. > > > > > > --------------------- > > Regards, > > Prasad Kommoju > >