[infinispan-issues] [JBoss JIRA] (ISPN-2835) Issues w/ M/R test cases if cache are not explicitly started on all nodes
Anna Manukyan (JIRA)
jira-events at lists.jboss.org
Wed Feb 20 10:30:56 EST 2013
[ https://issues.jboss.org/browse/ISPN-2835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12755441#comment-12755441 ]
Anna Manukyan edited comment on ISPN-2835 at 2/20/13 10:29 AM:
---------------------------------------------------------------
Hi Ray,
yes - but the thing is that, when you create CacheManagers (which is done by createCluster(..) method, then the default caches are not created yet, until you will not call getCache() on each of them. And while the getCache() is not called, the cache doesn't exist for each of the CacheManagers, which means that already created nodes doesn't see created CacheManagers.
You can see the api description for getCache() method:
/**
* Retrieves the default cache associated with this cache manager. Note that the default cache does not need to be
* explicitly created with {@link #createCache(String)} since it is automatically created lazily when first used.
*
* As such, this method is always guaranteed to return the default cache.
*
* @return the default cache.
*/
@Override
public <K, V> Cache<K, V> getCache() {
return getCache(DEFAULT_CACHE_NAME);
}
Before making any cache related actions, especially if you have a cluster, you should make sure that the cache on nodes is properly started and the cluster is formed.
was (Author: amanukyan):
Hi Ray,
yes - but the thing is that, when you create CacheManagers (which is done by createCluster(..) method, then the default caches are not created yet, until you will not call getCache() on each of them. And while the getCache() is not called, the cache doesn't exist for each of the CacheManagers, which means that already created nodes doesn't see created CacheManagers.
You can see the api description for getCache() method:
{quote}
/**
* Retrieves the default cache associated with this cache manager. Note that the default cache does not need to be
* explicitly created with {@link #createCache(String)} since it is automatically created lazily when first used.
*
* As such, this method is always guaranteed to return the default cache.
*
* @return the default cache.
*/
@Override
public <K, V> Cache<K, V> getCache() {
return getCache(DEFAULT_CACHE_NAME);
}
{quote}
Before making any cache related actions, especially if you have a cluster, you should make sure that the cache on nodes is properly started and the cluster is formed.
> Issues w/ M/R test cases if cache are not explicitly started on all nodes
> -------------------------------------------------------------------------
>
> Key: ISPN-2835
> URL: https://issues.jboss.org/browse/ISPN-2835
> Project: Infinispan
> Issue Type: Feature Request
> Components: Core API, Distributed Execution and Map/Reduce
> Reporter: Ray Tsang
> Assignee: Galder Zamarreño
> Fix For: 5.3.0.Alpha1, 5.3.0.Final
>
> Attachments: mr-test-src.zip
>
>
> I ran into some issues while using M/R. The gist of the issue I was seeing is that:
> Start a cluster of Embedded Caches, like 4 nodes
> Put in 100 elements
> Run a simple M/R job to count the number of keys
> If I run the M/R job using the node I'm inserting elements into as coordinator - the result is 100
> But if I run the M/R job using a different node as coordinator, the result is less than 100
> More interestingly, I can pause for 5 seconds and run the M/R jobs again, the results are always less than 100
> This behavior doens't occur if I explicitly run cacheManager.getCache() for each of the nodes...
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the infinispan-issues
mailing list