[prev in list] [next in list] [prev in thread] [next in thread] 

List:       hadoop-dev
Subject:    [jira] [Created] (HADOOP-16268) Allow custom wrapped exception to be thrown by server if RPC call qu
From:       "CR Hota (JIRA)" <jira () apache ! org>
Date:       2019-04-22 22:05:00
Message-ID: JIRA.13229458.1555970693000.118769.1555970700116 () Atlassian ! JIRA
[Download RAW message or body]

CR Hota created HADOOP-16268:
--------------------------------

             Summary: Allow custom wrapped exception to be thrown by server if RPC \
call queue is filled up  Key: HADOOP-16268
                 URL: https://issues.apache.org/jira/browse/HADOOP-16268
             Project: Hadoop Common
          Issue Type: Improvement
            Reporter: CR Hota


In the current implementation of callqueue manager, "CallQueueOverflowException" \
exceptions are always wrapping "RetriableException". Through configs servers should \
be allowed to throw custom exceptions based on new use cases.

In server.java for backoff the below is done  
{code:java}
  // ideally this behavior should be controllable too.
  private void throwBackoff() throws IllegalStateException {
    throw CallQueueOverflowException.DISCONNECT;
  }
{code}
Since CallQueueOverflowException only wraps RetriableException clients would end up \
hitting the same server for retries. In use cases that router supports these \
overflowed requests could be handled by another router that shares the same state \
thus distributing load across a cluster of routers better. In the absence of any \
custom exception, current behavior should be supported.

In CallQueueOverflowException class a new Standby exception wrap should be created. \
Something like the below {code:java}
   static final CallQueueOverflowException KEEPALIVE =
        new CallQueueOverflowException(
            new RetriableException(TOO_BUSY),
            RpcStatusProto.ERROR);
    static final CallQueueOverflowException DISCONNECT =
        new CallQueueOverflowException(
            new RetriableException(TOO_BUSY + " - disconnecting"),
            RpcStatusProto.FATAL);
    static final CallQueueOverflowException DISCONNECT2 =
        new CallQueueOverflowException(
            new StandbyException(TOO_BUSY + " - disconnecting"),
            RpcStatusProto.FATAL);

{code}
  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-dev-help@hadoop.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic