Re: Cannot connect to web console

2019-02-12 Thread the_palakkaran
Yes I am running on the same node for sure.



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


Cannot connect to web console

2019-02-05 Thread the_palakkaran
Hi,

I have copied ignite-http-rest to libs folder and set default.properties as:
tokens=NlY3
server-uri=https://console.gridgain.com
node-uri=http://127.0.0.1:8080

The url http://localhost:8080/ignite?cmd=version returns success, so the
rest api works correctly.

But I get this error and cannot view dashboard. Please help.

[2019-02-05 16:42:00,603][INFO ][main][AgentLauncher] Starting Apache Ignite
Web Console Agent...
[2019-02-05 16:42:01,501][INFO ][main][AgentLauncher] Connecting to:
https://console.gridgain.com
[2019-02-05 16:42:03,982][INFO ][EventThread][AgentLauncher] Connection
established.
[2019-02-05 16:42:05,059][INFO ][EventThread][AgentLauncher] Authentication
success.
[2019-02-05 16:42:15,070][ERROR][pool-1-thread-1][ClusterListener] WatchTask
failed
java.net.SocketTimeoutException: Connect timed out
at java.net.SocksSocketImpl.readSocksReply(SocksSocketImpl.java:126)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:459)
at java.net.Socket.connect(Socket.java:589)
at okhttp3.internal.platform.Platform.connectSocket(Platform.java:124)
at
okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.java:221)
at
okhttp3.internal.connection.RealConnection.connect(RealConnection.java:147)
at
okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:192)
at
okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:121)
at
okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:100)
at
okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42)
at
okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at
okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at
okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
at
okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at
okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at
okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
at
okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at
okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:120)
at
okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at
okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:185)
at okhttp3.RealCall.execute(RealCall.java:69)
at
org.apache.ignite.console.agent.rest.RestExecutor.sendRequest(RestExecutor.java:169)
at
org.apache.ignite.console.agent.rest.RestExecutor.sendRequest(RestExecutor.java:184)
at
org.apache.ignite.console.agent.handlers.ClusterListener$WatchTask.restCommand(ClusterListener.java:396)
at
org.apache.ignite.console.agent.handlers.ClusterListener$WatchTask.topology(ClusterListener.java:430)
at
org.apache.ignite.console.agent.handlers.ClusterListener$WatchTask.run(ClusterListener.java:486)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)



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


RE: Infinispan vs Ignite?

2018-12-10 Thread the_palakkaran
Andrey,.

I am trying to set up a distributed datagrid for my application. With
Ignite, I can create a cluster of cache nodes for this purpose.

This can alao be achieved on infinispan I believe. 

So what really makes ignite better than infinsipan was my concern.



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


Infinispan vs Ignite?

2018-12-10 Thread the_palakkaran
Hi,

Haven't seen much discussions on this topic. Can some one tell me if ignite
has got significant performance advantage over infinispan in distributed
cache management?



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


Re: Ignite not scaling as expected !!! (Thread dump provided)

2018-12-02 Thread the_palakkaran
Hi Amir,

I have two server nodes and 1 client node. I have two caches, one that holds
entire accounts from DB and another counter cache that is used for counter
operations. The server nodes are deployed on two different nodes and
clustered together. A client that is also on one of the machines of the two
server nodes deployed tries to access data from the caches.


Ignite Configuration is provided below:
*

  
  
  
 

   
  
 

ip1:47500..47509
ip2:47500..47509

  
   

 
  
  




  
  
 

 
  
  
  
 

   
  
 
 
 
 
 
  
   

 
  
  
 












 
  







   
   
   
   
   
   
   
   
   
  
 
  
   


  
  
 

   
   
   
  
   

 
  
  *



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


Ignite not scaling as expected !!! (Thread dump provided)

2018-12-01 Thread the_palakkaran
Hi,

I tried scaling ignite with 10, 20, 50, 100, 200, 500 threads for 1M gets.
The results were not as expected. For example, my application took 19 ms per
record for 20 threads which also took 49 ms per record for 50 threads.

Analyzing thread dump, I could see the below trace in numbers almost
equivalent to number of threads in every single dump I took.

*java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:304)
at
org.apache.ignite.internal.util.future.GridFutureAdapter.get0(GridFutureAdapter.java:177)
at
org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutureAdapter.java:140)
at
org.apache.ignite.internal.processors.cache.GridCacheAdapter.get0(GridCacheAdapter.java:4563)
at
org.apache.ignite.internal.processors.cache.GridCacheAdapter.get(GridCacheAdapter.java:4537)
at
org.apache.ignite.internal.processors.cache.GridCacheAdapter.get(GridCacheAdapter.java:1350)
at
org.apache.ignite.internal.processors.cache.IgniteCacheProxyImpl.get(IgniteCacheProxyImpl.java:907)
at
org.apache.ignite.internal.processors.cache.GatewayProtectedCacheProxy.get(GatewayProtectedCacheProxy.java:608)
at *


I have a transactional cache and another atomic cache. This waiting was
shown for both of them for get operations.

Any suggestions so as to improve this situation is most welcome. Is
increasing system thread pool an option to overcome this?



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


Able to access one cache not able to access another from cluster

2018-11-27 Thread the_palakkaran
Hi,

I have two caches. I am able to write and put into both caches from a
client. Then when I try to check the size of the caches, I am able to access
one Cache from Cluster but not able to access the other. 

Can someone please clarify what is happening? Details given below:

*1. Not able to access Cache*

*Config:*













 
  







*Error:*

[2018-11-27T23:41:20,262][INFO ][tcp-disco-srvr-#2][TcpDiscoverySpi] TCP
discovery accepted incoming connection [rmtAddr=/192.168.79.97,
rmtPort=55131]
[2018-11-27T23:41:20,262][INFO ][tcp-disco-srvr-#2][TcpDiscoverySpi] TCP
discovery spawning a new thread for connection [rmtAddr=/192.168.79.97,
rmtPort=55131]
[2018-11-27T23:41:20,262][INFO ][tcp-disco-sock-reader-#12][TcpDiscoverySpi]
Started serving remote node connection [rmtAddr=/192.168.79.97:55131,
rmtPort=55131]
[2018-11-27T23:41:20,313][INFO
][disco-event-worker-#61][GridDiscoveryManager] Added new node to topology:
TcpDiscoveryNode [id=f1fd3686-fb61-470a-88c7-8ab335b65c1e,
addrs=[0:0:0:0:0:0:0:1, 127.0.0.1, 192.168.79.97],
sockAddrs=[SBSKKWSVM314.com/192.168.79.97:0, /0:0:0:0:0:0:0:1:0,
/127.0.0.1:0], discPort=0, order=19, intOrder=12,
lastExchangeTime=1543342280293, loc=false, ver=2.6.0#20180710-sha1:669feacc,
isClient=true]
[2018-11-27T23:41:20,314][INFO
][disco-event-worker-#61][GridDiscoveryManager] Topology snapshot [ver=19,
servers=2, clients=3, CPUs=52, offheap=29.0GB, heap=9.5GB]
[2018-11-27T23:41:20,314][INFO
][disco-event-worker-#61][GridDiscoveryManager]   ^-- Node
[id=67C07299-BF2E-4EC4-BAAE-C242172616D3, clusterState=ACTIVE]
[2018-11-27T23:41:20,314][INFO
][disco-event-worker-#61][GridDiscoveryManager]   ^-- Baseline [id=0,
size=2, online=2, offline=0]
[2018-11-27T23:41:20,314][INFO
][disco-event-worker-#61][GridDiscoveryManager] Data Regions Configured:
[2018-11-27T23:41:20,314][INFO
][disco-event-worker-#61][GridDiscoveryManager]   ^-- default
[initSize=256.0 MiB, maxSize=6.3 GiB, persistenceEnabled=false]
[2018-11-27T23:41:20,314][INFO
][disco-event-worker-#61][GridDiscoveryManager]   ^-- defaultDataRegion
[initSize=1.0 GiB, maxSize=8.0 GiB, persistenceEnabled=true]
[2018-11-27T23:41:20,315][INFO ][exchange-worker-#62][time] Started exchange
init [topVer=AffinityTopologyVersion [topVer=19, minorTopVer=0], crd=true,
evt=NODE_JOINED, evtNode=f1fd3686-fb61-470a-88c7-8ab335b65c1e,
customEvt=null, allowMerge=true]
[2018-11-27T23:41:20,316][INFO
][exchange-worker-#62][GridDhtPartitionsExchangeFuture] Finish exchange
future [startVer=AffinityTopologyVersion [topVer=19, minorTopVer=0],
resVer=AffinityTopologyVersion [topVer=19, minorTopVer=0], err=null]
[2018-11-27T23:41:20,316][INFO ][exchange-worker-#62][time] Finished
exchange init [topVer=AffinityTopologyVersion [topVer=19, minorTopVer=0],
crd=true]
[2018-11-27T23:41:20,321][INFO
][exchange-worker-#62][GridCachePartitionExchangeManager] Skipping
rebalancing (nothing scheduled) [top=AffinityTopologyVersion [topVer=19,
minorTopVer=0], evt=NODE_JOINED, node=f1fd3686-fb61-470a-88c7-8ab335b65c1e]
[2018-11-27T23:41:20,675][INFO
][grid-nio-worker-tcp-comm-5-#46][TcpCommunicationSpi] Established outgoing
communication connection [locAddr=/192.168.61.6:40834,
rmtAddr=SBSKKWSVM314.com/192.168.79.97:47100]
[2018-11-27T23:41:21,322][ERROR][grid-nio-worker-tcp-comm-3-#44][TcpCommunicationSpi]
Failed to process selector key [ses=GridSelectorNioSessionImpl
[worker=DirectNioClientWorker [super=AbstractNioClientWorker [idx=3,
bytesRcvd=354476686, bytesSent=109157004, bytesRcvd0=0, bytesSent0=704,
select=true, super=GridWorker [name=grid-nio-worker-tcp-comm-3,
igniteInstanceName=null, finished=false, hashCode=1175937895,
interrupted=false, runner=grid-nio-worker-tcp-comm-3-#44]]],
writeBuf=java.nio.DirectByteBuffer[pos=0 lim=32768 cap=32768],
readBuf=java.nio.DirectByteBuffer[pos=0 lim=32768 cap=32768],
inRecovery=GridNioRecoveryDescriptor [acked=0, resendCnt=0, rcvCnt=2,
sentCnt=5, reserved=true, lastAck=0, nodeLeft=false, node=TcpDiscoveryNode
[id=723621a3-3de2-4354-a47b-b828b325300b, addrs=[0:0:0:0:0:0:0:1, 127.0.0.1,
192.168.79.97], sockAddrs=[SBSKKWSVM314.com/192.168.79.97:0,
/0:0:0:0:0:0:0:1:0, /127.0.0.1:0], discPort=0, order=17, intOrder=11,
lastExchangeTime=1543342068589, loc=false, ver=2.6.0#20180710-sha1:669feacc,
isClient=true], connected=false, connectCnt=1, queueLimit=4096,
reserveCnt=1, pairedConnections=false],
outRecovery=GridNioRecoveryDescriptor [acked=0, resendCnt=0, rcvCnt=2,
sentCnt=5, 

Re: Use case difference between CacheLoader, CacheWriter and CacheStore?

2018-11-27 Thread the_palakkaran
Thanks. Should I be using CacheStore or CacheStoreAdapter for my
implementations?



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


Use case difference between CacheLoader, CacheWriter and CacheStore?

2018-11-27 Thread the_palakkaran
Hi,

What is the difference in use case between CacheLoader, CacheWriter and
CacheStore ? CacheStore contains implementations for methods in the other
two, so why should I use them is what makes me confused.

When loading a record using cache store, the query was getting executed in
all the nodes, will this be the same if I use CacheLoader?



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


Re: Values lost when cache is in partitioned mode in cluster

2018-11-26 Thread the_palakkaran
Hi, 

An update :

when I set writeSynchronizationMode as FULL_SYNC, this is working now.
[Seems like a work around, hoping to get a correct solution]

Earlier cache store was getting executed even though I had never invoked its
load method explicitly. Also one time, I got this message in the log:

[2018-11-27T11:47:43,728][INFO ][tcp-disco-sock-reader-#5][TcpDiscoverySpi]
Finished serving remote node connection [rmtAddr=/192.168.79.97:63949,
rmtPort=63949
[2018-11-27T11:47:43,731][WARN ][grid-timeout-worker-#39][TcpDiscoverySpi]
Socket write has timed out (consider increasing
'IgniteConfiguration.failureDetectionTimeout' configuration property)
[failureDetectionTimeout=1, rmtAddr=/192.168.79.97:63949, rmtPort=63949,
sockTimeout=5000]
[2018-11-27T11:48:13,729][WARN
][disco-event-worker-#61][GridDiscoveryManager] Node FAILED:
TcpDiscoveryNode [id=dff2089b-1c8c-4077-8176-389d52241823,
addrs=[0:0:0:0:0:0:0:1, 127.0.0.1, 192.168.79.97],
sockAddrs=[SBSKKWSVM314.suntecsbs.com/192.168.79.97:0, /0:0:0:0:0:0:0:1:0,
/127.0.0.1:0], discPort=0, order=3, intOrder=3,
lastExchangeTime=1543299352342, loc=false, ver=2.6.0#20180710-sha1:669feacc,
isClient=true]
[2018-11-27T11:48:13,730][INFO
][disco-event-worker-#61][GridDiscoveryManager] Topology snapshot [ver=4,
servers=2, clients=0, CPUs=32, offheap=29.0GB, heap=2.0GB]
[2018-11-27T11:48:13,730][INFO
][disco-event-worker-#61][GridDiscoveryManager]   ^-- Node
[id=96FB77AE-5D5A-4D53-B40A-7DBB1A90E429, clusterState=ACTIVE]
[2018-11-27T11:48:13,730][INFO
][disco-event-worker-#61][GridDiscoveryManager]   ^-- Baseline [id=0,
size=2, online=2, offline=0]
[2018-11-27T11:48:13,730][INFO
][disco-event-worker-#61][GridDiscoveryManager] Data Regions Configured:
[2018-11-27T11:48:13,731][INFO
][disco-event-worker-#61][GridDiscoveryManager]   ^-- default
[initSize=256.0 MiB, maxSize=6.3 GiB, persistenceEnabled=false]
[2018-11-27T11:48:13,731][INFO
][disco-event-worker-#61][GridDiscoveryManager]   ^-- defaultDataRegion
[initSize=1.0 GiB, maxSize=8.0 GiB, persistenceEnabled=true]
[2018-11-27T11:48:13,743][INFO ][exchange-worker-#62][time] Started exchange
init [topVer=AffinityTopologyVersion [topVer=4, minorTopVer=0], crd=false,
evt=NODE_FAILED, evtNode=dff2089b-1c8c-4077-8176-389d52241823,
customEvt=null, allowMerge=true]
[2018-11-27T11:48:13,744][INFO
][exchange-worker-#62][GridDhtPartitionsExchangeFuture] Finish exchange
future [startVer=AffinityTopologyVersion [topVer=4, minorTopVer=0],
resVer=AffinityTopologyVersion [topVer=4, minorTopVer=0], err=null]
[2018-11-27T11:48:13,744][INFO ][exchange-worker-#62][time] Finished
exchange init [topVer=AffinityTopologyVersion [topVer=4, minorTopVer=0],
crd=false]
[2018-11-27T11:48:13,757][INFO
][exchange-worker-#62][GridCachePartitionExchangeManager] Skipping
rebalancing (nothing scheduled) [top=AffinityTopologyVersion [topVer=4,
minorTopVer=0], evt=NODE_FAILED, node=dff2089b-1c8c-4077-8176-389d52241823]
[2018-11-27T11:48:42,973][INFO ][grid-timeout-worker-#39][IgniteKernal] 




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


Re: Values lost when cache is in partitioned mode in cluster

2018-11-26 Thread the_palakkaran
I do flush the data in the streamer. Reproducer attached along.
reproducer.zip
  



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


Values lost when cache is in partitioned mode in cluster

2018-11-26 Thread the_palakkaran
Hi,

I have two nodes. A cache which has an Object as Key and a list of Objects
as values is configured in partitioned mode. On a single node every value in
the list is loaded correctly. While started in a cluster of two nodes, even
though the data is queried and put into the cache correctly, afterwards when
I check entries in the cache on both nodes, it is observed that many keys
have lost values from the list of values against it. 

To be specific I expect 4 values as list against a particular key but when I
check there would be 2 or 3 entries only for like 20% of the keys.

Why I think this is a partitioning or rebalancing problem is because it
works fine in a single node and data is not lost at all !!!

Once when I started, all entries were there correctly in the cache, every
other time I had this loss problem which makes me really comfused because
there was no change other than a restart.

Cache is partitioned. Data is loaded using datastreamer through an ignite
service on a node and should get balanced into all other nodes in the
cluster. Persistence is enabled as well as off heap data storage is
configured.

Am I missing any configuration? Is there any chance of serialization issue,
so that I should create a serializable object as value and set tge list into
it?




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


@IgniteInstanceResource not working as expected

2018-11-07 Thread the_palakkaran
Hi,

I have a service from which I create a singleton IgniteQueue. I can get
ignite instance using @IgniteInstanceResouce inside my service but cannot
get it inside my singleton queue implementation. for queue creation. Why is
this so?



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


Is there a provision to apply predicate on values in cache?

2018-10-23 Thread the_palakkaran
Hi,

My cache is like : key vs list of models. (key, ArrayList)

I know that we have ScanQuery to apply filter conditions on keys. Is there a
provision to apply this on values against a particular key at ignite server
node?

Otherwise I will have to pull these list of values to my client side and
apply filter. Any way to bypass?



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


Is it possible to avoid redeployment of an Ignite service n a cluster even if the node bound to it gets down?

2018-10-18 Thread the_palakkaran
Hi,

I have a cache loading service in an ignite cluster. Since cache loading is
expected to be a one time activity, is it possible to avoid a redeployment
if the node bound to it gets down? If it gets deployed again, it will load
cache again, which is not expected.

PS: I have a work around to keep a cache for marking loading complete. I
just want to know if there is a simpler solution.



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


Ignite Service Grid - how to have control over service execution in cluster?

2018-10-17 Thread the_palakkaran
Hi,

Suppose I have three server nodes and using ignite in standalone manner. I
have configured a service for loading my data into cache in all nodes, but
expects only one of them to actually deploy the service as a cluster
singleton.

1. How do I tell my service to execute its execute method only after all
nodes are up and the cluster is activated? Can I do this without another
client node? 

2. The service will be started up (invokes init method) when the first node
starts up. Can I also do this only when the cluster is active without doing
this through a client node?




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


Failed to process selector key error

2018-10-17 Thread the_palakkaran


Hi,

While loading data using streamer, I have the below exception. Why do i get
this error?

>From another thread, there was a hint that it causes due to network lags.
Even if this error occurs, data loading gets complete without any problem.

[grid-nio-worker-tcp-comm-0-#25][TcpCommunicationSpi] Failed to process
selector key [ses=GridSelectorNioSessionImpl [worker=DirectNioClientWorker
[super=AbstractNioClientWorker [idx=0, bytesRcvd=276409905,
bytesSent=480474228, bytesRcvd0=13319971, bytesSent0=12535268, select=true,
super=GridWorker [name=grid-nio-worker-tcp-comm-0, igniteInstanceName=null,
finished=false, hashCode=510309409, interrupted=false,
runner=grid-nio-worker-tcp-comm-0-#25]]],
writeBuf=java.nio.DirectByteBuffer[pos=0 lim=32768 cap=32768],
readBuf=java.nio.DirectByteBuffer[pos=0 lim=32768 cap=32768],
inRecovery=GridNioRecoveryDescriptor [acked=442016, resendCnt=0,
rcvCnt=502951, sentCnt=442032, reserved=true, lastAck=502944,
nodeLeft=false, node=TcpDiscoveryNode
[id=e7651c3d-52cb-42d5-a112-7c7e346a25d0, addrs=[0:0:0:0:0:0:0:1%lo,
127.0.0.1, 192.168.11.134], sockAddrs=[/0:0:0:0:0:0:0:1%lo:47500,
/127.0.0.1:47500, sbstjvmlx222.suntecsbs.com/192.168.11.134:47500],
discPort=47500, order=2, intOrder=2, lastExchangeTime=1539762572477,
loc=false, ver=2.6.0#20180710-sha1:669feacc, isClient=false],
connected=false, connectCnt=1, queueLimit=4096, reserveCnt=2,
pairedConnections=false], outRecovery=GridNioRecoveryDescriptor
[acked=442016, resendCnt=0, rcvCnt=502951, sentCnt=442032, reserved=true,
lastAck=502944, nodeLeft=false, node=TcpDiscoveryNode
[id=e7651c3d-52cb-42d5-a112-7c7e346a25d0, addrs=[0:0:0:0:0:0:0:1%lo,
127.0.0.1, 192.168.11.134], sockAddrs=[/0:0:0:0:0:0:0:1%lo:47500,
/127.0.0.1:47500, sbstjvmlx222.suntecsbs.com/192.168.11.134:47500],
discPort=47500, order=2, intOrder=2, lastExchangeTime=1539762572477,
loc=false, ver=2.6.0#20180710-sha1:669feacc, isClient=false],
connected=false, connectCnt=1, queueLimit=4096, reserveCnt=2,
pairedConnections=false], super=GridNioSessionImpl
[locAddr=/192.168.11.130:36356,
rmtAddr=sbstjvmlx222.suntecsbs.com/192.168.11.134:47100,
createTime=1539762655890, closeTime=0, bytesSent=478235463,
bytesRcvd=264250879, bytesSent0=12535268, bytesRcvd0=13319971,
sndSchedTime=1539762655890, lastSndTime=1539762724840,
lastRcvTime=1539762724840, readsPaused=false,
filterChain=FilterChain[filters=[GridNioCodecFilter
[parser=o.a.i.i.util.nio.GridDirectParser@b36d8a, directMode=true],
GridConnectionBytesVerifyFilter], accepted=false]]]
java.io.IOException: Connection reset by peer
at sun.nio.ch.FileDispatcherImpl.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
at sun.nio.ch.IOUtil.write(IOUtil.java:51)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)
at
org.apache.ignite.internal.util.nio.GridNioServer$DirectNioClientWorker.processWrite0(GridNioServer.java:1649)
at
org.apache.ignite.internal.util.nio.GridNioServer$DirectNioClientWorker.processWrite(GridNioServer.java:1306)
at
org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.processSelectedKeysOptimized(GridNioServer.java:2342)
at
org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.bodyInternal(GridNioServer.java:2110)
at
org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.body(GridNioServer.java:1764)
at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
at java.lang.Thread.run(Thread.java:748)




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


Re: Ignite Service Grid - Anomalous behavior

2018-10-16 Thread the_palakkaran
Does it mean all data will be loaded on all servers and then it will
partition amongst them ?



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


Re: What happens if Server node in a client-server gets down?

2018-10-16 Thread the_palakkaran
1. How does client re-connect to another server if I have mentioned only the
address of leader aka oldest node in its configuration?

2. Suppose I have mentioned all server addresses in my client's
configuration. What if I I need to add a new server node? Then I will need
to restart the client again right?

3. Is it possible to connect client to a cluster without mentioning ip
address of any of the nodes in the cluster in its configuration?

4. I faced a major challenge when I mentioned all server addresses in my
client configuration. When I deployed a service from client as cluster
singleton, it got deployed on all nodes. 



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


Ignite Service Grid - Anomalous behavior

2018-10-16 Thread the_palakkaran
I have a cluster of three nodes. I have a cache loader service that I deploy
from my client node which actually invokes a cache store implementation's
loadCache method. The problem is that the service gets executed on all nodes
means every node loads the same data. 

I tried restricting max no of services in cluster to one. But this time also
it got executed in every node. Then I changed my client's host to only one
node and then deployed the service. Then the service got init only once, but
still the cache store got invoked on all three nodes.

Is there a way to solve this without partitioning loading?



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


What happens if Server node in a client-server gets down?

2018-10-16 Thread the_palakkaran
Hi,

I have a cluster of three nodes and a client that is connected to one of the
node in the cluster. If this node gets down, then the client will throw
exception that cannot connect to the node. Is there a way to dynamically
attach my client to the leader node, means if the leader is down, the client
gets automatically attached to the next leader?



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


How to configure service deployment as cluster node singleton in Ignite Configuration file?

2018-10-16 Thread the_palakkaran
Hi,

I have a service that needs to be deployed in a cluster of three nodes. But
I want only one node to run it. How can I restrict it? I have tried setting 

1)maxPerNodeCount=1 and totalCount=1
2)totalCount=1

Still on all nodes the service is getting run.

Also, what is the equivalent to services.deployClusterSingleton() in
IgniteConfigruation.xml?



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


Re: Configuration does not guarantee strict consistency betweenCacheStore and Ignite data storage upon restarts.

2018-10-09 Thread the_palakkaran
How do I tell Ignite to include a node in the baseline topology? Isn't it the
hosts that I set to TCPIpFinder? Also, is it possible to dynamically add a
new node to the cluster?



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


RE: Configuration does not guarantee strict consistency betweenCacheStore and Ignite data storage upon restarts.

2018-10-09 Thread the_palakkaran
Did not fully understand what it says, but does it like even if values in my
DB is changed, it wont automatically get updated into the ignite cache? Or
is the concept something else? I just have a read through enabled cache.

I also had the below error before it, just noticed. Is it related to the
other?

Local node is not included in Baseline Topology and will not be used for
persistent data storage. Use control.(sh|bat) script or IgniteCluster
interface to include the node to Baseline Topology.






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


Configuration does not guarantee strict consistency between CacheStore and Ignite data storage upon restarts.

2018-10-09 Thread the_palakkaran
Hi,

Why do I get the below error while starting up ignite clustered?

Both Ignite native persistence and CacheStore are configured for cache
'cacheStoresExampleCache'. This configuration does not guarantee strict
consistency between CacheStore and Ignite data storage upon restarts.
Consult documentation for more details. 




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


How to schedule and ignite service to run every 5 seconds?

2018-10-07 Thread the_palakkaran
The default scheduling happens every 1 minute. Is it possible to override it
and make it every 5 seconds?

SchedulerFuture schedulerFuture = ignite.scheduler().scheduleLocal(
new Callable() {
private int invocations = 0;

@Override
public Integer call() {
invocations++;
ignite.compute().broadcast(
new IgniteRunnable() {

@Override public void run() {

System.out.println("Running");
}
}
);
return invocations;
}
},
"{5, 3} * * * * *" // Cron expression.
);



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


Is it possible to schedule an ignite service?

2018-10-07 Thread the_palakkaran
Hi,

Is it possible to schedule an ignite service that is deployed on multiple
nodes to run at periodic intervals?



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


Cache.get() while read through enabled throws closed result set exception

2018-10-07 Thread the_palakkaran
Hi,

I have read through enabled. I clear a key from cache inside an ignite
service and invoke cache.get() so as to get the latest value from db (it
will execute load() method in cachestore adapter). When this is happening, I
try to execute cache.get() from another service which gives me the above
exception. Is there any other way to do this ? Can I invoke methods in
cachestore adapter directly?



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


Is there a way for ignite cache to know data update in DB and refresh ?

2018-10-04 Thread the_palakkaran
Hi,

Is there a way in ignite to know if the original value in DB has been
updated so as to refresh it in cache that has persistence enabled?



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


How to check if key exists in DataStreamer buffer so that it can be flushed?

2018-08-28 Thread the_palakkaran
Hi,

I have a data streamer to load data into a cache. While loading I might need
to update value of a particular key in cache, so I need to check if it is
already there in the streamer buffer. If so, either I need to update value
against that key in the buffer or I need to flush the data in the streamer
and then update. Is there a way to do this?



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


Re: H2 performs better than ignite !!?

2018-08-09 Thread the_palakkaran
Yes, I am running on a single node. Still ignite being in-memory, I expected
it to perform better than H2. Is there anything I can do to make it faster?
Like right now I have a single data region, does having multiple data
regions give me better performance? Something like that?



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


H2 performs better than ignite !!?

2018-08-09 Thread the_palakkaran
Hi,

When I tried running few db lookup scenarios in H2 and ignite, I got better
performance for H2. All were basic db operations like =, <=, >=.

These were the figures for 2million records(2 lookups for one record)

H2 : 3 minutes

Ignite (cache gets based on keys) : 3.4 minutes

Ignite (SQLFields query based) : 5 minutes

Below is my sample cache config:

cacheConfig = new CacheConfiguration<>("paramControlCache");
cacheConfig.setIndexedTypes(Key.class, Model.class;
cacheConfig.setReadThrough(false);
cacheConfig.setAtomicityMode(ATOMIC);
cacheConfig.setCacheMode(CacheMode.PARTITIONED);
cacheConfig factory = new CacheCacheFactory();
cacheConfig.setCacheStoreFactory(factory);
cacheConfig.setDataRegionName("CacheDataRegion");
cacheConfig.setOnheapCacheEnabled(true);

How does this happen? Is there something I am missing out ??





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


Re: Quick questions on Evictions

2018-06-20 Thread the_palakkaran
So to conclude, if I have enabled on heap storage for cache(using
cache.setOnHeapEnabled(true),
then :
1. Still data will be stored off heap, but will be loaded to heap. To escape
out of memory error, I have to set eviction policies.
2. Off heap entries will be written to disk based on data page eviction mode
enabled on data region. This size is limited based on initial and maximum
size of data region.

I hope this is how it works. Big thanks !!



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


Re: Quick questions on Evictions

2018-06-19 Thread the_palakkaran
So how do I limit cache size if ignite native persistence is enabled using
dataRegionCfg.setPersistenceEnabled(true)? I don't want it to keep a lot of
data in memory and others may be kept on disk. That is the requirement.

Also, I do have on heap cache enabled. But I read in many threads that
Ignite stores everything off heap and only references may be kept in java
heap. So how do I limit off heap cache usage? I mean I don't want to it to
use more than a particular amount of off heap memory?



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


Re: Quick questions on Evictions

2018-06-18 Thread the_palakkaran
Hi,

DataPageEvictionMode is deprecated now, right? What should I do to evict my
off heap entries? Also, can I limit off heap memory usage?



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


Re: Cache Configuration for a data region

2018-06-18 Thread the_palakkaran
Do I need to configure something else for off heap eviction?

I have on heap enabled and set eviction policy(LRU). Max size of 1MB also
provided. I have 1.5million data, so obviously it some entries loaded in the
start should be evicted. Still when I try to get those entries, I get
performance equivalent to the cache on heap reads. Is this normal or am I
missing something?

As per the thread below, I need to set some data page eviction too, but
official documentation says it is deprecated,

http://apache-ignite-users.70518.x6.nabble.com/Quick-questions-on-Evictions-td16632.html



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


Re: Cache Configuration for a data region

2018-06-18 Thread the_palakkaran
Thanks, every thing other than native vs durable is now clear for me.

I guess durable memory is pure RAM based and native persistence is
combination of both RAM and disk.

How to manipulate durable memory? Can I configure it?



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


Re: Cache Configuration for a data region

2018-06-18 Thread the_palakkaran
Hi,

1. I have set setOnheapCacheEnabled(true) for every cache. This means they
will go into java heap right?

2. Is it possible for me to take control of this durable memory? What should
essentially be kept there? How to do that? I don't clearly understand the
difference between durable memory and persistence.

3. If I have enabled persistence and also set LRU eviction policy correctly,
does this mean during loading also this eviction policy will work and I
would never get an out of memory error?

4. How to check if the read happened from ignite persistence(disk) or
memory?



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


Cache Configuration for a data region

2018-06-18 Thread the_palakkaran
Hi,

I have multiple on heap caches attached to a data region of maximum 1GB size
durable memory. I have 512MB heap memory specified also.

Is it possible for me to set the size of this cache to take maximum of 100MB
and store the remaining in durable memory? Otherwise, won't it be using the
entire 2GB if new entries are put into it?

Or can this only be done using eviction policies?



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


Local peek from client on a server node in a cluster

2018-06-13 Thread the_palakkaran
Hi, 

Is it possible to local peek on a server node using a client node, so that I
can know what entries are there in the cache in partitions that are present
on that node? 




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


Local peek from client

2018-06-13 Thread the_palakkaran
Hi,

Is it possible to local peek on a server node using a client node, so that I
can know what entries are there in the cache in partitions that are present
on that node?

Also will entries of a cache be in multiple partitions on the same node? Or
can a partition have entries of different cache ?



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


Re: How to use Affinity Function to Map a set of Keys to a particular node in a cluster?

2018-06-13 Thread the_palakkaran
Thanks for the detailed reply, now everything makes more sense to me.

1.Do I have a control over number of partitions ignite makes? I think this
is done using affinity.setPartitions(5) right? 

2. Can I tell ignite to have a single partition of my cache in each node? [5
nodes => 5 partitions]

Your suggestion method 1 will have worked for me, if I knew in which
partition of which node all entries marked with (int) affinity = 1 --> means
ranging from 1-1. I know about using
CacheConfiguration().getAffinityFunction().partition(Object key), but I
can't use this for each record, I need to know it in prior. And I also need
to know details of partitions against node.



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


Re: How to use Affinity Function to Map a set of Keys to a particular node in a cluster?

2018-06-12 Thread the_palakkaran
Hi Val,

My requirement is something like this:

5 nodes, 5 customers.

I will keep data of 1 on each node.

Whenever a file in the range 1-1 is coming in, I will process it in node
1, so that the read time is minimal (rather than looking for data on all
nodes).

I hope you got my requirement.



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


Re: How to use Affinity Function to Map a set of Keys to a particular node in a cluster?

2018-06-12 Thread the_palakkaran
The requirement is an actual scenario, mate. I would have explained it if it
was not a public forum.

Also this is now a personal interest of mine, you have a great product,
buddy.

What are those "partitioning" mechanisms?



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


Re: How to use Affinity Function to Map a set of Keys to a particular node in a cluster?

2018-06-12 Thread the_palakkaran
Thanks a ton man !!

One last doubt.

Will this overridden partition method be invoked everytime a new node is
added to the cluster? (Since there can be a new partition created at that
time). 

Similarly, when one node in the cluster is down, hence one partition is
gone, then also will this be invoked everytime so that rebalancing is done?

Would have tried this and checked on my own, but its hard to peek in a node
for the cache entries that it has in it.



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


Re: How to use Affinity Function to Map a set of Keys to a particular node in a cluster?

2018-06-12 Thread the_palakkaran
Thanks a ton again.

Still few more doubts :

//It's much better if you in AffinityFunction.partition() method will 
calculate node according to your key. If you have key 1-1 it should go 
to partitions that belong to a single node. But at the same time method 
assignPartitions() should assign related partitions to the same node. //


1. AffinityFunction.partition() will calculate the partition where it will
be gone into. How to know which node/machine is this partition in? Is there
an API for this?

2.  // If you have key 1-1 it should go to partitions that belong to a
single node // 

How can I be sure about this? or how can I force this? Since the ids are
unique and does not have anything in common.

3.  //But at the same time method assignPartitions() should assign related
partitions to the same node.//
is this used for assigning partitions to nodes? when I checked, this returns
something else?

And finally and most importantly, this will all
work(load,rebalance,failover) if I load data from a single node and other
nodes won't have any data loading part.




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


Re: How to use Affinity Function to Map a set of Keys to a particular node in a cluster?

2018-06-12 Thread the_palakkaran
Actually my requirement is something like the below:

I have customers with customer numbers from 1 to 5, I have 5 nodes.
I need my first 1 in node1, next 1 in node2 and so on.
So I guess I cannot do that here.

Again about the below:

//AffinityFunction does two things: maps partitions to nodes and keys to 
partitions. If you override RendezvousAffinityFunction in that way, when 
partitions 1-4 will go to node 1, you need to make sure that your keys will 
fall into that partitions. //

Does this mean a node can have multiple partitions? How to make it single
partition on a single node so that if I have 5 nodes, then there shall be
maximum 5 partitions?




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


Re: How to use Affinity Function to Map a set of Keys to a particular node in a cluster?

2018-06-12 Thread the_palakkaran
Thanks.

I still have few doubts:

1. If I have a customer id, customer number, customer name fields in
CustomerKey, but only customer number is unique, I should annotate only
customer number with @@AffinityKeyMapped. Is that so? 

2. If so, ignite internally decides which node a key with the annotation
should always go into, right? To overcome this, are you suggesting
Rendezvous Affinity Function?

3. How do I get Rendezvous Affinity Function instance? How do I map it with
a node, say N1 in a cluster of 3 nodes N1,N2,N3 ?

Sorry to ask for spoon feeding, I am in a hurry to complete this, that is
why.



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


How to use Affinity Function to Map a set of Keys to a particular node in a cluster?

2018-06-12 Thread the_palakkaran
Hi,

How can I use Affinity Function to map a set of keys (may be an id range) to
a particular node? 

What I need is that all the time this node will be responsible for
loading/handling these set of keys. 

Also if there is a node failure, this should be distributed to other nodes.



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


Ignite Backup doubts

2018-06-08 Thread the_palakkaran
Hi,

I have 3 nodes. I have my caches on heap enabled. Also I have persistence
enabled. I have configured 2 backups for each cache. 

As I understand, I can use RendezvousAffinityFunction to exclude neighbors,
so that backup of a cache in Node-1 on a Machine-1 will be stored in a
machine other than itself.

Now, because of this at any point of time, there can be at least a primary
of the same node and a backup of some other node on a single machine. 

My doubt is, 

(1) Will my cache.get(key) be run on the primary and backups on the machine? 
If so, can I limit this ? 

(2) Also, every time I do a get operation or query, will it be executed on
every node?

(3) Again is there an optimal backup configuration based on an N number of
nodes?

(4) When a node in the cluster is down, will another backup be created for
the primary and backups that were on that node on other available nodes?



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


Re: Ignite clustering doubts

2018-06-07 Thread the_palakkaran
Why do I want to map keys to partition ids? Can you tell me more, please? 

By keys, it means the keys used for the cache right? If so, particular keys
will always go to some node, is that so?



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


Re: Ignite clustering doubts

2018-06-07 Thread the_palakkaran
Wow ! Thanks a ton. If there was an upvote thing here,I would have surely
broke it.

Can you tell me what is the need of AffinityFunction then? Also can I
control this Rendezvous Hashing?




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


Ignite clustering doubts

2018-06-07 Thread the_palakkaran
Hi,

The below is my scenario:

I have a CustomerCache. I have externalizable keys and models. Customers ids
range from 1 to 4. I have 4 nodes.

I have few doubts on clustering in ignite:

1. How can I restrict 1 records on each node?

2. How does ignite distribute records between each node? On what basis? Is
there any relevance of AffinityFunction here? Is there a demo of how to use
that ?

3. How would fail over and re-balancing work when a node fails?

4. Do I need to configure number of backups? Is the number of backups
dependent on number of nodes?

5. Will I have any problem to access data from any of these nodes or a
client node since I have used externalization?

6. Is there any possible way to query data on a single node? 

7. Leader election is based on age, as per documentation. Can I control this
election?

8. Zero deployment means I do not need to have models deployed on every
class right? Is this the same case for externalized models?



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


Re: Does equals method have relevance in Custom Key Class

2018-06-06 Thread the_palakkaran
But you cannot use simple datatypes all the time in a real scenario, right? I
mean when you need to get results based on multiple fields/columns [unless I
form a key or something based on them]

As per different discussions here in the forum and from some demo stubs, I
understand performance of ignite in the order high to low will be :

1. Using Binary Objects direct get
2. Using normal serialiazable objects
3. Using Externalizable direct get
4. Using SQLField query [ queries will always be the one taking most
performance, from my experience]



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


Re: Does equals method have relevance in Custom Key Class

2018-06-06 Thread the_palakkaran
Hi Andrew,

Thanks for the reply.

I have two more doubts:

1. So rather than a Custom key, you are suggesting to use simple types like
Integer, Long, etc, right? Why is this so?

2. What does indices with proper inline size mean ? Also, more indices does
not necessarily give better performance right?





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


How Ignite performs cache.get() operation when hashCode is overridden ?

2018-06-06 Thread the_palakkaran
 


See the image attached. I have put keys into the cache using the equals
method as follows:


@Override
  public boolean equals(Object obj) {
HierarchyMasterKey hierarchyMasterKey = (HierarchyMasterKey) obj;
return equalTo(this.hmCustNo, hierarchyMasterKey.hmCustNo) &&
  equalTo(this.hmFromDate, hierarchyMasterKey.hmFromDate) &&
  equalTo(this.hmParentCustNo,
hierarchyMasterKey.hmParentCustNo) &&
  equalTo(this.hmActNo, hierarchyMasterKey.hmActNo);
  }

(equalTo method is basically null safe equals check.)

and hashCode is computed as below:

@Override
public int hashCode() {
return Objects.hash(hmCustNo,hmActNo);
}


When I try to get from it,
the equals method won't get executed. Why is this so? How does ignite get
the key without executing equals?

[I have a cache that has a HierarchyMasterKey and a list of HierarchyMaster
as values]





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


Re: Does equals method have relevance in Custom Key Class

2018-06-04 Thread the_palakkaran
The SQL queries are not getting me performance that I want. So I was trying
for alternative methods to handle the same using get. 

Like getting the data using cache.get() and filtering them with the sql
operations that I actually wanted to do.

Suppose I have an equals method which will have two return cases working
based on a field value "Y" or "N". So there are basically two cases in
equals which will get executed based on the field value. That way I can get
results differently, right?

for example in a customer key class, I have a customer id and a customer
number fields. In my equals method I have something like this:

if("Y".equals(field))
return (null != this.custNo && null != custNo &&
this.custNo.compareTo(CustomerMaster.custNo) == 0)
else
return (null != this.custId && null != custId &&
this.custId.compareTo(CustomerMaster.custId) == 0)

This would fetch me records differently, right?



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


Doubts regarding using externalizable in model classes

2018-06-04 Thread the_palakkaran
I have 3 doubts, 

1. My model classes are externalizable. Still they can be queried using
SQLFieldsQuery at server node without any problem right?

2. Externalizable items cannot be queried from a client node in remote,
right? Is there a way to make it happen at client ?

3. Are there any other limitations using externalizable or any performance
concerns?



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


Re: While using Externalizable, possible to do SQLFieldsQuery, but not cache.get()

2018-06-04 Thread the_palakkaran
Sorry, the problem was that I had a wrong hash code implementation. Now when
I implemented it correctly, this works fine.



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


Re: How to use Binarylizable interface or Externalizable on my custom Key?

2018-06-04 Thread the_palakkaran
I figured out the solution for this. 

Just implement Externalizable and you can override equals and hashcode
method.

//Key is unique for each cache entry. So, it is impossible to get entry by a
part of key.//

I understand that, I was checking for a way to do that.

Thanks a lot for the confirmation, Andrew.




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


While using Externalizable, possible to do SQLFieldsQuery, but not cache.get()

2018-06-04 Thread the_palakkaran
Hi,

I have both my Key and Model classes implementing Externalizable. I am able
to put data into it correctly and also to do SQLFieldsQuery on it
successfully. But when I use the same cache object to get value by passing a
Key, it always returns null.

Why does this happen?



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


Re: How to use Binarylizable interface or Externalizable on my custom Key?

2018-06-04 Thread the_palakkaran
Hi Andrew,

I need to somehow override the equals and hashcode method in my key class.

ie;

I have a CustomerKey and CustomerModel configured in a customerCache. I need
to get results from the cache based on the key class that I am passing to
the cache for query. 

like when I pass a key class to the cache that has an equals method in which
I have something like customerNumber == obj.CustomerNo, I need to get
results based on it. So basically during put to cache also, this equals
method should have been executed.

Is there any way I could achieve this using Binary Objects or Binarylizable
or Externalizable ?



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


How to use Binarylizable interface or Externalizable on my custom Key?

2018-06-04 Thread the_palakkaran
Hi,

I understand that by default, ignite does not allow override hash code and
equals method. I need it to handle my scenarios, so i came across
Binarylizable interface.

How to do this? Not so clear from documentation.



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


Does equals method have relevance in Custom Key Class

2018-06-01 Thread the_palakkaran
Hi,

Does overriding equals method in my CustomKey class has any relevance in
cache.put and cache.get ? When I checked, they were not getting executed
while put and get.

Also I understand that ignite does not want us to override of equals method
in Binary Objects. Is there any way to override this? 

Suppose I have multiple CustomKeys that implement BinaryObject, then it
would have been benefical if I could just use theys keys to get results
diffrently.

For eg:  A custom key has an equals method that checks for a field to be
equal to 0 and for another key has an equals method that checks for a field
to be equal to 1.

When I tried, custom key to BinaryObjectEx casting exception was being
thrown.



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


Re: QueryCursor.getAll() performance is very very low !!!

2018-06-01 Thread the_palakkaran
Hi Ilya,

I was missing the index=true annotation in my server deployed jars. 




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


Re: IGNITE performance very very very less !!!

2018-05-29 Thread the_palakkaran
Hi Andrew,

I have found what is causing problem here and moved it into a more specific
thread:

http://apache-ignite-users.70518.x6.nabble.com/QueryCursor-getAll-performance-is-very-very-low-td21691.html



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


Re: IGNITE performance very very very less !!!

2018-05-29 Thread the_palakkaran
Hi Andrew,

I had analyzed this further and found out that actually ther cursor getAll
is making it slow. I have pointed this out in the thread below:

http://apache-ignite-users.70518.x6.nabble.com/QueryCursor-getAll-performance-is-very-very-low-td21691.html



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


QueryCursor.getAll() performance is very very low !!!

2018-05-29 Thread the_palakkaran
Hi, 

I have 200 caches loaded into a single data region. Among that I have a 
customerCache which has 300K records. It has many indexed fields, including 
customer number. 

When I query using *SQLFieldsQuery *on this particular cache (where 
condition has just customer number = ?), it takes around *280ms *to query a 
customer  

On detailed analysis, I noted that, SQLFieldQueryCursor.getAll() is
consuming 99% of the time (Getting cache instance and query execution is
completing at nano second to 1 ms range). Is there any way to tune
cursor.getAll()  or any alternate way to get data from cursor. 

Please provide some tips to improve the performance or let me know if I am 
missing something here. 



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


IGNITE performance very very very less !!!

2018-05-29 Thread the_palakkaran
Hi,

I have 200 caches loaded into a single data region. Among that I have a
customerCache which has 300K records. It has many indexed fields, including
customer number.

When I query using *SQLFieldsQuery *on this particular cache (where
condition has just customer number = ?), it takes around *280ms *to query a
customer 

This is very slow as compared to H2.

Please provide some tips to improve the performance or let me know if I am
missing something here.

Ignite is started in embedded mode. Tried keeping data on heap and off heap,
there is no difference in performance. 

cache configuration as below:

dataRegionCfg.setInitialSize(8L * 1024 * 1024 * 1024);
dataRegionCfg.setMaxSize(8L*1024*1024*1024);
dataRegionCfg.setPersistenceEnabled(false);
dataStorageCfg.setDataRegionConfigurations(dataRegionCfg);
dataStorageCfg.setPageSize(4096);
customerCacheConfig = new CacheConfiguration<>("customerCache");
customerCacheConfig.setIndexedTypes(CustomerKey.class, Customer.class);
customerCacheConfig.setReadThrough(false);
customerCacheConfig.setAtomicityMode(ATOMIC);
customerCacheConfig.setCacheMode(CacheMode.LOCAL);





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


Join Query on two different caches

2018-05-23 Thread the_palakkaran
Hi,

Suppose I have two IgniteCaches customerCache and addressCache, which
contains data from Customer table and Account table respectively. Is it
possible to execute a sql field JOIN query as below?

select * from Customer,Address where custNo = adCustNo; (where Customer and
Address are the model classes)



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


Re: LIKE operator in Apache ignite SQL

2018-05-23 Thread the_palakkaran
Yes, it is working. Thanks, Ilya



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


Re: LIKE operator in Apache ignite SQL

2018-05-23 Thread the_palakkaran
@ilya So does this mean an SQL field query executed on a cache as "select
custNo from Customer where custId like '%SAM%'" will work and return values
?



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


LIKE operator in Apache ignite SQL

2018-05-23 Thread the_palakkaran
Hi, will like operator work in Apache ignite in the same way as in Oracle? I
saw somewhere it should be uses as key=%value%.






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


RE: SEVERE error while starting ignite in embedded mode

2018-05-23 Thread the_palakkaran
Sorry,  I thought both were different issues. I have deleted the other topic.

And yes, it was a problem with my custom class loader and when I set my
class loader from my thread context to the ignite configuration and this
worked fine.




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


RE: Dependencies required to use ignite in embedded mode?

2018-05-22 Thread the_palakkaran
@Stanislav

*This is my configuration:
*
IgniteConfiguration igniteConfig = new IgniteConfiguration();
DataStorageConfiguration dataStorageCfg = new
DataStorageConfiguration();
DataRegionConfiguration dataRegionCfg = new DataRegionConfiguration();
igniteConfig.setIgniteInstanceName("ignite");
igniteConfig.setPeerClassLoadingEnabled(true);
TcpDiscoverySpi spi = new TcpDiscoverySpi();
TcpDiscoveryVmIpFinder ipFinder = new TcpDiscoveryVmIpFinder();
String hosts[] = {"127.0.0.1"};
ipFinder.setAddresses(Arrays.asList(hosts));
spi.setIpFinder(ipFinder);
igniteConfig.setDiscoverySpi(spi);
dataRegionCfg.setName("CacheDataRegion");
dataRegionCfg.setInitialSize(2L * 1024 * 1024 * 1024);
dataRegionCfg.setMaxSize(10L*1024*1024*1024);
dataRegionCfg.setPersistenceEnabled(true);
dataStorageCfg.setDataRegionConfigurations(dataRegionCfg);
processingAttributesCacheConfig = new
CacheConfiguration<>("processingAttributesCache");
   
processingAttributesCacheConfig.setIndexedTypes(ProcessingAttributesKey.class, 
ProcessingAttributes.class);
processingAttributesCacheConfig.setReadThrough(true);
processingAttributesCacheConfig.setAtomicityMode(TRANSACTIONAL);
processingAttributesCacheConfig.setCacheMode(CacheMode.PARTITIONED);
ProcessingAttributesFactory processingAttributesFactory = new
ProcessingAttributesFactory();
igniteConfig.setDataStorageConfiguration(dataStorageCfg);
igniteConfig.setCacheConfiguration(processingAttributesCacheConfig);
IgniteLogger log = null;
try {
log = new Log4JLogger();
} catch (Exception e) {
}
igniteConfig.setGridLogger(log);  
ignite = Ignition.start(igniteConfig);
ignite.active(true);


*And here's the log :*

2018-05-23 00:41:58,638 INFO  [org.apache.ignite.logger.log4j.Log4JLogger] 

>>>__    
>>>   /  _/ ___/ |/ /  _/_  __/ __/  
>>>  _/ // (7 7// /  / / / _/
>>> /___/\___/_/|_/___/ /_/ /___/   
>>> 
>>> ver. 2.3.0#20171028-sha1:8add7fd5
>>> 2017 Copyright(C) Apache Software Foundation
>>> 
>>> Ignite documentation: http://ignite.apache.org

2018-05-23 00:41:58,638 INFO  [org.apache.ignite.logger.log4j.Log4JLogger]
Config URL: n/a
2018-05-23 00:41:58,638 INFO  [org.apache.ignite.logger.log4j.Log4JLogger]
Daemon mode: off
2018-05-23 00:41:58,639 INFO  [org.apache.ignite.logger.log4j.Log4JLogger]
OS: Linux 3.8.13-68.3.4.el6uek.x86_64 amd64
2018-05-23 00:41:58,639 INFO  [org.apache.ignite.logger.log4j.Log4JLogger]
OS user: hsbc
2018-05-23 00:41:58,639 INFO  [org.apache.ignite.logger.log4j.Log4JLogger]
PID: 36975
2018-05-23 00:41:58,639 INFO  [org.apache.ignite.logger.log4j.Log4JLogger]
Language runtime: Java Platform API Specification ver. 1.8
2018-05-23 00:41:58,640 INFO  [org.apache.ignite.logger.log4j.Log4JLogger]
VM information: Java(TM) SE Runtime Environment 1.8.0_51-b16 Oracle
Corporation Java HotSpot(TM) 64-Bit Server VM 25.51-b03
2018-05-23 00:41:58,640 INFO  [org.apache.ignite.logger.log4j.Log4JLogger]
VM total memory: 10.0GB
2018-05-23 00:41:58,640 INFO  [org.apache.ignite.logger.log4j.Log4JLogger]
Remote Management [restart: off, REST: on, JMX (remote: off)]
2018-05-23 00:41:58,672 INFO  [org.apache.ignite.logger.log4j.Log4JLogger]
IGNITE_HOME=/home/hsbc/HSBC_RCM_DEV_PC/Instance1
2018-05-23 00:41:58,672 INFO  [org.apache.ignite.logger.log4j.Log4JLogger]
VM arguments: [-Xms2G, -Xmx10G, -Xss1024k, -XX:PermSize=1500M,
-XX:MaxPermSize=1800M, -XX:NewSize=209715K, -XX:MaxNewSize=209715K,
-XX:SurvivorRatio=8, -XX:MaxTenuringThreshold=6, -XX:+UseParallelOldGC,
-XX:ParallelCMSThreads=2, -XX:ParallelGCThreads=6,
-XX:-UseAdaptiveSizePolicy, -XX:+CMSClassUnloadingEnabled,
-XX:+UseStringCache, -XX:+OptimizeStringConcat, -XX:+UseFastAccessorMethods,
-XX:+AggressiveOpts, -Djava.net.preferIPv4Stack=true,
-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl,
-Dcom.atomikos.icatch.no_file=true,
-Dcom.atomikos.icatch.service=com.atomikos.icatch.standalone.UserTransactionServiceFactory,
-Djavax.net.ssl.trustStore=/home/Final_8AG_PC/Instance1/pot/web/ecp_sscert/pctruststore,
-Djavax.net.ssl.trustStorePassword=suntec,
-Doracle.jdbc.J2EE13Compliant=true, -Dbind.address=127.0.0.1, -Xdebug,
-Xrunjdwp:server=y,transport=dt_socket,address=8087,suspend=n]
2018-05-23 00:41:58,673 INFO  [org.apache.ignite.logger.log4j.Log4JLogger]
System cache's DataRegion size is configured to 40 MB. Use
DataStorageConfiguration.systemCacheMemorySize property to change the
setting.
2018-05-23 00:41:58,673 INFO  [org.apache.ignite.logger.log4j.Log4JLogger]
Configured caches [in 'sysMemPlc' dataRegion: ['ignite-sys-cache'], in
'CacheDataRegion' dataRegion: ['processingAttributesCache']
2018-05-23 00:41:58,673 WARN  [org.apache.ignite.logger.log4j.Log4JLogger]
Peer class loading is enabled (disable it in production for performance and
deployment consistency reasons)
2018-05-23 00:41:58,777 INFO  

Dependencies required to use ignite in embedded mode?

2018-05-22 Thread the_palakkaran
Hi,

Can someone help me with the dependencies needed for starting ignite in
embedded mode ? (Oracle DB).

I miss something so that my ignition does not start and hence cache is not
getting loaded, but no error thrown from Ignite.

Please help.



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


SEVERE error while starting ignite in embedded mode

2018-05-22 Thread the_palakkaran
Hi,

When I am trying to start ignite in embedded mode, the below error is
thrown.

Can anyone help me understand what is wrong here?

May 22, 2018 12:57:08 PM org.apache.ignite.logger.java.JavaLogger error
SEVERE: Got exception while starting (will rollback startup routine).
class org.apache.ignite.IgniteException: Failed to load class names
properties file packaged with ignite binaries
[file=META-INF/classnames.properties,
ldr=com.container.deploy.loader.RuntimeClassLoader@308144a9]

at
org.apache.ignite.internal.MarshallerContextImpl.(MarshallerContextImpl.java:120)
at
org.apache.ignite.internal.GridKernalContextImpl.(GridKernalContextImpl.java:463)
at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:847)
at
org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1909)
at
org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1652)
at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1080)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:600)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:525)
at org.apache.ignite.Ignition.start(Ignition.java:322)
at
com.tpe.caching.config.IgniteConfig.igniteInstance(IgniteConfig.java:2724)
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:497)
at
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:166)
at
org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:586)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1094)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:989)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:703)
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
at
com.tpe.caching.controller.IgniteController.loadCache(IgniteController.java:427)
at com.tpe.core.server.ServerManager.init(ServerManager.java:3663)
at
com.container.core.ServiceContainerCommandDespatcher.run(ServiceContainerCommandDespatcher.java:46)



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


Re: IS NULL on Numeric Query SQL Fields

2018-05-08 Thread the_palakkaran
Thanks for the reply Pavel.

Actually I don't want to keep 0 in my java model. I just want some other way
around so that I can execute an is null query on a numeric field and get
rows returned if it was originally null in the DB.

I think I need to keep it as Wrapper type and do getObject() and then query
on it. 

Was checking for other alternatives.



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


IS NULL on Numeric Query SQL Fields

2018-05-07 Thread the_palakkaran
Hi,

int uniqueId;
int actNo;
String actId;
String somethingElse;

Now when I load values to the cache, if actNo is null in DB, then it will be
*loaded as 0* (zero being initial value)

So if I execute the below query as SQLFieldsQuery on cache, no rows would be
returned:
select somethingElse from Account where actNo * is null * and actId = ?;
(arguments will be passed as object array)

In hibernate we had the provision to mention parameter type so that it would
understand this scenario? Does ignite provide a way to resolve this ?

Thanks in advance.




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