Re: How to insert data?

2019-11-08 Thread Ivan Pavlukhin
Hi Boris, Perhaps confusing point here is that Ignite separates key and value parts in KV storage. And there is always underlying KV storage in Ignite. So you cannot have cache key and value in a single POJO. I tried your class with annotations and run INSERTs with it. A trick here is a "_key"

Re: How to insert data?

2019-11-06 Thread BorisBelozerov
When I run your code in one node, It run OK But when I run your code in a cluster, It can't run. I can select but can't insert or do other things -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: How to insert data?

2019-11-06 Thread BorisBelozerov
Now I can show table DATAX by run "!tables" But when I insert data, it can't run In Eclipse, the error is: Key is missing from query In Sqlline, the error is: Failed to execute DML statement [stmt=insert into "tdCache".DATAX (key,value) values (1,'value 1');] -- Sent from:

Re: How to insert data?

2019-11-06 Thread BorisBelozerov
When I run "!tables", there isn't any tables or schemas -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: How to insert data?

2019-11-05 Thread Stanislav Lukyanov
There are multiple ways to configure a cache to use SQL. The easiest is to use @QuerySqlField annotation. Check out this doc https://www.gridgain.com/docs/8.7.6/developers-guide/SQL/sql-api#querysqlfield-annotation . On Tue, Nov 5, 2019 at 5:52 PM BorisBelozerov wrote: > I have 3 nodes, and I

Re: How to insert data?

2019-11-05 Thread BorisBelozerov
I have 3 nodes, and I code in each node: The 1st node: in Main function Ignite ignite=Ignition.start(); CacheConfiguration cacheConfiguration = new CacheConfiguration(); QueryEntity valQE = new QueryEntity();

Re: How to insert data?

2019-11-05 Thread BorisBelozerov
val cacheConfiguration = new CacheConfiguration[Integer,DataX]() val valQE = new QueryEntity() valQE.setKeyFieldName("key") valQE.setKeyType("java.lang.Integer") valQE.setValueType("DataX") valQE.addQueryField("key", "java.lang.Integer", "key")

Re: How to insert data?

2019-11-05 Thread Stephen Darlington
One. The cache is cluster-wide, so once it’s created every node can see it. > On 5 Nov 2019, at 12:36, BorisBelozerov wrote: > > Thank you!! > How many nodes that I run your code?? > I only run the "CREATE database" code in one node or all nodes?? > > > > -- > Sent from:

Re: How to insert data?

2019-11-05 Thread BorisBelozerov
Thank you!! How many nodes that I run your code?? I only run the "CREATE database" code in one node or all nodes?? -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: How to insert data?

2019-11-04 Thread Stephen Darlington
You need to tell the SQL engine about your POJO. There are number of ways of doing that, but one example would be: val cacheConfiguration = new CacheConfiguration[Integer,DataX]() val valQE = new QueryEntity() valQE.setKeyFieldName("key") valQE.setKeyType("java.lang.Integer")