T
- public class ClientFuture<T> extends Object implements Future<T>, Serializable
Serializable
class wraps a RemoteFuture
delegating
methods through to the Future
on the remote service while
masquerading IOException
s so that we can implement the
Future
API.Modifier and Type | Field and Description |
---|---|
protected static org.apache.log4j.Logger |
log |
Constructor and Description |
---|
ClientFuture(RemoteFuture<T> proxy) |
public ClientFuture(RemoteFuture<T> proxy)
proxy
- A proxy for the RemoteFuture
.public boolean cancel(boolean mayInterruptIfRunning)
java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.rmi.NoSuchObjectException: no such object in table at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:232) at java.util.concurrent.FutureTask.get(FutureTask.java:91) at com.bigdata.service.proxy.RemoteFutureImpl.get(RemoteFutureImpl.java:48) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at net.jini.jeri.BasicInvocationDispatcher.invoke(BasicInvocationDispatcher.java:1126) at net.jini.jeri.BasicInvocationDispatcher.dispatch(BasicInvocationDispatcher.java:608) at com.sun.jini.jeri.internal.runtime.ObjectTable$6.run(ObjectTable.java:597) at net.jini.export.ServerContext.doWithServerContext(ServerContext.java:103) at com.sun.jini.jeri.internal.runtime.ObjectTable$Target.dispatch0(ObjectTable.java:595) at com.sun.jini.jeri.internal.runtime.ObjectTable$Target.access$700(ObjectTable.java:212) at com.sun.jini.jeri.internal.runtime.ObjectTable$5.run(ObjectTable.java:568) at java.security.AccessController.doPrivileged(Native Method) at com.sun.jini.jeri.internal.runtime.ObjectTable$Target.dispatch(ObjectTable.java:565) at com.sun.jini.jeri.internal.runtime.ObjectTable$Target.dispatch(ObjectTable.java:540) at com.sun.jini.jeri.internal.runtime.ObjectTable$RD.dispatch(ObjectTable.java:778) at net.jini.jeri.connection.ServerConnectionManager$Dispatcher.dispatch(ServerConnectionManager.java:148) at com.sun.jini.jeri.internal.mux.MuxServer$2.run(MuxServer.java:244) at java.security.AccessController.doPrivileged(Native Method) at com.sun.jini.jeri.internal.mux.MuxServer$1.run(MuxServer.java:241) at com.sun.jini.thread.ThreadPool$Worker.run(ThreadPool.java:136) at java.lang.Thread.run(Thread.java:619) at com.sun.jini.jeri.internal.runtime.Util.__________EXCEPTION_RECEIVED_FROM_SERVER__________(Util.java:108) at com.sun.jini.jeri.internal.runtime.Util.exceptionReceivedFromServer(Util.java:101) at net.jini.jeri.BasicInvocationHandler.unmarshalThrow(BasicInvocationHandler.java:1303) at net.jini.jeri.BasicInvocationHandler.invokeRemoteMethodOnce(BasicInvocationHandler.java:832) at net.jini.jeri.BasicInvocationHandler.invokeRemoteMethod(BasicInvocationHandler.java:659) at net.jini.jeri.BasicInvocationHandler.invoke(BasicInvocationHandler.java:528) at $Proxy8.get(Unknown Source) at com.bigdata.service.proxy.ClientFuture.get(ClientFuture.java:67) at com.bigdata.relation.rule.eval.pipeline.JoinMasterTask.awaitAll(JoinMasterTask.java:528) at com.bigdata.relation.rule.eval.pipeline.JoinMasterTask.call(JoinMasterTask.java:378) at com.bigdata.relation.rule.eval.pipeline.JoinMasterTask.call(JoinMasterTask.java:236) at com.bigdata.relation.rule.eval.AbstractStepTask.runOne(AbstractStepTask.java:331) at com.bigdata.relation.rule.eval.MutationTask.call(MutationTask.java:113) at com.bigdata.relation.rule.eval.MutationTask.call(MutationTask.java:55) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.RuntimeException: java.rmi.NoSuchObjectException: no such object in table at com.bigdata.service.proxy.ClientFuture.cancel(ClientFuture.java:48) at com.bigdata.relation.rule.eval.pipeline.DistributedJoinTask.cancelSinks(DistributedJoinTask.java:956) at com.bigdata.relation.rule.eval.pipeline.JoinTask.call(JoinTask.java:511) at com.bigdata.relation.rule.eval.pipeline.JoinTask.call(JoinTask.java:128) ... 5 more Caused by: java.rmi.NoSuchObjectException: no such object in table at net.jini.jeri.BasicObjectEndpoint.executeCall(BasicObjectEndpoint.java:420) at net.jini.jeri.BasicInvocationHandler.invokeRemoteMethodOnce(BasicInvocationHandler.java:806) at net.jini.jeri.BasicInvocationHandler.invokeRemoteMethod(BasicInvocationHandler.java:659) at net.jini.jeri.BasicInvocationHandler.invoke(BasicInvocationHandler.java:528) at $Proxy9.cancel(Unknown Source) at com.bigdata.service.proxy.ClientFuture.cancel(ClientFuture.java:46) ... 8 moreThis appears to be an RMI/DGC bug where the remote future is somehow garbage collected even though this class is holding a reference to its
RemoteFuture
proxy.
Since the remote future no longer exists we can assume that it is no
longer running. Therefore, I have modified this method to log a warning
and return false
when this exception is thrown.
Note: I have also seen this problem where the stack trace involves
java.rmi.ConnectException
.
cancel
in interface Future<T>
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6181943
,
http://archives.java.sun.com/cgi-bin/wa?A2=ind0509&L=rmi-users&P=617
,
http://archives.java.sun.com/cgi-bin/wa?A2=ind0512&L=rmi-users&P=3747
,
http://archives.java.sun.com/cgi-bin/wa?A2=ind0601&L=rmi-users&P=1985
public T get() throws InterruptedException, ExecutionException
get
in interface Future<T>
InterruptedException
ExecutionException
public T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get
in interface Future<T>
InterruptedException
ExecutionException
TimeoutException
public boolean isCancelled()
isCancelled
in interface Future<T>
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.