Ignite cluster unstable when doing continuous query

2017-02-20 Thread ght230
I found Ignite cluster unstable when doing continuous query.
Following is my test code.

ContinuousQuery.java
public class ContinuousQuery {
/** Cache name. */
private static final String CACHE_NAME_INPUTDATA = "inputdata";
private static final String CACHE_NAME_UPDATEDATA = "updatedata";
private static IgniteCache inputCache = null;
private static IgniteCache updateCache = null;
static Random rand=new Random();

public static void main(String[] args) throws Exception {
Ignition.setClientMode(true);
Ignite ignite = Ignition.start();

CacheConfiguration cacheCfg = new CacheConfiguration();
cacheCfg.setCacheMode(CacheMode.PARTITIONED);
cacheCfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
cacheCfg.setName(CACHE_NAME_INPUTDATA);
inputCache = ignite.getOrCreateCache(cacheCfg);

CacheConfiguration cacheCfg1 = new CacheConfiguration();
cacheCfg1.setCacheMode(CacheMode.REPLICATED);
cacheCfg1.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
cacheCfg1.setName(CACHE_NAME_UPDATEDATA);
updateCache = ignite.getOrCreateCache(cacheCfg1);

ContinuousQuery qry = new ContinuousQuery<>();

qry.setLocalListener(new CacheEntryUpdatedListener() {
@Override
public void onUpdated(Iterable> evts) {
}
});

qry.setRemoteFilterFactory(new 
Factory>() {
@Override public CacheEntryEventFilter create()
{
return new CacheEntryFilter();
}
}); 
inputCache.query(qry);
}   

private static class CacheEntryFilter implements
CacheEntryEventFilter {
/** Ignite instance. */
@IgniteInstanceResource
private Ignite ignite;

/** {@inheritDoc} */
@Override public boolean evaluate(final CacheEntryEvent e)
throws CacheEntryListenerException {
IgniteCache syncCache =
ignite.cache(CACHE_NAME_UPDATEDATA);
if (e.getEventType() == EventType.CREATED && e.getKey() < 
10 &&
e.getKey() % 5000 != 0){

System.out.println(Thread.currentThread().getName()+"***--->>=<"+e.getKey()+","+e.getValue()+">"
);
syncCache.put(e.getKey(),
e.getValue()+"___"+System.currentTimeMillis());
syncCache.remove(e.getKey());
return false;
}
return true;
}
}
}

InputData.java
public class InputData {
/** Cache name. */
private static final String CACHE_NAME_INPUTDATA = "inputdata";
private static IgniteCache inputCache;

public static void main(String[] args) throws Exception {
Ignition.setClientMode(true);
Ignite ignite = Ignition.start();

inputCache = ignite.getOrCreateCache(CACHE_NAME_INPUTDATA);

// Auto-close cache at the end of the example.
int keyCnt = 100;

// These entries will be queried by initial predicate.
for (int i = 0; i < keyCnt; i++){
inputCache.put(i, Integer.toString(1 + i));
}
}
}

My test steps as following:
step 1:start an Ignite server.
step 2: start an Ignite client of ContinuousQuery.jar
step 3: start an Ignite client of InputData.jar

Then If I start another Ignite server or even start ignitevisorcmd, the
Ignite cluster will be jammed.

If I add @IgniteAsyncCallback to CacheEntryFilter, the cluster will not be
jammed, but it can not guarantee event to be processed in order.

I would like to know what solution can meet my follwong needs?
1. The event should be triggered in order.
2. The process in function "evaluate" should be in order.(in the example,
"put" and "remove" operation should be in order) 



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Ignite-cluster-unstable-when-doing-continuous-query-tp10726.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Pessimistic TXN did not release lock on a key, all subsequent txns failed

2017-02-20 Thread Andrey Gura
Hi,

Actualy dead lock detection for pessimistic transactions was
introduced in Apache Ignite 1.7 release. But anyway it is good idea to
try the same code on the newest release.

In case of trasaction timeout dead lock detection should be triggered
and TransactionTimoutException should contain
TransactionDeadlockException as cause if dead lock was detected. Is it
your case or not?

If transaction doesn't release any locks (or non transactional locks)
then you will get messages in logs about long running transactions or
futures because exchange can't be finished in this case. Do you have
something like to this messages?

Is it possible to create some reproducer project that we can analyze?


On Sat, Feb 18, 2017 at 1:42 AM, bintisepaha  wrote:
> Thanks Andrew,
>
> The same thing happened again today. Clearly the key is locked, we get the
> timeout exceptions. But prior update to the same has not thrown any
> exceptions. Suddenly one update fails with timeout exceptions and we are
> notified due to those exceptions that the key is locked.
>
> We will upgrade to 1.8, but in the meantime is there a way to free up this
> locked key using some code?
>
> We try killing nodes, but we have one back up and it looks like the lock is
> carried over too, which would be the right thing to do.
>
> Outside the transaction we can read this key (dirty read). This is becoming
> an issue for us, since its a production system and the only way to free up
> is to restart the cluster.
>
> Please point us in a direction where we can avoid this or free it up.
>
> Thanks,
> Binti
>
>
>
> --
> View this message in context: 
> http://apache-ignite-users.70518.x6.nabble.com/Pessimistic-TXN-did-not-release-lock-on-a-key-all-subsequent-txns-failed-tp10536p10713.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Replace H2 database with MySQL within SQL Grid SQL Engine

2017-02-20 Thread zaid
Hi,
Unfortunately the first query I am transforming to cache query, I
encountered GROUP_CONCAT function.

Please find below code snippet from ignite-indexing module:

class file: 

GridSqlAggregateFunction

line no: 84

  switch (type) {
case GROUP_CONCAT:
throw new UnsupportedOperationException();
Regards.



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Replace-H2-database-with-MySQL-within-SQL-Grid-SQL-Engine-tp10631p10729.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Ignit Cache Stopped

2017-02-20 Thread Anil
Hi Andrey,

Does client ignite gc impact ignite cluster topology ?

Thanks

On 17 February 2017 at 22:56, Andrey Gura  wrote:

> From GC logs at the end of files I see Full GC pauses like this:
>
> 2017-02-17T04:29:22.118-0800: 21122.643: [Full GC (Allocation Failure)
>  10226M->8526M(10G), 26.8952036 secs]
>[Eden: 0.0B(512.0M)->0.0B(536.0M) Survivors: 0.0B->0.0B Heap:
> 10226.0M(10.0G)->8526.8M(10.0G)], [Metaspace:
> 77592K->77592K(1120256K)]
>
> Your heap is exhausted. During GC discovery doesn't receive heart
> betas and nodes stopped due to segmentation. Please check your nodes'
> logs for NODE_SEGMENTED pattern. If it is your case try to tune GC or
> reduce load on GC (see for details [1])
>
> [1] https://apacheignite.readme.io/docs/jvm-and-system-tuning
>
> On Fri, Feb 17, 2017 at 6:35 PM, Anil  wrote:
> > Hi Andrey,
> >
> > The queyr execution time is very high when limit 1+250 .
> >
> > 10 GB of heap memory for both client and servers. I have attached the gc
> > logs of 4 servers. Could you please take a look ? thanks.
> >
> >
> > On 17 February 2017 at 20:52, Anil  wrote:
> >>
> >> Hi Andrey,
> >>
> >> I checked GClogs  and everything looks good.
> >>
> >> Thanks
> >>
> >> On 17 February 2017 at 20:45, Andrey Gura  wrote:
> >>>
> >>> Anil,
> >>>
> >>> IGNITE-4003 isn't related with your problem.
> >>>
> >>> I think that nodes are going out of topology due to long GC pauses.
> >>> You can easily check this using GC logs.
> >>>
> >>> On Fri, Feb 17, 2017 at 6:04 PM, Anil  wrote:
> >>> > Hi,
> >>> >
> >>> > We noticed whenever long running queries fired, nodes are going out
> of
> >>> > topology and entire ignite cluster is down.
> >>> >
> >>> > In my case, a filter criteria could get 5L records. So each API
> request
> >>> > could fetch 250 records. When page number is getting increased the
> >>> > query
> >>> > execution time is high and entire cluster is down
> >>> >
> >>> >  https://issues.apache.org/jira/browse/IGNITE-4003 related to this ?
> >>> >
> >>> > Can we set seperate thread pool for queries executions, compute jobs
> >>> > and
> >>> > other services instead of common public thread pool ?
> >>> >
> >>> > Thanks
> >>> >
> >>> >
> >>
> >>
> >
>


Re: Ignit Cache Stopped

2017-02-20 Thread Andrey Gura
Anil,

No, it doesn't. Only client should left topology in this case.

On Mon, Feb 20, 2017 at 3:44 PM, Anil  wrote:
> Hi Andrey,
>
> Does client ignite gc impact ignite cluster topology ?
>
> Thanks
>
> On 17 February 2017 at 22:56, Andrey Gura  wrote:
>>
>> From GC logs at the end of files I see Full GC pauses like this:
>>
>> 2017-02-17T04:29:22.118-0800: 21122.643: [Full GC (Allocation Failure)
>>  10226M->8526M(10G), 26.8952036 secs]
>>[Eden: 0.0B(512.0M)->0.0B(536.0M) Survivors: 0.0B->0.0B Heap:
>> 10226.0M(10.0G)->8526.8M(10.0G)], [Metaspace:
>> 77592K->77592K(1120256K)]
>>
>> Your heap is exhausted. During GC discovery doesn't receive heart
>> betas and nodes stopped due to segmentation. Please check your nodes'
>> logs for NODE_SEGMENTED pattern. If it is your case try to tune GC or
>> reduce load on GC (see for details [1])
>>
>> [1] https://apacheignite.readme.io/docs/jvm-and-system-tuning
>>
>> On Fri, Feb 17, 2017 at 6:35 PM, Anil  wrote:
>> > Hi Andrey,
>> >
>> > The queyr execution time is very high when limit 1+250 .
>> >
>> > 10 GB of heap memory for both client and servers. I have attached the gc
>> > logs of 4 servers. Could you please take a look ? thanks.
>> >
>> >
>> > On 17 February 2017 at 20:52, Anil  wrote:
>> >>
>> >> Hi Andrey,
>> >>
>> >> I checked GClogs  and everything looks good.
>> >>
>> >> Thanks
>> >>
>> >> On 17 February 2017 at 20:45, Andrey Gura  wrote:
>> >>>
>> >>> Anil,
>> >>>
>> >>> IGNITE-4003 isn't related with your problem.
>> >>>
>> >>> I think that nodes are going out of topology due to long GC pauses.
>> >>> You can easily check this using GC logs.
>> >>>
>> >>> On Fri, Feb 17, 2017 at 6:04 PM, Anil  wrote:
>> >>> > Hi,
>> >>> >
>> >>> > We noticed whenever long running queries fired, nodes are going out
>> >>> > of
>> >>> > topology and entire ignite cluster is down.
>> >>> >
>> >>> > In my case, a filter criteria could get 5L records. So each API
>> >>> > request
>> >>> > could fetch 250 records. When page number is getting increased the
>> >>> > query
>> >>> > execution time is high and entire cluster is down
>> >>> >
>> >>> >  https://issues.apache.org/jira/browse/IGNITE-4003 related to this ?
>> >>> >
>> >>> > Can we set seperate thread pool for queries executions, compute jobs
>> >>> > and
>> >>> > other services instead of common public thread pool ?
>> >>> >
>> >>> > Thanks
>> >>> >
>> >>> >
>> >>
>> >>
>> >
>
>


Re: SqlFieldQueries on property of custom user type

2017-02-20 Thread davida
Hi Denis, unfortunately that did not work for me (I had problem with inner
class). 
Let me clarify what I was trying to do. I have following classes:

class Parent {
  int ParentID;
  Child ChildObject; // assume initialized
}
class Child {
  int ChildID;
}

Parent properly is serialized with its child object. I want to execute
following query:
"select ParentID, ChildObject.ChildID from Parent where
ChildObject.ChildID<10".

I assume this should not be possible to execute as child object is custom
user type. Am I correct ? 
Many Thanks.



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/SqlFieldQueries-on-property-of-custom-user-type-tp10719p10732.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: java.lang.NoClassDefFoundError: Could not initialize class org.apache.ignite.sink.flink.IgniteSink$SinkContext$Holder

2017-02-20 Thread dkarachentsev
Hi,

Check that file in path igniteCfgFile that you pass to IgniteSink
constructor is available. If class initialization failed
NoClassDefFoundError will be thrown. 

Also verify if IgniteSink$SinkContext$Holder.class is present in
ignite-flink-2.0.jar.

-Dmitry.



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/java-lang-NoClassDefFoundError-Could-not-initialize-class-org-apache-ignite-sink-flink-IgniteSink-Sir-tp10703p10733.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


ODBC connection error

2017-02-20 Thread Saifullah Zahid
Hi,

I have installed ignite odbc driver (1.8)

But I am getting following error message

An error occurred: Failed to connect: 08001: Failed to establish connection
with the host.

Ignite server is created using ignite.net 1.8

I am trying to connect using c++ odbc example.

connection string
std::string connectStr = "DRIVER={Apache
Ignite};SERVER=localhost;PORT=10800;CACHE=businessunit;";

Thanks,
Saif


ODBC configuratoin for Ignite.Net

2017-02-20 Thread Saifullah Zahid
Hi,

How I can provide ODBC configuration in app.config for Ignite.Net.

I am using version 1.8.

Thanks,
Saif


Re: ODBC connection error

2017-02-20 Thread Igor Sapego
Hi Saif,

Did you take a look on [1]? You need to enable OdbcProcessor on the node
side.
Does it help?

[1] -
https://apacheignite.readme.io/docs/odbc-driver#section-cluster-configuration

Best Regards,
Igor

On Mon, Feb 20, 2017 at 7:47 PM, Saifullah Zahid 
wrote:

> Hi,
>
> I have installed ignite odbc driver (1.8)
>
> But I am getting following error message
>
> An error occurred: Failed to connect: 08001: Failed to establish
> connection with the host.
>
> Ignite server is created using ignite.net 1.8
>
> I am trying to connect using c++ odbc example.
>
> connection string
> std::string connectStr = "DRIVER={Apache Ignite};SERVER=localhost;PORT=
> 10800;CACHE=businessunit;";
>
> Thanks,
> Saif
>


getOrCreateCache hang

2017-02-20 Thread Matt Warner
I'm experiencing Ignite client hangs when calling getOrCreateCache when both
are starting simultaneously. The stack trace shows the clients are hung in
the getOrCreateCache method, which is why I'm focusing here.

This seems like a deadlock when both clients are trying to simultaneously
call getOrCreateCache.

The setup is a vanilla Ignite installation running (./bin/ignite.sh) and two
clients (IgniteConfiguration setClientMode(true)). Both go through the same
setup, albeit in separate jar files (and separate PIDs):

TcpDiscoverySpi spi = new TcpDiscoverySpi();
TcpDiscoveryVmIpFinder ipFinder = new TcpDiscoveryVmIpFinder();
ipFinder.setAddresses(Arrays.asList("127.0.0.1"));
spi.setIpFinder(ipFinder);
IgniteConfiguration cfg = new IgniteConfiguration();
cfg.setDiscoverySpi(spi);
cfg.setClientMode(true);
try (Ignite ignite = Ignition.start(cfg)) {
CacheConfiguration<> cacheCfg = new 
CacheConfiguration<>(CACHE_NAME);
cacheCfg.setAtomicityMode(ATOMIC);
cacheCfg.setReadThrough(true);
cacheCfg.setWriteThrough(true);
cacheCfg.setWriteBehindEnabled(false);
cache = ignite.getOrCreateCache(cacheCfg);  <-- Hangs 
here
//
}

"main" #1 prio=5 os_prio=31 tid=0x7fdd01009800 nid=0xc07 waiting on
condition [0x70218000]
   java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for  <0x0007964b0e58> (a
org.apache.ignite.internal.processors.cache.GridCacheProcessor$DynamicCacheStartFuture)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:997)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1304)
at
org.apache.ignite.internal.util.future.GridFutureAdapter.get0(GridFutureAdapter.java:160)
at
org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:118)
at
org.apache.ignite.internal.IgniteKernal.getOrCreateCache(IgniteKernal.java:2586)


My apologies in advance if this is a well-known problem. I've been searching
and am stumped.

Thanks!



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


Re: ODBC connection error

2017-02-20 Thread Saifullah Zahid
Igor,

Thanks for your reply, may be this is the cause of issue.

My server configuration is in app.config file.

How I can add following XML configuration in it?


  ...
  
  

  
  ...


Thanks,

Saif


On Mon, Feb 20, 2017 at 10:32 PM, Igor Sapego  wrote:

> Hi Saif,
>
> Did you take a look on [1]? You need to enable OdbcProcessor on the node
> side.
> Does it help?
>
> [1] - https://apacheignite.readme.io/docs/odbc-driver#section-
> cluster-configuration
>
> Best Regards,
> Igor
>
> On Mon, Feb 20, 2017 at 7:47 PM, Saifullah Zahid 
> wrote:
>
>> Hi,
>>
>> I have installed ignite odbc driver (1.8)
>>
>> But I am getting following error message
>>
>> An error occurred: Failed to connect: 08001: Failed to establish
>> connection with the host.
>>
>> Ignite server is created using ignite.net 1.8
>>
>> I am trying to connect using c++ odbc example.
>>
>> connection string
>> std::string connectStr = "DRIVER={Apache Ignite};SERVER=localhost;PORT=
>> 10800;CACHE=businessunit;";
>>
>> Thanks,
>> Saif
>>
>
>


Re: ODBC configuratoin for Ignite.Net

2017-02-20 Thread Pavel Tupitsyn
Hi,

ODBC configuration is not yet supported directly in .NET (
https://issues.apache.org/jira/browse/IGNITE-4730),
you can configure ODBC in Spring XML file (as described in the docs:
https://apacheignite.readme.io/docs/odbc-driver#section-cluster-configuration
)
and then use IgniteConfiguration.SpringConfigUrl property to load it:



Pavel


On Mon, Feb 20, 2017 at 8:13 PM, Saifullah Zahid 
wrote:

> Hi,
>
> How I can provide ODBC configuration in app.config for Ignite.Net.
>
> I am using version 1.8.
>
> Thanks,
> Saif
>


Re: ODBC connection error

2017-02-20 Thread Igor Sapego
Pavel already answered this question in another mail.

Best Regards,
Igor

On Mon, Feb 20, 2017 at 8:35 PM, Saifullah Zahid 
wrote:

> Igor,
>
> Thanks for your reply, may be this is the cause of issue.
>
> My server configuration is in app.config file.
>
> How I can add following XML configuration in it?
>
>  class="org.apache.ignite.configuration.IgniteConfiguration">
>   ...
>   
>   
> 
>   
>   ...
>
>
> Thanks,
>
> Saif
>
>
> On Mon, Feb 20, 2017 at 10:32 PM, Igor Sapego 
> wrote:
>
>> Hi Saif,
>>
>> Did you take a look on [1]? You need to enable OdbcProcessor on the node
>> side.
>> Does it help?
>>
>> [1] - https://apacheignite.readme.io/docs/odbc-driver#section-cl
>> uster-configuration
>>
>> Best Regards,
>> Igor
>>
>> On Mon, Feb 20, 2017 at 7:47 PM, Saifullah Zahid 
>> wrote:
>>
>>> Hi,
>>>
>>> I have installed ignite odbc driver (1.8)
>>>
>>> But I am getting following error message
>>>
>>> An error occurred: Failed to connect: 08001: Failed to establish
>>> connection with the host.
>>>
>>> Ignite server is created using ignite.net 1.8
>>>
>>> I am trying to connect using c++ odbc example.
>>>
>>> connection string
>>> std::string connectStr = "DRIVER={Apache Ignite};SERVER=localhost;PORT=
>>> 10800;CACHE=businessunit;";
>>>
>>> Thanks,
>>> Saif
>>>
>>
>>
>


Re: ODBC connection error

2017-02-20 Thread Saifullah Zahid
Thanks, it worked.

On Mon, Feb 20, 2017 at 10:42 PM, Igor Sapego  wrote:

> Pavel already answered this question in another mail.
>
> Best Regards,
> Igor
>
> On Mon, Feb 20, 2017 at 8:35 PM, Saifullah Zahid 
> wrote:
>
>> Igor,
>>
>> Thanks for your reply, may be this is the cause of issue.
>>
>> My server configuration is in app.config file.
>>
>> How I can add following XML configuration in it?
>>
>> > class="org.apache.ignite.configuration.IgniteConfiguration">
>>   ...
>>   
>>   
>> 
>>   
>>   ...
>>
>>
>> Thanks,
>>
>> Saif
>>
>>
>> On Mon, Feb 20, 2017 at 10:32 PM, Igor Sapego 
>> wrote:
>>
>>> Hi Saif,
>>>
>>> Did you take a look on [1]? You need to enable OdbcProcessor on the node
>>> side.
>>> Does it help?
>>>
>>> [1] - https://apacheignite.readme.io/docs/odbc-driver#section-cl
>>> uster-configuration
>>>
>>> Best Regards,
>>> Igor
>>>
>>> On Mon, Feb 20, 2017 at 7:47 PM, Saifullah Zahid 
>>> wrote:
>>>
 Hi,

 I have installed ignite odbc driver (1.8)

 But I am getting following error message

 An error occurred: Failed to connect: 08001: Failed to establish
 connection with the host.

 Ignite server is created using ignite.net 1.8

 I am trying to connect using c++ odbc example.

 connection string
 std::string connectStr = "DRIVER={Apache Ignite};SERVER=localhost;PORT=
 10800;CACHE=businessunit;";

 Thanks,
 Saif

>>>
>>>
>>
>


Re: ODBC configuratoin for Ignite.Net

2017-02-20 Thread Saifullah Zahid
Hi Pavel,

Thanks, it worked for me.

Saif

On Mon, Feb 20, 2017 at 10:38 PM, Pavel Tupitsyn 
wrote:

> Hi,
>
> ODBC configuration is not yet supported directly in .NET (
> https://issues.apache.org/jira/browse/IGNITE-4730),
> you can configure ODBC in Spring XML file (as described in the docs:
> https://apacheignite.readme.io/docs/odbc-driver#
> section-cluster-configuration)
> and then use IgniteConfiguration.SpringConfigUrl property to load it:
>
> 
>
> Pavel
>
>
> On Mon, Feb 20, 2017 at 8:13 PM, Saifullah Zahid 
> wrote:
>
>> Hi,
>>
>> How I can provide ODBC configuration in app.config for Ignite.Net.
>>
>> I am using version 1.8.
>>
>> Thanks,
>> Saif
>>
>
>


Task was not deployed error

2017-02-20 Thread rflachlan
Hello,
I am new to Ignite, and am stuck on something probably very basic.

I have a compute job that needs to (a) run 1000 tasks; (b) calculate some
statistics; (c) run another set of the same 1000 tasks (same classes, and
methods, different initial parameters). The program correctly runs the first
1000 tasks across my test cluster of three machines (three Ignite servers;
program run as a client on one of the machines). But then, when it tries to
run the second set of tasks, I get errors. For the Ignite server running on
the local machine, it starts running again (correctly). For the servers on
the other two machines, there is a pause for ~6s, then "SEVERE" errors. In
the servers, these are reported as:

[20:35:41,697][SEVERE][pub-#286%null%][GridJobProcessor] Task was not
deployed or was redeployed since task execution
[taskName=com.lachlan.maven.SongABCIg.SongABCIg$1,
taskClsName=com.lachlan.maven.SongABCIg.SongABCIg$1, codeVer=0,
clsLdrId=e925b3d5a51-5aa311c1-4c5d-47a4-a4ff-2a27e008d841,
seqNum=1487622853278, depMode=SHARED, dep=null]
class org.apache.ignite.IgniteDeploymentException: Task was not deployed or
was redeployed since task execution
[taskName=com.lachlan.maven.SongABCIg.SongABCIg$1,
taskClsName=com.lachlan.maven.SongABCIg.SongABCIg$1, codeVer=0,
clsLdrId=e925b3d5a51-5aa311c1-4c5d-47a4-a4ff-2a27e008d841,
seqNum=1487622853278, depMode=SHARED, dep=null]
at
org.apache.ignite.internal.processors.job.GridJobProcessor.processJobExecuteRequest(GridJobProcessor.java:1159)
at
org.apache.ignite.internal.processors.job.GridJobProcessor$JobExecutionListener.onMessage(GridJobProcessor.java:1894)
at
org.apache.ignite.internal.managers.communication.GridIoManager.invokeListener(GridIoManager.java:1082)
at
org.apache.ignite.internal.managers.communication.GridIoManager.processRegularMessage0(GridIoManager.java:710)
at
org.apache.ignite.internal.managers.communication.GridIoManager.access$1700(GridIoManager.java:102)
at
org.apache.ignite.internal.managers.communication.GridIoManager$5.run(GridIoManager.java:673)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)


These errors then cause a second set of errors in the client:
   [GridTaskWorker] Failed to obtain remote job policy for result from
ComputeTask.result(..) 




I have implemented my code in a method that schedules the tasks and uses
IgniteCallable to collate results. I then calculate the statistics, and call
the method again. The Ignite code is:

try(Ignite ignite = Ignition.start(cfg)){
   IgniteCluster=ignite.cluster();
   Collection>> calls=new
ArrayList<>();
   for (int i=0; i> res
=ignite.compute(cluster.forRemotes()).call(calls);


I'm obviously doing something fairly obvious incorrectly here. I'd greatly
appreciate any advice.

Rob




--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Task-was-not-deployed-error-tp10743.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Get high throughput for loading data in ignite

2017-02-20 Thread Andrey Mashenkov
Sorry for late answer.

Common performance tip described in [1] and [2].
Do you have all your ignite nodes on single machine?
Do you use any Virtual Environment like VmWare ESX? Ignite running inside
VM can have some performance issues.

Also I've notice from screenshot you provide:
- almost half of spap space is used. Is it used by Ignite?
- eth0 shows 798 Mbps incoming data rate, that ~ 200k msg per sec (for 500
bytes messages). Does it maximum speed? How does is changing while you
adding new nodes?
- lo0 shown 1Gbps. It looks like Ignite inter-nodes communication. Is it
possible to apply partition-aware data loading [3] to your test?

Please, correct me if I missed smth.

Grid and cache configuration and JFR profiling results [4] may be helpful.


[1] http://apacheignite.gridgain.org/docs/performance-tips
[2] http://apacheignite.gridgain.org/docs/jvm-and-system-tuning
[3] http://apacheignite.gridgain.org/docs/data-loading#ignitedatastreamer
[4]
http://apacheignite.gridgain.org/docs/jvm-and-system-tuning#section-detailed-garbage-collection-stats

On Thu, Feb 16, 2017 at 5:36 PM, rishi007bansod 
wrote:

> Hi,
> In my case CPU is becoming bottleneck when 2 nodes are connected, I
> have
> attached my atop command snapshot,
> 
> I have not set number of backups parameter, it is default(i.e. 0) in my
> case. Is there any way I can improve performance? Which ignite parameters
> or
> system parameters should I look for? Are there any settings that I should
> look for when 2 or more nodes are connected in grid? As in my case data
> loading rate is not scaling up with 2 nodes connected
>
> Thanks.
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/Get-high-throughput-for-loading-data-
> in-ignite-tp10483p10675.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>



-- 
Best regards,
Andrey V. Mashenkov


Re: SqlFieldQueries on property of custom user type

2017-02-20 Thread Denis Magda
It’s possible to execute queries accessing fields of inner classes. In your 
example you need to remove “ChildObject” prefix from the query and it will work 
fine:

"select ParentID, ChildID from Parent where ChildID < 10”

—
Denis

> On Feb 20, 2017, at 6:14 AM, davida  wrote:
> 
> Hi Denis, unfortunately that did not work for me (I had problem with inner
> class). 
> Let me clarify what I was trying to do. I have following classes:
> 
> class Parent {
>  int ParentID;
>  Child ChildObject; // assume initialized
> }
> class Child {
>  int ChildID;
> }
> 
> Parent properly is serialized with its child object. I want to execute
> following query:
> "select ParentID, ChildObject.ChildID from Parent where
> ChildObject.ChildID<10".
> 
> I assume this should not be possible to execute as child object is custom
> user type. Am I correct ? 
> Many Thanks.
> 
> 
> 
> --
> View this message in context: 
> http://apache-ignite-users.70518.x6.nabble.com/SqlFieldQueries-on-property-of-custom-user-type-tp10719p10732.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.



Ignite client doing asynchronously operation will be jammed

2017-02-20 Thread ght230
I start an Ignite server first, 
then start an Ignite client which do some asynchronously operations on
cache.
But only after several seconds, the operation jammed.

Is there anything wrong about my code?

public class ContinuousQuery {

public static void main(String[] args) {
Ignition.setClientMode(true);
String cacheName = "Test";
Ignite ignite = Ignition.start();
System.out.println();
System.out.println(">>>TestMain started.");
CacheConfiguration cacheCfg = new
CacheConfiguration<>(cacheName);
cacheCfg.setBackups(0);
cacheCfg.setCacheMode(CacheMode.PARTITIONED);
cacheCfg.setAtomicityMode(CacheAtomicityMode.ATOMIC);
cacheCfg.setMemoryMode(CacheMemoryMode.OFFHEAP_TIERED);
cacheCfg.setOffHeapMaxMemory(200L * 1024L * 1024L);
cacheCfg.setSwapEnabled(false);
boolean isAsync = true;
for (int i = 1;; i++) {
IgniteCache cache = 
ignite.getOrCreateCache(cacheCfg);

for (int j = 0; j < 100; j++) {
UUID val = UUID.randomUUID();
doit(isAsync, i, cache, j, val);
}
}
}

private static void doit(boolean isAsync, final int i, 
IgniteCache cache, final Integer key,
final UUID value) {
if (isAsync) {
final IgniteCache asyncCache = 
cache.withAsync();
// setp 1
asyncCache.put(key, value);
// setp 1 asynchronously wait for result.
asyncCache.future().listen(new 
IgniteInClosure>() {
@Override
public void apply(IgniteFuture fut) {
System.out.println(i + ", timeNow=" + 
timeNow() + ":setp 1 put
operation completed '" + fut.isDone()
+ "' [key=" + key + ", 
value=" + fut.get() + "]");
// setp 2
asyncCache.remove(key);
// setp 2 asynchronously wait for 
result.
asyncCache.future().listen(new 
IgniteInClosure>() {
@Override
public void 
apply(IgniteFuture fut) {
System.out.println(i + 
", timeNow=" + timeNow() + ":setp 2 remove
operation completed '"
+ 
fut.isDone() + "' [key=" + key + ", value=" + fut.get() + "]");
}
});
}
});
} else {
// setp 1
cache.put(key, value);
System.out.println(i + ", timeNow=" + timeNow() + 
":setp 1 put operation
completed [key=" + key + "]");
// setp 2
boolean result = cache.remove(key);
System.out.println(i + ", timeNow=" + timeNow() + 
":setp 2 remove
operation completed [key=" + key
+ ", result=" + result + "]");
}
}

private static String timeNow() {
Date date = new Date();
DateFormat format = new SimpleDateFormat("-MM-dd 
HH:mm:ss.SSS");
String time = format.format(date);
return time;
}
}

Following is the test result:
[10:19:55] Topology snapshot [ver=2, servers=1, clients=1, CPUs=32,
heap=12.0GB]

>>>TestMain started.
1, timeNow=2017-02-21 10:19:55.652:setp 1 put operation completed 'true'
[key=0, value=null]
1, timeNow=2017-02-21 10:19:55.658:setp 2 remove operation completed 'true'
[key=0, value=true]
1, timeNow=2017-02-21 10:19:55.659:setp 1 put operation completed 'true'
[key=1, value=null]
1, timeNow=2017-02-21 10:19:55.663:setp 2 remove operation completed 'true'
[key=1, value=true]
1, timeNow=2017-02-21 10:19:55.664:setp 1 put operation completed 'true'
[key=2, value=null]
1, timeNow=2017-02-21 10:19:55.667:setp 2 remove operation completed 'true'
[key=2, value=true]
1, timeNow=2017-02-21 10:19:55.668:setp 1 put operation completed 'true'
[key=3, value=null]
1, timeNow=2017-02-21 10:19:55.672:setp 2 remove operation completed 'true'
[key=3, value=true]
1, timeNow=2017-02-21 10:19:55.673:setp 1 put operation completed 'true'
[key=4, value=null]
1, timeNow=2017-02-21 10:19:55.677:setp 2 remove operation completed 'true'
[key=4, value=true]
1, timeNow=2017-02

Re: java.lang.NoClassDefFoundError: Could not initialize class org.apache.ignite.sink.flink.IgniteSink$SinkContext$Holder

2017-02-20 Thread dkarachentsev
Is it possible to provide reproducible example?

-Dmitry.



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/java-lang-NoClassDefFoundError-Could-not-initialize-class-org-apache-ignite-sink-flink-IgniteSink-Sir-tp10703p10750.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: SqlFieldQueries on property of custom user type

2017-02-20 Thread davida
Thanks Denis it works (forgot to add the field in app.config's queryfields
collection).



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/SqlFieldQueries-on-property-of-custom-user-type-tp10719p10751.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.