Re: Query Entity and Affinity Key

2020-03-16 Thread narges saleh
Attached. thanks.

On Mon, Mar 16, 2020 at 8:28 PM Evgenii Zhuravlev 
wrote:

> Hi, please share the whole config file
>
> пн, 16 мар. 2020 г. в 15:38, narges saleh :
>
>> Thanks Evgenii for the reply.
>> How do I do that in XML configuration file if my query entities are
>> defined solely in the xml file? What does ClassNameOfKey and
>> fieldNameinThatClass represent? I assume I will have one bean for each
>> cache.
>> 
>> 
>> 
>> 
>> 
>> >
>> value="fieldNameInThatClass"/>
>> 
>> 
>> 
>> 
>> And the bean for the query entity is:have
>>   
>> > value="java.lang.Integer"/>
>> > value="PERSON"/>
>> > value="PERSON"/>
>> 
>> 
>> 
>> > value="java.lang.Integer"/>
>>> value="java.lang.Integer"/>
>> > value="java.lang.String"/>
>> > value="java.lang.String"/>
>> 
>> 
>> 
>> 
>> 
>> CompanyId
>> EmployeeId
>> 
>> 
>> 
>>
>>
>> On Mon, Mar 16, 2020 at 3:22 PM Evgenii Zhuravlev <
>> e.zhuravlev...@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> You should have one cache per table(query entity) and configure separate
>>> CacheKeyConfigurations for each of the caches.
>>>
>>> Evgenii
>>>
>>> пн, 16 мар. 2020 г. в 11:42, narges saleh :
>>>
 Hi All,

 I have a question that might be trivial.
 If I define my query entity for each in the XML configuration file and
 define the affinity key via CacheKeyConfiguration (again in the xml file),
 considering that here affinity key is defined at IgniteConfiguration level,
 how do I specify which cache keys (i.e., query entity key fields) will use
 the affinity key and which ones don't?

 Say I have these 4 tables
 Employee(company-id, employee-id)
 Contractor(company-id, contractor-id)
 Customer(company-id, customer-id)
 Company(company-id, address)

 How do I collocate employee, and contractors with companies but not the
 customers and companies? Can you provide the CacheKeyConfiguration and
 keyfields for each query entity?

 thanks.

>>>




http://www.springframework.org/schema/beans;
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
   xmlns:util="http://www.springframework.org/schema/util;
   xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd;>































employeeId
companyId































   

Re: java.lang.IllegalMonitorStateException: attempt to unlock read lock, not locked by current thread

2020-03-16 Thread yangjiajun
Hello.Thanks for u reply.

Actually I am using Hakaricp connection pool.I think my threads can't use
same connection at same time.The threads can only reuse same connection at
different time.My code works well in ignite 2.7 and it also works when I set
lazy=false in ignite 2.8.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Query Entity and Affinity Key

2020-03-16 Thread Evgenii Zhuravlev
Hi, please share the whole config file

пн, 16 мар. 2020 г. в 15:38, narges saleh :

> Thanks Evgenii for the reply.
> How do I do that in XML configuration file if my query entities are
> defined solely in the xml file? What does ClassNameOfKey and
> fieldNameinThatClass represent? I assume I will have one bean for each
> cache.
> 
> 
> 
> 
> 
> 
> value="fieldNameInThatClass"/>
> 
> 
> 
> 
> And the bean for the query entity is:have
>   
>  value="java.lang.Integer"/>
> 
> 
> 
> 
> 
>  value="java.lang.Integer"/>
> value="java.lang.Integer"/>
>  value="java.lang.String"/>
>  value="java.lang.String"/>
> 
> 
> 
> 
> 
> CompanyId
> EmployeeId
> 
> 
> 
>
>
> On Mon, Mar 16, 2020 at 3:22 PM Evgenii Zhuravlev <
> e.zhuravlev...@gmail.com> wrote:
>
>> Hi,
>>
>> You should have one cache per table(query entity) and configure separate
>> CacheKeyConfigurations for each of the caches.
>>
>> Evgenii
>>
>> пн, 16 мар. 2020 г. в 11:42, narges saleh :
>>
>>> Hi All,
>>>
>>> I have a question that might be trivial.
>>> If I define my query entity for each in the XML configuration file and
>>> define the affinity key via CacheKeyConfiguration (again in the xml file),
>>> considering that here affinity key is defined at IgniteConfiguration level,
>>> how do I specify which cache keys (i.e., query entity key fields) will use
>>> the affinity key and which ones don't?
>>>
>>> Say I have these 4 tables
>>> Employee(company-id, employee-id)
>>> Contractor(company-id, contractor-id)
>>> Customer(company-id, customer-id)
>>> Company(company-id, address)
>>>
>>> How do I collocate employee, and contractors with companies but not the
>>> customers and companies? Can you provide the CacheKeyConfiguration and
>>> keyfields for each query entity?
>>>
>>> thanks.
>>>
>>


Re: Ignite client stuck

2020-03-16 Thread akorensh
Hi,

GridGain checks that each critical worker thread is  is alive and updating
its heartbeat timestamp. If that is not the case, the worker will be
regarded as blocked and GridGain will print a message to the log file. The
period of inactivity is specified by the
IgniteConfiguration.systemWorkerBlockedTimeout property.

more info here:
https://apacheignite.readme.io/docs/critical-failures-handling#section-critical-workers-health-check

In your case a communication worker failed [threadName=tcp-comm-worker,
blockedFor=932s]

Check that your network to make sure that all ports are open and all hosts
reachable.

Thanks, Alex







--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Query Entity and Affinity Key

2020-03-16 Thread narges saleh
Thanks Evgenii for the reply.
How do I do that in XML configuration file if my query entities are defined
solely in the xml file? What does ClassNameOfKey and fieldNameinThatClass
represent? I assume I will have one bean for each cache.










And the bean for the query entity is:have
  







   







CompanyId
EmployeeId





On Mon, Mar 16, 2020 at 3:22 PM Evgenii Zhuravlev 
wrote:

> Hi,
>
> You should have one cache per table(query entity) and configure separate
> CacheKeyConfigurations for each of the caches.
>
> Evgenii
>
> пн, 16 мар. 2020 г. в 11:42, narges saleh :
>
>> Hi All,
>>
>> I have a question that might be trivial.
>> If I define my query entity for each in the XML configuration file and
>> define the affinity key via CacheKeyConfiguration (again in the xml file),
>> considering that here affinity key is defined at IgniteConfiguration level,
>> how do I specify which cache keys (i.e., query entity key fields) will use
>> the affinity key and which ones don't?
>>
>> Say I have these 4 tables
>> Employee(company-id, employee-id)
>> Contractor(company-id, contractor-id)
>> Customer(company-id, customer-id)
>> Company(company-id, address)
>>
>> How do I collocate employee, and contractors with companies but not the
>> customers and companies? Can you provide the CacheKeyConfiguration and
>> keyfields for each query entity?
>>
>> thanks.
>>
>


Ignite client stuck

2020-03-16 Thread mikle-a
Hi guys!

I have ignite cluster of 3 nodes and couple of applications with enabled
client mode and default communication spi configuration. One morning I found
one of applications being stucked with following messages in the log:



I was able to connect to the server via ssh, no connectivity problems been
noticed. Restart helped.

What are possible reasons for such behavior? Could you please advice any
measures to prevent such situation in the future, some kind of timeouts
maybe?



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Query Entity and Affinity Key

2020-03-16 Thread Evgenii Zhuravlev
Hi,

You should have one cache per table(query entity) and configure separate
CacheKeyConfigurations for each of the caches.

Evgenii

пн, 16 мар. 2020 г. в 11:42, narges saleh :

> Hi All,
>
> I have a question that might be trivial.
> If I define my query entity for each in the XML configuration file and
> define the affinity key via CacheKeyConfiguration (again in the xml file),
> considering that here affinity key is defined at IgniteConfiguration level,
> how do I specify which cache keys (i.e., query entity key fields) will use
> the affinity key and which ones don't?
>
> Say I have these 4 tables
> Employee(company-id, employee-id)
> Contractor(company-id, contractor-id)
> Customer(company-id, customer-id)
> Company(company-id, address)
>
> How do I collocate employee, and contractors with companies but not the
> customers and companies? Can you provide the CacheKeyConfiguration and
> keyfields for each query entity?
>
> thanks.
>


Query Entity and Affinity Key

2020-03-16 Thread narges saleh
Hi All,

I have a question that might be trivial.
If I define my query entity for each in the XML configuration file and
define the affinity key via CacheKeyConfiguration (again in the xml file),
considering that here affinity key is defined at IgniteConfiguration level,
how do I specify which cache keys (i.e., query entity key fields) will use
the affinity key and which ones don't?

Say I have these 4 tables
Employee(company-id, employee-id)
Contractor(company-id, contractor-id)
Customer(company-id, customer-id)
Company(company-id, address)

How do I collocate employee, and contractors with companies but not the
customers and companies? Can you provide the CacheKeyConfiguration and
keyfields for each query entity?

thanks.


Re: NullPointerException while cluster startup

2020-03-16 Thread swattal
Hi Mike,

The problem is intermittent and doesn't always show up. I haven't given a
shot to your suggestion and am looking into how i test the internally on a
largish cluster. For now, i have stopped registering the CacheEntryListener.

I will keep this thread updated.

Sumit



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: How to terminate long running transactions in 2.4.0?

2020-03-16 Thread rc
Hi Ilya,

Thanks for responding. Killing the originator nodes did not terminate the
transactions. I would like understand more about the VM-level deadlock. How
does one go about determining that?

Thanks,
rc



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Warning in the logs - Writes are very slow

2020-03-16 Thread krkumar24061...@gmail.com
Hi Mike - Thanks for the reply. Please take a look at the point to point
details.

Ignite need to sync memory and disk time to time, if you write rate is 
bigger than disk speed that means Ignite will never able to sync memory and 
disk, that's why it starts to throttle your writes. 

 Its a write intensive process and I am curious if there way to figure
out what is the disk speed that is required in terms of IOPS (AWS) other
than programmatically instrumenting it.

You can disable throttling, which I don't recommend, because then, instead 
of throttling updates, ignite can completely stop all updates during a 
checkpoint. 

 --- Ageed. If i disable throttling it will get into this stop the world
checkpoints. Not good i guess.


here are several options you can try, first use different physical disks 
for WAL/WAL Archive and Storage.(WAL and WAL archive should on the same 
disk). If it won't help then it's time to scale. 

 --- Storage and WAL are different disks . Wal Archive is same as Wal

So if it's AWS like environment, I would recommend using IO1 disks with high 
IOPS to make sure that it can handle your peak load. However, IO1 disks it's 
pretty expensive might be it would be more efficient to just add a few more 
nodes. 


  io1 disks are not an option as they will shoot up the cost. May be
adding few more nodes is an option and i will check on this.


Again, if it's just initial data load, then it can be fine to have 
throttling because usually, initial data load creates load significantly 
bigger then regular load. 
   
--- In a way its initial load but the subsequent also we have significant
throughput requirements.








--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Warning in the logs - Writes are very slow

2020-03-16 Thread krkumar24061...@gmail.com
HI - Thanks for getting back to me. This is happening in our test environment
and we have 4TB gp2 disks i.e. general purpose SSD with 12000 IOPS. Its a
very write intensive work where we compress records that are anything
between 1kb to 4kb and push them to ignite. Right now the throughput is
about 25K/sec. Another thing initially it starts with a big bang and then
drops to anything between 10k to 25k. Its a three node cluster.

Thanx and Regards,
KR Kumar



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: java.lang.IllegalMonitorStateException: attempt to unlock read lock, not locked by current thread

2020-03-16 Thread Ilya Kasnacheev
Hello!

Are you sure that you are not using the same connection from two threads
concurrently? Ignite thin connections are non-thread-safe.

Regards,
-- 
Ilya Kasnacheev


чт, 12 мар. 2020 г. в 11:47, yangjiajun <1371549...@qq.com>:

> Hello.
>
> I get a strange exception while test ignite 2.8 in our test env.I get
> following exception when I set lazy = true to run our tasks.The tasks do
> jdbc selects and insert the result to others ignite tables.The tasks are
> async.The exception throws when my code fetches 1024 rows.Such tasks works
> well in ignite 2.7.And it also works well when I set lazy = false in ignite
> 2.8.
>
> This is the exception in client:
> java.sql.SQLException: General error:
> "java.lang.IllegalMonitorStateException: attempt to unlock read lock, not
> locked by current thread" [5-197]
> at
>
> org.apache.ignite.internal.jdbc.thin.JdbcThinConnection.sendRequest(JdbcThinConnection.java:901)
> at
>
> org.apache.ignite.internal.jdbc.thin.JdbcThinResultSet.next(JdbcThinResultSet.java:206)
> at
> com.zaxxer.hikari.pool.HikariProxyResultSet.next(HikariProxyResultSet.java)
> .
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at
>
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748)
>
> The log in server:
> ignite-369ae417.rar
> <
> http://apache-ignite-users.70518.x6.nabble.com/file/t2059/ignite-369ae417.rar>
>
>
> Unfortunately,I still can't make a simple reproducer in my locl env.Do u
> have any ideas about such exception?
>
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


Re: Warning in the logs - Writes are very slow

2020-03-16 Thread Ilya Kasnacheev
Hello!

Let me add to the previous answers:

This message means that checkpoint page buffer is almost exhausted. It is
recommended to increase its size (dataRegionCfg.checkpointPageBufferSize)
if you have a lot of writes.

Please see
https://apacheignite.readme.io/docs/durable-memory-tuning#section-checkpointing-buffer-size

Regards,
-- 
Ilya Kasnacheev


пт, 13 мар. 2020 г. в 09:39, krkumar24061...@gmail.com <
krkumar24061...@gmail.com>:

> Hi All - I see this message in the logs
>
> [2020-03-12 15:23:29,896][INFO
> ][comcastprod-1-StoreFlushWorker-7][PageMemoryImpl] Throttling is applied
> to
> page modifications [*percentOfPartTime=0.54*, markDirty=8185 pages/sec,
> checkpointWrite=14893 pages/sec, estIdealMarkDirty=8182 pages/sec,
> curDirty=0.35, maxDirty=0.28, avgParkTime=1654529 ns, pages:
> (total=5700803,
> evicted=13463, written=3967472, synced=0, cpBufUsed=307302,
> cpBufTotal=518215)]
>
> From the docs, i understand that this thread is being parked for almost 54%
> time as part of throttling. Wanted to know how to solve this issue and what
> are thing that can be done avoid this ??
>
> Thanx and Regards,
> KR Kumar
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


Re: ClusterTopologyServerNotFoundException

2020-03-16 Thread Ilya Kasnacheev
Hello!

Do you have baseline topology? What does it contain?

I'm pretty sure Ignite will define baseline topology for persistent
cluster, and you will have to adjust it to match your actual nodes.

Regards,
-- 
Ilya Kasnacheev


пн, 16 мар. 2020 г. в 09:27, prudhvibiruda :

> Hi ,
> Sorry for the late reply.
> Please find these attached screenshots of my ignite configuration and also
> the error we are getting.
> We are using spring boot in our project.
> Our requirement is that :
> 1.) We need ignite to store data on disk.
> 2.)When node is down then the other node should continue doing the
> persistence on to the disk.
> Please help on what are we missing ? Why are we getting that exception ?
> What are your suggestions?
> 
> 
> 
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


Re: ClusterTopologyServerNotFoundException

2020-03-16 Thread prudhvibiruda
Hi ,
Sorry for the late reply.
Please find these attached screenshots of my ignite configuration and also
the error we are getting.
We are using spring boot in our project.
Our requirement is that :
1.) We need ignite to store data on disk.
2.)When node is down then the other node should continue doing the
persistence on to the disk.
Please help on what are we missing ? Why are we getting that exception ?
What are your suggestions?
 
 
 



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/