Re: CacheJdbcPojoStoreFactory met error "Spring application context resource is not injected."

2016-02-29 Thread anovikov
Configuration example: 
https://apacheignite.readme.io/docs/automatic-persistence#cachejdbcpojostore
  

Possibly, you don't declare "dataSource" bean.



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/CacheJdbcPojoStoreFactory-met-error-Spring-application-context-resource-is-not-injected-tp3249p3287.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: update the sql database after a particular limit?

2016-02-29 Thread Vladimir Ozerov
Ravi,

There is no built-in mechanism to automatically retrieve updates from
database. I would suggest you to do the following:
1) Configure a cache store (e.g. see CacheJdbcPojoStore).
2) Set flags CacheConfiguration.setReadThrough() and
CacheConfigutration.setWriteThrough() to true.
3) Whenever you want to change database data, update the cache, not the
database. Ignite will transfer this change to the database.

Vladimir.

On Tue, Mar 1, 2016 at 8:32 AM, Ravi Puri  wrote:

> Suppose i have a employee data and its login time . I want to fetch the
> data
> from database and store it in cache and everytime i login if its changes in
> database then i want to reflect back in cache too. As i want my code to
> work
> consistently with cache data rather than database
> ??
>
> please suggest me ways how to configure and and some code changes in get
> and
> put operation
>
>
>
> --
> View this message in context:
> http://apache-ignite-users.70518.x6.nabble.com/update-the-sql-database-after-a-particular-limit-tp3250p3279.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>


Re: storekeepbinary error?

2016-02-29 Thread Vladimir Ozerov
Ravi,

Probably you have old Ignite version where there is no such method.

Vladimir.

On Tue, Mar 1, 2016 at 10:02 AM, Ravi Puri 
wrote:

>  >
>
> how to resolve above error?
>
>
>
> --
> View this message in context:
> http://apache-ignite-users.70518.x6.nabble.com/storekeepbinary-error-tp3284.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>


Re: QueryCursor entry does not return "versioned" cache entry.

2016-02-29 Thread Vladimir Ozerov
Hi,

Can you please properly subscribe to the mailing list so that the community
receives email notifications? Please follow this instruction:
http://apache-ignite-users.70518.x6.nabble.com/mailing_list/MailingListOptions.jtp?forum=1

Queries are not transactional, so you cannot update entries returned by
query cursor and expect these updates to be as a part of transaction.

I would recommend the following approach:
1) Run SQL query and identify the list of key to be updated.
2) Start transaction and update these keys using IgniteCache.get() and
IgniteCache.put() operations.

Vladimir.



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/QueryCursor-entry-does-not-return-versioned-cache-entry-tp3274p3283.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


About fetch cache data's question

2016-02-29 Thread 上帝已死
I have 3 ignite instance in 3 tomcat.The cache mode is Replicated.If one of
them's ignite instance stoped, will it fetch data from other 2 ingnite
instance?The following is my configuration:




--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/About-fetch-cache-data-s-question-tp3281.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: About fetch cache data's question

2016-02-29 Thread Vladimir Ozerov
If you stop one Tomcat/Ignite instance, then all data will be available still
on remaining two instances.



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/About-fetch-cache-data-s-question-tp3281p3282.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: update the sql database after a particular limit?

2016-02-29 Thread Ravi Puri
Suppose i have a employee data and its login time . I want to fetch the data
from database and store it in cache and everytime i login if its changes in
database then i want to reflect back in cache too. As i want my code to work
consistently with cache data rather than database
??

please suggest me ways how to configure and and some code changes in get and
put operation



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/update-the-sql-database-after-a-particular-limit-tp3250p3279.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


How to start ignite instance when tomcat start?

2016-02-29 Thread 上帝已死
Ignite start cost me almost 1 minute.So I try to  start ignite instance when
tomcat start.But the following code didn't work.




--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/How-to-start-ignite-instance-when-tomcat-start-tp3278.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: If Apache Ignite's cacheMode is REPLACATED, there will be a delay?

2016-02-29 Thread 上帝已死




--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/If-Apache-Ignite-s-cacheMode-is-REPLACATED-there-will-be-a-delay-tp3195p3276.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: If Apache Ignite's cacheMode is REPLACATED, there will be a delay?

2016-02-29 Thread 上帝已死
Sorry, I'am chinese.My English is not good. 






192.168.2.232:8080  
192.168.1.199:8080  


   
@Resource(name = "igniteConfiguration") private IgniteConfiguration
igniteConfiguration;@SuppressWarnings("rawtypes")   @Resource(name =
"cacheConfiguration")   private CacheConfiguration cacheConfiguration;  
@SuppressWarnings({ "rawtypes", "unchecked" })  @RequestMapping(value =
"/put") @ResponseBody   public String put() {   Ignite ignite =
Ignition.start(igniteConfiguration);IgniteCache cache =
ignite.getOrCreateCache(cacheConfiguration);cache.put("aaa", 123);  
return
"ok";   }This is my configuration. I had start a server on 192.168.1.199. Then
I wrote a test on 192.168.2.232.@Resource(name =
"igniteConfiguration")  private IgniteConfiguration igniteConfiguration;
@SuppressWarnings("rawtypes")   @Resource(name = "cacheConfiguration")
CacheConfiguration cacheConfiguration;  @Test   @SuppressWarnings({
"rawtypes", "unchecked" })  public void getData() { 
Ignite ignite =
Ignition.start(igniteConfiguration);IgniteCache cache =
ignite.getOrCreateCache(cacheConfiguration);System.out.println("aaa 
= " +
cache.get("aaa"));  }The output is : aaa = null



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/If-Apache-Ignite-s-cacheMode-is-REPLACATED-there-will-be-a-delay-tp3195p3275.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Control cache datanodes in an ignite cluster

2016-02-29 Thread vkulichenko
Hi Manish,

This is not possible. A node can be added to the existing cache topology
only on startup. To achieve the behavior you described, you can start a new
node with both caches and stop one of the old ones. Will this work for you?

-Val



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Control-cache-datanodes-in-an-ignite-cluster-tp3216p3272.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


答复: How can I only get the local data(Internet mail)

2016-02-29 Thread 洪利平
thank you for your response, I use the  “ignite.compute().broadcast()” because 
I hope to execute some other operation in the data in each server node, for 
example,  Seeking maximum , if we can execute in each server node, then the 
server node will not return all data but only the maximum data.

发件人: Denis Magda [mailto:dma...@gridgain.com]
发送时间: 2016年2月29日 21:52
收件人: user@ignite.apache.org
主题: Re: 答复: How can I only get the local data(Internet mail)

> but I will use the “ignite.compute().broadcast()” method to get all data(for 
> example, aggregate in server node)

There is no sense to use compute.broadcast() and local query at all because SQL 
engine does this properly for you out of the box. So in such a case just 
execute query and all the nodes that store cache XX data will receive the 
request and return their portion of data.

> Or, Is there another method to use “select * from XX where XX” to get the 
> local data in partition cache method ?

Give me an example of a real SQL you're executing.

--
Denis

On 2/29/2016 2:30 PM, smilehong(洪利平) wrote:

Yes, You are right,  but I will use the “ignite.compute().broadcast()” method 
to get all data(for example, aggregate in server node),  so I want to know that 
 set Query.setLocal to "true" can solute this problem ( Get data only from 
local node) ?
Or, Is there another method to use “select * from XX where XX” to get the local 
data in partition cache method ?

发件人: Denis Magda [mailto:dma...@gridgain.com]
发 送时间: 2016年2月29日 19:12
收件人: user@ignite.apache.org
主题: Re: How can I only get the local data(Internet mail)

Hi,

Presently there is no a reliable way to execute a SQL query over local 
collocated data.
Even if you set Query.setLocal to "true" there is a chance that you will get 
incomplete result set if re-partitioning happened at some point of the query 
execution.

However, it's planned to support the feature that will execute a query on a 
specific machine if it's know that all the data is located there.
Igniters, have we already created a ticket for this feature?

--
Denis
On 2/29/2016 10:52 AM, smilehong(洪利平) wrote:
Hi, all
  when I use the “select * from XX where XX” in ignite, how can I only get the 
local data ? because it obtain data on all nodes default. And I have configure 
the cache modes is partitioned mode.
 Thank you very much!




Re: "Failed to send message"

2016-02-29 Thread vkulichenko
Paolo,

>From what I see in the code, it can be even a client node (you can check by
the ID, btw). Task topology is defined by a cluster group that is used to
get IgniteCompute. By default it's all server nodes.

In any case, this is just a debug message and if job stealing works for you
as expected, I would not worry about this. If it doesn't, please describe
the issue you have.

-Val



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Failed-to-send-message-tp3217p3269.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Control cache datanodes in an ignite cluster

2016-02-29 Thread Manishag
Thanks Val. This is really helpful. One last issue I have is that there is a
possibility that I might want to add an existing ignite node hosting a cache
say cache1 to cache2 as well. The problem is how do I tell ignite to force
repartitioning so that it calls the node filter and adds this node. This is
not a new node from ignite's perspective and looks like calling
cache.rebalance does not trigger a repartition. Is there any way to force
repartitioning without any add/remove node event from ignite's perspective?




--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Control-cache-datanodes-in-an-ignite-cluster-tp3216p3268.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: "Failed to send message"

2016-02-29 Thread Paolo Di Tommaso
Val,

I guess I'm missing something but I was expecting that having a two nodes
cluster, one should still the waiting tasks from the other. What is
defining the task topology or how to control it?


Cheers,
Paolo


On Mon, Feb 29, 2016 at 11:02 PM, vkulichenko  wrote:

> Paolo,
>
> This is not an error. This is a debug message which means that there is a
> node in topology (thief candidate) which is not in task topology - this is
> absolutely legal situation. Does it break something for you?
>
> -Val
>
>
>
> --
> View this message in context:
> http://apache-ignite-users.70518.x6.nabble.com/Failed-to-send-message-tp3217p3265.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>


Re: Race condition in IgniteScheduler.nextExecutionTime()

2016-02-29 Thread vkulichenko
Hi Steve,

I looked at the code and don't see such a race there. But I noticed that
nextExecutionTime() uses U.currentTimeMillis() as start time, which looks
suspicious. Do you have a test that reproduces the issue?

-Val



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Race-condition-in-IgniteScheduler-nextExecutionTime-tp3261p3266.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: "Failed to send message"

2016-02-29 Thread vkulichenko
Paolo,

This is not an error. This is a debug message which means that there is a
node in topology (thief candidate) which is not in task topology - this is
absolutely legal situation. Does it break something for you?

-Val



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Failed-to-send-message-tp3217p3265.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: If Apache Ignite's cacheMode is REPLACATED, there will be a delay?

2016-02-29 Thread vkulichenko
Hi,

Please subscribe to the mailing list according to this instruction:
http://apache-ignite-users.70518.x6.nabble.com/mailing_list/MailingListOptions.jtp?forum=1.
Otherwise community doesn't receive notifications about your messages.


上帝已死 wrote
> If I have 3 server, how to start the ignite (Ignite ignite =
> Ignition.start(igniteConfiguration))?

To start a standalone server, use bin/ignite.{sh|bat} script. To start a
node embedded into the application, use Ignition.start() method.

-Val



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/If-Apache-Ignite-s-cacheMode-is-REPLACATED-there-will-be-a-delay-tp3195p3263.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: How can I only get the local data

2016-02-29 Thread Dmitriy Setrakyan
I think the answer is to use Query.setLocal(true) flag which will return
correct results on the stable topology. The issue with changing topology is
being addressed right now and should become part of the next release.

D.

On Mon, Feb 29, 2016 at 3:11 AM, Denis Magda  wrote:

> Hi,
>
> Presently there is no a reliable way to execute a SQL query over local
> collocated data.
> Even if you set Query.setLocal to "true" there is a chance that you will
> get incomplete result set if re-partitioning happened at some point of the
> query execution.
>
> However, it's planned to support the feature that will execute a query on
> a specific machine if it's know that all the data is located there.
> Igniters, have we already created a ticket for this feature?
>
> --
> Denis
>
>
> On 2/29/2016 10:52 AM, smilehong(洪利平) wrote:
>
> Hi, all
>
>   when I use the “select * from XX where XX” in ignite, how can I only get
> the local data ? because it obtain data on all nodes default. And I have
> configure the cache modes is partitioned mode.
>
>  Thank you very much!
>
>
>


Race condition in IgniteScheduler.nextExecutionTime()

2016-02-29 Thread Steve Scheck
It seems there is a race condition between the IgniteScheduler scheduleLocal() 
and nextExecutionTime() methods, so that nextExecutionTime() sometimes reports 
the current execution time when called from with the closure being executed by 
scheduleLocal() - my hypothesis is that the data structures for determining 
next execution time are being updated by a different thread just after the 
closure is executed. When I insert a Thread.sleep() with a short delay into my 
scheduled closure implementation, the intermittent inaccurate next execution 
time goes away.

Has anybody else observed such behavior? Can someone on the development team 
confirm if the code contains such a race condition?

Thanks.



Re: Version issue with concurrent cache updates (EntryProcessor)

2016-02-29 Thread Myron Chelyada
Alexey,

For now, I've only figured out that problem is on node that is joining the
grid and with records/keys for which it becomes primary.
Also I tried different rebalance modes but with no luck. But now I can
confirm that "cacheStore" makes no impact on that (tried to disable
cacheStore and result is the same).
The other thing I am observing is that "innerUpdate" is being actually
called but update is not applied. Will try to capture more information
and/or build/extract some test code that would allow to reproduce it.
But meanwhile if provide above information would provide you some hints and
allow you to see/find the root cause that would be awesome.

Thanks,
Myron

2016-02-29 1:13 GMT+02:00 Alexey Goncharuk :

> Myron,
>
> We have a specific test for the exact use-case you have described and it
> passes - see IgniteAtomicCacheEntryProcessorNodeJoinTest. I tried to play
> with the configuration (added test store, tried different memory modes),
> but was not able to make the test fail.
>
> Is there any change you can share a reproducible example as you did before
> for the issue with the assertion you've encountered?
>
> Thanks,
> AG
>


Re: NoSuchMethod Error

2016-02-29 Thread jitesh dundas
HI Vladimir,

I will surely check that out.

Thanks & Regards,
Jitesh Dundas

Phone - 732-357-6292




On Mon, Feb 29, 2016 at 8:14 AM, Vladimir Ozerov 
wrote:

> Hi Jitesh,
>
> It looks like you should try configuring Resin classloading somehow so
> that your application JARs are picked first. Normally application servers
> should support this option. Did you have a chance to investigate it? E.g.
> see "servlet-hack" property:
> http://www.caucho.com/resin-4.0/admin/advanced-classloaders.xtp
>
> Vladimir.
>
> On Sun, Feb 28, 2016 at 12:22 AM, jitesh dundas 
> wrote:
>
>> Hi,
>>
>> Some notes from the log:-
>>
>> ...skipping...
>>
>> Jiteshs-:~ jbdundas$ javap -public -cp
>> /Users/jbdundas/resin-4.0.36/deploy/_ear_jee-mail-connector-app-2016-W07/lib/cache-api-1.0.0.jar
>>  javax.cache.event.CacheEntryEvent
>>
>> Compiled from "CacheEntryEvent.java"
>>
>> public abstract class javax.cache.event.CacheEntryEvent extends
>> java.util.EventObject implements javax.cache.Cache$Entry {
>>
>>   public javax.cache.event.CacheEntryEvent(javax.cache.Cache,
>> javax.cache.event.EventType);
>>
>>   public final javax.cache.Cache getSource();
>>
>>   public abstract V getOldValue();
>>
>>   public abstract boolean isOldValueAvailable();
>>
>>   public final javax.cache.event.EventType getEventType();
>>
>>   public java.lang.Object getSource();
>>
>> }
>>
>> Jiteshs-:~ jbdundas$ javap -public -cp
>> /Users/jbdundas/resin-4.0.36/lib/javaee-16.jar
>>  javax.cache.event.CacheEntryEvent
>>
>> Compiled from "CacheEntryEvent.java"
>>
>> public abstract class javax.cache.event.CacheEntryEvent extends
>> java.util.EventObject {
>>
>>   public javax.cache.event.CacheEntryEvent(javax.cache.Cache);
>>
>>   public final javax.cache.Cache getSource();
>>
>>   public abstract K getKey();
>>
>>   public abstract V getValue();
>>
>>   public V getOldValue();
>>
>>   public boolean isOldValueAvailable();
>>
>>   public java.lang.Object getSource();
>>
>> }
>>
>> Jiteshs-MacBook-Pro:~ jbdundas$
>>
>>
>> Thanks & Regards,
>> Jitesh Dundas
>>
>> Phone - 732-357-6292
>>
>>
>>
>>
>> On Sat, Feb 27, 2016 at 4:17 PM, jitesh dundas 
>> wrote:
>>
>>> Hi Val,
>>>
>>> I think you are right but when we tried your suggestion, it brought our
>>> hibernate code down.
>>>
>>> Thus, we drilled down and found a confllict betweem cache-api-1.0.0.jar
>>> and javaee-16.jar
>>>
>>> they have a conflict on javax.cache.event.CacheEntryEvent. class with
>>> the constructor method( both have different signatures).
>>>
>>> javaee-16.jar resides in resin/lib folder while cache-api-1.0.0.jar
>>> resides in our application code. We use Maven for dependency management.
>>>
>>> The class is getting loaded from javaee-16.jar and not the cache JAR.
>>>
>>>
>>> Thanks & Regards,
>>> Jitesh Dundas
>>>
>>> Phone - 732-357-6292
>>>
>>>
>>>
>>>
>>> On Sat, Feb 27, 2016 at 12:29 PM, jitesh dundas 
>>> wrote:
>>>
 Hi Val,

 We tried the suggestion but we still get the same error.

 Any other ideas?


 Thanks & Regards,
 Jitesh Dundas

 Phone - 732-357-6292




 On Thu, Feb 25, 2016 at 9:28 PM, jitesh dundas 
 wrote:

> Hi,
>
> Thanks for the advise. I will surely try that.
>
> Thanks & Regards,
> Jitesh Dundas
>
> Phone - 732-357-6292
>
>
>
>
> On Thu, Feb 25, 2016 at 6:40 PM, vkulichenko <
> valentin.kuliche...@gmail.com> wrote:
>
>> Hi Jitesh,
>>
>> This issue looks similar to [1] - Resin includes javaee-16.jar which
>> contains some outdated JCache spec classes. These classes override
>> ones
>> provided by the application. Can you try the solution provided on SO
>> to
>> reverse the class loading order?
>>
>> [1]
>>
>> http://stackoverflow.com/questions/29382856/how-to-classload-java-ee-7-in-resin-4-0-42-and-not-use-the-default-javaee-16-jar
>>
>> -Val
>>
>>
>>
>> --
>> View this message in context:
>> http://apache-ignite-users.70518.x6.nabble.com/NoSuchMethod-Error-tp3193p3194.html
>> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>>
>
>

>>>
>>
>


Re: "Failed to send message"

2016-02-29 Thread Paolo Di Tommaso
Hi Valentin,

It looks the problem was the OSX firewall. I've disabled it and the
exception is not raised any more.

However I'm still still struggling with a strange communication error. I'm
testing the JobStealingCollisionSpi, with two nodes in the same machine.

I'm executing three jobs having set `activeJobsThreshold` to 1. I can see
in the log that the node is receiving a stealing request from the other
node, but it refuse it because apparently that node does not belong to the
topology. This is log trace:

DEBUG: Received steal request [nodeId=91309c34-3821-462a-b30f-485af83f776e,
msg=JobStealingRequest [delta=1], stealReqs=1]
DEBUG: Jobs to reject count [jobsToReject=2, waitCtx=CollisionJobContext
[passive=true]]
DEBUG: Thief node does not belong to task topology
[thief=91309c34-3821-462a-b30f-485af83f776e, task=GridJobSessionImpl
[ses=GridTaskSessionImpl
[taskName=nextflow.executor.IgExecutor$IgniteTaskWrapper,
dep=LocalDeployment [super=GridDeployment [ts=1456758356196,
depMode=SHARED, clsLdr=sun.misc.Launcher$AppClassLoader@33909752,
clsLdrId=4e8709d2351-0d1480de-7544-4177-bc08-a1ccfbe5, userVer=0,
loc=true, sampleClsName=java.lang.String, pendingUndeploy=false,
undeployed=false, usage=0]],
taskClsName=nextflow.executor.IgExecutor$IgniteTaskWrapper,
sesId=f19709d2351-0d1480de-7544-4177-bc08-a1ccfbe5,
startTime=1456758358224, endTime=9223372036854775807,
taskNodeId=0d1480de-7544-4177-bc08-a1ccfbe5,
clsLdr=sun.misc.Launcher$AppClassLoader@33909752, closed=false, cpSpi=null,
failSpi=null, loadSpi=null, usage=1, fullSup=false,
subjId=0d1480de-7544-4177-bc08-a1ccfbe5, mapFut=IgniteFuture
[orig=GridFutureAdapter [resFlag=0, res=null, startTime=1456758358224,
endTime=0, ignoreInterrupts=false, lsnr=null, state=INIT]]],
jobId=029709d2351-0d1480de-7544-4177-bc08-a1ccfbe5]]



Any clue why is happening this?


Cheers,
Paolo



On Sun, Feb 28, 2016 at 7:58 PM, vkulichenko 
wrote:

> Hi Paolo,
>
> Can you try to disable shared memory communication and check if it helps?
> Add this to your configuration:
>
> 
>  class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
> 
> 
> 
>
> -Val
>
>
>
> --
> View this message in context:
> http://apache-ignite-users.70518.x6.nabble.com/Failed-to-send-message-tp3217p3229.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>


Re: Semaphore waiting for permit even if node is shut down

2016-02-29 Thread nyname00
Vladimir,

in my original tests I used two nodes, one owning the permit and the second
one waiting in acqire(). I then used a poison-pill (using a client and from
a separate JVM) to shutdown both nodes at the same time (similar to the
solution posted here:
http://apache-ignite-users.70518.x6.nabble.com/How-shutdown-all-nodes-td1531.html).

So, when all nodes but the last one are closed - it's a single node scenario
:)
The source I provided produces the same effects I get in a multi-node setup,
I just thought it easier to reproduce. I could provide a more complex
multi-node (+client) example, if that is of any help.

Thanks,
Mario



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Semaphore-waiting-for-permit-even-if-node-is-shut-down-tp3232p3257.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: update the sql database after a particular limit?

2016-02-29 Thread Vladimir Ozerov
Ravi,

What do you mean by "update the sql database"? If you configured a store
and enabled write-through mode, database will be updated as soon as
corresponding cached entry is changed.

Vladimir.

On Mon, Feb 29, 2016 at 2:54 PM, Ravi Puri 
wrote:

> How to update the sql database using cache after a particular time
> interval??
>
>
>
> --
> View this message in context:
> http://apache-ignite-users.70518.x6.nabble.com/update-the-sql-database-after-a-particular-limit-tp3250.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>


Re: IgniteCache: How to receive Load Re-balance notifications?

2016-02-29 Thread Vladimir Ozerov
Kamal,

You should enable these event type in configuration. See
IgniteConfiguration.setIncludeEventTypes(int
...) method.

Vladimir.

On Mon, Feb 29, 2016 at 12:00 PM, Kamal C  wrote:

> Hi,
>
> I have a replicated ignite cache with 3 nodes. I want to listen for
> data rebalance notifications in all the nodes whenever a new node joined /
> left the cluster.
>
> Using Ignite Events, I'd tried to register for cache re-balance
> notifications. But, I'm unable to receive any notifications.
>
> CacheConfiguration cacheCfg = new
> CacheConfiguration<>("cache_name");
> cacheCfg.setCacheMode(CacheMode.REPLICATED);
>
>
> IgniteCache cache = ignite.getOrCreateCache(cacheCfg);
>
> ignite.events(ignite.cluster().forCacheNodes("cache_name")).localListen(
> new IgnitePredicate() {
>
> private static final long serialVersionUID = 1L;
>
> @Override
> public boolean apply(CacheRebalanacingEvent e)
> {
> if(e.cacheName.equals("cache_name")) {
> logger.info("Received rebalancing Event :
> {}", e);
> }
> return true;
> }
> }, EventType.EVTS_CACHE_REBALANCE);
>
>
>
>
> *In logs,* WARN [2016-02-29 13:01:31,661] [main] (Log4JLogger.java:480) -
> Added listener for disabled event type: CACHE_REBALANCE_STARTED
>  WARN [2016-02-29 13:01:31,662] [main] (Log4JLogger.java:480) - Added
> listener for disabled event type: CACHE_REBALANCE_STOPPED
>  WARN [2016-02-29 13:01:31,662] [main] (Log4JLogger.java:480) - Added
> listener for disabled event type: CACHE_REBALANCE_PART_LOADED
>  WARN [2016-02-29 13:01:31,662] [main] (Log4JLogger.java:480) - Added
> listener for disabled event type: CACHE_REBALANCE_PART_UNLOADED
>  WARN [2016-02-29 13:01:31,662] [main] (Log4JLogger.java:480) - Added
> listener for disabled event type: CACHE_REBALANCE_OBJECT_LOADED
>  WARN [2016-02-29 13:01:31,663] [main] (Log4JLogger.java:480) - Added
> listener for disabled event type: CACHE_REBALANCE_OBJECT_UNLOADED
>  WARN [2016-02-29 13:01:31,663] [main] (Log4JLogger.java:480) - Added
> listener for disabled event type: CACHE_REBALANCE_PART_DATA_LOST
>
>
> How to receive REBALANCE_STOPPED notification ?
>
> --
> Kamal
>
>


Re: Semaphore waiting for permit even if node is shut down

2016-02-29 Thread Vladimir Ozerov
Hi,

I tested your code in multi-node scenario, and semaphore is released fine
when node owning a permit has been closed. In your code sample there is
only one node, and in this case semaphore is not released. I think that
"acquire" method should throw an exception in this case (say,
InterruptedException) as semaphore is no longer accessible when node is
stopped.

Vladislav,
I know you worked on distributed semaphore. Could you please share your
thoughts on the matter? And would you mind fixing that for a single-node
scenario?

Vladimir.

On Sun, Feb 28, 2016 at 11:14 PM, nyname00 
wrote:

> Hi Igniters,
>
> I've got a problem with a semaphore that seems to wait for a permit even if
> the node is already shut down. This behavior appears in a multi-node setup
> where i try to shut down all nodes at the same time (using a poison-pill).
> The code below can be used to reproduce the behavior. You will notice that
> there is no call on sem1#release() - this is because in my poison-pill
> scenario there seems to be no way to get a handle to sem1. And since I was
> under the impression that any semaphore gets released by Ignite when the
> node crashes/is shut down, I was expecting an exception on sem2#acquire().
>
> Any ideas? Best regards,
> Mario
>
> public static void main(String[] args) {
> Ignite i1 = Ignition.start(new
> IgniteConfiguration().setGridName("1"));
>
> System.out.println(">>> I1 STARTED");
> IgniteSemaphore sem1 = i1.semaphore("sem1", 1, true, true);
> System.out.println(">>> S1 READ");
> sem1.acquire();
> System.out.println(">>> S1 ACQUIRED");
>
> new Thread(() -> {
> IgniteSemaphore sem2 = i1.semaphore("sem1", 1, true, true);
> System.out.println(">>> S1 READ 2");
> sem2.acquire();
> try {
> System.out.println(">>> S1 ACQUIRED 2");
> } finally {
> sem2.release();
> }
> }).start();
>
> try {
> TimeUnit.SECONDS.sleep(2);
> } catch (InterruptedException e) {
> e.printStackTrace();
> }
>
> System.out.println(">>> I1 CLOSING");
> i1.close();
> System.out.println(">>> I1 CLOSED");
> }
>
>
>
> --
> View this message in context:
> http://apache-ignite-users.70518.x6.nabble.com/Semaphore-waiting-for-permit-even-if-node-is-shut-down-tp3232.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>


Re: NoSuchMethod Error

2016-02-29 Thread Vladimir Ozerov
Hi Jitesh,

It looks like you should try configuring Resin classloading somehow so that
your application JARs are picked first. Normally application servers should
support this option. Did you have a chance to investigate it? E.g. see
"servlet-hack" property:
http://www.caucho.com/resin-4.0/admin/advanced-classloaders.xtp

Vladimir.

On Sun, Feb 28, 2016 at 12:22 AM, jitesh dundas  wrote:

> Hi,
>
> Some notes from the log:-
>
> ...skipping...
>
> Jiteshs-:~ jbdundas$ javap -public -cp
> /Users/jbdundas/resin-4.0.36/deploy/_ear_jee-mail-connector-app-2016-W07/lib/cache-api-1.0.0.jar
>  javax.cache.event.CacheEntryEvent
>
> Compiled from "CacheEntryEvent.java"
>
> public abstract class javax.cache.event.CacheEntryEvent extends
> java.util.EventObject implements javax.cache.Cache$Entry {
>
>   public javax.cache.event.CacheEntryEvent(javax.cache.Cache,
> javax.cache.event.EventType);
>
>   public final javax.cache.Cache getSource();
>
>   public abstract V getOldValue();
>
>   public abstract boolean isOldValueAvailable();
>
>   public final javax.cache.event.EventType getEventType();
>
>   public java.lang.Object getSource();
>
> }
>
> Jiteshs-:~ jbdundas$ javap -public -cp
> /Users/jbdundas/resin-4.0.36/lib/javaee-16.jar
>  javax.cache.event.CacheEntryEvent
>
> Compiled from "CacheEntryEvent.java"
>
> public abstract class javax.cache.event.CacheEntryEvent extends
> java.util.EventObject {
>
>   public javax.cache.event.CacheEntryEvent(javax.cache.Cache);
>
>   public final javax.cache.Cache getSource();
>
>   public abstract K getKey();
>
>   public abstract V getValue();
>
>   public V getOldValue();
>
>   public boolean isOldValueAvailable();
>
>   public java.lang.Object getSource();
>
> }
>
> Jiteshs-MacBook-Pro:~ jbdundas$
>
>
> Thanks & Regards,
> Jitesh Dundas
>
> Phone - 732-357-6292
>
>
>
>
> On Sat, Feb 27, 2016 at 4:17 PM, jitesh dundas  wrote:
>
>> Hi Val,
>>
>> I think you are right but when we tried your suggestion, it brought our
>> hibernate code down.
>>
>> Thus, we drilled down and found a confllict betweem cache-api-1.0.0.jar
>> and javaee-16.jar
>>
>> they have a conflict on javax.cache.event.CacheEntryEvent. class with
>> the constructor method( both have different signatures).
>>
>> javaee-16.jar resides in resin/lib folder while cache-api-1.0.0.jar
>> resides in our application code. We use Maven for dependency management.
>>
>> The class is getting loaded from javaee-16.jar and not the cache JAR.
>>
>>
>> Thanks & Regards,
>> Jitesh Dundas
>>
>> Phone - 732-357-6292
>>
>>
>>
>>
>> On Sat, Feb 27, 2016 at 12:29 PM, jitesh dundas 
>> wrote:
>>
>>> Hi Val,
>>>
>>> We tried the suggestion but we still get the same error.
>>>
>>> Any other ideas?
>>>
>>>
>>> Thanks & Regards,
>>> Jitesh Dundas
>>>
>>> Phone - 732-357-6292
>>>
>>>
>>>
>>>
>>> On Thu, Feb 25, 2016 at 9:28 PM, jitesh dundas 
>>> wrote:
>>>
 Hi,

 Thanks for the advise. I will surely try that.

 Thanks & Regards,
 Jitesh Dundas

 Phone - 732-357-6292




 On Thu, Feb 25, 2016 at 6:40 PM, vkulichenko <
 valentin.kuliche...@gmail.com> wrote:

> Hi Jitesh,
>
> This issue looks similar to [1] - Resin includes javaee-16.jar which
> contains some outdated JCache spec classes. These classes override ones
> provided by the application. Can you try the solution provided on SO to
> reverse the class loading order?
>
> [1]
>
> http://stackoverflow.com/questions/29382856/how-to-classload-java-ee-7-in-resin-4-0-42-and-not-use-the-default-javaee-16-jar
>
> -Val
>
>
>
> --
> View this message in context:
> http://apache-ignite-users.70518.x6.nabble.com/NoSuchMethod-Error-tp3193p3194.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>


>>>
>>
>


Re: A Question About Behavior

2016-02-29 Thread Kevin Daly
I think this is a bug..

I have meetings most of today.. I will definitely get you a code Sample..

copyOnRead is set to true.

Will work around it and try to get you code examples later today..

Basically this is easy to re-produce though, all you have to do is do a
query and pull an object out of the QueryCursor and change it while watching
the H2Debug window.. You'll see the values in H2 change immediately.

Will update later with code/




--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/A-Question-About-Behavior-tp3235p3251.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


update the sql database after a particular limit?

2016-02-29 Thread Ravi Puri
How to update the sql database using cache after a particular time interval??



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/update-the-sql-database-after-a-particular-limit-tp3250.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


答复: How can I only get the local data

2016-02-29 Thread 洪利平
Yes, You are right,  but I will use the “ignite.compute().broadcast()” method 
to get all data(for example, aggregate in server node),  so I want to know that 
 set Query.setLocal to "true" can solute this problem ( Get data only from 
local node) ?
Or, Is there another method to use “select * from XX where XX” to get the local 
data in partition cache method ?

发件人: Denis Magda [mailto:dma...@gridgain.com]
发送时间: 2016年2月29日 19:12
收件人: user@ignite.apache.org
主题: Re: How can I only get the local data(Internet mail)

Hi,

Presently there is no a reliable way to execute a SQL query over local 
collocated data.
Even if you set Query.setLocal to "true" there is a chance that you will get 
incomplete result set if re-partitioning happened at some point of the query 
execution.

However, it's planned to support the feature that will execute a query on a 
specific machine if it's know that all the data is located there.
Igniters, have we already created a ticket for this feature?

--
Denis
On 2/29/2016 10:52 AM, smilehong(洪利平) wrote:
Hi, all
  when I use the “select * from XX where XX” in ignite, how can I only get the 
local data ? because it obtain data on all nodes default. And I have configure 
the cache modes is partitioned mode.
 Thank you very much!



unsubscribe

2016-02-29 Thread Dor Ben Dov
unsubscribe

This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,
you may review at http://www.amdocs.com/email_disclaimer.asp


Re: How can I only get the local data

2016-02-29 Thread Denis Magda

Hi,

Presently there is no a reliable way to execute a SQL query over local 
collocated data.
Even if you set Query.setLocal to "true" there is a chance that you will 
get incomplete result set if re-partitioning happened at some point of 
the query execution.


However, it's planned to support the feature that will execute a query 
on a specific machine if it's know that all the data is located there.

Igniters, have we already created a ticket for this feature?

--
Denis

On 2/29/2016 10:52 AM, smilehong(洪利平) wrote:


Hi, all

  when I use the “select * from XX where XX” in ignite, how can I only 
get the local data ? because it obtain data on all nodes default. And 
I have configure the cache modes is partitioned mode.


 Thank you very much!





Re: Semaphore blocking on tryAcquire() while holding a cache-lock

2016-02-29 Thread Yakov Zhdanov
Vlad, that's great! I will take a look this week. Reassigning ticket to
myself.

--Yakov

2016-02-26 18:37 GMT+03:00 Vladisav Jelisavcic :

> Hi,
>
> i recently implemented distributed ReentrantLock - IGNITE-642,
> i made a pull request, so hopefully this could be added to the next
> release.
>
> Best regards,
> Vladisav
>
> On Thu, Feb 18, 2016 at 10:49 AM, Alexey Goncharuk <
> alexey.goncha...@gmail.com> wrote:
>
> > Folks,
> >
> > The current implementation of IgniteCache.lock(key).lock() has the same
> > semantics as the transactional locks - cache topology cannot be changed
> > while there exists an ongoing transaction or an explicit lock is held.
> The
> > restriction for transactions is quite fundamental, the lock() issue can
> be
> > fixed if we re-implement locking the same way IgniteSemaphore currently
> > works.
> >
> > As for the "Failed to find semaphore with the given name" message, my
> first
> > guess is that DataStructures were configured with 1 backups which led to
> > the data loss when two nodes were stopped. Mario, can you please re-test
> > your semaphore scenario with 2 backups configured for data structures?
> > From my side, I can also take a look at the semaphore issue when I'm done
> > with IGNITE-2610.
> >
>


IgniteCache: How to receive Load Re-balance notifications?

2016-02-29 Thread Kamal C
Hi,

I have a replicated ignite cache with 3 nodes. I want to listen for
data rebalance notifications in all the nodes whenever a new node joined /
left the cluster.

Using Ignite Events, I'd tried to register for cache re-balance
notifications. But, I'm unable to receive any notifications.

CacheConfiguration cacheCfg = new
CacheConfiguration<>("cache_name");
cacheCfg.setCacheMode(CacheMode.REPLICATED);


IgniteCache cache = ignite.getOrCreateCache(cacheCfg);

ignite.events(ignite.cluster().forCacheNodes("cache_name")).localListen(
new IgnitePredicate() {

private static final long serialVersionUID = 1L;

@Override
public boolean apply(CacheRebalanacingEvent e)
{
if(e.cacheName.equals("cache_name")) {
logger.info("Received rebalancing Event : {}",
e);
}
return true;
}
}, EventType.EVTS_CACHE_REBALANCE);




*In logs,* WARN [2016-02-29 13:01:31,661] [main] (Log4JLogger.java:480) -
Added listener for disabled event type: CACHE_REBALANCE_STARTED
 WARN [2016-02-29 13:01:31,662] [main] (Log4JLogger.java:480) - Added
listener for disabled event type: CACHE_REBALANCE_STOPPED
 WARN [2016-02-29 13:01:31,662] [main] (Log4JLogger.java:480) - Added
listener for disabled event type: CACHE_REBALANCE_PART_LOADED
 WARN [2016-02-29 13:01:31,662] [main] (Log4JLogger.java:480) - Added
listener for disabled event type: CACHE_REBALANCE_PART_UNLOADED
 WARN [2016-02-29 13:01:31,662] [main] (Log4JLogger.java:480) - Added
listener for disabled event type: CACHE_REBALANCE_OBJECT_LOADED
 WARN [2016-02-29 13:01:31,663] [main] (Log4JLogger.java:480) - Added
listener for disabled event type: CACHE_REBALANCE_OBJECT_UNLOADED
 WARN [2016-02-29 13:01:31,663] [main] (Log4JLogger.java:480) - Added
listener for disabled event type: CACHE_REBALANCE_PART_DATA_LOST


How to receive REBALANCE_STOPPED notification ?

--
Kamal