[JBoss JIRA] Created: (ISPN-1294) Run local operations from a DistributedExecutor in parallel
by Sanne Grinovero (JIRA)
Run local operations from a DistributedExecutor in parallel
-----------------------------------------------------------
Key: ISPN-1294
URL: https://issues.jboss.org/browse/ISPN-1294
Project: Infinispan
Issue Type: Enhancement
Reporter: Sanne Grinovero
Assignee: Manik Surtani
Fix For: 5.1.0.ALPHA1
Looking into
{code}org.infinispan.distexec.DefaultExecutorService.invokeLocally(DistributedRunnableFuture<T>){code}
It seems that the operations are performed in the same thread as the invoker; if we happen to send multiple operations to the local node, these are performed in sequence, and in sequence with the remote operations. We should use an Executor for the local tasks.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years
[JBoss JIRA] (ISPN-1974) Add <T> Future<T> submit(Address target, Callable<T> task) at least to DefaultExecutorService
by Thomas Fromm (JIRA)
Thomas Fromm created ISPN-1974:
----------------------------------
Summary: Add <T> Future<T> submit(Address target, Callable<T> task) at least to DefaultExecutorService
Key: ISPN-1974
URL: https://issues.jboss.org/browse/ISPN-1974
Project: Infinispan
Issue Type: Enhancement
Components: Core API
Affects Versions: 5.1.3.FINAL
Reporter: Thomas Fromm
Assignee: Manik Surtani
To easy execute tasks on specific nodes I'd like to have an additional method at DefaultExecutorService:
{code}
public <T> Future<T> submit(Address target, Callable<T> task){
if (task == null) throw new NullPointerException();
if (target == null) throw new NullPointerException();
List<Address> members = rpc.getTransport().getMembers();
if(!members.contains(target)){
throw new IllegalArgumentException("Unknown node "+target.toString());
}
Address me = rpc.getAddress();
DistributedExecuteCommand<T> c = null;
if(target.equals(me)){
c = factory.buildDistributedExecuteCommand(clone(task), me, null);
} else {
c = factory.buildDistributedExecuteCommand(task, me, null);
}
DistributedRunnableFuture<T> f = new DistributedRunnableFuture<T>(c);
executeFuture(target, f);
return f;
}
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years
[JBoss JIRA] (ISPN-2039) Iteration in DistributedTaskLifecycleService using ServiceLoader fails
by Vladimir Blagojevic (JIRA)
Vladimir Blagojevic created ISPN-2039:
-----------------------------------------
Summary: Iteration in DistributedTaskLifecycleService using ServiceLoader fails
Key: ISPN-2039
URL: https://issues.jboss.org/browse/ISPN-2039
Project: Infinispan
Issue Type: Bug
Components: Distributed Cache
Affects Versions: 5.1.4.FINAL
Environment: This problem has been observed in AS 7 environment rather than Infinispan standalone
Reporter: Ales Justin
Assignee: Vladimir Blagojevic
Priority: Minor
Fix For: 5.2.0.ALPHA1, 5.2.0.FINAL
For some unknown reason iteration over available DistributedTaskLifecycle services in DistributedTaskLifecycleService fails, and it fails only in AS environment:
Caused by: java.util.NoSuchElementException
at java.util.AbstractList$Itr.next(AbstractList.java:350) [classes.jar:1.6.0_31]
at java.util.Collections$1.nextElement(Collections.java:3389) [classes.jar:1.6.0_31]
at java.util.ServiceLoader$LazyIterator.hasNext(ServiceLoader.java:332) [classes.jar:1.6.0_31]
at java.util.ServiceLoader$1.hasNext(ServiceLoader.java:415) [classes.jar:1.6.0_31]
at org.infinispan.distexec.spi.DistributedTaskLifecycleService.onPreExecute(DistributedTaskLifecycleService.java:50) [infinispan-core-5.2.0-SNAPSHOT.jar:5.2.0-SNAPSHOT]
public <T> void onPreExecute(Callable<T> task) {
try {
Iterator<DistributedTaskLifecycle> i = loader.iterator();
while (i.hasNext()) { // <------------------------------------------------- we CHECK before
DistributedTaskLifecycle cl = i.next();
cl.onPreExecute(task);
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years