You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by Denis Magda <dm...@apache.org> on 2017/08/29 16:27:51 UTC

Re: Ignite 2.1.0 - Thread deadlock on DefaultSingletonBeanRegistry.getSingleton

Igor,

Could you share a test to reproduce the issue?

—
Denis


> On Aug 29, 2017, at 3:59 AM, igor.tanackovic <ig...@gmail.com> wrote:
> 
> Upgraded Ignite from 2.0.0 to 2.1.0 and ran into a thread deadlock on Ignite
> startup. I noticed the deadlock once I added CacheStore into a cache
> configuration which has Spring Data repository injected using
> @SpringResource. Ignite hangs during startup with one of executor threads
> blocked.
> 
> java.lang.Thread.State: BLOCKED (on object monitor)
> 	at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:188)
> 	- waiting to lock <0x0000000790d4e9b8> (a
> java.util.concurrent.ConcurrentHashMap)
> 	at
> org.springframework.beans.factory.support.AbstractBeanFactory.isTypeMatch(AbstractBeanFactory.java:486)
> 	at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:432)
> 	at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:403)
> 	at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:389)
> 	at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveNamedBean(DefaultListableBeanFactory.java:1002)
> 	at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:345)
> 	at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:340)
> 	at
> org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1090)
> 	at
> org.apache.ignite.internal.processors.resource.GridResourceSpringBeanInjector.getBeanByResourceAnnotation(GridResourceSpringBeanInjector.java:122)
> 	at
> org.apache.ignite.internal.processors.resource.GridResourceSpringBeanInjector.inject(GridResourceSpringBeanInjector.java:64)
> 	at
> org.apache.ignite.internal.processors.resource.GridResourceIoc$ClassDescriptor.injectInternal(GridResourceIoc.java:440)
> 	at
> org.apache.ignite.internal.processors.resource.GridResourceIoc$ClassDescriptor.inject(GridResourceIoc.java:470)
> 	at
> org.apache.ignite.internal.processors.resource.GridResourceProcessor.inject(GridResourceProcessor.java:278)
> 	at
> org.apache.ignite.internal.processors.resource.GridResourceProcessor.inject(GridResourceProcessor.java:248)
> 	at
> org.apache.ignite.internal.processors.resource.GridResourceProcessor.injectGeneric(GridResourceProcessor.java:229)
> 	at
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepare(GridCacheProcessor.java:609)
> 	at
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepare(GridCacheProcessor.java:598)
> 	at
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1416)
> 	at
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1867)
> 	at
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCachesOnLocalJoin(GridCacheProcessor.java:1755)
> 	at
> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:619)
> 	at
> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1901)
> 	at
> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
> 	at java.lang.Thread.run(Thread.java:745)
> 
>   Locked ownable synchronizers:
> 	- None
> 
> 
> 
> 
> 
> 
> 
> 
> --
> View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Ignite-2-1-0-Thread-deadlock-on-DefaultSingletonBeanRegistry-getSingleton-tp16481.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Ignite as Cache and Query layer for Cassandra.

Posted by Denis Magda <dm...@gridgain.com>.
Came across this technical gettings started:
https://t.co/KboV0LtPmv?ssr=true

Check it up and share if it helps you more than the existing docs.

Denis

On Thursday, August 31, 2017, Denis Magda <dm...@apache.org> wrote:

> Hello Mark,
>
> The article is not technical, covers only the top of the iceberg and this
> is probably why it confused you a lot.
>
> In short, the conclusion you got
>
> I'm especially interested in not having to migrate any schema's,  nor
> having to pre-load the data into the cache.  (lazy load), which the
> articles imply.
>
>
> is not 100% correct.
>
> Cassandra is a 3rd party store for Ignite (as any RDBMS or NoSQL database)
> and you should create corresponding Ignite schema and fully pre-load data
> in RAM if you plan using SQL. That’s not required only if Ignite Native
> Persistence is used as a disk store. See the differences here:
> https://apacheignite.readme.io/v2.1/docs/distributed-
> persistent-store#section-ignite-native-vs-3rd-party-persistence
>
> Basically, if to follow the earlier provided Cassandra integration doc you
> will be able to stick Ignite and Cassandra together.
>
> P.S.
> I’ve updated the broken links. Thanks for reporting!
>
> —
> Denis
>
> On Aug 31, 2017, at 12:29 PM, Mark Farnan <mark.farnan@petrolink.com
> <javascript:_e(%7B%7D,'cvml','mark.farnan@petrolink.com');>> wrote:
>
> Hi Ilya,
>
> That documentation I saw,  however it seems to describe only using
> Cassandra as a Persistant store for  Ignite Caches,   i.e.
>
> "Ignite Cassandra module implements persistent store
> <https://apacheignite.readme.io/docs/persistent-store> for Ignite caches
> by utilizing Cassandra <http://cassandra.apache.org/>as a persistent
> storage for expired cache records.
> It functions pretty much the same way like CacheJdbcBlobStore
> <https://apacheignite.readme.io/docs/persistent-store#cachejdbcblobstore>
>  and CacheJdbcPojoStore
> <https://apacheignite.readme.io/docs/persistent-store#cachejdbcpojostore>and
> provides such benefits:"
>
> It dosn't seem to describe anywhere, how to set it up over an existing
> large cassandra table structure to act as a cache and SQL query mechanism
> for it.   Nor how to deal with the fact you can't have it all in memory and
> how Writes and Reads would be handled etc.
> Also several of the links on the page are broken.
>
> Ideally want to be able to run ad-hoc SQL queries over the data, including
> joins etc. \
>
> I agree there are config examples, AWS etc,   but  they all seem to me, to
> be for persistance of general cache,  BLOB or POJO,   not for what the
> InfoWorld article described.
>
> Unless I'm missing something obvious !.
>
>
> Regards
>
> Mark.
>
>
>
>
>
> From:        Ilya Kasnacheev <ilya.kasnacheev@gmail.com
> <javascript:_e(%7B%7D,'cvml','ilya.kasnacheev@gmail.com');>>
> To:        user@ignite.apache.org
> <javascript:_e(%7B%7D,'cvml','user@ignite.apache.org');>,
> Date:        08/31/2017 06:56 PM
> Subject:        Re: Ignite as Cache and Query layer for Cassandra.
> ------------------------------
>
>
>
> Hello Mark,
>
> I have found some documentation on how to do what the article describes:
>
> "Apache Ignite can be inserted between Apache Cassandra and an existing
> application layer with no changes to the Cassandra data and only minimal
> changes to the application"
>
> *https://apacheignite-mix.readme.io/docs/ignite-with-apache-cassandra*
> <https://apacheignite-mix.readme.io/docs/ignite-with-apache-cassandra>
>
> On the left you can see there are config examples, tests, AWS
> configuration, etc.
>
> Hope it's good enough.
>
>
> --
> Ilya Kasnacheev
>
> 2017-08-31 16:15 GMT+03:00 Mark Farnan <*mark.farnan@petrolink.com*
> <javascript:_e(%7B%7D,'cvml','mark.farnan@petrolink.com');>>:
> Howdy,
>
> I'm currently evaluating Ignite for a project, and am looking for some
> guidance and project sample for using Ignite over Cassandra as a cache and
> query layer.
> Note: The Cassandra database and schema already exists and is mature.
>
> In a Recent Infoworld post,   (
> *https://www.infoworld.com/article/3191895/application-development/light-a-fire-under-cassandra-with-apache-ignite.html*
> <https://www.infoworld.com/article/3191895/application-development/light-a-fire-under-cassandra-with-apache-ignite.html>)
> it stated
>
> "*No remodeling of Cassandra data*
> Apache Ignite reads from Apache Cassandra and other NoSQL databases, so
> moving Cassandra data into Ignite requires no data modification. The data
> schema can also be migrated directly into Ignite as is. "
>
> However, I can't find in *any* documentation,  or online articles,
>  guidance on just how to do this and there are no links in the article.
>   - The Ignite docs /cassandra section appear to only cover using
> Cassandra as a persistence layer,  not for going over and caching /
> querying an existing schema.   (unless I'm missing something obvious !)
>   - The Youtube video cuts out to blank at the end, so no links are shown.
>    The  links on the slideshare document appear to be broken.
>   -  Can't find any git hub for examples on how to do this (especially not
> for the couple you tube vids)
>
> Can anyone please point me to some working sample code and/or
> documentation on how to do this ?
>
> I'm especially interested in not having to migrate any schema's,  nor
> having to pre-load the data into the cache.  (lazy load), which the
> articles imply.
> Also some of the data would be too large to load it all into Ram anyway.
>
>
> Any assistance greatly appreciated.
>
>
> Regards
>
> Mark.
>
>
>

Re: Ignite as Cache and Query layer for Cassandra.

Posted by Denis Magda <dm...@apache.org>.
Hello Mark,

The article is not technical, covers only the top of the iceberg and this is probably why it confused you a lot.

In short, the conclusion you got

> I'm especially interested in not having to migrate any schema's,  nor having to pre-load the data into the cache.  (lazy load), which the articles imply. 

is not 100% correct.

Cassandra is a 3rd party store for Ignite (as any RDBMS or NoSQL database) and you should create corresponding Ignite schema and fully pre-load data in RAM if you plan using SQL. That’s not required only if Ignite Native Persistence is used as a disk store. See the differences here:
https://apacheignite.readme.io/v2.1/docs/distributed-persistent-store#section-ignite-native-vs-3rd-party-persistence

Basically, if to follow the earlier provided Cassandra integration doc you will be able to stick Ignite and Cassandra together.
 
P.S.
I’ve updated the broken links. Thanks for reporting!

—
Denis

> On Aug 31, 2017, at 12:29 PM, Mark Farnan <ma...@petrolink.com> wrote:
> 
> Hi Ilya, 
> 
> That documentation I saw,  however it seems to describe only using Cassandra as a Persistant store for  Ignite Caches,   i.e.   
> 
> "Ignite Cassandra module implements persistent store <https://apacheignite.readme.io/docs/persistent-store> for Ignite caches by utilizing Cassandra <http://cassandra.apache.org/>as a persistent storage for expired cache records. 
> It functions pretty much the same way like CacheJdbcBlobStore <https://apacheignite.readme.io/docs/persistent-store#cachejdbcblobstore> and CacheJdbcPojoStore <https://apacheignite.readme.io/docs/persistent-store#cachejdbcpojostore>and provides such benefits:"
> 
> It dosn't seem to describe anywhere, how to set it up over an existing large cassandra table structure to act as a cache and SQL query mechanism for it.   Nor how to deal with the fact you can't have it all in memory and how Writes and Reads would be handled etc. 
> Also several of the links on the page are broken. 
> 
> Ideally want to be able to run ad-hoc SQL queries over the data, including joins etc. \ 
> 
> I agree there are config examples, AWS etc,   but  they all seem to me, to be for persistance of general cache,  BLOB or POJO,   not for what the InfoWorld article described. 
> 
> Unless I'm missing something obvious !. 
> 
> 
> Regards 
> 
> Mark. 
> 
> 
> 
> 
> 
> From:        Ilya Kasnacheev <il...@gmail.com> 
> To:        user@ignite.apache.org, 
> Date:        08/31/2017 06:56 PM 
> Subject:        Re: Ignite as Cache and Query layer for Cassandra. 
> 
> 
> 
> Hello Mark,
> 
> I have found some documentation on how to do what the article describes:
> 
> "Apache Ignite can be inserted between Apache Cassandra and an existing application layer with no changes to the Cassandra data and only minimal changes to the application"
> 
> https://apacheignite-mix.readme.io/docs/ignite-with-apache-cassandra <https://apacheignite-mix.readme.io/docs/ignite-with-apache-cassandra>
> 
> On the left you can see there are config examples, tests, AWS configuration, etc.
> 
> Hope it's good enough. 
> 
> 
> -- 
> Ilya Kasnacheev 
> 
> 2017-08-31 16:15 GMT+03:00 Mark Farnan <mark.farnan@petrolink.com <ma...@petrolink.com>>: 
> Howdy, 
> 
> I'm currently evaluating Ignite for a project, and am looking for some guidance and project sample for using Ignite over Cassandra as a cache and query layer.   
> Note: The Cassandra database and schema already exists and is mature.   
> 
> In a Recent Infoworld post,   (https://www.infoworld.com/article/3191895/application-development/light-a-fire-under-cassandra-with-apache-ignite.html <https://www.infoworld.com/article/3191895/application-development/light-a-fire-under-cassandra-with-apache-ignite.html>) it stated 
> 
> "No remodeling of Cassandra data 
> Apache Ignite reads from Apache Cassandra and other NoSQL databases, so moving Cassandra data into Ignite requires no data modification. The data schema can also be migrated directly into Ignite as is. " 
> 
> However, I can't find in any documentation,  or online articles,  guidance on just how to do this and there are no links in the article. 
>   - The Ignite docs /cassandra section appear to only cover using Cassandra as a persistence layer,  not for going over and caching / querying an existing schema.   (unless I'm missing something obvious !) 
>   - The Youtube video cuts out to blank at the end, so no links are shown.    The  links on the slideshare document appear to be broken. 
>   -  Can't find any git hub for examples on how to do this (especially not for the couple you tube vids) 
> 
> Can anyone please point me to some working sample code and/or documentation on how to do this ? 
> 
> I'm especially interested in not having to migrate any schema's,  nor having to pre-load the data into the cache.  (lazy load), which the articles imply. 
> Also some of the data would be too large to load it all into Ram anyway. 
> 
> 
> Any assistance greatly appreciated.   
> 
> 
> Regards 
> 
> Mark. 
> 


Re: Ignite as Cache and Query layer for Cassandra.

Posted by Mark Farnan <ma...@petrolink.com>.
Hi Ilya, 

That documentation I saw,  however it seems to describe only using 
Cassandra as a Persistant store for  Ignite Caches,   i.e. 

"Ignite Cassandra module implements persistent store for Ignite caches by 
utilizing Cassandraas a persistent storage for expired cache records.
It functions pretty much the same way like CacheJdbcBlobStore and 
CacheJdbcPojoStoreand provides such benefits:"

It dosn't seem to describe anywhere, how to set it up over an existing 
large cassandra table structure to act as a cache and SQL query mechanism 
for it.   Nor how to deal with the fact you can't have it all in memory 
and how Writes and Reads would be handled etc. 
Also several of the links on the page are broken. 

Ideally want to be able to run ad-hoc SQL queries over the data, including 
joins etc. \

I agree there are config examples, AWS etc,   but  they all seem to me, to 
be for persistance of general cache,  BLOB or POJO,   not for what the 
InfoWorld article described. 

Unless I'm missing something obvious !. 


Regards

Mark. 





From:   Ilya Kasnacheev <il...@gmail.com>
To:     user@ignite.apache.org, 
Date:   08/31/2017 06:56 PM
Subject:        Re: Ignite as Cache and Query layer for Cassandra.



Hello Mark,

I have found some documentation on how to do what the article describes:

"Apache Ignite can be inserted between Apache Cassandra and an existing 
application layer with no changes to the Cassandra data and only minimal 
changes to the application"

https://apacheignite-mix.readme.io/docs/ignite-with-apache-cassandra

On the left you can see there are config examples, tests, AWS 
configuration, etc.

Hope it's good enough.


-- 
Ilya Kasnacheev

2017-08-31 16:15 GMT+03:00 Mark Farnan <ma...@petrolink.com>:
Howdy, 

I'm currently evaluating Ignite for a project, and am looking for some 
guidance and project sample for using Ignite over Cassandra as a cache and 
query layer.   
Note: The Cassandra database and schema already exists and is mature.   

In a Recent Infoworld post,   (
https://www.infoworld.com/article/3191895/application-development/light-a-fire-under-cassandra-with-apache-ignite.html
) it stated 

"No remodeling of Cassandra data 
Apache Ignite reads from Apache Cassandra and other NoSQL databases, so 
moving Cassandra data into Ignite requires no data modification. The data 
schema can also be migrated directly into Ignite as is. " 

However, I can't find in any documentation,  or online articles,  guidance 
on just how to do this and there are no links in the article. 
  - The Ignite docs /cassandra section appear to only cover using 
Cassandra as a persistence layer,  not for going over and caching / 
querying an existing schema.   (unless I'm missing something obvious !) 
  - The Youtube video cuts out to blank at the end, so no links are shown. 
   The  links on the slideshare document appear to be broken. 
  -  Can't find any git hub for examples on how to do this (especially not 
for the couple you tube vids) 

Can anyone please point me to some working sample code and/or 
documentation on how to do this ? 

I'm especially interested in not having to migrate any schema's,  nor 
having to pre-load the data into the cache.  (lazy load), which the 
articles imply. 
Also some of the data would be too large to load it all into Ram anyway. 


Any assistance greatly appreciated.   


Regards 

Mark. 


RE: Ignite as Cache and Query layer for Cassandra.

Posted by "Roger Fischer (CW)" <rf...@Brocade.com>.
Hi Mark,

I recently did a Proof-of-Concept with Ignite and Cassandra. There are a number of challenges you need to look out for:

1) In order to do SQL queries, you need to have all the data in Ignite. It is not practical to include other persistence layers in the query process.
The exception is Ignite Native Persistence.

2) You need to deploy the POJO for the objects (and keys if they are not basic types) in Ignite. This may become unnecessary in a near-future release.

3) Preloading data is not particularly efficient. Each Ignite node sends the preload query. Each Ignite node ignores the data it is not primary or backup for. It may be possible to optimize this for the case where the partitioning is the same in Ignite and Cassandra.
We wanted to dynamically load data from Cassandra, and thus were sensitive to this point.

4) Things get a bit trickier when the primary keys (partitioning) are not the same in Ignite and Cassandra. Only one key POJO can be deployed in Ignite, and it needs to handle the Ignite and Cassandra use cases.

Data Source is configured at the top level:

    <!-- Cassandra Data Source -->
    <bean id="cassandraDataSource" class="org.apache.ignite.cache.store.cassandra.datasource.DataSource">
        <property name="user" value="cassandra"></property>
        <property name="password" value="cassandra"></property>
        <property name="contactPoints" value="10.24.51.190,10.24.51.187,10.24.51.150,10.24.51.240"/>
        <property name="port" value="9042"/>
    </bean>

Persistence settings for each cache are also at the top level. Here is an example that has a composite primary key and some field name mappings. Note the CDATA section.

    <!-- Persistence settings for PortStats cache -->
    <bean id="PortStatsCachePersistenceSettings" class="org.apache.ignite.cache.store.cassandra.persistence.KeyValuePersistenceSettings">
        <constructor-arg type="java.lang.String">
            <value><![CDATA[
                <persistence keyspace="test_11" table="port_stats">
                    <keyPersistence class="com.abc.poc.icpoc.model.PortStatsKey" strategy="POJO">
                        <partitionKey>
                            <field name="day"/>
                            <field name="group"/>  <!-- hash of switch-id -->
                        </partitionKey>
                        <clusterKey>
                            <field name="dateTime" column="date_time"/>
                            <field name="portId" column="port_id"/>
                        </clusterKey>
                    </keyPersistence>
                    <valuePersistence class="com.abc.poc.icpoc.model.PortStats" strategy="POJO">
                        <field name="portId" column="port_id"/>
                        <field name="dateTime" column="date_time"/>
                        <field name="portType" column="port_type"/>
                        <field name="switchId" column="switch_id"/>
                        <field name="rxUtil" column="rx_util"/>
                        <field name="txUtil" column="tx_util"/>
                    </valuePersistence>
                </persistence>
            ]]></value>
        </constructor-arg>
    </bean>

Lastly, in the cache config, you need to reference the persistence settings. We did not use write-through or write-behind.

                <bean class="org.apache.ignite.configuration.CacheConfiguration">
                    <property name="name" value="PortStatsCache"/>
                    <property name="cacheMode" value="PARTITIONED"/>
                    <property name="backups" value="1"/>

                    <!-- for Cassandra backing store -->
                    <property name="readThrough" value="true"/>
                    <property name="cacheStoreFactory">
                        <bean class="org.apache.ignite.cache.store.cassandra.CassandraCacheStoreFactory">
                            <property name="dataSourceBean" value="cassandraDataSource"/>
                            <property name="persistenceSettingsBean" value="PortStatsCachePersistenceSettings"/>
                        </bean>
                    </property>

Hope this helps.

Roger

From: Ilya Kasnacheev [mailto:ilya.kasnacheev@gmail.com]
Sent: Thursday, August 31, 2017 8:56 AM
To: user@ignite.apache.org
Subject: Re: Ignite as Cache and Query layer for Cassandra.

Hello Mark,

I have found some documentation on how to do what the article describes:

"Apache Ignite can be inserted between Apache Cassandra and an existing application layer with no changes to the Cassandra data and only minimal changes to the application"

https://apacheignite-mix.readme.io/docs/ignite-with-apache-cassandra<https://urldefense.proofpoint.com/v2/url?u=https-3A__apacheignite-2Dmix.readme.io_docs_ignite-2Dwith-2Dapache-2Dcassandra&d=DwMFaQ&c=IL_XqQWOjubgfqINi2jTzg&r=1esZO0r0bYS90lcsaLA6N4AFxuNo6lzauhETGwdJQoQ&m=V1yhk9HVShi4pdJWzPqkw3L6T-IdasiuF8bYdpMPp7w&s=JEswLCWrb1oQBPKMEjakE1kWv0rr5KARYVMUphxYciI&e=>
On the left you can see there are config examples, tests, AWS configuration, etc.
Hope it's good enough.


--
Ilya Kasnacheev

2017-08-31 16:15 GMT+03:00 Mark Farnan <ma...@petrolink.com>>:
Howdy,

I'm currently evaluating Ignite for a project, and am looking for some guidance and project sample for using Ignite over Cassandra as a cache and query layer.
Note: The Cassandra database and schema already exists and is mature.

In a Recent Infoworld post,   (https://www.infoworld.com/article/3191895/application-development/light-a-fire-under-cassandra-with-apache-ignite.html<https://urldefense.proofpoint.com/v2/url?u=https-3A__www.infoworld.com_article_3191895_application-2Ddevelopment_light-2Da-2Dfire-2Dunder-2Dcassandra-2Dwith-2Dapache-2Dignite.html&d=DwMFaQ&c=IL_XqQWOjubgfqINi2jTzg&r=1esZO0r0bYS90lcsaLA6N4AFxuNo6lzauhETGwdJQoQ&m=V1yhk9HVShi4pdJWzPqkw3L6T-IdasiuF8bYdpMPp7w&s=9B2fqNQEKRiN4vS_MCJyh1K_6SCV1xVaPiLVEoqUqUQ&e=>) it stated

"No remodeling of Cassandra data
Apache Ignite reads from Apache Cassandra and other NoSQL databases, so moving Cassandra data into Ignite requires no data modification. The data schema can also be migrated directly into Ignite as is. "

However, I can't find in any documentation,  or online articles,  guidance on just how to do this and there are no links in the article.
  - The Ignite docs /cassandra section appear to only cover using Cassandra as a persistence layer,  not for going over and caching / querying an existing schema.   (unless I'm missing something obvious !)
  - The Youtube video cuts out to blank at the end, so no links are shown.    The  links on the slideshare document appear to be broken.
  -  Can't find any git hub for examples on how to do this (especially not for the couple you tube vids)

Can anyone please point me to some working sample code and/or documentation on how to do this ?

I'm especially interested in not having to migrate any schema's,  nor having to pre-load the data into the cache.  (lazy load), which the articles imply.
Also some of the data would be too large to load it all into Ram anyway.


Any assistance greatly appreciated.


Regards

Mark.


Re: Ignite as Cache and Query layer for Cassandra.

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello Mark,

I have found some documentation on how to do what the article describes:

"Apache Ignite can be inserted between Apache Cassandra and an existing
application layer with no changes to the Cassandra data and only minimal
changes to the application"

https://apacheignite-mix.readme.io/docs/ignite-with-apache-cassandra

On the left you can see there are config examples, tests, AWS
configuration, etc.

Hope it's good enough.


-- 
Ilya Kasnacheev

2017-08-31 16:15 GMT+03:00 Mark Farnan <ma...@petrolink.com>:

> Howdy,
>
> I'm currently evaluating Ignite for a project, and am looking for some
> guidance and project sample for using Ignite over Cassandra as a cache and
> query layer.
> Note: The Cassandra database and schema already exists and is mature.
>
> In a Recent Infoworld post,   (https://www.infoworld.com/
> article/3191895/application-development/light-a-fire-
> under-cassandra-with-apache-ignite.html) it stated
>
> "*No remodeling of Cassandra data*
> Apache Ignite reads from Apache Cassandra and other NoSQL databases, so
> moving Cassandra data into Ignite requires no data modification. The data
> schema can also be migrated directly into Ignite as is. "
>
> However, I can't find in *any* documentation,  or online articles,
>  guidance on just how to do this and there are no links in the article.
>   - The Ignite docs /cassandra section appear to only cover using
> Cassandra as a persistence layer,  not for going over and caching /
> querying an existing schema.   (unless I'm missing something obvious !)
>   - The Youtube video cuts out to blank at the end, so no links are shown.
>    The  links on the slideshare document appear to be broken.
>   -  Can't find any git hub for examples on how to do this (especially not
> for the couple you tube vids)
>
> Can anyone please point me to some working sample code and/or
> documentation on how to do this ?
>
> I'm especially interested in not having to migrate any schema's,  nor
> having to pre-load the data into the cache.  (lazy load), which the
> articles imply.
> Also some of the data would be too large to load it all into Ram anyway.
>
>
> Any assistance greatly appreciated.
>
>
> Regards
>
> Mark.
>

Ignite as Cache and Query layer for Cassandra.

Posted by Mark Farnan <ma...@petrolink.com>.
Howdy, 

I'm currently evaluating Ignite for a project, and am looking for some 
guidance and project sample for using Ignite over Cassandra as a cache and 
query layer. 
Note: The Cassandra database and schema already exists and is mature. 

In a Recent Infoworld post,   (
https://www.infoworld.com/article/3191895/application-development/light-a-fire-under-cassandra-with-apache-ignite.html
) it stated 

"No remodeling of Cassandra data
Apache Ignite reads from Apache Cassandra and other NoSQL databases, so 
moving Cassandra data into Ignite requires no data modification. The data 
schema can also be migrated directly into Ignite as is. "

However, I can't find in any documentation,  or online articles,  guidance 
on just how to do this and there are no links in the article. 
  - The Ignite docs /cassandra section appear to only cover using 
Cassandra as a persistence layer,  not for going over and caching / 
querying an existing schema.   (unless I'm missing something obvious !)
  - The Youtube video cuts out to blank at the end, so no links are shown. 
   The  links on the slideshare document appear to be broken. 
  -  Can't find any git hub for examples on how to do this (especially not 
for the couple you tube vids)

Can anyone please point me to some working sample code and/or 
documentation on how to do this ?

I'm especially interested in not having to migrate any schema's,  nor 
having to pre-load the data into the cache.  (lazy load), which the 
articles imply. 
Also some of the data would be too large to load it all into Ram anyway. 


Any assistance greatly appreciated. 


Regards

Mark. 

Re: Ignite 2.1.0 - Thread deadlock on DefaultSingletonBeanRegistry.getSingleton

Posted by afedotov <al...@gmail.com>.
Denis, yes I can confirm that the issue doesn't stand for 2.0.
I'll drill down into the issue and will file a ticket soon.

Kind regards,
Alex.



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

Re: Ignite 2.1.0 - Thread deadlock on DefaultSingletonBeanRegistry.getSingleton

Posted by "igor.tanackovic" <ig...@gmail.com>.
Denis,

I can confirm the same configuration works in 2.0.



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Ignite-2-1-0-Thread-deadlock-on-DefaultSingletonBeanRegistry-getSingleton-tp16481p16521.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Ignite 2.1.0 - Thread deadlock on DefaultSingletonBeanRegistry.getSingleton

Posted by Denis Magda <dm...@apache.org>.
Alex,

Does it mean you could reproduce the issue in 2.1 and confirm it doesn’t exist in 2.0? I’m curious what happened in 2.1 release so that we got this bug.

—
Denis

> On Aug 29, 2017, at 1:01 PM, afedotov <al...@gmail.com> wrote:
> 
> Hi,
> 
> Looks like with IgniteSpringBean and a @SpringResource configured for a CacheStore a deadlock occurs, since
> IgniteSpringBean singleton creation takes a Spring internal lock and after that tries to start a cache with a CacheStore in a separate thread in a synchronous way,
> it sees that a @SpringResource should be injected, takes the Spring context and tries to fetch a corresponding bean from it, but it implies a corresponding 
> singleton instantiation and the same lock being held by the main thread is attempted to be acquired.
> I will file a ticket for the issue.
> 
> As a workaround you could consider creating Ignite instance in the following way
> @Bean(destroyMethod = "close")
> public Ignite ignite() {
>     return Ignition.start(igniteConfig());
> }
> 
> where igniteConfig() returns proper config. 
> 
> 
> Kind regards,
> Alex.
> 
> On Tue, Aug 29, 2017 at 7:28 PM, Denis Magda-2 [via Apache Ignite Users] <[hidden email] <x-msg://19/user/SendEmail.jtp?type=node&node=16519&i=0>> wrote:
> Igor, 
> 
> Could you share a test to reproduce the issue? 
> 
> — 
> Denis 
> 
> 
> > On Aug 29, 2017, at 3:59 AM, igor.tanackovic <[hidden email] <http://user/SendEmail.jtp?type=node&node=16510&i=0>> wrote: 
> > 
> > Upgraded Ignite from 2.0.0 to 2.1.0 and ran into a thread deadlock on Ignite 
> > startup. I noticed the deadlock once I added CacheStore into a cache 
> > configuration which has Spring Data repository injected using 
> > @SpringResource. Ignite hangs during startup with one of executor threads 
> > blocked. 
> > 
> > java.lang.Thread.State: BLOCKED (on object monitor) 
> > at 
> > org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:188) 
> > - waiting to lock <0x0000000790d4e9b8> (a 
> > java.util.concurrent.ConcurrentHashMap) 
> > at 
> > org.springframework.beans.factory.support.AbstractBeanFactory.isTypeMatch(AbstractBeanFactory.java:486) 
> > at 
> > org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:432) 
> > at 
> > org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:403) 
> > at 
> > org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:389) 
> > at 
> > org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveNamedBean(DefaultListableBeanFactory.java:1002) 
> > at 
> > org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:345) 
> > at 
> > org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:340) 
> > at 
> > org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1090) 
> > at 
> > org.apache.ignite.internal.processors.resource.GridResourceSpringBeanInjector.getBeanByResourceAnnotation(GridResourceSpringBeanInjector.java:122) 
> > at 
> > org.apache.ignite.internal.processors.resource.GridResourceSpringBeanInjector.inject(GridResourceSpringBeanInjector.java:64) 
> > at 
> > org.apache.ignite.internal.processors.resource.GridResourceIoc$ClassDescriptor.injectInternal(GridResourceIoc.java:440) 
> > at 
> > org.apache.ignite.internal.processors.resource.GridResourceIoc$ClassDescriptor.inject(GridResourceIoc.java:470) 
> > at 
> > org.apache.ignite.internal.processors.resource.GridResourceProcessor.inject(GridResourceProcessor.java:278) 
> > at 
> > org.apache.ignite.internal.processors.resource.GridResourceProcessor.inject(GridResourceProcessor.java:248) 
> > at 
> > org.apache.ignite.internal.processors.resource.GridResourceProcessor.injectGeneric(GridResourceProcessor.java:229) 
> > at 
> > org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepare(GridCacheProcessor.java:609) 
> > at 
> > org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepare(GridCacheProcessor.java:598) 
> > at 
> > org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1416) 
> > at 
> > org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1867) 
> > at 
> > org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCachesOnLocalJoin(GridCacheProcessor.java:1755) 
> > at 
> > org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:619) 
> > at 
> > org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1901) 
> > at 
> > org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110) 
> > at java.lang.Thread.run(Thread.java:745) 
> > 
> >   Locked ownable synchronizers: 
> > - None 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > -- 
> > View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Ignite-2-1-0-Thread-deadlock-on-DefaultSingletonBeanRegistry-getSingleton-tp16481.html <http://apache-ignite-users.70518.x6.nabble.com/Ignite-2-1-0-Thread-deadlock-on-DefaultSingletonBeanRegistry-getSingleton-tp16481.html>
> > Sent from the Apache Ignite Users mailing list archive at Nabble.com.
> 
> 
> 
> If you reply to this email, your message will be added to the discussion below:
> http://apache-ignite-users.70518.x6.nabble.com/Ignite-2-1-0-Thread-deadlock-on-DefaultSingletonBeanRegistry-getSingleton-tp16481p16510.html <http://apache-ignite-users.70518.x6.nabble.com/Ignite-2-1-0-Thread-deadlock-on-DefaultSingletonBeanRegistry-getSingleton-tp16481p16510.html>
> To start a new topic under Apache Ignite Users, email [hidden email] <x-msg://19/user/SendEmail.jtp?type=node&node=16519&i=1> 
> To unsubscribe from Apache Ignite Users, click here <applewebdata://88380FA1-10E9-4667-83D5-4FB0F5E56A86>.
> NAML <http://apache-ignite-users.70518.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
> 
> View this message in context: Re: Ignite 2.1.0 - Thread deadlock on DefaultSingletonBeanRegistry.getSingleton <http://apache-ignite-users.70518.x6.nabble.com/Ignite-2-1-0-Thread-deadlock-on-DefaultSingletonBeanRegistry-getSingleton-tp16481p16519.html>
> Sent from the Apache Ignite Users mailing list archive <http://apache-ignite-users.70518.x6.nabble.com/> at Nabble.com <http://nabble.com/>.


Re: Ignite 2.1.0 - Thread deadlock on DefaultSingletonBeanRegistry.getSingleton

Posted by afedotov <al...@gmail.com>.
Hi,

Looks like with IgniteSpringBean and a @SpringResource configured for a
CacheStore a deadlock occurs, since
IgniteSpringBean singleton creation takes a Spring internal lock and after
that tries to start a cache with a CacheStore in a separate thread in a
synchronous way,
it sees that a @SpringResource should be injected, takes the Spring context
and tries to fetch a corresponding bean from it, but it implies a
corresponding
singleton instantiation and the same lock being held by the main thread is
attempted to be acquired.
I will file a ticket for the issue.

As a workaround you could consider creating Ignite instance in the
following way

@Bean(destroyMethod = "close")
public Ignite ignite() {
    return Ignition.start(igniteConfig());
}

where igniteConfig() returns proper config.



Kind regards,
Alex.

On Tue, Aug 29, 2017 at 7:28 PM, Denis Magda-2 [via Apache Ignite Users] <
ml+s70518n16510h44@n6.nabble.com> wrote:

> Igor,
>
> Could you share a test to reproduce the issue?
>
> —
> Denis
>
>
> > On Aug 29, 2017, at 3:59 AM, igor.tanackovic <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=16510&i=0>> wrote:
> >
> > Upgraded Ignite from 2.0.0 to 2.1.0 and ran into a thread deadlock on
> Ignite
> > startup. I noticed the deadlock once I added CacheStore into a cache
> > configuration which has Spring Data repository injected using
> > @SpringResource. Ignite hangs during startup with one of executor
> threads
> > blocked.
> >
> > java.lang.Thread.State: BLOCKED (on object monitor)
> > at
> > org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.
> getSingleton(DefaultSingletonBeanRegistry.java:188)
> > - waiting to lock <0x0000000790d4e9b8> (a
> > java.util.concurrent.ConcurrentHashMap)
> > at
> > org.springframework.beans.factory.support.AbstractBeanFactory.
> isTypeMatch(AbstractBeanFactory.java:486)
> > at
> > org.springframework.beans.factory.support.DefaultListableBeanFactory.
> doGetBeanNamesForType(DefaultListableBeanFactory.java:432)
> > at
> > org.springframework.beans.factory.support.DefaultListableBeanFactory.
> getBeanNamesForType(DefaultListableBeanFactory.java:403)
> > at
> > org.springframework.beans.factory.support.DefaultListableBeanFactory.
> getBeanNamesForType(DefaultListableBeanFactory.java:389)
> > at
> > org.springframework.beans.factory.support.DefaultListableBeanFactory.
> resolveNamedBean(DefaultListableBeanFactory.java:1002)
> > at
> > org.springframework.beans.factory.support.DefaultListableBeanFactory.
> getBean(DefaultListableBeanFactory.java:345)
> > at
> > org.springframework.beans.factory.support.DefaultListableBeanFactory.
> getBean(DefaultListableBeanFactory.java:340)
> > at
> > org.springframework.context.support.AbstractApplicationContext.getBean(
> AbstractApplicationContext.java:1090)
> > at
> > org.apache.ignite.internal.processors.resource.
> GridResourceSpringBeanInjector.getBeanByResourceAnnotation(
> GridResourceSpringBeanInjector.java:122)
> > at
> > org.apache.ignite.internal.processors.resource.
> GridResourceSpringBeanInjector.inject(GridResourceSpringBeanInjector.java:64)
>
> > at
> > org.apache.ignite.internal.processors.resource.GridResourceIoc$
> ClassDescriptor.injectInternal(GridResourceIoc.java:440)
> > at
> > org.apache.ignite.internal.processors.resource.GridResourceIoc$
> ClassDescriptor.inject(GridResourceIoc.java:470)
> > at
> > org.apache.ignite.internal.processors.resource.
> GridResourceProcessor.inject(GridResourceProcessor.java:278)
> > at
> > org.apache.ignite.internal.processors.resource.
> GridResourceProcessor.inject(GridResourceProcessor.java:248)
> > at
> > org.apache.ignite.internal.processors.resource.GridResourceProcessor.
> injectGeneric(GridResourceProcessor.java:229)
> > at
> > org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepare(GridCacheProcessor.java:609)
>
> > at
> > org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepare(GridCacheProcessor.java:598)
>
> > at
> > org.apache.ignite.internal.processors.cache.GridCacheProcessor.
> createCache(GridCacheProcessor.java:1416)
> > at
> > org.apache.ignite.internal.processors.cache.GridCacheProcessor.
> prepareCacheStart(GridCacheProcessor.java:1867)
> > at
> > org.apache.ignite.internal.processors.cache.GridCacheProcessor.
> startCachesOnLocalJoin(GridCacheProcessor.java:1755)
> > at
> > org.apache.ignite.internal.processors.cache.distributed.dht.preloader.
> GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:619)
>
> > at
> > org.apache.ignite.internal.processors.cache.
> GridCachePartitionExchangeManager$ExchangeWorker.body(
> GridCachePartitionExchangeManager.java:1901)
> > at
> > org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>
> > at java.lang.Thread.run(Thread.java:745)
> >
> >   Locked ownable synchronizers:
> > - None
> >
> >
> >
> >
> >
> >
> >
> >
> > --
> > View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/Ignite-2-1-0-Thread-deadlock-on-
> DefaultSingletonBeanRegistry-getSingleton-tp16481.html
> > Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://apache-ignite-users.70518.x6.nabble.com/Ignite-2-
> 1-0-Thread-deadlock-on-DefaultSingletonBeanRegistry-
> getSingleton-tp16481p16510.html
> To start a new topic under Apache Ignite Users, email
> ml+s70518n1h65@n6.nabble.com
> To unsubscribe from Apache Ignite Users, click here
> <http://apache-ignite-users.70518.x6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1&code=YWxleGFuZGVyLmZlZG90b2ZmQGdtYWlsLmNvbXwxfC0xMzYxNTU0NTg=>
> .
> NAML
> <http://apache-ignite-users.70518.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Ignite-2-1-0-Thread-deadlock-on-DefaultSingletonBeanRegistry-getSingleton-tp16481p16519.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.