Re: Partition eviction failed, this can cause grid hang. (Caused by: java.lang.IllegalStateException: Failed to get page IO instance (page content is corrupted))

2018-07-05 Thread siva
nohup.out
  


Hi akurbanov,

I have attached the logs ,can u go through ?

we were started on single machine on multiple ignite nodes and configuration
is as follows







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

  





 


 

  
  
   


  

192.168.1.2
  192.168.1.2:47500..47530

  

  

  
 





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


Re: Aviod distributes query in case of collocated data

2018-07-05 Thread Evgenii Zhuravlev
SqlFieldsQuery.setLocal:
https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/cache/query/SqlFieldsQuery.html#setLocal-boolean-

2018-07-06 4:51 GMT+03:00 Prasad Bhalerao :

> Hi,
> Is there any way to make sure that SQL executed on cache gets executed
> only on the node where data is present?
> One way could be submit the the task on affinity key to get the data. But
> is doesn't seem good option.
>
> My case is I am already submitting a ignite runnable task on my affinity
> id. Inside this task I am querying  multiple caches.
> And the data I am querying for is present on the node where the task is
> executing.
>
> How can I make sure that this SQL gets executed only on current node?
>
>
> Thanks,
> Prasad
>


Aviod distributes query in case of collocated data

2018-07-05 Thread Prasad Bhalerao
Hi,
Is there any way to make sure that SQL executed on cache gets executed only
on the node where data is present?
One way could be submit the the task on affinity key to get the data. But
is doesn't seem good option.

My case is I am already submitting a ignite runnable task on my affinity
id. Inside this task I am querying  multiple caches.
And the data I am querying for is present on the node where the task is
executing.

How can I make sure that this SQL gets executed only on current node?


Thanks,
Prasad


Re: And again... Failed to get page IO instance (page content is corrupted)

2018-07-05 Thread Olexandr K
Hi guys,

are you still planning to release 2.6.0 as patch release for 2.5.0?

BR, Oleksandr

On Fri, Jun 29, 2018 at 11:43 AM, Andrey Mashenkov <
andrey.mashen...@gmail.com> wrote:

> Hi Oleg,
>
> Yes, page corruption issues shouldn't happened when persistence is
> disabled.
> Please, let us know it you will face one.
>
>
> On Fri, Jun 29, 2018 at 1:56 AM Olexandr K 
> wrote:
>
>> Hi Andrey,
>>
>> Thanks for clarifying this.
>> We have just a single persistent cache and I reworked the code to get rid
>> of expiration policy.
>> All our non-persistent caches have expiration policy but this should not
>> be a problem, right?
>>
>> BR, Oleksandr
>>
>> On Thu, Jun 28, 2018 at 8:37 PM, Andrey Mashenkov <
>> andrey.mashen...@gmail.com> wrote:
>>
>>> Hi Oleg,
>>>
>>> The issue you mentioned IGNITE-8659 [1] is caused by IGNITE-5874 [2]
>>> that will not a part of ignite-2.6 release.
>>> For now, 'ExpiryPolicy with persistence' is totally broken and all it's
>>> fixes are planned to the next 2.7 release.
>>>
>>>
>>> [1] https://issues.apache.org/jira/browse/IGNITE-8659
>>> [2] https://issues.apache.org/jira/browse/IGNITE-5874
>>>
>>> On Tue, Jun 26, 2018 at 11:26 PM Olexandr K <
>>> olexandr.kundire...@gmail.com> wrote:
>>>
 Hi Andrey,

 I see Fix version 2.7 in Jira: https://issues.apache.org/
 jira/browse/IGNITE-8659
 This is a critical bug.. bouncing of server node in not-a-right-time
 causes a catastrophe.
 This mean no availability in fact - I had to clean data folders to
 start my cluster after that

 BR, Oleksandr


 On Fri, Jun 22, 2018 at 4:06 PM, Andrey Mashenkov <
 andrey.mashen...@gmail.com> wrote:

> Hi,
>
> We've found and fixed few issues related to ExpiryPolicy usage.
> Most likely, your issue is [1] and it is planned to ignite 2.6 release.
>
> [1] https://issues.apache.org/jira/browse/IGNITE-8659
>
>
> On Fri, Jun 22, 2018 at 8:43 AM Olexandr K <
> olexandr.kundire...@gmail.com> wrote:
>
>> Hi Team,
>>
>> Issue is still there in 2.5.0
>>
>> Steps to reproduce:
>> 1) start 2 servers + 2 clients topology
>> 2) start load testing on client nodes
>> 3) stop server 1
>> 4) start server 1
>> 5) stop server 1 again when rebalancing is in progress
>> => and we got data corrupted here, see error below
>> => we were not able to restart Ignite cluster after that and need to
>> perform data folders cleanup...
>>
>> 2018-06-21 11:28:01.684 [ttl-cleanup-worker-#43] ERROR  - Critical
>> system error detected. Will be handled accordingly to configured handler
>> [hnd=class o.a.i.failure.StopNodeOrHaltFailureHandler,
>> failureCtx=FailureContext [type=SYSTEM_WORKER_TERMINATION, err=class
>> o.a.i.IgniteException: Runtime failure on bounds: [lower=null,
>> upper=PendingRow [
>> org.apache.ignite.IgniteException: Runtime failure on bounds:
>> [lower=null, upper=PendingRow []]
>> at org.apache.ignite.internal.processors.cache.persistence.
>> tree.BPlusTree.find(BPlusTree.java:971)
>> ~[ignite-core-2.5.0.jar:2.5.0]
>> at org.apache.ignite.internal.processors.cache.persistence.
>> tree.BPlusTree.find(BPlusTree.java:950)
>> ~[ignite-core-2.5.0.jar:2.5.0]
>> at org.apache.ignite.internal.processors.cache.
>> IgniteCacheOffheapManagerImpl.expire(IgniteCacheOffheapManagerImpl.java:1024)
>> ~[ignite-core-2.5.0.jar:2.5.0]
>> at org.apache.ignite.internal.processors.cache.
>> GridCacheTtlManager.expire(GridCacheTtlManager.java:197)
>> ~[ignite-core-2.5.0.jar:2.5.0]
>> at org.apache.ignite.internal.processors.cache.
>> GridCacheSharedTtlCleanupManager$CleanupWorker.body(
>> GridCacheSharedTtlCleanupManager.java:137)
>> [ignite-core-2.5.0.jar:2.5.0]
>> at 
>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>> [ignite-core-2.5.0.jar:2.5.0]
>> at java.lang.Thread.run(Thread.java:748) [?:1.8.0_162]
>> Caused by: java.lang.IllegalStateException: Item not found: 2
>> at org.apache.ignite.internal.processors.cache.persistence.
>> tree.io.AbstractDataPageIO.findIndirectItemIndex(AbstractDataPageIO.java:341)
>> ~[ignite-core-2.5.0.jar:2.5.0]
>> at org.apache.ignite.internal.processors.cache.persistence.
>> tree.io.AbstractDataPageIO.getDataOffset(AbstractDataPageIO.java:450)
>> ~[ignite-core-2.5.0.jar:2.5.0]
>> at org.apache.ignite.internal.processors.cache.persistence.
>> tree.io.AbstractDataPageIO.readPayload(AbstractDataPageIO.java:492)
>> ~[ignite-core-2.5.0.jar:2.5.0]
>> at org.apache.ignite.internal.processors.cache.persistence.
>> CacheDataRowAdapter.initFromLink(CacheDataRowAdapter.java:150)
>> ~[ignite-core-2.5.0.jar:2.5.0]
>> at org.apache.ignite.internal.processors.cache.persistence.
>> 

Re: Uneven partitioning and data not on off-heap memory.

2018-07-05 Thread smovva
Thanks Denis. That makes sense.



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


Re: Metrics for IgniteDataStreamer

2018-07-05 Thread vbm
HI Evangii,

Thanks for the reply. I have some more question regarding ignite data
streamer.

Below is our scenario:
We have many Kafka topics and now we want to use ignite data streamer to
pull data to ignite cache and data is such that each kafka topic correspond
to a cache in ignite.

>From what I understand we need to have multiple KafkaStreamer which has one
to one mapping to ignite data streamer which eventually writes to cache.
Correct me if I am wrong here.

If there are multiple kafka topics, what is the best approach to load data
to caches.


Regards,
Vishwas



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


Re: Cache configuration in case of Client mode

2018-07-05 Thread Вячеслав Коптилин
Oh, I see now that we are talking about Factory
:)
Yes, it looks like a usability issue or even a bug. The implementation
should inject dependencies into that factory in the same way it does for
CacheStoreFactory.
As a workaround, you can try the following:

private CacheConfiguration ipContainerIPV4CacheCfg() {
CacheConfiguration ipContainerIpV4CacheCfg = new
CacheConfiguration<>(CacheName.IP_CONTAINER_IPV4_CACHE.name());
Factory storeFactory =
FactoryBuilder.factoryOf(IpContainerIpV4CacheLoader.class);
ipContainerIpV4CacheCfg.setCacheStoreFactory(storeFactory);
ipContainerIpV4CacheCfg.setCacheStoreSessionListenerFactories(new
Factory() {
@Override public CacheStoreSessionListener create() {
return new TestCacheStoreSessionListener();
}
});

...
}

public class TestCacheStoreSessionListener extends
CacheJdbcStoreSessionListener {
@SpringApplicationContextResource
public void setupDataSourceFromSpringContext(Object appCtx) {
ApplicationContext appContext = (ApplicationContext) appCtx;
setDataSource((DataSource) appContext.getBean("dataSource"));
}
}

Best regards,
Slava.

чт, 5 июл. 2018 г. в 18:44, Prasad Bhalerao :

>
> I tried to debug the ignite code, GridResourceProcessor.inject is not
>> being executed for injecting resources into CacheStoreSessionListener. It
>> is being called for Cachestores.
>>
>> Can you please advise?
>>
>> Thanks,
>> Prasad
>>
>> On Thu, Jul 5, 2018 at 8:14 PM Prasad Bhalerao <
>> prasadbhalerao1...@gmail.com> wrote:
>>
>>> I had used SpringApplicationContextResource  annotation. But it did not
>>> inject the application context in it. So I decided to use spring managed
>>> bean and it worked but now it is creating the problem which is described in
>>> this mail chain.
>>>
>>> On Thu, Jul 5, 2018 at 8:11 PM Prasad Bhalerao <
>>> prasadbhalerao1...@gmail.com> wrote:
>>>
 I had used SpringApplicationContextResource  annotation. But it did not
 inject the application context in it. So I decided to use spring managed
 bean and it worked.

 Thanks,
 Prasad

 On Thu, Jul 5, 2018 at 7:49 PM Вячеслав Коптилин <
 slava.kopti...@gmail.com> wrote:

> It seems that you need to use @
>
> SpringApplicationContextResource
>
> instead of @Autowired.
> Could you please check that?
>
> Thanks.
>
> чт, 5 июл. 2018 г. в 17:01, Prasad Bhalerao <
> prasadbhalerao1...@gmail.com>:
>
>>
>>
>> import java.io.Serializable;
>> import javax.cache.configuration.Factory;
>> import javax.sql.DataSource;
>> import org.apache.ignite.IgniteException;
>> import org.apache.ignite.cache.store.CacheStoreSessionListener;
>> import org.apache.ignite.cache.store.jdbc.CacheJdbcStoreSessionListener;
>> import org.springframework.beans.factory.annotation.Autowired;
>> import org.springframework.context.ApplicationContext;
>>
>> public class CacheStoreSessionListenerFactory implements 
>> Factory, Serializable {
>>
>>   private static final long serialVersionUID = 6142932447545510244L;
>>
>>   private String className;
>>
>>   @Autowired
>>   private transient ApplicationContext appCtx;
>>
>>
>>   public 
>> CacheStoreSessionListenerFactory(Class clazz) 
>> {
>> this.className = clazz.getName();
>>   }
>>
>>   @Override
>>   public CacheStoreSessionListener create() {
>>
>> if (appCtx == null) {
>>   throw new IgniteException("Spring application context resource is 
>> not injected.");
>> }
>> CacheJdbcStoreSessionListener lsnr = new 
>> CacheJdbcStoreSessionListener();
>> lsnr.setDataSource((DataSource) appCtx.getBean("dataSource"));
>> return lsnr;
>>
>>   }
>>
>> }
>>
>>
>>
>> On Thu, Jul 5, 2018 at 7:24 PM slava.koptilin <
>> slava.kopti...@gmail.com> wrote:
>>
>>> Well, the exception is thrown by your class:
>>> org.apache.ignite.IgniteException: Spring application context
>>> resource is
>>> not injected.
>>>  at
>>>
>>> *com.qualys.agms.grid.cache.loader.factory.CacheStoreSessionListenerFactory*.create(CacheStoreSessionListenerFactory.java:30)
>>>  at
>>>
>>> com.qualys.agms.grid.cache.loader.factory.CacheStoreSessionListenerFactory.create(CacheStoreSessionListenerFactory.java:12)
>>>
>>> Is it possible to share this class as well?
>>>
>>>
>>>
>>> --
>>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>>>
>>


Re: Is it possible to configure Apache Ignite QueryCursor to be autocloseable in the xml configuration file?

2018-07-05 Thread tizh
Yes, we decided to look into the go client. Thank you very much for your
help. 



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


Re: Cache configuration in case of Client mode

2018-07-05 Thread Prasad Bhalerao
> I tried to debug the ignite code, GridResourceProcessor.inject is not
> being executed for injecting resources into CacheStoreSessionListener. It
> is being called for Cachestores.
>
> Can you please advise?
>
> Thanks,
> Prasad
>
> On Thu, Jul 5, 2018 at 8:14 PM Prasad Bhalerao <
> prasadbhalerao1...@gmail.com> wrote:
>
>> I had used SpringApplicationContextResource  annotation. But it did not
>> inject the application context in it. So I decided to use spring managed
>> bean and it worked but now it is creating the problem which is described in
>> this mail chain.
>>
>> On Thu, Jul 5, 2018 at 8:11 PM Prasad Bhalerao <
>> prasadbhalerao1...@gmail.com> wrote:
>>
>>> I had used SpringApplicationContextResource  annotation. But it did not
>>> inject the application context in it. So I decided to use spring managed
>>> bean and it worked.
>>>
>>> Thanks,
>>> Prasad
>>>
>>> On Thu, Jul 5, 2018 at 7:49 PM Вячеслав Коптилин <
>>> slava.kopti...@gmail.com> wrote:
>>>
 It seems that you need to use @

 SpringApplicationContextResource

 instead of @Autowired.
 Could you please check that?

 Thanks.

 чт, 5 июл. 2018 г. в 17:01, Prasad Bhalerao <
 prasadbhalerao1...@gmail.com>:

>
>
> import java.io.Serializable;
> import javax.cache.configuration.Factory;
> import javax.sql.DataSource;
> import org.apache.ignite.IgniteException;
> import org.apache.ignite.cache.store.CacheStoreSessionListener;
> import org.apache.ignite.cache.store.jdbc.CacheJdbcStoreSessionListener;
> import org.springframework.beans.factory.annotation.Autowired;
> import org.springframework.context.ApplicationContext;
>
> public class CacheStoreSessionListenerFactory implements 
> Factory, Serializable {
>
>   private static final long serialVersionUID = 6142932447545510244L;
>
>   private String className;
>
>   @Autowired
>   private transient ApplicationContext appCtx;
>
>
>   public 
> CacheStoreSessionListenerFactory(Class clazz) {
> this.className = clazz.getName();
>   }
>
>   @Override
>   public CacheStoreSessionListener create() {
>
> if (appCtx == null) {
>   throw new IgniteException("Spring application context resource is 
> not injected.");
> }
> CacheJdbcStoreSessionListener lsnr = new 
> CacheJdbcStoreSessionListener();
> lsnr.setDataSource((DataSource) appCtx.getBean("dataSource"));
> return lsnr;
>
>   }
>
> }
>
>
>
> On Thu, Jul 5, 2018 at 7:24 PM slava.koptilin <
> slava.kopti...@gmail.com> wrote:
>
>> Well, the exception is thrown by your class:
>> org.apache.ignite.IgniteException: Spring application context
>> resource is
>> not injected.
>>  at
>>
>> *com.qualys.agms.grid.cache.loader.factory.CacheStoreSessionListenerFactory*.create(CacheStoreSessionListenerFactory.java:30)
>>  at
>>
>> com.qualys.agms.grid.cache.loader.factory.CacheStoreSessionListenerFactory.create(CacheStoreSessionListenerFactory.java:12)
>>
>> Is it possible to share this class as well?
>>
>>
>>
>> --
>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>>
>


Re: Performance acting as a redis server

2018-07-05 Thread Ilya Kasnacheev
Hello!

I have no idea why your node has lost zookeeper connection, but my bet will
be that you still failed to close some of connections, and they have
clogged each and every available socket on your machine (which are still
only 63k).

Please make extra sure that when you open a socket, you close it regardless
of errors, etc.

Regards,

-- 
Ilya Kasnacheev

2018-07-05 13:33 GMT+03:00 胡海麟 :

> Hi,
>
> Challenged again and I'm back :)
>
> One of the node stopped for SEGMENTATION.
> The Zookeeper is used by other services, too. It is supposed working
> all the time.
>
> I'm not sure if raising session timeout of zookeeper work or not. Ask
> for suggestions.
>
> Thanks.
>
> On Thu, Jul 5, 2018 at 6:24 PM, Ilya Kasnacheev
>  wrote:
> > Hello!
> >
> > The config looks correct. I'll check why ConnectorConfiguration doesn't
> have
> > proper string representation, hence:
> > https://issues.apache.org/jira/browse/IGNITE-8935
> >
> > Regards,
> >
> > --
> > Ilya Kasnacheev
> >
> > 2018-07-05 9:21 GMT+03:00 胡海麟 :
> >>
> >> Hi,
> >>
> >> I added the config above. But I don't know whether it is applied.
> >>
> >>
> >> connectorCfg=org.apache.ignite.configuration.ConnectorConfiguration@
> 7d8704ef
> >>
> >> There is such a piece of relevant info but no detail. Is there any way
> >> to confirm the details?
> >>
> >> Thanks.
> >>
> >> On Wed, Jul 4, 2018 at 7:25 PM, Ilya Kasnacheev
> >>  wrote:
> >> > Hello!
> >> >
> >> > You should add it to config/default-config.xml in the form of
> >> >
> >> >   
> >> >  >> > class="org.apache.ignite.configuration.ConnectorConfiguration">
> >> >   
> >> > 
> >> >   
> >> >
> >> > inside IgniteConfiguration bean.
> >> >
> >> > Come to think of it, maybe your slowdown is caused not by thread
> >> > starvation
> >> > but by genuine locking due to repeated usage of the same keys. Are you
> >> > sure
> >> > that you are using a lot of different keys and not just a couple which
> >> > you
> >> > over-write over and over?
> >> >
> >> > Makes sense to try both.
> >> >
> >> > Regards,
> >> >
> >> > --
> >> > Ilya Kasnacheev
> >> >
> >> > 2018-07-04 13:19 GMT+03:00 胡海麟 :
> >> >>
> >> >> Hi,
> >> >>
> >> >> After googling for 1 hour to get nothing, I'm back for some basic
> >> >> knowledges.
> >> >>
> >> >> igniteConfiguration.setConnectorConfiguration(new
> >> >> ConnectorConfiguration().setThreadPoolSize(64))
> >> >>
> >> >> I suppose this is a piece of java code but I don't know how and where
> >> >> to execute it.
> >> >> I started the cluster with `bin/ignite.sh config/default-config.xml`
> >> >> and use golang written program as a client.
> >> >>
> >> >> Am I missing something?
> >> >>
> >> >> Thanks.
> >> >>
> >> >> On Wed, Jul 4, 2018 at 6:22 PM, Ilya Kasnacheev
> >> >>  wrote:
> >> >> > Hello!
> >> >> >
> >> >> > You can try increasing number of threads in REST thread pool by
> >> >> > setting
> >> >> > igniteConfiguration.setConnectorConfiguration(new
> >> >> > ConnectorConfiguration().setThreadPoolSize(64))
> >> >> > Or the corresponding Spring XML.
> >> >> >
> >> >> > This is as per https://apacheignite.readme.io/docs/rest-api
> >> >> >
> >> >> > Regards,
> >> >> >
> >> >> > --
> >> >> > Ilya Kasnacheev
> >> >> >
> >> >> > 2018-07-04 12:04 GMT+03:00 胡海麟 :
> >> >> >>
> >> >> >> Hi,
> >> >> >>
> >> >> >> Here is the thread dump.
> >> >> >>
> >> >> >> Thank you.
> >> >> >>
> >> >> >> On Wed, Jul 4, 2018 at 5:52 PM, Ilya Kasnacheev
> >> >> >>  wrote:
> >> >> >> > Hello!
> >> >> >> >
> >> >> >> > Can you provide the thread dump collected when the system is
> under
> >> >> >> > peak
> >> >> >> > load?
> >> >> >> >
> >> >> >> > I think it's some other thread pool, such as client pool or
> >> >> >> > management
> >> >> >> > pool,
> >> >> >> > but have to take a look at the thread dump to be sure.
> >> >> >> >
> >> >> >> > Regards,
> >> >> >> >
> >> >> >> > --
> >> >> >> > Ilya Kasnacheev
> >> >> >> >
> >> >> >> > 2018-07-04 11:33 GMT+03:00 胡海麟 :
> >> >> >> >>
> >> >> >> >> Hi,
> >> >> >> >>
> >> >> >> >> We use ignite as a redis server.
> >> >> >> >>
> >> >> >> >> The use case is
> >> >> >> >> a. Write timeout is 15ms on the client side.
> >> >> >> >> b. 2 server nodes. each is an EC2 r4.4xlarge instance.
> >> >> >> >> c. Write req/s is about 120,000. In another word, 60,000 for
> each
> >> >> >> >> node.
> >> >> >> >>
> >> >> >> >> The problem is that timeout happens frequently, several ones
> per
> >> >> >> >> second.
> >> >> >> >> A lower write req/s results less timeout. I guest we have
> >> >> >> >> bottleneck
> >> >> >> >> somewhere.
> >> >> >> >>
> >> >> >> >> ==
> >> >> >> >> $ tail -f
> >> >> >> >>
> >> >> >> >> /opt/apache-ignite-fabric-2.5.0-bin/work/log/ignite-
> ee4f25ed.0.log
> >> >> >> >> | grep pool
> >> >> >> >> ^-- Public thread pool [active=0, idle=0, qSize=0]
> >> >> >> >> ^-- System thread pool [active=0, idle=16, qSize=0]
> >> >> >> >> ==
> >> >> >> >> system thread pool seems not busy at all.
> >> >> >> >>
> >> 

Re: Classloading error during startup with OSGi in 2.5

2018-07-05 Thread ilya.kasnacheev
Hello!

Can you create a small reproducer project for this problem, post it to e.g.
Github?

I would take a look definitely if you do. Otherwise it's hard to say, I
don't know anything about your environment.

Regards,



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


Re: Cache configuration in case of Client mode

2018-07-05 Thread Prasad Bhalerao
I tried to debug the ignite code, GridResourceProcessor.inject is not being
executed for injecting resources into CacheStoreSessionListenerFactories.
It is being called for CachestoreFactories.

Can you please advise?

Thanks,
Prasad

On Thu, Jul 5, 2018 at 8:14 PM Prasad Bhalerao 
wrote:

> I had used SpringApplicationContextResource  annotation. But it did not
> inject the application context in it. So I decided to use spring managed
> bean and it worked but now it is creating the problem which is described in
> this mail chain.
>
> On Thu, Jul 5, 2018 at 8:11 PM Prasad Bhalerao <
> prasadbhalerao1...@gmail.com> wrote:
>
>> I had used SpringApplicationContextResource  annotation. But it did not
>> inject the application context in it. So I decided to use spring managed
>> bean and it worked.
>>
>> Thanks,
>> Prasad
>>
>> On Thu, Jul 5, 2018 at 7:49 PM Вячеслав Коптилин <
>> slava.kopti...@gmail.com> wrote:
>>
>>> It seems that you need to use @
>>>
>>> SpringApplicationContextResource
>>>
>>> instead of @Autowired.
>>> Could you please check that?
>>>
>>> Thanks.
>>>
>>> чт, 5 июл. 2018 г. в 17:01, Prasad Bhalerao <
>>> prasadbhalerao1...@gmail.com>:
>>>


 import java.io.Serializable;
 import javax.cache.configuration.Factory;
 import javax.sql.DataSource;
 import org.apache.ignite.IgniteException;
 import org.apache.ignite.cache.store.CacheStoreSessionListener;
 import org.apache.ignite.cache.store.jdbc.CacheJdbcStoreSessionListener;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.ApplicationContext;

 public class CacheStoreSessionListenerFactory implements 
 Factory, Serializable {

   private static final long serialVersionUID = 6142932447545510244L;

   private String className;

   @Autowired
   private transient ApplicationContext appCtx;


   public CacheStoreSessionListenerFactory(Class 
 clazz) {
 this.className = clazz.getName();
   }

   @Override
   public CacheStoreSessionListener create() {

 if (appCtx == null) {
   throw new IgniteException("Spring application context resource is 
 not injected.");
 }
 CacheJdbcStoreSessionListener lsnr = new 
 CacheJdbcStoreSessionListener();
 lsnr.setDataSource((DataSource) appCtx.getBean("dataSource"));
 return lsnr;

   }

 }



 On Thu, Jul 5, 2018 at 7:24 PM slava.koptilin 
 wrote:

> Well, the exception is thrown by your class:
> org.apache.ignite.IgniteException: Spring application context resource
> is
> not injected.
>  at
>
> *com.qualys.agms.grid.cache.loader.factory.CacheStoreSessionListenerFactory*.create(CacheStoreSessionListenerFactory.java:30)
>  at
>
> com.qualys.agms.grid.cache.loader.factory.CacheStoreSessionListenerFactory.create(CacheStoreSessionListenerFactory.java:12)
>
> Is it possible to share this class as well?
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>



Re: Cache configuration in case of Client mode

2018-07-05 Thread Prasad Bhalerao
I had used SpringApplicationContextResource  annotation. But it did not
inject the application context in it. So I decided to use spring managed
bean and it worked but now it is creating the problem which is described in
this mail chain.

On Thu, Jul 5, 2018 at 8:11 PM Prasad Bhalerao 
wrote:

> I had used SpringApplicationContextResource  annotation. But it did not
> inject the application context in it. So I decided to use spring managed
> bean and it worked.
>
> Thanks,
> Prasad
>
> On Thu, Jul 5, 2018 at 7:49 PM Вячеслав Коптилин 
> wrote:
>
>> It seems that you need to use @
>>
>> SpringApplicationContextResource
>>
>> instead of @Autowired.
>> Could you please check that?
>>
>> Thanks.
>>
>> чт, 5 июл. 2018 г. в 17:01, Prasad Bhalerao > >:
>>
>>>
>>>
>>> import java.io.Serializable;
>>> import javax.cache.configuration.Factory;
>>> import javax.sql.DataSource;
>>> import org.apache.ignite.IgniteException;
>>> import org.apache.ignite.cache.store.CacheStoreSessionListener;
>>> import org.apache.ignite.cache.store.jdbc.CacheJdbcStoreSessionListener;
>>> import org.springframework.beans.factory.annotation.Autowired;
>>> import org.springframework.context.ApplicationContext;
>>>
>>> public class CacheStoreSessionListenerFactory implements 
>>> Factory, Serializable {
>>>
>>>   private static final long serialVersionUID = 6142932447545510244L;
>>>
>>>   private String className;
>>>
>>>   @Autowired
>>>   private transient ApplicationContext appCtx;
>>>
>>>
>>>   public CacheStoreSessionListenerFactory(Class 
>>> clazz) {
>>> this.className = clazz.getName();
>>>   }
>>>
>>>   @Override
>>>   public CacheStoreSessionListener create() {
>>>
>>> if (appCtx == null) {
>>>   throw new IgniteException("Spring application context resource is not 
>>> injected.");
>>> }
>>> CacheJdbcStoreSessionListener lsnr = new 
>>> CacheJdbcStoreSessionListener();
>>> lsnr.setDataSource((DataSource) appCtx.getBean("dataSource"));
>>> return lsnr;
>>>
>>>   }
>>>
>>> }
>>>
>>>
>>>
>>> On Thu, Jul 5, 2018 at 7:24 PM slava.koptilin 
>>> wrote:
>>>
 Well, the exception is thrown by your class:
 org.apache.ignite.IgniteException: Spring application context resource
 is
 not injected.
  at

 *com.qualys.agms.grid.cache.loader.factory.CacheStoreSessionListenerFactory*.create(CacheStoreSessionListenerFactory.java:30)
  at

 com.qualys.agms.grid.cache.loader.factory.CacheStoreSessionListenerFactory.create(CacheStoreSessionListenerFactory.java:12)

 Is it possible to share this class as well?



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

>>>


Re: Cache configuration in case of Client mode

2018-07-05 Thread Prasad Bhalerao
I had used SpringApplicationContextResource  annotation. But it did not
inject the application context in it. So I decided to use spring managed
bean and it worked.

Thanks,
Prasad

On Thu, Jul 5, 2018 at 7:49 PM Вячеслав Коптилин 
wrote:

> It seems that you need to use @
>
> SpringApplicationContextResource
>
> instead of @Autowired.
> Could you please check that?
>
> Thanks.
>
> чт, 5 июл. 2018 г. в 17:01, Prasad Bhalerao  >:
>
>>
>>
>> import java.io.Serializable;
>> import javax.cache.configuration.Factory;
>> import javax.sql.DataSource;
>> import org.apache.ignite.IgniteException;
>> import org.apache.ignite.cache.store.CacheStoreSessionListener;
>> import org.apache.ignite.cache.store.jdbc.CacheJdbcStoreSessionListener;
>> import org.springframework.beans.factory.annotation.Autowired;
>> import org.springframework.context.ApplicationContext;
>>
>> public class CacheStoreSessionListenerFactory implements 
>> Factory, Serializable {
>>
>>   private static final long serialVersionUID = 6142932447545510244L;
>>
>>   private String className;
>>
>>   @Autowired
>>   private transient ApplicationContext appCtx;
>>
>>
>>   public CacheStoreSessionListenerFactory(Class 
>> clazz) {
>> this.className = clazz.getName();
>>   }
>>
>>   @Override
>>   public CacheStoreSessionListener create() {
>>
>> if (appCtx == null) {
>>   throw new IgniteException("Spring application context resource is not 
>> injected.");
>> }
>> CacheJdbcStoreSessionListener lsnr = new CacheJdbcStoreSessionListener();
>> lsnr.setDataSource((DataSource) appCtx.getBean("dataSource"));
>> return lsnr;
>>
>>   }
>>
>> }
>>
>>
>>
>> On Thu, Jul 5, 2018 at 7:24 PM slava.koptilin 
>> wrote:
>>
>>> Well, the exception is thrown by your class:
>>> org.apache.ignite.IgniteException: Spring application context resource is
>>> not injected.
>>>  at
>>>
>>> *com.qualys.agms.grid.cache.loader.factory.CacheStoreSessionListenerFactory*.create(CacheStoreSessionListenerFactory.java:30)
>>>  at
>>>
>>> com.qualys.agms.grid.cache.loader.factory.CacheStoreSessionListenerFactory.create(CacheStoreSessionListenerFactory.java:12)
>>>
>>> Is it possible to share this class as well?
>>>
>>>
>>>
>>> --
>>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>>>
>>


Re: Cache configuration in case of Client mode

2018-07-05 Thread Вячеслав Коптилин
It seems that you need to use @

SpringApplicationContextResource

instead of @Autowired.
Could you please check that?

Thanks.

чт, 5 июл. 2018 г. в 17:01, Prasad Bhalerao :

>
>
> import java.io.Serializable;
> import javax.cache.configuration.Factory;
> import javax.sql.DataSource;
> import org.apache.ignite.IgniteException;
> import org.apache.ignite.cache.store.CacheStoreSessionListener;
> import org.apache.ignite.cache.store.jdbc.CacheJdbcStoreSessionListener;
> import org.springframework.beans.factory.annotation.Autowired;
> import org.springframework.context.ApplicationContext;
>
> public class CacheStoreSessionListenerFactory implements 
> Factory, Serializable {
>
>   private static final long serialVersionUID = 6142932447545510244L;
>
>   private String className;
>
>   @Autowired
>   private transient ApplicationContext appCtx;
>
>
>   public CacheStoreSessionListenerFactory(Class 
> clazz) {
> this.className = clazz.getName();
>   }
>
>   @Override
>   public CacheStoreSessionListener create() {
>
> if (appCtx == null) {
>   throw new IgniteException("Spring application context resource is not 
> injected.");
> }
> CacheJdbcStoreSessionListener lsnr = new CacheJdbcStoreSessionListener();
> lsnr.setDataSource((DataSource) appCtx.getBean("dataSource"));
> return lsnr;
>
>   }
>
> }
>
>
>
> On Thu, Jul 5, 2018 at 7:24 PM slava.koptilin 
> wrote:
>
>> Well, the exception is thrown by your class:
>> org.apache.ignite.IgniteException: Spring application context resource is
>> not injected.
>>  at
>>
>> *com.qualys.agms.grid.cache.loader.factory.CacheStoreSessionListenerFactory*.create(CacheStoreSessionListenerFactory.java:30)
>>  at
>>
>> com.qualys.agms.grid.cache.loader.factory.CacheStoreSessionListenerFactory.create(CacheStoreSessionListenerFactory.java:12)
>>
>> Is it possible to share this class as well?
>>
>>
>>
>> --
>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>>
>


Re: Cache configuration in case of Client mode

2018-07-05 Thread Prasad Bhalerao
import java.io.Serializable;
import javax.cache.configuration.Factory;
import javax.sql.DataSource;
import org.apache.ignite.IgniteException;
import org.apache.ignite.cache.store.CacheStoreSessionListener;
import org.apache.ignite.cache.store.jdbc.CacheJdbcStoreSessionListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;

public class CacheStoreSessionListenerFactory implements
Factory, Serializable {

  private static final long serialVersionUID = 6142932447545510244L;

  private String className;

  @Autowired
  private transient ApplicationContext appCtx;


  public CacheStoreSessionListenerFactory(Class
clazz) {
this.className = clazz.getName();
  }

  @Override
  public CacheStoreSessionListener create() {

if (appCtx == null) {
  throw new IgniteException("Spring application context resource
is not injected.");
}
CacheJdbcStoreSessionListener lsnr = new CacheJdbcStoreSessionListener();
lsnr.setDataSource((DataSource) appCtx.getBean("dataSource"));
return lsnr;

  }

}



On Thu, Jul 5, 2018 at 7:24 PM slava.koptilin 
wrote:

> Well, the exception is thrown by your class:
> org.apache.ignite.IgniteException: Spring application context resource is
> not injected.
>  at
>
> *com.qualys.agms.grid.cache.loader.factory.CacheStoreSessionListenerFactory*.create(CacheStoreSessionListenerFactory.java:30)
>  at
>
> com.qualys.agms.grid.cache.loader.factory.CacheStoreSessionListenerFactory.create(CacheStoreSessionListenerFactory.java:12)
>
> Is it possible to share this class as well?
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


Re: can't see caches via DBeaver

2018-07-05 Thread Evgenii Zhuravlev
Hi,

You should configure which fields should be used for SQL at first, please
refer this documentation:
https://apacheignite-sql.readme.io/docs/schema-and-indexes

Evgenii


2018-07-05 16:44 GMT+03:00 Som Som <2av10...@gmail.com>:

> Hello.
>
>
>
> I installed DBeaver in order to browse caches, configured the driver
> accordingly the instruction. As a result DBeaver successfully connected to
> server node, but there was no "City" cache in tables folder. Cache was
> created with the code attached below.
>
>
>
> Server node configuration:
>
>
>
> http://www.springframework.org/schema/beans;
>
>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
>
>xsi:schemaLocation="
>
>http://www.springframework.org/schema/beans
>
>http://www.springframework.org/schema/beans/spring-beans.xsd;>
>
> 
>
>   
>
> < bean class="org.apache.ignite.configuration.
> DataStorageConfiguration">
>
>   
>
> < list >
>
>   < bean class="org.apache.ignite.configuration.
> DataRegionConfiguration">
>
> 
>
> 
>
> 
>
>   
>
>   
>
> 
>
> 
>
>   
>
> 
>
>   
>
> 
>
>   
>
> 
>
> 
>
>
>
> Code snippet:
>
>
>
> public class City
>
> {
>
> public int Id;
>
> public string Name;
>
>
>
> }
>
>
>
> class Program
>
> {
>
>
>
> static void Main(string[] args)
>
> {
>
>
>
> var cfg = new IgniteConfiguration
>
> {
>
> DiscoverySpi = new TcpDiscoverySpi
>
> {
>
> IpFinder = new TcpDiscoveryStaticIpFinder
>
> {
>
> Endpoints = new[] { "xxx.xxx.xxx.xxx" }
>
> }
>
> },
>
> ClientMode = true,
>
> };
>
> var ignite = Ignition.Start(cfg);
>
>
>
> var cityCache = ignite.GetOrCreateCache(new 
> CacheConfiguration
> { Name = "City", DataRegionName = "DR0" });
>
>
>
> //cityCache.Put(1, new City { Id = 1, Name = "TestCity0" });
>
>
>
> foreach (var city in cityCache)
>
> {
>
> }
>
>
>
> ignite.Dispose();
>
> }
>
> }
>
> }
>


Re: Cache configuration in case of Client mode

2018-07-05 Thread slava.koptilin
Well, the exception is thrown by your class:
org.apache.ignite.IgniteException: Spring application context resource is
not injected.
 at
*com.qualys.agms.grid.cache.loader.factory.CacheStoreSessionListenerFactory*.create(CacheStoreSessionListenerFactory.java:30)
 at
com.qualys.agms.grid.cache.loader.factory.CacheStoreSessionListenerFactory.create(CacheStoreSessionListenerFactory.java:12)

Is it possible to share this class as well?



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


can't see caches via DBeaver

2018-07-05 Thread Som Som
Hello.



I installed DBeaver in order to browse caches, configured the driver
accordingly the instruction. As a result DBeaver successfully connected to
server node, but there was no "City" cache in tables folder. Cache was
created with the code attached below.



Server node configuration:



http://www.springframework.org/schema/beans;

   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;

   xsi:schemaLocation="

   http://www.springframework.org/schema/beans

   http://www.springframework.org/schema/beans/spring-beans.xsd;>



  

< bean class=
"org.apache.ignite.configuration.DataStorageConfiguration">

  

< list >

  < bean class=
"org.apache.ignite.configuration.DataRegionConfiguration">







  

  





  



  



  







Code snippet:



public class City

{

public int Id;

public string Name;



}



class Program

{



static void Main(string[] args)

{



var cfg = new IgniteConfiguration

{

DiscoverySpi = new TcpDiscoverySpi

{

IpFinder = new TcpDiscoveryStaticIpFinder

{

Endpoints = new[] { "xxx.xxx.xxx.xxx" }

}

},

ClientMode = true,

};

var ignite = Ignition.Start(cfg);



var cityCache = ignite.GetOrCreateCache(new
CacheConfiguration
{ Name = "City", DataRegionName = "DR0" });



//cityCache.Put(1, new City { Id = 1, Name = "TestCity0" });



foreach (var city in cityCache)

{

}



ignite.Dispose();

}

}

}


Re: Cache configuration in case of Client mode

2018-07-05 Thread Prasad Bhalerao
Hi,

I am using Ignite 2.4 version. Please find attached the log files. Log file
agms-web is a client node log and agms-core is server node log.

Ignite configuration on client node is as follows. When I try to get the
cache contents on client node after data push operation, my request hangs
on ignite.cache(getCacheName()) code and throws following exception. But if
I fire the same request again, code  ignite.cache(getCacheName())  for
cache "IP_CONTAINER_IPV4_CACHE" returns null.  When I debugged on server
node, this cache is present and data is being pushed to this cache by
ignite runnable task.


Exception on first request :

2018-07-05 18:18:34,127 108076 [exchange-worker-#37%springDataNode%] ERROR
o.a.i.i.p.c.GridCachePartitionExchangeManager - Failed to process custom
exchange task: ClientCacheChangeDummyDiscoveryMessage
[reqId=23767a7f-3437-4d20-9993-36d5d88a8860, cachesToClose=null,
startCaches=[IP_CONTAINER_IPV4_CACHE]]
org.apache.ignite.IgniteException: Spring application context resource is
not injected.
 at
com.qualys.agms.grid.cache.loader.factory.CacheStoreSessionListenerFactory.create(CacheStoreSessionListenerFactory.java:30)
 at
com.qualys.agms.grid.cache.loader.factory.CacheStoreSessionListenerFactory.create(CacheStoreSessionListenerFactory.java:12)
 at
org.apache.ignite.internal.processors.cache.GridCacheUtils.startStoreSessionListeners(GridCacheUtils.java:1403)
 at
org.apache.ignite.internal.processors.cache.store.GridCacheStoreManagerAdapter.start0(GridCacheStoreManagerAdapter.java:241)
 at
org.apache.ignite.internal.processors.cache.store.CacheOsStoreManager.start0(CacheOsStoreManager.java:64)


@Configuration
@Profile({"prod", "default"})
public class IgniteAppConfig {

  @Value("${ignite.data_storage_path}")
  private String dataStoragePath;

  @Bean
  public IgniteSpringBean igniteInstance() {
IgniteSpringBean ignite = new IgniteSpringBean();

ignite.setConfiguration(getIgniteConfiguration(ignite));

return ignite;
  }

  private IgniteConfiguration getIgniteConfiguration(IgniteSpringBean ignite) {

String HOST = "127.0.0.1:47500..47509";
TcpDiscoveryVmIpFinder ipFinder = new TcpDiscoveryVmIpFinder();
ipFinder.setAddresses(Collections.singletonList(HOST));

TcpDiscoverySpi discoSpi = new TcpDiscoverySpi();
discoSpi.setIpFinder(ipFinder);

IgniteConfiguration cfg = new IgniteConfiguration();
cfg.setDiscoverySpi(discoSpi);
cfg.setIgniteInstanceName("springDataNode");
cfg.setPeerClassLoadingEnabled(false);
cfg.setRebalanceThreadPoolSize(4);
//cfg.setLifecycleBeans(new IgniteLifeCycleBean());
cfg.setClientMode(true);

return cfg;
  }

}



@Override
public FieldsQueryCursor>
getFieldResultsByCriteria(Serializable customCriteria) {
  QueryCriteria criteria = (QueryCriteria) customCriteria;
  SqlFieldsQuery sqlFieldsQuery = new
SqlFieldsQuery(criteria.getStatement()).setArgs(criteria.getArgs());
  sqlFieldsQuery.setDistributedJoins(criteria.isDistributeJoins());
  return cache().query(sqlFieldsQuery);
}

protected abstract String getCacheName();

protected IgniteCache cache() {
  return ignite.cache(getCacheName());
}


IP_CONTAINER_IPV4_CACHE

private CacheConfiguration ipContainerIPV4CacheCfg() {

  CacheConfiguration ipContainerIpV4CacheCfg = new
CacheConfiguration<>(CacheName.IP_CONTAINER_IPV4_CACHE.name());
  ipContainerIpV4CacheCfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
  ipContainerIpV4CacheCfg.setWriteThrough(true);
  ipContainerIpV4CacheCfg.setReadThrough(false);
  ipContainerIpV4CacheCfg.setRebalanceMode(CacheRebalanceMode.ASYNC);
  
ipContainerIpV4CacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
  ipContainerIpV4CacheCfg.setBackups(1);
  //SpringCacheStoreFactory springCacheStoreFactory = new
SpringCacheStoreFactory(DefaultCacheLoader.class);
  Factory storeFactory =
FactoryBuilder.factoryOf(IpContainerIpV4CacheLoader.class);
  ipContainerIpV4CacheCfg.setCacheStoreFactory(storeFactory);
  ipContainerIpV4CacheCfg.setIndexedTypes(DefaultDataAffinityKey.class,
IpContainerIpV4Data.class);
  
ipContainerIpV4CacheCfg.setCacheStoreSessionListenerFactories(cacheStoreSessionListenerFactory());

  RendezvousAffinityFunction affinityFunction = new
RendezvousAffinityFunction();
  affinityFunction.setExcludeNeighbors(true);
  ipContainerIpV4CacheCfg.setAffiy(affinityFunction);

  return ipContainerIpV4CacheCfg;
}

@Bean
public CacheStoreSessionListenerFactory cacheStoreSessionListenerFactory() {
  return new CacheStoreSessionListenerFactory(CacheStoreSessionListener.class);
}




Thanks
Prasad

On Thu, Jul 5, 2018 at 5:57 PM slava.koptilin 
wrote:

> Hello Prasad,
>
> I cannot reproduce the behavior that you described.
> Please share the code that the community can use in order to reproduce the
> issue.
> It would be nice to have log files from both nodes (client and server).
>
> One more thing. Could you please share the version of Apache Ignite that
> you
> are using?
>
> Thanks!
>

Re: Cache configuration in case of Client mode

2018-07-05 Thread slava.koptilin
Hello Prasad,

I cannot reproduce the behavior that you described.
Please share the code that the community can use in order to reproduce the
issue.
It would be nice to have log files from both nodes (client and server).

One more thing. Could you please share the version of Apache Ignite that you
are using?

Thanks!



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


Re: Cache configuration in case of Client mode

2018-07-05 Thread akurbanov
Hi, 

Try advice to call ignite.getOrCreateCache("cacheName");, got a feeling that
you will get an empty cache there which would mean that this cache is not
created yet or is failing to start. In this case please attach startup logs
for server/client nodes setup.

Regards.



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


Re: Cache configuration in case of Client mode

2018-07-05 Thread Prasad Bhalerao
Hi Maxim,

My mistake, I did not phrase the problem correctly.

I am getting NullPointerException in my code because
ignite.cache(getCacheName())
is returning null on client node.

As I said I have not provided any cache configurations on client node
because I thought it is unnecessary.

So the question is.

Is it necessary to provide all cache configuration on client node as well?
If yes why?


Thanks,
Prasad

On Thu, Jul 5, 2018 at 5:23 PM Maxim Malygin 
wrote:

> Please show stack trace of your NPE.
>
> Regards,
> Maxim
>
> чт, 5 июл. 2018 г. в 14:48, Prasad Bhalerao  >:
>
>> Don't want to use that method.  I know that cache is already present on
>> server node as it is loaded by loaders and this ignite.cache method is
>> present in my common framework.
>>
>> Thanks,
>> Prasad
>>
>> On Thu, Jul 5, 2018, 5:14 PM Sambhaji Sawant 
>> wrote:
>>
>>> try using
>>> ignite.getOrCreateCache("cacheName");
>>>
>>> On Thu, Jul 5, 2018 at 3:49 PM, Prasad Bhalerao <
>>> prasadbhalerao1...@gmail.com> wrote:
>>>
 Hi,

 I have provided the cache configurations on ignite node which is
 started in server mode,but other ignite node which started in client mode
 does not have any cache configurations.

 Now case is cache is present on ignite server node. But when I access
 the same cache from client node I get NullPointerException when I execute
 following code on client node.

 ignite.cache(getCacheName())

 Is it necessary to provide all cache configuration on client node as
 well?
 If yes why?

 Thanks,
 Prasad

>>>
>>>


Re: Getting an exception when listing partitions of IgniteDataFrame

2018-07-05 Thread akurbanov
Hi,

Check out this answer and try to apply given advice, seems that it helped:
https://groups.google.com/forum/#!topic/bigdl-user-group/cZEBADHhhaE

>> /at org.apache.spark.rdd.RDD.partitions(RDD.scala:250)/
That's Spark RDD, not Ignite.

Regards,
Anton



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


Re: Cache configuration in case of Client mode

2018-07-05 Thread Maxim Malygin
Please show stack trace of your NPE.

Regards,
Maxim

чт, 5 июл. 2018 г. в 14:48, Prasad Bhalerao :

> Don't want to use that method.  I know that cache is already present on
> server node as it is loaded by loaders and this ignite.cache method is
> present in my common framework.
>
> Thanks,
> Prasad
>
> On Thu, Jul 5, 2018, 5:14 PM Sambhaji Sawant 
> wrote:
>
>> try using
>> ignite.getOrCreateCache("cacheName");
>>
>> On Thu, Jul 5, 2018 at 3:49 PM, Prasad Bhalerao <
>> prasadbhalerao1...@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> I have provided the cache configurations on ignite node which is started
>>> in server mode,but other ignite node which started in client mode does not
>>> have any cache configurations.
>>>
>>> Now case is cache is present on ignite server node. But when I access
>>> the same cache from client node I get NullPointerException when I execute
>>> following code on client node.
>>>
>>> ignite.cache(getCacheName())
>>>
>>> Is it necessary to provide all cache configuration on client node as
>>> well?
>>> If yes why?
>>>
>>> Thanks,
>>> Prasad
>>>
>>
>>


Re: Cache configuration in case of Client mode

2018-07-05 Thread Prasad Bhalerao
Don't want to use that method.  I know that cache is already present on
server node as it is loaded by loaders and this ignite.cache method is
present in my common framework.

Thanks,
Prasad

On Thu, Jul 5, 2018, 5:14 PM Sambhaji Sawant 
wrote:

> try using
> ignite.getOrCreateCache("cacheName");
>
> On Thu, Jul 5, 2018 at 3:49 PM, Prasad Bhalerao <
> prasadbhalerao1...@gmail.com> wrote:
>
>> Hi,
>>
>> I have provided the cache configurations on ignite node which is started
>> in server mode,but other ignite node which started in client mode does not
>> have any cache configurations.
>>
>> Now case is cache is present on ignite server node. But when I access the
>> same cache from client node I get NullPointerException when I execute
>> following code on client node.
>>
>> ignite.cache(getCacheName())
>>
>> Is it necessary to provide all cache configuration on client node as well?
>> If yes why?
>>
>> Thanks,
>> Prasad
>>
>
>


Re: Cache configuration in case of Client mode

2018-07-05 Thread Sambhaji Sawant
try using
ignite.getOrCreateCache("cacheName");

On Thu, Jul 5, 2018 at 3:49 PM, Prasad Bhalerao <
prasadbhalerao1...@gmail.com> wrote:

> Hi,
>
> I have provided the cache configurations on ignite node which is started
> in server mode,but other ignite node which started in client mode does not
> have any cache configurations.
>
> Now case is cache is present on ignite server node. But when I access the
> same cache from client node I get NullPointerException when I execute
> following code on client node.
>
> ignite.cache(getCacheName())
>
> Is it necessary to provide all cache configuration on client node as well?
> If yes why?
>
> Thanks,
> Prasad
>


Cache configuration in case of Client mode

2018-07-05 Thread Prasad Bhalerao
Hi,

I have provided the cache configurations on ignite node which is started in
server mode,but other ignite node which started in client mode does not
have any cache configurations.

Now case is cache is present on ignite server node. But when I access the
same cache from client node I get NullPointerException when I execute
following code on client node.

ignite.cache(getCacheName())

Is it necessary to provide all cache configuration on client node as well?
If yes why?

Thanks,
Prasad


Re: Performance acting as a redis server

2018-07-05 Thread Ilya Kasnacheev
Hello!

The config looks correct. I'll check why ConnectorConfiguration doesn't
have proper string representation, hence:
https://issues.apache.org/jira/browse/IGNITE-8935

Regards,

-- 
Ilya Kasnacheev

2018-07-05 9:21 GMT+03:00 胡海麟 :

> Hi,
>
> I added the config above. But I don't know whether it is applied.
>
> connectorCfg=org.apache.ignite.configuration.ConnectorConfiguration@
> 7d8704ef
>
> There is such a piece of relevant info but no detail. Is there any way
> to confirm the details?
>
> Thanks.
>
> On Wed, Jul 4, 2018 at 7:25 PM, Ilya Kasnacheev
>  wrote:
> > Hello!
> >
> > You should add it to config/default-config.xml in the form of
> >
> >   
> >  > class="org.apache.ignite.configuration.ConnectorConfiguration">
> >   
> > 
> >   
> >
> > inside IgniteConfiguration bean.
> >
> > Come to think of it, maybe your slowdown is caused not by thread
> starvation
> > but by genuine locking due to repeated usage of the same keys. Are you
> sure
> > that you are using a lot of different keys and not just a couple which
> you
> > over-write over and over?
> >
> > Makes sense to try both.
> >
> > Regards,
> >
> > --
> > Ilya Kasnacheev
> >
> > 2018-07-04 13:19 GMT+03:00 胡海麟 :
> >>
> >> Hi,
> >>
> >> After googling for 1 hour to get nothing, I'm back for some basic
> >> knowledges.
> >>
> >> igniteConfiguration.setConnectorConfiguration(new
> >> ConnectorConfiguration().setThreadPoolSize(64))
> >>
> >> I suppose this is a piece of java code but I don't know how and where
> >> to execute it.
> >> I started the cluster with `bin/ignite.sh config/default-config.xml`
> >> and use golang written program as a client.
> >>
> >> Am I missing something?
> >>
> >> Thanks.
> >>
> >> On Wed, Jul 4, 2018 at 6:22 PM, Ilya Kasnacheev
> >>  wrote:
> >> > Hello!
> >> >
> >> > You can try increasing number of threads in REST thread pool by
> setting
> >> > igniteConfiguration.setConnectorConfiguration(new
> >> > ConnectorConfiguration().setThreadPoolSize(64))
> >> > Or the corresponding Spring XML.
> >> >
> >> > This is as per https://apacheignite.readme.io/docs/rest-api
> >> >
> >> > Regards,
> >> >
> >> > --
> >> > Ilya Kasnacheev
> >> >
> >> > 2018-07-04 12:04 GMT+03:00 胡海麟 :
> >> >>
> >> >> Hi,
> >> >>
> >> >> Here is the thread dump.
> >> >>
> >> >> Thank you.
> >> >>
> >> >> On Wed, Jul 4, 2018 at 5:52 PM, Ilya Kasnacheev
> >> >>  wrote:
> >> >> > Hello!
> >> >> >
> >> >> > Can you provide the thread dump collected when the system is under
> >> >> > peak
> >> >> > load?
> >> >> >
> >> >> > I think it's some other thread pool, such as client pool or
> >> >> > management
> >> >> > pool,
> >> >> > but have to take a look at the thread dump to be sure.
> >> >> >
> >> >> > Regards,
> >> >> >
> >> >> > --
> >> >> > Ilya Kasnacheev
> >> >> >
> >> >> > 2018-07-04 11:33 GMT+03:00 胡海麟 :
> >> >> >>
> >> >> >> Hi,
> >> >> >>
> >> >> >> We use ignite as a redis server.
> >> >> >>
> >> >> >> The use case is
> >> >> >> a. Write timeout is 15ms on the client side.
> >> >> >> b. 2 server nodes. each is an EC2 r4.4xlarge instance.
> >> >> >> c. Write req/s is about 120,000. In another word, 60,000 for each
> >> >> >> node.
> >> >> >>
> >> >> >> The problem is that timeout happens frequently, several ones per
> >> >> >> second.
> >> >> >> A lower write req/s results less timeout. I guest we have
> bottleneck
> >> >> >> somewhere.
> >> >> >>
> >> >> >> ==
> >> >> >> $ tail -f
> >> >> >> /opt/apache-ignite-fabric-2.5.0-bin/work/log/ignite-
> ee4f25ed.0.log
> >> >> >> | grep pool
> >> >> >> ^-- Public thread pool [active=0, idle=0, qSize=0]
> >> >> >> ^-- System thread pool [active=0, idle=16, qSize=0]
> >> >> >> ==
> >> >> >> system thread pool seems not busy at all.
> >> >> >>
> >> >> >> ==
> >> >> >> $ tail -f
> >> >> >> /opt/apache-ignite-fabric-2.5.0-bin/work/log/ignite-
> ee4f25ed.0.log
> >> >> >> | grep "CPU "
> >> >> >> ^-- CPU [cur=14.77%, avg=6.21%, GC=0%]
> >> >> >> ^-- CPU [cur=13.43%, avg=6.23%, GC=0%]
> >> >> >> ==
> >> >> >> CPU is not busy, either.
> >> >> >>
> >> >> >> We expected milli second level performance and we have too many
> >> >> >> timeout
> >> >> >> now.
> >> >> >> Any idea for optimizing the performance?
> >> >> >>
> >> >> >> Thanks.
> >> >> >
> >> >> >
> >> >
> >> >
> >
> >
>


Re: Metrics for IgniteDataStreamer

2018-07-05 Thread Evgenii Zhuravlev
Well, then you can just check the cache size after the certain period for
each method and compare it. I'm not sure that the metric for the thing you
want will make any sense - if you will have any pauses in ingestion, this
metric won't be informative at all. At the same time, absolutely the same
information can be rook from cache.size.

Evgenii

2018-07-05 12:06 GMT+03:00 vbm :

> Hi Evgenii,
>
> To compare the 2 ingestion methods (DataStreamer and KafkaConnect), we
> wanted to know what are the key parameters that needs to be monitored. For
> example: How fast the data is being put in cache.
>
>
> Regards,
> Vishwas
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


Re: Metrics for IgniteDataStreamer

2018-07-05 Thread vbm
Hi Evgenii,

To compare the 2 ingestion methods (DataStreamer and KafkaConnect), we
wanted to know what are the key parameters that needs to be monitored. For
example: How fast the data is being put in cache. 


Regards,
Vishwas



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


Re: Metrics for IgniteDataStreamer

2018-07-05 Thread Evgenii Zhuravlev
Hi,

What kind of metrics will help you? Why just checking of the cache size
won't be enough?

Regards,
Evgenii

2018-07-03 19:53 GMT+03:00 vbm :

> Hi
>
> As part of our POC we wanted to compare the ingestion in to ignite using
> Kafka Connect and Ignite Data Streamer.
>
> For comparison, what are the metrics that we can monitor to measure the
> performance.
>
>
> Regards,
> Vishwas
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


Re: Why pageEvictionMode isn't work

2018-07-05 Thread Michaelikus
All nodes are runing same config.




-
Russian telegram Ignite chat at http://t.me/Apache_Ignite_chat
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Classloading error during startup with OSGi in 2.5

2018-07-05 Thread aro
Hi

We have upgraded from Ignite 2.3 to 2.5 and now we are getting a class
loading error during start up. See stacktrace below.
It fails to find class DiscoveryDataClusterState. We are setting the
classloader in config (ContainerSweepClassLoader), just as we did with 2.3.

final IgniteConfiguration config = new IgniteConfiguration();
config.setClassLoader( new ContainerSweepClassLoader(
bundleContext.getBundle(), Ignite.class.getClassLoader() ) );

I tested it by running 2 nodes on the same machine, with the exact same
code.

Any ideas of why it uses the sun.misc.Launcher$AppClassLoader instead of the
one we set in config?


org.apache.ignite.IgniteException: Failed to start manager:
GridManagerAdapter [enabled=true,
name=org.apache.ignite.internal.managers.discovery.GridDiscoveryManager]
at
org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.java:990)
at org.apache.ignite.Ignition.start(Ignition.java:330)
at 
com.enonic.xp.ignite.impl.IgniteCluster.activate(IgniteCluster.java:65)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:222)
at
org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:37)
at
org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:615)
at 
org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:499)
at
org.apache.felix.scr.impl.helper.ActivateMethod.invoke(ActivateMethod.java:295)
at
org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:302)
at
org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:113)
at
org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:866)
at
org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:833)
at
org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:774)
at
org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:347)
at
org.apache.felix.framework.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:247)
at
org.apache.felix.framework.ServiceRegistry.getService(ServiceRegistry.java:343)
at org.apache.felix.framework.Felix.getService(Felix.java:3692)
at
org.apache.felix.framework.BundleContextImpl.getService(BundleContextImpl.java:470)
at
org.apache.felix.scr.impl.manager.SingleRefPair.getServiceObject(SingleRefPair.java:72)
at
org.apache.felix.scr.impl.helper.BindMethod.getServiceObject(BindMethod.java:646)
at
org.apache.felix.scr.impl.manager.DependencyManager.getServiceObject(DependencyManager.java:2137)
at
org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.prebind(DependencyManager.java:389)
at
org.apache.felix.scr.impl.manager.DependencyManager.prebind(DependencyManager.java:1457)
at
org.apache.felix.scr.impl.manager.AbstractComponentManager.collectDependencies(AbstractComponentManager.java:983)
at
org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:812)
at
org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:724)
at
org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:399)
at
org.apache.felix.scr.impl.config.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java:676)
at
org.apache.felix.scr.impl.BundleComponentActivator.initialEnable(BundleComponentActivator.java:339)
at 
org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:360)
at org.apache.felix.scr.impl.Activator.access$000(Activator.java:53)
at
org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:260)
at
org.apache.felix.utils.extender.AbstractExtender.createExtension(AbstractExtender.java:259)
at
org.apache.felix.utils.extender.AbstractExtender.modifiedBundle(AbstractExtender.java:232)
at
org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:482)
at
org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:415)
at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232)
at
org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444)
at

Re: Performance acting as a redis server

2018-07-05 Thread 胡海麟
Hi,

I added the config above. But I don't know whether it is applied.

connectorCfg=org.apache.ignite.configuration.ConnectorConfiguration@7d8704ef

There is such a piece of relevant info but no detail. Is there any way
to confirm the details?

Thanks.

On Wed, Jul 4, 2018 at 7:25 PM, Ilya Kasnacheev
 wrote:
> Hello!
>
> You should add it to config/default-config.xml in the form of
>
>   
>  class="org.apache.ignite.configuration.ConnectorConfiguration">
>   
> 
>   
>
> inside IgniteConfiguration bean.
>
> Come to think of it, maybe your slowdown is caused not by thread starvation
> but by genuine locking due to repeated usage of the same keys. Are you sure
> that you are using a lot of different keys and not just a couple which you
> over-write over and over?
>
> Makes sense to try both.
>
> Regards,
>
> --
> Ilya Kasnacheev
>
> 2018-07-04 13:19 GMT+03:00 胡海麟 :
>>
>> Hi,
>>
>> After googling for 1 hour to get nothing, I'm back for some basic
>> knowledges.
>>
>> igniteConfiguration.setConnectorConfiguration(new
>> ConnectorConfiguration().setThreadPoolSize(64))
>>
>> I suppose this is a piece of java code but I don't know how and where
>> to execute it.
>> I started the cluster with `bin/ignite.sh config/default-config.xml`
>> and use golang written program as a client.
>>
>> Am I missing something?
>>
>> Thanks.
>>
>> On Wed, Jul 4, 2018 at 6:22 PM, Ilya Kasnacheev
>>  wrote:
>> > Hello!
>> >
>> > You can try increasing number of threads in REST thread pool by setting
>> > igniteConfiguration.setConnectorConfiguration(new
>> > ConnectorConfiguration().setThreadPoolSize(64))
>> > Or the corresponding Spring XML.
>> >
>> > This is as per https://apacheignite.readme.io/docs/rest-api
>> >
>> > Regards,
>> >
>> > --
>> > Ilya Kasnacheev
>> >
>> > 2018-07-04 12:04 GMT+03:00 胡海麟 :
>> >>
>> >> Hi,
>> >>
>> >> Here is the thread dump.
>> >>
>> >> Thank you.
>> >>
>> >> On Wed, Jul 4, 2018 at 5:52 PM, Ilya Kasnacheev
>> >>  wrote:
>> >> > Hello!
>> >> >
>> >> > Can you provide the thread dump collected when the system is under
>> >> > peak
>> >> > load?
>> >> >
>> >> > I think it's some other thread pool, such as client pool or
>> >> > management
>> >> > pool,
>> >> > but have to take a look at the thread dump to be sure.
>> >> >
>> >> > Regards,
>> >> >
>> >> > --
>> >> > Ilya Kasnacheev
>> >> >
>> >> > 2018-07-04 11:33 GMT+03:00 胡海麟 :
>> >> >>
>> >> >> Hi,
>> >> >>
>> >> >> We use ignite as a redis server.
>> >> >>
>> >> >> The use case is
>> >> >> a. Write timeout is 15ms on the client side.
>> >> >> b. 2 server nodes. each is an EC2 r4.4xlarge instance.
>> >> >> c. Write req/s is about 120,000. In another word, 60,000 for each
>> >> >> node.
>> >> >>
>> >> >> The problem is that timeout happens frequently, several ones per
>> >> >> second.
>> >> >> A lower write req/s results less timeout. I guest we have bottleneck
>> >> >> somewhere.
>> >> >>
>> >> >> ==
>> >> >> $ tail -f
>> >> >> /opt/apache-ignite-fabric-2.5.0-bin/work/log/ignite-ee4f25ed.0.log
>> >> >> | grep pool
>> >> >> ^-- Public thread pool [active=0, idle=0, qSize=0]
>> >> >> ^-- System thread pool [active=0, idle=16, qSize=0]
>> >> >> ==
>> >> >> system thread pool seems not busy at all.
>> >> >>
>> >> >> ==
>> >> >> $ tail -f
>> >> >> /opt/apache-ignite-fabric-2.5.0-bin/work/log/ignite-ee4f25ed.0.log
>> >> >> | grep "CPU "
>> >> >> ^-- CPU [cur=14.77%, avg=6.21%, GC=0%]
>> >> >> ^-- CPU [cur=13.43%, avg=6.23%, GC=0%]
>> >> >> ==
>> >> >> CPU is not busy, either.
>> >> >>
>> >> >> We expected milli second level performance and we have too many
>> >> >> timeout
>> >> >> now.
>> >> >> Any idea for optimizing the performance?
>> >> >>
>> >> >> Thanks.
>> >> >
>> >> >
>> >
>> >
>
>




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


  

  
  

  

  

  

  

  

  

  
  

  

  

  

  
  
  

  




ignite-1e969a38.0.log
Description: Binary data