Re: Cache atomic conditional remove returns error when node leaves cluster

2016-04-15 Thread vkulichenko
Hi, This is possible in ATOMIC cache, because if the client doesn't receive the response from the failed node, it doesn't know if the value was removed or not. It will then get an exception and retry, but if the value was removed on the first iteration, false will be removed. Can you try switchin

Re: Maintaining relationships between tables

2016-04-15 Thread vkulichenko
Hi, You're storing departments and employees as separate objects, right? If so, then there is nothing to update in Employee when Department is updated. After any update, all SQL queries will work on the new data (like in any database), so if you join two tables, you will get new results. Makes se

Re: error in xml config file

2016-04-15 Thread vkulichenko
First link in Google: https://jdbc.postgresql.org/documentation/documentation.html -Val -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/error-in-xml-config-file-tp4235p4243.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: error in xml config file

2016-04-15 Thread tomk
Could you tell more about it ? I cant find information in google about it. -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/error-in-xml-config-file-tp4235p4242.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: executing jar application with ignite server

2016-04-15 Thread Dmitriy Setrakyan
You can also check out the GridGain Add-on listed here: https://ignite.apache.org/addons.html#web-console It will automatically generate all the mapping code between DB and Ignite, as well as provide the store implementation. D. On Fri, Apr 15, 2016 at 4:05 AM, Alexei Scherbakov < alexey.scherba

Re: UPDATE sql query in ignite

2016-04-15 Thread Prachi Garg
You can use IgniteCache.put(key,value) method to store key/value pairs in cache. On Fri, Apr 15, 2016 at 11:31 AM, tusharnakra wrote: > I think you did not understand my question. I want to add a new value to > the > cache, one that is not already present in the database table. > > Example: > >

Re: Database transaction updating more than 1 table from CacheStore

2016-04-15 Thread vkulichenko
The example I provided [1] has this, see line 90. Out of the box Ignite provides JDBC-based CacheJdbcStoreSessionListener, Spring-based CacheSpringStoreSessionListener and Hibernate-based CacheHibernateStoreSessionListener. These three fit majority of cases, but you're always free to implement your

Re: Database transaction updating more than 1 table from CacheStore

2016-04-15 Thread bintisepaha
Val, is there an example of how to use Cache store sessions listeners? -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Database-transaction-updating-more-than-1-table-from-CacheStore-tp4197p4238.html Sent from the Apache Ignite Users mailing list archive at Nabbl

Re: error in xml config file

2016-04-15 Thread vkulichenko
This means that PGPoolingDataSource class doesn't have 'setUrl' method. Quick googling showed that they use separate properties like 'serverName', 'portNumber', etc. You should refer to the JDBC driver documentation to find out how to properly configure it. -Val -- View this message in context:

Maintaining relationships between tables

2016-04-15 Thread akritibahal91
Hi, I want to know if there is any way of maintaining relationships between database tables (stored in caches) in Ignite? Example: Department Table has fields : deptid and dept Employee Table has fields : id, firstname, lastname, deptid Now, if any change in the Department Table is made (say,

error in xml config file

2016-04-15 Thread tomk
I don;t know why, following error is : Caused by: class org.apache.ignite.IgniteCheckedException: Failed to instantiate Spring XML application context [springUrl=file:/home/tomk/downloads/apache-ignite-fabric-1.5.0.final-bin/bin/../config/turbines_table_cluster-server.xml, err=Error creating bean w

Re: UPDATE sql query in ignite

2016-04-15 Thread tusharnakra
I think you did not understand my question. I want to add a new value to the cache, one that is not already present in the database table. Example: Right now the cache has the following: [key=PersonKey [id=2], val=Person [id=2, firstName=Marc, lastName=Robinson, orgid=300, salary=12000]] [key=Pe

Re: UPDATE sql query in ignite

2016-04-15 Thread akritibahal91
I think you did not understand my question. How do I add a new value in my cache (i.e., a new row) which is not already present in the database? Example: Person Cache right now, has: [key=PersonKey [id=2], val=Person [id=2, firstName=Marc, lastName=Robinson, orgid=300, salary=12000]] Entry [key

Re: It it possible to eleminate CacheConfiguration from code java ?

2016-04-15 Thread vkulichenko
You don't need to create Ignite instance on the server node, it's already there. On the client do like this: Ignition.setClientMode(true); Ignite ignite = Ignition.start(...); -Val -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/It-it-possible-to-eleminate-Cac

Re: UPDATE sql query in ignite

2016-04-15 Thread vkulichenko
Write-through is done automatically if you enable it. Refer to [1] for more details. [1] https://apacheignite.readme.io/docs/persistent-store -Val -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/UPDATE-sql-query-in-ignite-tp4180p4231.html Sent from the Apache I

Re: do you support json based cache?

2016-04-15 Thread vkulichenko
How will it complicate it? Ignite's binary format can be easily used for storing JSON object, there is nothing in JSON that is not supported by this format. So the flow will be something like this: 1. User wants to store JSON object in the cache. 2. You code parses JSON and uses BinaryObjectBuilde

Using sql query in ignite

2016-04-15 Thread akritibahal91
Hi, I'm trying to use yoru sql query facility. And I'm doing something like this: String sql = "select orgid from Person where id = ?"; QueryCursor> cursor = cache.query(new SqlFieldsQuery(sql).setArgs(2)); // In this particular

Re: UPDATE sql query in ignite

2016-04-15 Thread tusharnakra
Could you tell me how do I do the following: I want to add a new row to the Person cache,which is currently not present in the Person table. So, first add it to the cache and then write through to the table. The columns in the Person table are "id, firstName, lastName, orgid, salary". How do I do

Re: C++ Distributed cache for caching files

2016-04-15 Thread Vladimir Ozerov
Hi, IGFS is a Hadoop-compliant distributed file system. If your application can work with Hadoop file systems, then you can just setup IGFS on top of it and cache data from Hadoop file system. If you want to employ a kind of POSIX distributed file system, such as NFS, IGFS is not able to work with

Re: spark and ignite - possibilities

2016-04-15 Thread Vladimir Ozerov
Hi, I am not very familiar with ThriftServer unfortunately. You should follow it's documentation to figure out how to make it use custom file system. As per IGFS setup please refer to documentation: https://apacheignite-fs.readme.io/docs/file-system Vladimir. On Thu, Apr 14, 2016 at 5:16 PM, to

Re: Ignite Data Grid with write through mode to HDFS with layer of IGFS

2016-04-15 Thread Vladimir Ozerov
Vij, Yes, cache store is normally used when you want to cache as much data from it as possible. In your case you have two separate data processing modes - one for hot data with possible caching, and another one for historical data. It seems to me that you could just put Ignite cache "near" operati

Re: do you support json based cache?

2016-04-15 Thread Ravi Puri
nopes. It will complicate my json. -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/do-you-support-json-based-cache-tp4160p4224.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Cache atomic conditional remove returns error when node leaves cluster

2016-04-15 Thread Shaun Mcginnity
Hi, I'm attempting to create a distributed locking mechanism using a distributed cache with the atomic putIfAbsent(key, value) and conditional remove(key, value) operations. The cache configuration is as follows: CacheConfiguration [name=lock_data0, storeConcurrentLoadAllThreshold=5, rebalancePo

Re: It it possible to eleminate CacheConfiguration from code java ?

2016-04-15 Thread tomk
I tried to search there. My problem is, that each my app is in client mode. Server is runned using ./bin/ignite.sh -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/It-it-possible-to-eleminate-CacheConfiguration-from-code-java-tp4214p4222.html Sent from the Apache

Re: executing jar application with ignite server

2016-04-15 Thread Alexei Scherbakov
Hi, I strongly recommend you to start from reading Ignite documentation http://apacheignite.readme.io and studiyng examples https://github.com/apache/ignite/tree/master/examples If you specifically want to propagates cache updates to relational database, please check the chapter https://apachei

Re: It it possible to eleminate CacheConfiguration from code java ?

2016-04-15 Thread Denis Magda
I would suggest you start learning Apache Ignite using its examples [1] that showcase how to start node, organize cluster, use caches, computer, queries, etc. [1] https://github.com/apache/ignite/tree/master/examples — Denis > On Apr 15, 2016, at 1:38 PM, tomk wrote: > > Ok, I will show this

Re: It it possible to eleminate CacheConfiguration from code java ?

2016-04-15 Thread tomk
Ok, I will show this webconsole. When it comes to flow in my code - could you refert to this issue ? As you know- for example I don't know where should I create instance of Ignite class. PS xmls files allow me totally eleminate configuration cache from java code ? -- View this message in conte

Re: It it possible to eleminate CacheConfiguration from code java ?

2016-04-15 Thread Alexey Kuznetsov
Hi, @tomk! In addition to Denis answer, I would like to suggest to try WebConsole, see https://ignite.apache.org/addons.html#web-console Web Console will generate XML and Java code, pom file and many more. On Fri, Apr 15, 2016 at 5:23 PM, Denis Magda wrote: > Hi, > > Sure, you can configure y

Re: Off-heap memory usage questions

2016-04-15 Thread Denis Magda
HI Shaomin, I would suggest making a memory snapshot using Visual VM or a similar tool and see which objects consumes so much memory. Make sure to explicitly trigger garbage collection (GC) before making the snapshot because sometimes GC postpones its job depending on the settings. If it’s stil

Re: It it possible to eleminate CacheConfiguration from code java ?

2016-04-15 Thread Denis Magda
Hi, Sure, you can configure your caches in Spring xml configuration. You can refer to this exemplary configuration https://github.com/apache/ignite/blob/master/examples/config/example-cache.xml — Denis > On Apr 15, 2016, at 12:59 PM, tomk wrote: > > Hello, > In my java code I am using CacheCo

Re: executing jar application with ignite server

2016-04-15 Thread tomk
No, I show you my case: I have a program which get data - in cyclic way. When it receives data I compute some things and as result I get row. The row I would like to write-through All program is packed into jar, main funcions look like: main (){ while (true){ row = getNewData (); c

It it possible to eleminate CacheConfiguration from code java ?

2016-04-15 Thread tomk
Hello, In my java code I am using CacheConfiguration to configure such things as cache name, data source (jdbc connection). Is it possible to eleminate this object from java code ? In place of them, I would like to create setting file (xml). -- View this message in context: http://apache-ignite

RE: Off-heap memory usage questions

2016-04-15 Thread Shaomin Zhang
Thank you Val. Another question is that although the reported off-heap memory is not big (around 72M), I observed big heap memory consumption - some as high as 6G. I am not using any expiry policy. Is this normal? Shaomin -Original Message- From: vkulichenko [mailto:valentin.kuliche...