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" col
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/
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: http://apache-ignite-
When I run "!tables", there isn't any tables or schemas
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
What tables do you see when you type “!tables” into sqlline?
> On 5 Nov 2019, at 15:52, BorisBelozerov wrote:
>
> I have 3 nodes, and I code in each node:
> The 1st node: in Main function
> Ignite ignite=Ignition.start();
> CacheConfiguration cacheConfiguration = new
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 co
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();
valQE.setKeyFieldName("key
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")
valQE.addQueryField("value","java.lang.String","value"
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: http://apache-ignite-
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/
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")
valQE.setValueType("D
How can I insert data by sqlline.bat?
I use class DataX:
public class DataX {
private Integer key;
private String value;
public DataX(int key,String value) {
this.key=key;
this.value=value;
}
public int getKey() {
12 matches
Mail list logo