Re: websession clustering problem
Hello. Here is: 2016-03-11 08:22:11,511 ERROR [http-bio-8080-exec-3 ] ROOT - Failed to update web session: null javax.cache.CacheException: class org.apache.ignite.IgniteCheckedException: Failed to deserialize object with given class loader: null at org.apache.ignite.internal.processors.cache.GridCacheUtils.convertToCacheException(GridCacheUtils.java:1618) at org.apache.ignite.internal.processors.cache.IgniteCacheProxy.cacheException(IgniteCacheProxy.java:1841) at org.apache.ignite.internal.processors.cache.IgniteCacheProxy.get(IgniteCacheProxy.java:871) at org.apache.ignite.cache.websession.WebSessionFilter.doFilter0(WebSessionFilter.java:341) at org.apache.ignite.cache.websession.WebSessionFilter.doFilter(WebSessionFilter.java:315) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:436) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) Caused by: org.apache.ignite.IgniteCheckedException: Failed to deserialize object with given class loader: null at org.apache.ignite.marshaller.optimized.OptimizedMarshaller.unmarshal(OptimizedMarshaller.java:222) at org.apache.ignite.internal.binary.BinaryUtils.doReadOptimized(BinaryUtils.java:1470) at org.apache.ignite.internal.binary.BinaryUtils.unmarshal(BinaryUtils.java:1669) at org.apache.ignite.internal.binary.BinaryUtils.unmarshal(BinaryUtils.java:1504) at org.apache.ignite.internal.binary.BinaryUtils.unmarshal(BinaryUtils.java:1495) at org.apache.ignite.internal.binary.GridBinaryMarshaller.unmarshal(GridBinaryMarshaller.java:251) at org.apache.ignite.internal.processors.cache.binary.CacheObjectBinaryProcessorImpl.unmarshal(CacheObjectBinaryProcessorImpl.java:702) at org.apache.ignite.internal.processors.cache.CacheObjectImpl.value(CacheObjectImpl.java:76) at org.apache.ignite.internal.processors.cache.CacheObjectContext.unwrapBinary(CacheObjectContext.java:280) at org.apache.ignite.internal.processors.cache.CacheObjectContext.unwrapBinaryIfNeeded(CacheObjectContext.java:145) at org.apache.ignite.internal.processors.cache.CacheObjectContext.unwrapBinaryIfNeeded(CacheObjectContext.java:132) at org.apache.ignite.internal.processors.cache.GridCacheContext.unwrapBinaryIfNeeded(GridCacheContext.java:1748) at org.apache.ignite.internal.processors.cache.distributed.dht.GridPartitionedSingleGetFuture.setResult(GridPartitionedSingleGetFuture.java:598) at org.apache.ignite.internal.processors.cache.distributed.dht.GridPartitionedSingleGetFuture.mapKeyToNode(GridPartitionedSingleGetFuture.java:396) at org.apache.ignite.internal.processors.cache.distributed.dht.GridPartitionedSingleGetFuture.map(GridPartitionedSingleGetFuture.java:202) at org.apache.ignite.internal.processors.cache.distributed.dht.GridPartitionedSingleGetFuture.init(GridPartitionedSingleGetFuture.java:194) at org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.getAsync0(GridDhtAtomicCache.java:1044) at org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.access$1500(GridDhtAtomicCache.java:128) at org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$12.apply(GridDhtAtomicCache.java:345) at org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$12.apply(GridDhtAtomicCache.java:343) at
Re: Hibernate connection inspite of jdbc?
can U tell me what will be probable error in this part as it throws after returning listner succesfully? code: * cacheCfg.setCacheStoreSessionListenerFactories(new Factory() { @Override public CacheStoreSessionListener create() { CacheHibernateStoreSessionListener lsnr = new CacheHibernateStoreSessionListener(); System.out.println("inside CacheHibernateStoreSessionListener "); lsnr.setHibernateConfigurationPath("hibernate.cfg.xml"); System.out.println("after config CacheHibernateStoreSessionListener"); return lsnr; } }); System.out.println("After listner") cacheCfg.setReadThrough(true); cacheCfg.setWriteThrough(true);* output with error: *inside CacheHibernateStoreSessionListener after config CacheHibernateStoreSessionListener* [12:41:39,033][ERROR][exchange-worker-#49%null%][GridDhtPartitionsExchangeFuture] Failed to reinitialize local partitions (preloading will be stopped): GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=1, minorTopVer=1], nodeId=3152067f, evt=DISCOVERY_CUSTOM_EVT] org.hibernate.HibernateException: Could not parse configuration: hibernate.cfg.xml at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1494) at org.hibernate.cfg.Configuration.configure(Configuration.java:1428) at org.apache.ignite.cache.store.hibernate.CacheHibernateStoreSessionListener.start(CacheHibernateStoreSessionListener.java:155) at org.apache.ignite.internal.processors.cache.GridCacheUtils.startStoreSessionListeners(GridCacheUtils.java:1728) at org.apache.ignite.internal.processors.cache.store.GridCacheStoreManagerAdapter.start0(GridCacheStoreManagerAdapter.java:213) at org.apache.ignite.internal.processors.cache.store.CacheOsStoreManager.start0(CacheOsStoreManager.java:64) at org.apache.ignite.internal.processors.cache.GridCacheManagerAdapter.start(GridCacheManagerAdapter.java:50) at org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCache(GridCacheProcessor.java:1034) at org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1630) at org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1545) at org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:944) at org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:511) at org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1297) at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110) at java.lang.Thread.run(Unknown Source) Caused by: org.dom4j.DocumentException: www.hibernate.org Nested exception: www.hibernate.org at org.dom4j.io.SAXReader.read(SAXReader.java:484) at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1484) ... 14 more [12:41:39,036][ERROR][exchange-worker-#49%null%][GridCachePartitionExchangeManager] Runtime error caught during grid runnable execution: GridWorker [name=partition-exchanger, gridName=null, finished=false, isCancelled=false, hashCode=1755656759, interrupted=false, runner=exchange-worker-#49%null%] java.lang.NullPointerException at org.apache.ignite.internal.processors.cache.GridCacheProcessor.onExchangeDone(GridCacheProcessor.java:1705) at org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.onDone(GridDhtPartitionsExchangeFuture.java:1098) at org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.onDone(GridDhtPartitionsExchangeFuture.java:87) at org.apache.ignite.internal.util.future.GridFutureAdapter.onDone(GridFutureAdapter.java:334) at org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:861) at org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1297) at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110) at java.lang.Thread.run(Unknown Source) -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Hibernate-connection-inspite-of-jdbc-tp3412p3449.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Simple example of write-behind cache
Kobe, No, this is a persistence store [1] implemented using Hibernate. When the cache is updated, it will use Hibernate session to update the database. In case of write-through consistency is guaranteed automatically by Ignite (if cache update fails, it will not update the database, and other way around). If there is a transaction, you can use CacheStoreSession and CacheHibernateStoreSessionListener to maintain ongoing Hibernate transaction and commit it only when the cache transaction is committed (this is also demonstrated in the example). L2 cache is also supported [2], but in this case Ignite is plugged into Hibernate and you use Hibernate API to do updates and reads. [1] https://apacheignite.readme.io/docs/persistent-store [2] https://apacheignite.readme.io/docs/hibernate-l2-cache -Val -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Simple-example-of-write-behind-cache-tp3439p3446.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: index and query org.apache.ignite.spark.IgniteRDD[String,org.apache.spark.sql.Row]
Spark SQL queries has the same problem -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/index-and-query-org-apache-ignite-spark-IgniteRDD-String-org-apache-spark-sql-Row-tp3343p3445.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Simple example of write-behind cache
Val, Could you tell me how this works? Is this like a L2 cache for Hibernate? How is cache coherence maintained? Using Hibernate session listener alone? Thanx, /Kobe vkulichenko wrote > Hi Kobe, > > Take a look at this example: > https://github.com/apache/ignite/tree/master/examples/src/main/java-lgpl/org/apache/ignite/examples/datagrid/store/hibernate > > Sounds like that's exactly what you need. > > -Val -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Simple-example-of-write-behind-cache-tp3439p3444.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: index and query org.apache.ignite.spark.IgniteRDD[String,org.apache.spark.sql.Row]
It looks like we are missing an option to tell IgniteRDD to work with binary objects. When an iterator is created, it tries to deserialize objects, and since you do not have a corresponding class, the exception occurs. I will create a ticket for this shortly. Despite this, you should still be able to query your data using IgniteSQL queries or Spark Data Frame SQL. Can you give it a shot?
Re: Unable to cache beyond RAM memory. Help me PLease!!!
Bhargav, Looks like you're still not subscribed to the mailing list. Can you please do this? Here is the short instruction: http://apache-ignite-users.70518.x6.nabble.com/mailing_list/MailingListOptions.jtp?forum=1 bhargav wrote > Hi, > > Here is the link for the requested server node log > > https://gist.github.com/anonymous/86009408053a778f6f13 > > Please have a look and suggest incase i m missing anything. I'm confused. There are no out of memory in the logs and the latest metrics print out shows that there are 98% free heap: Heap [used=138MB, free=98.65%, comm=1023MB] Is it a full log? I would also recommend to disable FINE logging for Ignite, it's much more verbose than needed right now. -Val -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Unable-to-cache-beyond-RAM-memory-Help-me-PLease-tp3366p3442.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: websession clustering problem
Hi Slavo, Can you provide the whole trace (looks like it's truncated)? -Val -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/websession-clustering-problem-tp3437p3441.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Simple example of write-behind cache
Hi Kobe, Take a look at this example: https://github.com/apache/ignite/tree/master/examples/src/main/java-lgpl/org/apache/ignite/examples/datagrid/store/hibernate Sounds like that's exactly what you need. -Val -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Simple-example-of-write-behind-cache-tp3439p3440.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Avoiding rebalance on process restart
Hi Val, thanks for the reply. This option has avoided the automatic re-balance on failure. I can also see that the server reloads the cache contents when it restarts. Regards, Shaun On Thu, Mar 10, 2016 at 1:33 AM, vkulichenkowrote: > Hi Shaun, > > When the node is stopped, it has to be removed from topology. However, if > you want to avoid rebalancing process happening twice during quick restart, > you can set a delay using CacheConfiguration.setRebelanceDelay() property. > If the restart happens within this delay, there will be only one > rebalancing. > > Let me know if this helps. > > -Val > > > > -- > View this message in context: > http://apache-ignite-users.70518.x6.nabble.com/Avoiding-rebalance-on-process-restart-tp3421p3426.html > Sent from the Apache Ignite Users mailing list archive at Nabble.com. >
Re: CacheStore handles persistence in client node for transactional cache
Hi Kamil, By default TRANSACTIONAL cache invokes store from the node where transaction is started. If this is a client node, then store will be invoked from client. This is done on purpose to allow for transactional writes to store. ATOMIC cache, to the contrast, do not give any transactional guarantees, so it can perform writes to store from primary nodes and hence store is never invoked from clients. You can disable saves from client if you enable write-behind semantics. See CacheConfiguration.writeBehindEnabled property. Vladimir. On Thu, Mar 10, 2016 at 12:32 PM, knowakwrote: > Hi, > > We configured partitioned, transactional cache with server and client nodes > and CacheStore which handles write-through persistence. It seems that, > however, in such model persistence logic (i.e. CacheStore.write() methods) > can be invoked in client node for certain scenarios. > > After browsing posts on this list, it looks this behaviour is intended for > transactional caches when operation originates in client node. > > Is there any way to disable persistence logic on client side for such > configuration, so it works along the same lines as in ATOMIC mode. > > Thanks, > Kamil > > > > > -- > View this message in context: > http://apache-ignite-users.70518.x6.nabble.com/CacheStore-handles-persistence-in-client-node-for-transactional-cache-tp3428.html > Sent from the Apache Ignite Users mailing list archive at Nabble.com. >
Re: Off Heap cache using lots of heap memory
Hi Neil, Could you please attach the code reproducing the problem? Vladimir. On Wed, Mar 9, 2016 at 1:16 PM, Neil Wightmanwrote: > Hi All, > > I have been trying out ignite for the past few weeks but I am hitting a > strange problem. I dont know if this problem is in my code or ignite. > > Currently I have an OFFHEAP_TIERED cache with ~3 million entries, max off > heap size of 4Gb, but this is showing some very high heap memory usage. > The cache stores data for 1 hour then expires it and constantly streams > data into this cache via the dataStreamer.addData API. > > The problem seems to be with this specific expiry policy configuration : > > cacheConfiguration.setExpiryPolicyFactory( FactoryBuilder.factoryOf( new > CreatedExpiryPolicy( Duration.ONE_HOUR ) ) ); > > - with this expiry policy the heap memory usage for the ignite process is > 976Mb, without this expiry policy set its just 156Mb. > > The actual off heap memory usage is only 557Mb (assuming the cache metrics > are correct). > > I have generated two heap dumps and the memory difference is all in the > GridCacheTtlManager which is retaining a heap of ~889Mb according to > Eclipses MAT. > > I have ran my tests with Ignite 1.5.0 Final and 1.6.0 SNAPSHOT from git > (Monday 7th March) and both show the same issue. > > The problem with this large heap usage is that I am now getting very large > GC pauses which I cant stop without disabling the expiry policy. > > My main question is am I doing something wrong? Is the Expiry Policy > really supposed to use so much heap memory compared to the off heap cache > size? > > Thanks in advance, > Neil > > config definition > > final CacheConfiguration cacheConfiguration = > new CacheConfiguration<>( "cacheName" ); > cacheConfiguration.setBackups( 1 ); > cacheConfiguration.setCacheMode( CacheMode.PARTITIONED ); > cacheConfiguration.setIndexedTypes( CustomKey.class, CustomData.class ); > cacheConfiguration.setMemoryMode( CacheMemoryMode.OFFHEAP_TIERED ); > cacheConfiguration.setOffHeapMaxMemory( 4L * 1024L * 1024L * 1024L ); > cacheConfiguration.setEvictionPolicy( new LruEvictionPolicy<>( 6_000_000 ) > ); > cacheConfiguration.setSwapEnabled( true ); > cacheConfiguration.setStatisticsEnabled( true ); > // This causes large memory usage > cacheConfiguration.setExpiryPolicyFactory( FactoryBuilder.factoryOf( new > CreatedExpiryPolicy( Duration.ONE_HOUR ) ) ); > >
Re: C++ Client for SQL Queries
Thanks Igor. I used your master version of the header file and it worked! Thanks for all your help. Arthi -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/C-Client-for-SQL-Queries-tp3407p3433.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: @QuerySqlField for collections
Hi Dmitry, I tried to reproduce you problem in Java using the following code, but without success: public class QueryListRunner { public static void main(String[] args) { IgniteConfiguration cfg = new IgniteConfiguration(); CacheConfigurationccfg = new CacheConfiguration<>(); ccfg.setIndexedTypes(Integer.class, TRow1.class); cfg.setCacheConfiguration(ccfg); try (Ignite node = Ignition.start(cfg)) { IgniteCache cache = node.cache(null); TRow1 val = new TRow1(); val.strP = "1"; val.intP = 2; val.doubleP = 3d; val.listP = Collections.singletonList("4"); cache.put(1, val); System.out.println("TAKEN FROM CACHE: " + cache.get(1).listP); Object queried = cache.query(new SqlFieldsQuery("select strP, intP, doubleP, listP from TRow1")).getAll().get(0).get(3); System.out.println("TAKEN FROM QUERY: " + queried); } } } class TRow1 implements Serializable { @QuerySqlField(index = true) public String strP; @QuerySqlField(index = true) public int intP; @QuerySqlField(index = true) public Double doubleP; @QuerySqlField(index = false) public List listP; } This leads me to assumption that this is a kind of Spark- or Scala-specific problem. *Andrey Gura, * Could you please assist? Vladimir. On Mon, Mar 7, 2016 at 6:15 AM, DmitryB wrote: > Hi Vladimir, > > i tried with java.util.ArrayList[String], got following exception: > > scala> val result = cache.sql("select t1.* from TRow1 as t1").count > 16/03/07 03:23:09 WARN TaskMemoryManager: leak 8.3 MB memory from > org.apache.spark.unsafe.map.BytesToBytesMap@bb96887 > 16/03/07 03:23:09 ERROR Executor: Managed memory leak detected; size = > 8650752 bytes, TID = 1047 > 16/03/07 03:23:09 ERROR Executor: Exception in task 0.0 in stage 23.0 (TID > 1047) > scala.MatchError: [] (of class java.util.ArrayList) > at > > org.apache.spark.sql.catalyst.CatalystTypeConverters$StructConverter.toCatalystImpl(CatalystTypeConverters.scala:255) > at > > org.apache.spark.sql.catalyst.CatalystTypeConverters$StructConverter.toCatalystImpl(CatalystTypeConverters.scala:250) > at > > org.apache.spark.sql.catalyst.CatalystTypeConverters$CatalystTypeConverter.toCatalyst(CatalystTypeConverters.scala:102) > at > > org.apache.spark.sql.catalyst.CatalystTypeConverters$StructConverter.toCatalystImpl(CatalystTypeConverters.scala:260) > at > > org.apache.spark.sql.catalyst.CatalystTypeConverters$StructConverter.toCatalystImpl(CatalystTypeConverters.scala:250) > at > > org.apache.spark.sql.catalyst.CatalystTypeConverters$CatalystTypeConverter.toCatalyst(CatalystTypeConverters.scala:102) > at > > org.apache.spark.sql.catalyst.CatalystTypeConverters$$anonfun$createToCatalystConverter$2.apply(CatalystTypeConverters.scala:401) > at > org.apache.spark.sql.SQLContext$$anonfun$6.apply(SQLContext.scala:492) > at > org.apache.spark.sql.SQLContext$$anonfun$6.apply(SQLContext.scala:492) > at scala.collection.Iterator$$anon$11.next(Iterator.scala:328) > at scala.collection.Iterator$$anon$11.next(Iterator.scala:328) > at > > org.apache.spark.sql.execution.aggregate.TungstenAggregationIterator.processInputs(TungstenAggregationIterator.scala:505) > at > > org.apache.spark.sql.execution.aggregate.TungstenAggregationIterator.(TungstenAggregationIterator.scala:686) > at > > org.apache.spark.sql.execution.aggregate.TungstenAggregate$$anonfun$doExecute$1$$anonfun$2.apply(TungstenAggregate.scala:95) > at > > org.apache.spark.sql.execution.aggregate.TungstenAggregate$$anonfun$doExecute$1$$anonfun$2.apply(TungstenAggregate.scala:86) > at > > org.apache.spark.rdd.RDD$$anonfun$mapPartitions$1$$anonfun$apply$20.apply(RDD.scala:710) > at > > org.apache.spark.rdd.RDD$$anonfun$mapPartitions$1$$anonfun$apply$20.apply(RDD.scala:710) > at > org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:38) > at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:306) > at org.apache.spark.rdd.RDD.iterator(RDD.scala:270) > at > org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:38) > at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:306) > at org.apache.spark.rdd.RDD.iterator(RDD.scala:270) > at > org.apache.spark.scheduler.ShuffleMapTask.runTask(ShuffleMapTask.scala:73) > at > org.apache.spark.scheduler.ShuffleMapTask.runTask(ShuffleMapTask.scala:41) > at org.apache.spark.scheduler.Task.run(Task.scala:89) > at > org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:213) > at > > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at > >
Re: C++ Client for SQL Queries
Arthi, It is known issue [1]. It has been fixed already and this fix is going to be included to the next release. You can try using code from master brach or as a workaround you can try using no-throw method version instead i.e. QueryFieldsRow::GetNext(IgniteError& err). [1] - https://issues.apache.org/jira/browse/IGNITE-2652 Best Regards, Igor On Thu, Mar 10, 2016 at 1:31 PM, arthiwrote: > Thanks Igor. It works! > > I am able to read the values from the cache using the C++ client. > > when I print the values from QueryFieldsCursor, I get a compilation error. > This code follows your examples - > Cache cache = grid.GetOrCreateCache ("myCache"); > > SqlFieldsQuery qry( > "select concat(FirstName, ' ', LastName), Organization.Name " > "from Person, Organization where " > "Person.OrgId = Organization.Id and " > "Person.Salary > ?"); > > qry.AddArgument(1000); > > QueryFieldsCursor cursor = cache.Query(qry); > > // Iterate over results. > while (cursor.HasNext()) > { > QueryFieldsRow row = cursor.GetNext(); > > std::cout << row.GetNext() << " " > << row.GetNext() << std::endl; > } > > > apache-ignite-fabric\platforms\cpp\core\include\ignite/cache/query/query_fields_row.h(112): > error C2440: 'initializing' : cannot convert from 'std::string' to > 'ignite::cache::query::QueryFieldsRow' > > Am I doing something wrong? > > thanks for all your help > Arthi > > > > -- > View this message in context: > http://apache-ignite-users.70518.x6.nabble.com/C-Client-for-SQL-Queries-tp3407p3430.html > Sent from the Apache Ignite Users mailing list archive at Nabble.com. >
Re: C++ Client for SQL Queries
Thanks Igor. It works! I am able to read the values from the cache using the C++ client. when I print the values from QueryFieldsCursor, I get a compilation error. This code follows your examples - Cachecache = grid.GetOrCreateCache ("myCache"); SqlFieldsQuery qry( "select concat(FirstName, ' ', LastName), Organization.Name " "from Person, Organization where " "Person.OrgId = Organization.Id and " "Person.Salary > ?"); qry.AddArgument(1000); QueryFieldsCursor cursor = cache.Query(qry); // Iterate over results. while (cursor.HasNext()) { QueryFieldsRow row = cursor.GetNext(); std::cout << row.GetNext() << " " << row.GetNext() << std::endl; } apache-ignite-fabric\platforms\cpp\core\include\ignite/cache/query/query_fields_row.h(112): error C2440: 'initializing' : cannot convert from 'std::string' to 'ignite::cache::query::QueryFieldsRow' Am I doing something wrong? thanks for all your help Arthi -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/C-Client-for-SQL-Queries-tp3407p3430.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: C++ Client for SQL Queries
Arthi, You can just put your additional libraries to $IGNITE_HOME/libs directory. Best Regards, Igor On Thu, Mar 10, 2016 at 7:56 AM, arthiwrote: > Thanks Igor. > > Well, I tried using a cache config in the XML to start my C++ client. but, > the factory store is not visible to the JNI. > > value="SHOP_ITEM_BITMAP_CACHE" /> > value="PARTITIONED" /> > > class="javax.cache.configuration.FactoryBuilder$SingletonFactory"> > > > class="com.nielsen.poc.aggregation.ignite.datagrid.store.ShopItemBitmapStore"> > > > > > > ... > > > > > The error is - > nested exception is java.lang.ClassNotFoundException: > com.nielsen.poc.aggregation.ignite.datagrid.store.ShopItemBitmapStore > > Seems like a class path issue. Is there a way I can pass on my additional > libraries to the C++ client? > I tried the VS2010 -> project properties -> Linker -> General -> Additional > Library Directories. > It did not work. > > I also tried to set the > std::string stdOpt = > "-Djava.class.path=C:/../aggregation-0.0.1-SNAPSHOT.jar;"; > in the C++ class, that also did not work. > > Can you please help? > > Thanks, > Arthi > > > > -- > View this message in context: > http://apache-ignite-users.70518.x6.nabble.com/C-Client-for-SQL-Queries-tp3407p3427.html > Sent from the Apache Ignite Users mailing list archive at Nabble.com. >
CacheStore handles persistence in client node for transactional cache
Hi, We configured partitioned, transactional cache with server and client nodes and CacheStore which handles write-through persistence. It seems that, however, in such model persistence logic (i.e. CacheStore.write() methods) can be invoked in client node for certain scenarios. After browsing posts on this list, it looks this behaviour is intended for transactional caches when operation originates in client node. Is there any way to disable persistence logic on client side for such configuration, so it works along the same lines as in ATOMIC mode. Thanks, Kamil -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/CacheStore-handles-persistence-in-client-node-for-transactional-cache-tp3428.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.