Hi, Taras.
We try to connect to server via NetBeans 8.2 for development purposes.
In Services tab we add Ignite 2.8.0 JDBC driver (ignite-core-2.8.0.jar) and
choose org.apache.ignite.IgniteJdbcThinDriver.
To reproduce long running query we create 2 tables:
create table if not exists TEST
(kField long not null, vField varchar(100) not null, rField varchar(100) not
null, primary key (kField))
WITH "template=REPLICATED, cache_name=TEST, key_type=KTEST,
value_type=VTEST"
create table if not exists TEST1
(kField long not null, vField varchar(100) not null, rField varchar(100) not
null, primary key (kField))
WITH "template=REPLICATED, cache_name=TEST1, key_type=KTEST1,
value_type=VTEST1"
Then fill this tables with 1 000 000 random data rows, eg
int size = 1_000_000;
IgniteCallable<Integer> clb = new IgniteCallable<Integer>()
{
@IgniteInstanceResource
Ignite ignite;
@Override
public Integer call() throws Exception
{
IgniteCache<BinaryObject, BinaryObject> test =
ignite.cache("TEST").withKeepBinary();
if (test.size(CachePeekMode.ALL) > 0)
{
test.clear();
}
IgniteBinary bin = ignite.binary();
long t;
for (int i = 0; i < size; i++)
{
BinaryObjectBuilder k = bin.builder("KTEST");
BinaryObjectBuilder v = bin.builder("VTEST");
t = System.currentTimeMillis();
k.setField("kField", t);
v.setField("vField", "I am value string " + t);
v.setField("rField", randomString(100));
test.putAsync(k.build(), v.build());
}
return null;
}
};
Then connect to server via NetBeans with
jdbc:ignite:thin://192.168.1.138:10800?queryTimeout=1
Then make long running query:
select t.kField, t.vField, t1.vField from test t inner join test1 t1 on
t.vField = t1.vField;
This query in our case is executed ~73 sec and not cancelled.
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/