it is my code to run affinityCall
IgniteConfiguration cfg = new IgniteConfiguration();
cfg.setClientMode(true);
cfg.setPeerClassLoadingEnabled(true);
TcpDiscoveryMulticastIpFinder ipFinder = new TcpDiscoveryMulticastIpFinder();
ipFinder.setAddresses(Collections.singletonList("127.0.0.1:47500..47509"));
cfg.setDiscoverySpi(new TcpDiscoverySpi().setIpFinder(ipFinder));
Ignite ignite = Ignition.start(igniteThickClientCfg);
int p = ignite.affinity("vest_identity_99").partitions();
for( int i=0;i<p;i++) {
ignite.compute().affinityCall(Arrays.asList("vest_identity_99"),i,new
IdentityCountTask(99,i) );
}
but when i run code it report below exception:
Caused by: org.h2.jdbc.JdbcSQLNonTransientConnectionException: Unsupported
connection setting "MULTI_THREADED" [90113-200]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:622)
at org.h2.message.DbException.getJdbcSQLException(DbException.java:429)
at org.h2.message.DbException.get(DbException.java:205)
at org.h2.message.DbException.get(DbException.java:181)
at org.h2.engine.ConnectionInfo.readSettingsFromURL(ConnectionInfo.java:269)
is there any solution?
[email protected]
From: Stephen Darlington
Date: 2022-08-25 20:58
To: user
Subject: Re: count cache key number
var p = ignite.affinity(“CACHENAME”).partitions();
On 25 Aug 2022, at 13:10, [email protected] wrote:
affinityCallAsync need PartitionId,how can i get all PartitionIds?
Or the number of partitions is 1024
[email protected]
From: [email protected]
Date: 2022-08-25 19:11
To: user
Subject: Re: Re: count cache key number
affinityCallAsync need PartitionId,how can i get all PartitionIds
[email protected]
From: Stephen Darlington
Date: 2022-08-25 18:55
To: user
Subject: Re: count cache key number
You’d need to use a thick client to call that API.
On 25 Aug 2022, at 10:39, [email protected] wrote:
sorry,i find igniteClient.compute() has no affinityCallAsync method ,does
igniteClient can call affinityCallAsync
[email protected]
From: Stephen Darlington
Date: 2022-08-24 20:27
To: user
Subject: Re: count cache key number
There are a number of ways to tackle this.
If your cache split the key into distinct fields rather that a concatenated
string, you could SQL-enable your cache and get your count as a simple SELECT
statement.
Alternatively, there’s an affinity compute task that takes a partition
(affinityCallAsync). If you use that and a ScanQuery that fetches records from
a specific partition (ScanQuery), you’ll get something like a map-reduce. (You
could also use the map-reduce API, but an affinity call is probably easier.)
On 24 Aug 2022, at 11:59, [email protected] wrote:
hi
do I pass cache in distribute compute than use cache scan ,that faster than I
use a cache scan in client api.
---Original---
From: "[email protected]"<[email protected]>
Date: Wed, Aug 24, 2022 17:06 PM
To: "user"<[email protected]>;
Subject: count cache key number
Hi,
I have a cache ,it's key like
"mobile:140000"
"mobile:140001",
"address:test1",
"address:test2",
"address:test3"。
I want to count mobile number and address number。
address number is 3 and mobile number is 2。I see Ignite doc has mapreduce
job,but it seem not example iterator cache key。 is there any method to iterator
key in mapreduce job。Thank you very much
[email protected]