Re: Re: count cache key number

2022-09-01 Thread wkhapy...@gmail.com
i found solution from 
https://stackoverflow.com/questions/68768699/h2-database-dbexception-unsupported-connection-setting-multi-threaded
implementation ('com.h2database:h2') {
version {
strictly '1.4.197'
}
}



wkhapy...@gmail.com
 
From: wkhapy...@gmail.com
Date: 2022-09-02 10:29
To: user
Subject: Re: Re: count cache key number
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
Date: Wed, Aug 24, 2022 17:06 PM
To: "user";
Subject: count cache key number

Hi,
I have a cache ,it's key like 
   "mobile:14"
   "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



wkhapy...@gmail.com



Re: Re: count cache key number

2022-09-01 Thread wkhapy...@gmail.com
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
Date: Wed, Aug 24, 2022 17:06 PM
To: "user";
Subject: count cache key number

Hi,
I have a cache ,it's key like 
   "mobile:14"
   "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



wkhapy...@gmail.com



Checkpointing threads

2022-09-01 Thread Raymond Wilson
Hi,

I am looking at our configuration of the Ignite checkpointing system to
ensure we have it tuned correctly.

There is a checkpointing thread pool defined, which defaults to 4 threads
in size. I have not been able to find much of a discussion on when/how this
pool size should be changed to reflect the node size Ignite is running on.

In our case, we are running 16 core servers with 128 GB RAM with
persistence on an NFS storage layer.

Given the number of cores, and the relative latency of NFS compared to
local SSD, is 4 checkpointing threads appropriate, or are we likely to see
better performance if we increased it to 8 (or more)?

If there is a discussion related to this a pointer to it would be good
(it's not really covered in the performance tuning section).

Thanks,
Raymond.

-- 

Raymond Wilson
Trimble Distinguished Engineer, Civil Construction Software (CCS)
11 Birmingham Drive | Christchurch, New Zealand
raymond_wil...@trimble.com




Re: ClassCastException while using ignite service proxy

2022-09-01 Thread Stephen Darlington
If I move the deployment to the server side, the exact same code works in my 
environment. Same if I deploy in XML rather than code.

Where are you getting the exception? If you’re seeing that on the client side, 
something very weird is happening. The client shouldn’t have any need for the 
implementation. What does your node filter do? Does it work if you disable it?

> On 1 Sep 2022, at 06:34, Surinder Mehra  wrote:
> 
> Hi Stephen,
> I see you are deploying service from the same client node where proxy is 
> obtained.
> In my setup, I have deployed service through ignite config on server start 
> and try to create a client later and hence the proxy. It works when I try to 
> obtain a proxy on the server node. But when I start a client node and try to 
> obtain service instance through proxy, it throws this exception mentioned 
> above
> 
> On Wed, Aug 31, 2022 at 6:13 PM Stephen Darlington 
> mailto:stephen.darling...@gridgain.com>> 
> wrote:
> You’ll need to share more of your code and configuration. As far as I can 
> tell, it works. This is my entire code/configuration, using Ignite 2.11.1 and 
> Java 11.0.16.1+1.
> 
> var igniteConfiguration = new IgniteConfiguration()
> .setPeerClassLoadingEnabled(true)
> .setClientMode(true);
> try (var ignite = Ignition.start(igniteConfiguration)) {
> var cfg = new ServiceConfiguration()
> .setName("MyService")
> .setTotalCount(1)
> .setMaxPerNodeCount(1)
> .setNodeFilter(x -> !x.isClient())
> .setService(new MyServiceImpl());
> ignite.services().deploy(cfg);
> var s = ignite.services().serviceProxy("MyService", 
> MyService.class, false);
> s.sayHello();
> }
> 
> public interface MyService {
> public void sayHello();
> }
> 
> public class MyServiceImpl implements MyService, Service {
> @Override
> public void cancel(ServiceContext serviceContext) {
> 
> }
> 
> @Override
> public void init(ServiceContext serviceContext) throws Exception {
> 
> }
> 
> @Override
> public void execute(ServiceContext serviceContext) throws Exception {
> 
> }
> 
> @Override
> public void sayHello() {
> System.out.println("Hello, world.");
> }
> }
> 
>> On 31 Aug 2022, at 04:17, Surinder Mehra > > wrote:
>> 
>> Please find below
>> ignite version: apache-ignite-2.11.1
>> VM information: OpenJDK Runtime Environment 11.0.15+9-LTS
>> 
>> On Wed, Aug 31, 2022 at 12:12 AM Stephen Darlington 
>> mailto:stephen.darling...@gridgain.com>> 
>> wrote:
>> Which version of Ignite? Which version of Java?
>> 
>> On 30 Aug 2022, at 13:40, Surinder Mehra > > wrote:
>>> 
>>> 
>>> Hi Stephen ,
>>>  yes that is implemented correctly and it's running on server nodes as 
>>> well. Somehow it doesn't work when accessed through proxy
>>> 
>>> On Tue, Aug 30, 2022 at 5:45 PM Stephen Darlington 
>>> mailto:stephen.darling...@gridgain.com>> 
>>> wrote:
>>> Your service needs to implement org.apache.ignite.services.Service.
>>> 
>>> > On 30 Aug 2022, at 12:40, Surinder Mehra >> > > wrote:
>>> > 
>>> > Hi,
>>> > can you help me find out the reason for this exception in thick client 
>>> > while getting instance of ignite service: 
>>> > 
>>> > getIgnite()
>>> > .services()
>>> > .serviceProxy("sampleService", SampleService.class, false) 
>>> > 
>>> > java.lang.ClassCastException: class com.sun.proxy.$Proxy148 cannot be 
>>> > cast to class com.test.ignite.stuff.services.SampleServiceImpl 
>>> > (com.sun.proxy.$Proxy148 and 
>>> > com.test.ignite.stuff.services.SampleServiceImpl are in unnamed module of 
>>> > loader 'app')
>>> > 
>>> > interface SampleService{
>>> > 
>>> > }
>>> > 
>>> > class SampleServiceImpl implements SampleService{
>>> > 
>>> > }
>>> > 
>>> > ignite config:
>>> > 
>>> > 
>>> >   
>>> > 
>>> >   
>>> >   
>>> >   
>>> >   
>>> > >> > class="com.test.ignite.stuff.services.SampleServiceImpl"/>
>>> >   
>>> >   
>>> > >> > class="com.test.ignite.stuff.node.filter.ServerNodeFilter"/>
>>> >   
>>> > 
>>> >   
>>> > 
>>> > 
>>> > 
>>> > 
>>> 
> 



Re: REST API TIMESTAMP

2022-09-01 Thread Dren Butković
Example of timestamp data, difference is in "," after year.

Ignite 2.7.6  Java 8   ->"Sep 18, 2019 12:57:35 PM"
Ignite 2.13  Java 11  ->"Aug 31, 2022, 12:43:44 PM"


On Thu, Sep 1, 2022 at 9:03 AM Dren Butković 
wrote:

> Hi,
>
> I have upgraded Ignite 2.7.6 on Java 8 to Ignite 2.13 on Java 11.
> In the REST API response the timestamp format has changed.
> Locale and all other ENV variables on the host are equal.
>
> Is there a possibility to define the format of the timestamp output in the
> Ignite configuration?
>
> Best regards
>
> Dren Butković
>


REST API TIMESTAMP

2022-09-01 Thread Dren Butković
Hi,

I have upgraded Ignite 2.7.6 on Java 8 to Ignite 2.13 on Java 11.
In the REST API response the timestamp format has changed.
Locale and all other ENV variables on the host are equal.

Is there a possibility to define the format of the timestamp output in the
Ignite configuration?

Best regards

Dren Butković


Re: What does javax.cache.CacheException: Failed to execute map query on remote node mean?

2022-09-01 Thread Alex Plehanov
Once the table is recreated (or index rebuilded) the issue is fixed.
Upgrading from 2.12 to 2.13 (if all indexes having this issue are already
rebuilded on 2.12) should be fine.

ср, 31 авг. 2022 г. в 23:43, John Smith :

> Ok but since I dropped and recreated the table I'm fine? It won't somehow
> throw that error again? And if I upgrade to 2.13 from 2.12 will I have the
> same issue?
>
> On Wed, Aug 31, 2022 at 3:31 PM Alex Plehanov 
> wrote:
>
>> John Smith,
>>
>> Thank you. This issue will be fixed in upcoming 2.14.
>>
>> ср, 31 авг. 2022 г. в 21:50, John Smith :
>>
>>> Here it is... And yes I recently upgraded to 2.12 from 2.8.1
>>>
>>> create table if not exists car_code (
>>> provider_id int,
>>> car_id int,
>>> car_code varchar(16),
>>> primary key (provider_id, car_id)
>>> ) with "template=replicatedTpl, key_type=CarCodeKey, value_type=CarCode";
>>>
>>> On Wed, Aug 31, 2022 at 7:25 AM Alex Plehanov 
>>> wrote:
>>>
 John Smith,

 Can you please show DDL for the car_code table? Does PK of this table
 include provider_id or car_code columns?
 I found a compatibility issue, with the same behaviour, it happens when
 storage created with Ignite version before 2.11 is used with the newer
 Ignite version. Have you upgraded the dev environment with existing storage
 recently (before starting to get this error)?


 чт, 4 авг. 2022 г. в 17:06, John Smith :

> Let me know if that makes any sense, because the test data is the same
> and the application code is the same. Only dropped and created the table
> again using DbEaver.
>
> On Wed, Aug 3, 2022 at 11:39 AM John Smith 
> wrote:
>
>> Hi, so I dropped the table and simply recreated it. Did NOT restart
>> the application.
>>
>> Now it works fine.
>>
>> On Wed, Aug 3, 2022 at 9:58 AM John Smith 
>> wrote:
>>
>>> How? The code is 100% the same between production and dev. And it's
>>> part of a bigger application.
>>>
>>> Only dev has the issue. I will drop and recreate the table if that
>>> fixes the issue then what?
>>>
>>> You are saying mismatch, it's a string period.
>>>
>>> "select car_id from car_code where provider_id = ? and car_code = ? 
>>> order by car_id asc limit 1;"
>>>
>>>
>>> The first parameter is Integer and the second one is String. there's
>>> no way this can mismatch... And even if the String was a UUID it's 
>>> still a
>>> string.
>>>
>>> public JsonArray query(final String sql, final long timeoutMs,
>>> final Object... args) {
>>> SqlFieldsQuery query = new SqlFieldsQuery(sql).setArgs(args);
>>> query.setTimeout((int) timeoutMs, TimeUnit.MILLISECONDS);
>>>
>>> try (QueryCursor> cursor = cache.query(query)) {
>>> List rows = new ArrayList<>();
>>> Iterator> iterator = cursor.iterator();
>>>
>>> while(iterator.hasNext()) {
>>> List currentRow = iterator.next();
>>> JsonArray row = new JsonArray();
>>>
>>> currentRow.forEach(o -> row.add(o));
>>>
>>> rows.add(row);
>>> }
>>>
>>> promise.tryComplete(rows);
>>> } catch(Exception ex) {
>>> ex.printStackTrace();
>>> }
>>> }
>>>
>>> Integer providerId = 1;
>>> String carCode = "FOO";
>>>
>>> query("select car_id from car_code where provider_id = ? and
>>> car_code = ? order by car_id asc limit 1;", 3000, providerId, cardCode);
>>>
>>>
>>>
>>> On Wed, Aug 3, 2022 at 6:50 AM Taras Ledkov 
>>> wrote:
>>>
 Hi John and Don,

 I guess the root cause in the data types mismatch between table
 schema and actual data at the store or type of the query parameter.
 To explore the gap, it would be very handy if you could provide a
 small reproducer (standalone project or PR somewhere).

 > In my case I'm not even using UUID fields. Also the same code 2
 diff environment dev vs prod doesn't cause the issue. I'm lucky enough 
 that
 it's on dev and prod is ok.
 >
 > But that last part might be misleading because in prod I think it
 happened early on during upgrade and all I did was recreate the sql 
 table.
 >
 > So before I do the same on dev... I want to see what the issue is.
 >
 > On Tue., Aug. 2, 2022, 6:06 p.m. ,  wrote:
 >
 >> I‘m only speculating but this looks very similar to the issue I
 had last week and reported to the group here.
 >>
 >> Caused by: org.h2.message.DbException: Hexadecimal string with
 odd number of characters: "5" [90003-197]


 --
 With best regards,

UNSUBSCRIBE

2022-09-01 Thread Rizwan Amin




Spread bets and CFDs are complex instruments and come with a high risk of 
losing money rapidly due to leverage. 76% of retail investor accounts lose 
money when spread betting and/or trading CFDs with this provider. You should 
consider whether you understand how spread bets and CFDs work and whether you 
can afford to take the high risk of losing your money.

Professional clients: Losses can exceed deposits when spread betting and 
trading CFDs. Countdowns carry a level of risk to your capital as you could 
lose all of your investment. These products may not be suitable for all clients 
therefore ensure you understand the risks and seek independent advice. Invest 
only what you can afford to lose.

CMC Markets UK plc (173730) and CMC Spreadbet plc (170627) are authorised and 
regulated by the Financial Conduct Authority in the United Kingdom. CMC Markets 
UK plc and CMC Spreadbet plc are registered in England and Wales with Company 
Numbers 02448409 and 02589529 and with their registered offices at 133 
Houndsditch, London, EC3A 7BX.

The content of this e-mail (including any attachments) is strictly confidential 
and is for the sole use of the intended addressee(s). If you are not the 
intended recipient of this e-mail please notify the sender immediately and 
delete this e-mail from your system. Any disclosure, copying, dissemination or 
use of its content (including any attachments) is strictly prohibited. CMC 
Markets UK plc and CMC Spreadbet plc reserve the right to intercept and monitor 
the content of the e-mail messages to and from its systems.

E-mails may be interfered with or may contain viruses or other defects for 
which CMC Markets UK plc and CMC Spreadbet plc accept no responsibility. It is 
the responsibility of the recipient to carry out a virus check on the e-mail 
and any attachment(s).

This communication is not intended as an offer or solicitation for the purchase 
or sale of a financial instrument or as an official confirmation of any 
transaction unless specifically presented as such.