You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Anil <an...@gmail.com> on 2016/11/05 19:06:28 UTC

Re: Ignite Jdbc connection

Hi Manu and All,

Ignite jdbc connection is very slow for very first time even with data
source.

Consecutive queries are very fast. queries with 1 mins time duration
becoming slow.

PoolProperties p = new PoolProperties();
         p.setUrl("jdbc:ignite:cfg://cache=TEST_CACHE@file:" +
System.getProperties().getProperty("ignite.config.file"));
         p.setDriverClassName("org.apache.ignite.IgniteJdbcDriver");
         p.setMaxActive(20);
         p.setInitialSize(5);
         p.setMaxWait(5000);
         p.setMinIdle(5);
         p.setMaxIdle(10);
         p.setTestOnBorrow(true);
         p.setTestWhileIdle(true);
         p.setTestOnReturn(true);
         p.setTimeBetweenEvictionRunsMillis(60000);
         p.setMinEvictableIdleTimeMillis(120000);
         p.setMaxAge(1500000);
         p.setRemoveAbandoned(true);
         p.setRemoveAbandonedTimeout(300);
         p.setLogAbandoned(true);
         p.setFairQueue(true);
         p.setValidationQuery("select count(*) from \"TEST_CACHE\".Person
limit 1");
         p.setValidationInterval(3000);
         ds = new DataSource();
         ds.setPoolProperties(p);
 anyone facing the similar problem ?

Thanks.

Re: Ignite Jdbc connection

Posted by Anil <an...@gmail.com>.
HI Andrey,

Thanks for your response. #2 answered from other answers

You are right. i created only one connection and it looks good. thanks.

On 11 November 2016 at 16:59, Andrey Gura <ag...@apache.org> wrote:

> Hi,
>
>
> 1. Ignite client node is thread-safe and you can create multiple
> statements in order to query execution. So, from my point of view, you
> should close connection when finish all your queries.
> 2. Could you please clarify your question?
> 3. I don't think that pooling is required.
> 4. Ignite client will try to reconnect to the Ignite cluster in case of
> server node fails. All you need is proper IP finder configuration.
>
>
> On Thu, Nov 10, 2016 at 5:01 PM, Anil <an...@gmail.com> wrote:
>
>> Any help in understanding below ?
>>
>> On 10 November 2016 at 16:31, Anil <an...@gmail.com> wrote:
>>
>>> I have couple of questions on ignite jdbc connection. Could you please
>>> clarify ?
>>>
>>> 1. Should connection be closed like other jdbc db connection ? - I see
>>> connection close is shutdown of ignite client node.
>>> 2. Connection objects are not getting released and all connections are
>>> busy ?
>>> 3. Connection pool is really required for ignite client ? i hope one
>>> ignite connection can handle number of queries in parallel.
>>> 4. What is the recommended configuration for ignite client to support
>>> failover ?
>>>
>>> Thanks.
>>>
>>
>>
>

Re: Ignite Jdbc connection

Posted by Andrey Gura <ag...@apache.org>.
Hi,


1. Ignite client node is thread-safe and you can create multiple statements
in order to query execution. So, from my point of view, you should close
connection when finish all your queries.
2. Could you please clarify your question?
3. I don't think that pooling is required.
4. Ignite client will try to reconnect to the Ignite cluster in case of
server node fails. All you need is proper IP finder configuration.


On Thu, Nov 10, 2016 at 5:01 PM, Anil <an...@gmail.com> wrote:

> Any help in understanding below ?
>
> On 10 November 2016 at 16:31, Anil <an...@gmail.com> wrote:
>
>> I have couple of questions on ignite jdbc connection. Could you please
>> clarify ?
>>
>> 1. Should connection be closed like other jdbc db connection ? - I see
>> connection close is shutdown of ignite client node.
>> 2. Connection objects are not getting released and all connections are
>> busy ?
>> 3. Connection pool is really required for ignite client ? i hope one
>> ignite connection can handle number of queries in parallel.
>> 4. What is the recommended configuration for ignite client to support
>> failover ?
>>
>> Thanks.
>>
>
>

Re: Ignite Jdbc connection

Posted by Anil <an...@gmail.com>.
Any help in understanding below ?

On 10 November 2016 at 16:31, Anil <an...@gmail.com> wrote:

> I have couple of questions on ignite jdbc connection. Could you please
> clarify ?
>
> 1. Should connection be closed like other jdbc db connection ? - I see
> connection close is shutdown of ignite client node.
> 2. Connection objects are not getting released and all connections are
> busy ?
> 3. Connection pool is really required for ignite client ? i hope one
> ignite connection can handle number of queries in parallel.
> 4. What is the recommended configuration for ignite client to support
> failover ?
>
> Thanks.
>

Re: Ignite Jdbc connection

Posted by Anil <an...@gmail.com>.
I have couple of questions on ignite jdbc connection. Could you please
clarify ?

1. Should connection be closed like other jdbc db connection ? - I see
connection close is shutdown of ignite client node.
2. Connection objects are not getting released and all connections are busy
?
3. Connection pool is really required for ignite client ? i hope one ignite
connection can handle number of queries in parallel.
4. What is the recommended configuration for ignite client to support
failover ?

Thanks.

Re: Ignite Jdbc connection

Posted by Anil <an...@gmail.com>.
i see it is because of client timeout. and has been resolved. thanks.

On 6 November 2016 at 00:36, Anil <an...@gmail.com> wrote:

> Hi Manu and All,
>
> Ignite jdbc connection is very slow for very first time even with data
> source.
>
> Consecutive queries are very fast. queries with 1 mins time duration
> becoming slow.
>
> PoolProperties p = new PoolProperties();
>          p.setUrl("jdbc:ignite:cfg://cache=TEST_CACHE@file:" +
> System.getProperties().getProperty("ignite.config.file"));
>          p.setDriverClassName("org.apache.ignite.IgniteJdbcDriver");
>          p.setMaxActive(20);
>          p.setInitialSize(5);
>          p.setMaxWait(5000);
>          p.setMinIdle(5);
>          p.setMaxIdle(10);
>          p.setTestOnBorrow(true);
>          p.setTestWhileIdle(true);
>          p.setTestOnReturn(true);
>          p.setTimeBetweenEvictionRunsMillis(60000);
>          p.setMinEvictableIdleTimeMillis(120000);
>          p.setMaxAge(1500000);
>          p.setRemoveAbandoned(true);
>          p.setRemoveAbandonedTimeout(300);
>          p.setLogAbandoned(true);
>          p.setFairQueue(true);
>          p.setValidationQuery("select count(*) from \"TEST_CACHE\".Person
> limit 1");
>          p.setValidationInterval(3000);
>          ds = new DataSource();
>          ds.setPoolProperties(p);
>  anyone facing the similar problem ?
>
> Thanks.
>