Re: Node is out of topology

2017-06-01 Thread vinshar
I think the question is that why node did not joined topology again after
garbage collection finished? Node can go out of topology for numerous
reasons but should it not join back when issue is resolved?  



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Node-is-out-of-topology-tp13147p13320.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: changed cache configuration and restarted server nodes. Getting exception.

2016-03-01 Thread vinshar
One observation. Everything works fine if i do not add any QueryIndex to
QueryEntity. Seems like problem is due to old QueryIndex metadata instance
being somehow used by client nodes even though all caches on all nodes were
destroyed and all server nodes restarted.


vinshar wrote
> Hi Vladimir,
> 
> I am able to reproduce problem and it's not intermittent. Exception occurs
> everytime. 
> I am attaching class with main method which replicates the issue ans also
> attaching logs.
> IgniteProblemTest.java
> <http://apache-ignite-users.70518.x6.nabble.com/file/n3307/IgniteProblemTest.java>
>   
> 
> log.txt
> <http://apache-ignite-users.70518.x6.nabble.com/file/n3307/log.txt>  
> 
> Below is summary of what i am doing in main method
> 1) create a server node 1 with a replicated cache EMPLOYEE. Wait 10
> seconds.
> 2) create a server node 2 with a replicated cache EMPLOYEE. Wait 10
> seconds.
> 3) create a client node 1 with a near cache cache EMPLOYEE. Wait 10
> seconds.
> 4) create a client node 2 with a near cache cache EMPLOYEE. Wait 10
> seconds.
> 5) put 100 entries to both client caches. Only 10 entries remain. Others
> get evicted.
> 6) Close both servers and wait for 5 seconds.
> 7) start servers again with same configs. Wait 10 seconds after start of
> each server. Some exceptions seen during server close.
> 8) getOrCreate near caches again on client nodes.
> 9) Try putting objects again. Exception occurred.
> 
> Regards,
> Vinay





--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/changed-cache-configuration-and-restarted-server-nodes-Getting-exception-tp3064p3310.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: changed cache configuration and restarted server nodes. Getting exception.

2016-03-01 Thread vinshar
Hi Vladimir,

I am able to reproduce problem and it's not intermittent. Exception occurs
everytime. 
I am attaching class with main method which replicates the issue ans also
attaching logs.

IgniteProblemTest.java

  
log.txt   

Below is summary of what i am doing in main method
1) create a server node 1 with a replicated cache EMPLOYEE. Wait 10 seconds.
2) create a server node 2 with a replicated cache EMPLOYEE. Wait 10 seconds.
3) create a client node 1 with a near cache cache EMPLOYEE. Wait 10 seconds.
4) create a client node 2 with a near cache cache EMPLOYEE. Wait 10 seconds.
5) put 100 entries to both client caches. Only 10 entries remain. Others get
evicted.
6) Close both servers and wait for 5 seconds.
7) start servers again with same configs. Wait 10 seconds after start of
each server. Some exceptions seen during server close.
8) getOrCreate near caches again on client nodes.
9) Try putting objects again. Exception occurred.

Regards,
Vinay



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/changed-cache-configuration-and-restarted-server-nodes-Getting-exception-tp3064p3307.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Ignite instance hangs during restart in client mode

2016-02-19 Thread vinshar
Hi,

I was facing a problem due to which i thought that its a good idea to have a
MBean which can do following
1) Restart a embedded client node in an app (we have a custom cache manager
as abstraction over Ignite instance)
2) Can also close or clear caches if required
2) Collate and print metrics the way we may want. 

I implemented above and problem i am facing now is that MBean stops already
running embedded instance successfully but new instance hangs. Thread never
returns. Just to make sure that issue is not in my abstraction and I
replicated the behavior through test case method pasted below. 

My observations are in the end but my guess is that use of same
IgniteConfiguration object is creating problem. This object is mutable and
is mutated by Ignition.start in a way that causes issues if used to start
another instance in client mode.

@Test
public void test() {
LOGGER.debug("START");
IgniteConfiguration config = new IgniteConfiguration();
config.setClientMode(true);
List lst = new ArrayList();
lst.add("127.0.0.1:47500");

TcpDiscoverySpi dspi = new TcpDiscoverySpi();
TcpDiscoveryMulticastIpFinder finder = new
TcpDiscoveryMulticastIpFinder();
dspi.setIpFinder(finder);
finder.setAddresses(lst);
config.setDiscoverySpi(dspi);

Ignite ignite = Ignition.start(config);
Cache cache = ignite.getOrCreateCache("TEST");
cache.put(1,1);
ignite.close();
ignite = Ignition.start(config);
cache =ignite.getOrCreateCache("TEST");
cache.put(1,1);
System.out.println(cache.get(1));
LOGGER.debug("END");
}

A few observations:-
1) Testcase works fine if nodes being started in test case are not client.
2) Server side topology version logger logs joining and leaving of client
nodes as expected. 2nd client node never leaves.
3) i see below error in logs during start of 2nd client node:- WARNING
[Thread-13] org.apache.ignite.logger.java.JavaLogger.warning Custom H2
serialization is already configured, will override.
4) If i do not use same IgniteConfiguration object then test case works
fine.

Regards,
Vinay Sharma 



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Ignite-instance-hangs-during-restart-in-client-mode-tp3101.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: changed cache configuration and restarted server nodes. Getting exception.

2016-02-19 Thread vinshar
Thanks for workaround Vladimir. I am using multiple caches. Each cache has
key as long and value are POJOs. One is Program Cache of type  and similar other caches exists. All had this problem. All these
value classes are simple POJOs which implement serializable, does not
override any of Object classes methods (equals, hashcode, toString etc) and
have class attributes of type - long, String, Boolean, java.sql.Timestamp
with getter setter methods. All classes do have auto generated "private
static final long serialVersionUID "

I also thought of a workaround of having a MBean which ,out of many other
tasks, can also restart encapsulated Ignite instance in my custom cache
manager. I landed in a  issue there which i will share in a separate thread.



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/changed-cache-configuration-and-restarted-server-nodes-Getting-exception-tp3064p3100.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: changed cache configuration and restarted server nodes. Getting exception.

2016-02-18 Thread vinshar
Hi Vladimir,

Please find attached stack traces and visor output for my multiple tries to
identify and resolve issue. Also find attached my server side
configurations. We start all caches from client in local mode and all
distributed caches have to be defined in server configs. Cache in attached
file with entries (name ends with _ALL) is local cache. Other caches are
replicated and defined in server configs. 

Attached stack trace file contains topology and cache statistics during
these multiple tries. I tried cleaning caches on a node by its ID and also
clearing a cache by its name but both failed. attached file has stack traces
for all.
I have masked some information like IPs etc. let me know in case if you need
any more information.

default-config.xml
  

visor_ignite_stack_trace_masked.txt

  

Regards,
Vinay Sharma



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/changed-cache-configuration-and-restarted-server-nodes-Getting-exception-tp3064p3085.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: changed cache configuration and restarted server nodes. Getting exception.

2016-02-17 Thread vinshar
Hi Val

At the time of this issue i checked topology through visor and all 3 client
and 2 server nodes were there. There were no items in any cache. I could
see caches created on all 5 nodes (near cache on 3 clients and replicated
cache on 2 servers). I also tried cleaning a cache through visor through
command "cache -clear -c=PROGRAMS" which caused exception trace as i
mentioned previously. I tried multiple times and got same error. I was
running visor on one on the hosts of server nodes.

Shouldn't a node be dropped from topology if its not accessible due to any
issue? Exception trace with class loader related exceptions, error in
uodate when cache is empty on all nodes, all nodes visible in visor
topology and getting same exception on repeated tries to clean a cache
seems like pointing to problem other than network or node accessibility
issue.

I restarted ignite server nodes but problem was still there. I had to stop
all ignite nodes including clients to resolve problem.

Even more interesting thing is that i did not faced any issue on my DEV and
QA environment when i did cache changes and restarted just server nodes. I
faced this problem on pre-prod where i had to restart all nodes.

Regards,
Vinay Sharma
On Feb 17, 2016 7:05 PM, "vkulichenko [via Apache Ignite Users]" <
ml-node+s70518n306...@n6.nabble.com> wrote:

> Hi Vinay,
>
> CachePartialUpdateException is thrown by an update operation (put, putAll,
> remove, removeAll, ...) if updates for one or more keys involved in this
> operation failed. This exception has failedKeys() method that tells you
> which keys failed so that you can retry only them, no need to retry
> successful ones.
>
> Most likely you were getting these exceptions when there were no server
> nodes in the topology. Is this the case?
>
> -Val
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-ignite-users.70518.x6.nabble.com/changed-cache-configuration-and-restarted-server-nodes-Getting-exception-tp3064p3066.html
> To unsubscribe from changed cache configuration and restarted server
> nodes. Getting exception., click here
> 
> .
> NAML
> 
>




--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/changed-cache-configuration-and-restarted-server-nodes-Getting-exception-tp3064p3070.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

changed cache configuration and restarted server nodes. Getting exception.

2016-02-17 Thread vinshar
Hi,

I faced an issue today and couldn't figure out whats wrong hence though of
asking on this forum.
I added expiration policy to 2 cacheConfigurations, stopped all cache server
nodes and then started one by one. My client nodes had near caches for the
these caches and i am not sure if this caused the issue. Issue was that i
started getting "org.apache.ignite.cache.CachePartialUpdateException: Failed
to update keys (retry update if possible)." exception in my apps that were
using these caches. 
I thought that may be there are some old entries in near caches where as
server caches are empty and this is causing issue somehow. I checked cache
statistics and all caches were empty. 
Still i tried to clear caches using visor and faced following exception.

visor> cache -clear -c=PROGRAMS
[16:43:42,883][SEVERE][mgmt-#22%null%][GridTaskWorker] Failed to reduce job
results due to undeclared user exception
[task=o.a.i.i.v.cache.VisorCacheClearTask@54656dd, err=class
o.a.i.IgniteException: Failed to deserialize object with given class loader:
WebappClassLoader
  context: /myWebService
  delegate: false
  repositories:
/WEB-INF/classes/
--> Parent Classloader:
java.net.URLClassLoader@2b71fc7e
]
class org.apache.ignite.IgniteException: Failed to deserialize object with
given class loader: WebappClassLoader
  context: /myWebService
  delegate: false
  repositories:
/WEB-INF/classes/
--> Parent Classloader:
java.net.URLClassLoader@2b71fc7e

at
org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.java:882)

..
..
..
..
..
Caused by: class org.apache.ignite.IgniteCheckedException: Failed to
deserialize object with given class loader: WebappClassLoader
..
..
..
Caused by: java.io.IOException: java.lang.reflect.InvocationTargetException
at
org.apache.ignite.marshaller.optimized.OptimizedObjectInputStream.readExternalizable(OptimizedObjectInputStream.java:523
..
..
..
Caused by: java.io.InvalidObjectException: Ignite instance with provided
name doesn't exist. Did you call Ignition.start(..) to start an Ignite
instance? [name=null]
at
org.apache.ignite.internal.processors.cache.GridCacheContext.readResolve(GridCacheContext.java:1999)
... 37 more
Caused by: class org.apache.ignite.IgniteIllegalStateException: Ignite
instance with provided name doesn't exist. Did you call Ignition.start(..)
to start an Ignite instance? [name=null]
at org.apache.ignite.internal.IgnitionEx.gridx(IgnitionEx.java:1267)
at
org.apache.ignite.internal.processors.cache.GridCacheContext.readResolve(GridCacheContext.java:1989)
... 37 more
(wrn) : class org.apache.ignite.IgniteException: Failed to
deserialize object with given class loader: WebappClassLoader


Regards,
Vinay Sharma



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/changed-cache-configuration-and-restarted-server-nodes-Getting-exception-tp3064.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Data grid Load balancing

2016-02-04 Thread vinshar
Hi Val,

If there is no affinity key defined then how client node chooses that to
which server node a put or get request is to be sent? Or does a client node
somehow chooses and send data always to one single server node for a
particular cache? Or is there something like a primary server node for each
cache?

If there is no load balancing in data grid then, is it possible that
majority of clients start sending get request to same server node degrading
its performance? Is this a valid scenario?

Regards,
Vinay




--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Data-grid-Load-balancing-tp2819p2843.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Data grid Load balancing

2016-02-03 Thread vinshar
Hi,

http://apacheignite.gridgain.org/v1.5/docs/load-balancing

I found above documentation on load balancing but i am still not clear and
have following queries

1) How load is balanced between server nodes when a lot of clients are
trying to run queries or get / put values in a cache? do we consider each
query / get / put as a task and by default use round robin scheduling?
2) How load is managed in more complex scenarios where data affinity also
has to be considered and caches are replicated? if round robin scheduling is
used on a cluster with 2 server node and if multiple clients try to fetch
same cache value (by id) from a replicated cache then half of the clients
will try fetching data from a server node which may not have it.
3) What are different ways in which i can override or customize load
balancing?
4) who makes the decision that which server node to be used to fetch or put
data in cache? is it client node?

Any links to documentation or code explaining above points will be a great
help.

Regards,
Vinay Sharma



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Data-grid-Load-balancing-tp2819.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Is there a way to get cache metrics for all the nodes in cluster combined

2016-01-26 Thread vinshar
Hi Val,

What Denis mentioned was correct. I got correct number of get / put / size
and eviction after i put a sleep time. so query 1 is resolved. 

You mentioned that 2,3 and 4 are issues which has to be fixed and a new
ticket will be created. I will look forward to the resolution of ticket.

Regarding 5.


5. Currently metrics() method without parameters returns metrics for local
node only, and I agree this is counterintuitive. I think we should calculate
numbers for the whole cluster instead. 




--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Is-there-a-way-to-get-cache-metrics-for-all-the-nodes-in-cluster-combined-tp2674p2724.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Is there a way to get cache metrics for all the nodes in cluster combined

2016-01-26 Thread vinshar
Hi Val, 

What Denis mentioned was correct. I got correct number of get / put / size
and eviction after i put a sleep time. so query 1 is resolved. 

You mentioned that 2,3 and 4 are issues which has to be fixed and a new
ticket will be created. I will look forward to the resolution of ticket. 

Regarding 5. 


vkulichenko wrote
> 5. Currently metrics() method without parameters returns metrics for local
> node only, and I agree this is counterintuitive. I think we should
> calculate numbers for the whole cluster instead. 

If i understood correctly then we think that we should call
"cache.metrics(ignite.cluster())" on each call to cache.metrics() for cache
with no data on client node. is that right?
Even if we start returning numbers of whole cluster, there will be no way to
see numbers of just client node cache. 
I understand that most of metrics attributes like "getAverageTxCommitTime"
etc will be zero on client node cache but should't there be some way to get
some basic metrics attributes like total gets, puts etc for these caches?

Regards,
Vinay





--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Is-there-a-way-to-get-cache-metrics-for-all-the-nodes-in-cluster-combined-tp2674p2725.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Is there a way to get cache metrics for all the nodes in cluster combined

2016-01-25 Thread vinshar
Hi Denis,

Thanks for inputs. I took another run by putting thread sleep before
printing metric and numbers are good now but issue 3 and 4 are still there.
is keeping these numbers 0 in combined metrics from cluster intentional due
to some reason?


Vinay wrote
> 3) putAvgTimeNanos=getAvgTimeNanos=rmvAvgTimeNanos=0.0. Why all put times
> are 0? 
> 4) size=keySize=0 in metrics but cache.size() returned 40,000 (which is
> expected with eviction maxSize 20,000 for partitioned cache on 2 server
> node cluster) 

Regarding point 5


Denis Magda wrote
> In regards to this 
> 5) I got cache instance through ignite.cache(
> 
> ). After completion of above process i printed cache.metrics() which was
> all empty although cache.metrics(
> 
> ) prints above metrics. 
> 
> In my understanding cache.metrics() call is done from a client node that
> doesn't hold cache data at all. So the result is expected. 

As a client shouldn't there be a way to see metrics of just my client node?
how can i determine frequency of operations being performed on a client
node?
Lets say my client node started facing some network issue causing 200 ms
delay in each request so cache put will take a bit more than 200ms from
client node. will this be reflected in combined cache metrics fetched by
client node? or will combined metrics will just print averages etc with
start time as time when server node got a request from client node?

as cache exists on client node on which client app performs all operations
although internally client node cache sends all data to server node but
still as a client i am performing all operations on client node cache and i
might be interested in metrics just for that node.

Regards,
Vinay Sharma



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Is-there-a-way-to-get-cache-metrics-for-all-the-nodes-in-cluster-combined-tp2674p2695.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: cache.getCacheManager() returns null.

2016-01-24 Thread vinshar
Is there any documentation or example to use jcache with ignite as
implementation?
On Jan 24, 2016 6:46 PM, "vkulichenko [via Apache Ignite Users]" <
ml-node+s70518n2682...@n6.nabble.com> wrote:

> Hi Vinay,
>
> getCacheManager() will return the instance of JCache manager [1] if you
> used one to create a cache. If you created it using Ignite API, it will be
> null.
>
> To get an Ignite instance from IgniteCache do this: 'Ignite ignite =
> cache.unwrap(Ignite.class)'
>
> [1]
> https://ignite.apache.org/releases/1.5.0.final/javadoc/org/apache/ignite/cache/CacheManager.html
>
> -Val
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-ignite-users.70518.x6.nabble.com/cache-getCacheManager-returns-null-tp2676p2682.html
> To unsubscribe from cache.getCacheManager() returns null., click here
> 
> .
> NAML
> 
>




--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/cache-getCacheManager-returns-null-tp2676p2683.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Is there a way to get cache metrics for all the nodes in cluster combined

2016-01-23 Thread vinshar
Hi,


Is there a way to get combined cache metrics for a whole cluster or metrics
for selected nodes in a cluster?
Lets say i want to get health of cache on all the nodes or log a combined
metrics from a client node?

Regards,
Vinay Sharma



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Is-there-a-way-to-get-cache-metrics-for-all-the-nodes-in-cluster-combined-tp2674.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Is there a way to get cache metrics for all the nodes in cluster combined

2016-01-23 Thread vinshar
I started a replicated cache on a cluster with 2 server nodes and 1 client
node and executed 100,000 puts with key starting from 1 to 100,000. Once put
is done i fetched all the entries one by one through cache key. Cache
metrics for cluster looks abit off to me. I think i am missing something
here. Below is cache configuration and cache metrics for cluster.
















CLUSTER Cache Metrics = CacheMetricsSnapshot [reads=99104, puts=10,
hits=39104, misses=39104, txCommits=0, txRollbacks=0, evicts=6,
removes=0, putAvgTimeNanos=0.0, getAvgTimeNanos=0.0, rmvAvgTimeNanos=0.0,
commitAvgTimeNanos=0.0, rollbackAvgTimeNanos=0.0,
cacheName=TEST_PARTITIONED, overflowSize=0, offHeapGets=0, offHeapPuts=0,
offHeapRemoves=0, offHeapEvicts=0, offHeapHits=0, offHeapMisses=0,
offHeapEntriesCnt=0, offHeapPrimaryEntriesCnt=0, offHeapBackupEntriesCnt=0,
offHeapAllocatedSize=0, offHeapMaxSize=-1, swapGets=0, swapPuts=0,
swapRemoves=0, swapEntriesCnt=0, swapHits=0, swapMisses=0, swapSize=0,
size=0, keySize=0, isEmpty=true, dhtEvictQueueCurrSize=0, txThreadMapSize=0,
txXidMapSize=0, txCommitQueueSize=0, txPrepareQueueSize=0,
txStartVerCountsSize=0, txCommittedVersionsSize=4,
txRolledbackVersionsSize=4, txDhtThreadMapSize=-1, txDhtXidMapSize=-1,
txDhtCommitQueueSize=0, txDhtPrepareQueueSize=0, txDhtStartVerCountsSize=0,
txDhtCommittedVersionsSize=-1, txDhtRolledbackVersionsSize=-1,
isWriteBehindEnabled=false, writeBehindFlushSize=-1,
writeBehindFlushThreadCnt=-1, writeBehindFlushFreq=-1,
writeBehindStoreBatchSize=-1, writeBehindTotalCriticalOverflowCnt=-1,
writeBehindCriticalOverflowCnt=-1, writeBehindErrorRetryCnt=-1,
writeBehindBufSize=-1, keyType=java.lang.Object, valType=java.lang.Object,
isStoreByVal=true, isStatisticsEnabled=true, isManagementEnabled=true,
isReadThrough=false, isWriteThrough=false]

What bothers me in above result is
1) Why reads are 99104 whereas i performed 100,000 gets.
2) Hits=Misses=39104. Why total of hits and missed is not equal to reads?
3) putAvgTimeNanos=getAvgTimeNanos=rmvAvgTimeNanos=0.0. Why all put times
are 0?
4) size=keySize=0 in metrics but cache.size() returned 40,000 (which is
expected with eviction maxSize 20,000 for partitioned cache on 2 server node
cluster)
5) I got cache instance through ignite.cache(). After
completion of above process i printed cache.metrics() which was all empty
although cache.metrics() prints above metrics.

Regards,
Vinay Sharma

Regards,
Vinay Sharma



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Is-there-a-way-to-get-cache-metrics-for-all-the-nodes-in-cluster-combined-tp2674p2677.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Is there a way to get cache metrics for all the nodes in cluster combined

2016-01-23 Thread vinshar
i found the way. 

cache.metrics(ClusterGroup grp)



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Is-there-a-way-to-get-cache-metrics-for-all-the-nodes-in-cluster-combined-tp2674p2675.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


cache.getCacheManager() returns null.

2016-01-23 Thread vinshar
Hi,

Below code prints null. is this expected? is there any way to get Ignite
instance from a cache instance?


ignite = Ignition.start("cache-server-test-node.xml");

System.out.println("#
"+ignite.cache("TEST_REPLICATED").getCacheManager());

below is cache configuration















Regards,
Vinay




--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/cache-getCacheManager-returns-null-tp2676.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


UnsupportedOperationException on adding indexed types to a config object

2016-01-19 Thread vinshar
Hi,

Below code throws UnsupportedOperationException.


public static void main(String[] args) {
CacheConfiguration config = new
CacheConfiguration((CompleteConfiguration)new CacheConfiguration());
config.setIndexedTypes(Integer.class,String.class); 
}


trace:-
Exception in thread "main" java.lang.UnsupportedOperationException
at java.util.AbstractList.add(AbstractList.java:148)

I am not sure whats going on in the setter hence thought of asking here.

Regards,
Vinay



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/UnsupportedOperationException-on-adding-indexed-types-to-a-config-object-tp2642.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


isManagementEnabled vs isStatisticsEnabled.

2016-01-13 Thread vinshar
Hi,

I see that Ignite registers same bean in case if any of the above flags are
true. Bean is of type
/"org.apache.ignite.internal.processors.cache.CacheMetricsMXBeanImpl"/. This
/CacheMetricsMXBeanImplclass /implements /CacheMetricsMXBean / which extends
below both interfaces defined in JSR107.
/"import javax.cache.management.CacheMXBean"
"import javax.cache.management.CacheStatisticsMXBean"/

So it seems like setting any of isManagementEnabled and isStatisticsEnabled
flags will do the same thing.
Is there anything where setting one flag is different from setting the other
one? 

Regards,
Vinay



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/isManagementEnabled-vs-isStatisticsEnabled-tp2549.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: SoreSessionListener, cacheLoaderFactory, cacheWriterFactory implementation examples

2016-01-11 Thread vinshar
Hi Val,


vkulichenko wrote
> "As for configuration, you will have to deploy cache reader/writer
> implementation classes on all nodes. Note that you provide Factory in
> configuration instead of reader/writer instance, so it created only on the
> node where it will be used. This allows to make reader/writer
> non-serializable."

What happens in below scenario
1) Cache configuration is defined on a server node and cache was created as
part of this server node start operation. Cache is read through and write
through. I Define cache loader factory and Cache writer Factory in this
configuration. I guess my loader factory implementation class should be on
all server nodes in this case? is this right? 
2) Create a near cache for above mentioned cache on a client node. Now do i
need loader and writer factory implementation classes on client node as
well? i think not.
3) Make a get operation which is a miss on near cache. I think i should get
value from Server node if it exists there in this case.
4) Make another get which is a miss on near cache as well as a miss on cache
on server node. I think in this case Server node will use Loader factory to
load object in cache and send it to client node. is this right?
5) What happens if i call getAndPut on near cache on client node?




--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/SoreSessionListener-cacheLoaderFactory-cacheWriterFactory-implementation-examples-tp2462p2498.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Is CacheConfiguration specified at client node ignored in case if Cache already exists?

2016-01-10 Thread vinshar
Hi Val,

How about NearCacheConfiguration? Will that also be ignored as part of
CacheConfiguration? If it also get ignored then it means that client nodes
cannot have a near cache size as per their own requirement and will have to
stick with what was configured by the node which created cache.

Regards,
Vinay
On Jan 10, 2016 12:21 AM, "vkulichenko [via Apache Ignite Users]" <
ml-node+s70518n2476...@n6.nabble.com> wrote:

> Vinay,
>
> Ignite.createCache() method will throw an exception if the cache already
> exists. But if you use Ignite.getOrCreateCache() method instead, it will be
> either created with the provided configuration, or you will get an already
> existing cache. In the latter case the configuration you provide will be
> ignored. There is also Ignite.cache() method that you can use when you're
> sure cache already exists. It accepts just a cache name instead of
> CacheConfiguration object.
>
> Makes sense?
>
> -Val
>
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-ignite-users.70518.x6.nabble.com/Is-CacheConfiguration-specified-at-client-node-ignored-in-case-if-Cache-already-exists-tp2461p2476.html
> To unsubscribe from Is CacheConfiguration specified at client node ignored
> in case if Cache already exists?, click here
> 
> .
> NAML
> 
>




--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Is-CacheConfiguration-specified-at-client-node-ignored-in-case-if-Cache-already-exists-tp2461p2480.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Cross Cache Affinity

2016-01-09 Thread vinshar
Hi Denis,

Thanks for reply. I had a look at example which resolved a lot of my
queries.

Regards,
Vinay



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Cross-Cache-Affinity-tp2464p2473.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: how to use jdbc

2016-01-09 Thread vinshar
Didn't knew that. Thanks for the link.



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/how-to-use-jdbc-tp2457p2474.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: how to use jdbc

2016-01-09 Thread vinshar
What are you trying to do here by passing ignite configuration xml path in
JDBC Connection String? 



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/how-to-use-jdbc-tp2457p2463.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Cross Cache Affinity

2016-01-09 Thread vinshar
I went through documentation for enabling Affinity at below link 
https://apacheignite.readme.io/docs/affinity-collocation

Following are my queries:-
1) Document has an example where same cache is used to hold different type
of cache objects. Is this advisable and is this necessary to achieve
collocation of objects? 
2) Is there any case where it may make sense to use Affinity Key's in case
of a replicated cache?
3) For cross cache SQL Queries, Cached objects should be collocated. If this
is correct then how can i achieve this?

Regards,
Vinay Sharma



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Cross-Cache-Affinity-tp2464.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Off heap disc location

2016-01-09 Thread vinshar
How can i specify a off heap disc location for a cache? What is default?
As per performance tips, enabling swap storage hurts performance. Why? isn't
that suppose to improve performance by keeping recently accessed entry in
memory and avoiding File I/O or random memory read for subsequent gets for
the same cache object? 



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Off-heap-disc-location-tp2465.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Is CacheConfiguration specified at client node ignored in case if Cache already exists?

2016-01-09 Thread vinshar
Hi,

What happens in case where i have a cache which is already exists on one of
the server nodes and i try to configure same cache at client node where
configurations at client node differs from configuration on server node used
to start the cache? 

For an example, Lets say in my server node's cache configuration i mentioned
a near cache configuration where as at client node i did not or vice versa?
or i specified a different cache mode in configuration on client node? Are
there some configurations which are ignored whereas some configuration which
are not? or will there be an exception thrown while getting cache at client
node?

Regards,
Vinay Sharma



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Is-CacheConfiguration-specified-at-client-node-ignored-in-case-if-Cache-already-exists-tp2461.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.