[ http://issues.apache.org/jira/browse/HADOOP-601?page=comments#action_12442072 ] Owen O'Malley commented on HADOOP-601: --------------------------------------
Ok, I propose that we add annotations to the rpc protocol classes: public interface FooBar extends VersionedProtocol { @RpcReliability(@Try) /* single try, no exception for failure */ void progress(); @RpcReliability(@TryNotify) /* single try, exception for failure */ void setStatus(String msg); @RpcReliability(@Forever) /* keep trying forever */ void done(); @RpcReliability(@Timed(30,5)) /* try for 30 seconds waiting 5 seconds between attempts and then throw */ void doWork(); /* Set a default policy with some explicit handlers for specific exceptions. Matches with remote exceptions will also be handled. */ @RpcReliability([EMAIL PROTECTED](30,5), [EMAIL PROTECTED](err=SocketTimeOutException.class, [EMAIL PROTECTED]), @ErrorHandler(err=NullPointerException, [EMAIL PROTECTED])}) void complexWork(); } Thoughts? > we need some rpc retry framework > -------------------------------- > > Key: HADOOP-601 > URL: http://issues.apache.org/jira/browse/HADOOP-601 > Project: Hadoop > Issue Type: Improvement > Components: ipc > Reporter: Owen O'Malley > Assigned To: Owen O'Malley > Fix For: 0.8.0 > > > We need some mechanism for RPC calls that get exceptions to automatically > retry the call under certain circumstances. In particular, we often end up > with calls to rpcs being wrapped with retry loops for timeouts. We should be > able to make a retrying proxy that will call the rpc and retry in some > circumstances. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira