Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-17531 RBF: Asynchronous router RPC
  3. HDFS-17552

[ARR] IPC client uses CompletableFuture to support asynchronous operations.

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Invalid
    • None
    • None
    • None

    Description

      Description

      In the implementation of asynchronous Ipc.client, the main methods used include HADOOP-13226HDFS-10224, etc.

      However, the existing implementation does not support `CompletableFuture`; instead, it relies on setting up callbacks, which can lead to the "callback hell" problem. Using `CompletableFuture` can better organize asynchronous callbacks. Therefore, on the basis of the existing implementation, by using `CompletableFuture`, once the `client.call` is completed, the asynchronous thread handles the response of this call without blocking the main thread.

       

      Test

      new UT  TestAsyncIPC#testAsyncCallWithCompletableFuture()

      Attachments

        1. HDFS-17552.patch
          8 kB
          Jian Zhang

        Issue Links

          Activity

            People

              keepromise Jian Zhang
              keepromise Jian Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: