Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-16268

Allow custom wrapped exception to be thrown by server if RPC call queue is filled up

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.3.0
    • None
    • None

    Description

      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 CallQueueManager.java for backoff the below is done 

        // ideally this behavior should be controllable too.
        private void throwBackoff() throws IllegalStateException {
          throw CallQueueOverflowException.DISCONNECT;
        }
      

      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

         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);
      
      

       

      Attachments

        1. HADOOP-16268.001.patch
          5 kB
          CR Hota
        2. HADOOP-16268.002.patch
          14 kB
          CR Hota
        3. HADOOP-16268.003.patch
          13 kB
          CR Hota
        4. HADOOP-16268.004.patch
          13 kB
          CR Hota

        Activity

          People

            crh CR Hota
            crh CR Hota
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: