Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-11770 [Umbrella] locate static synchronized blocks in hadoop-common
  3. HADOOP-11772

RPC Invoker relies on static ClientCache which has synchronized(this) blocks

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.8.0, 3.0.0-alpha1
    • ipc, performance
    • None
    • Incompatible change, Reviewed
    • The Client#call() methods that are deprecated since 0.23 have been removed.

    Description

        private static ClientCache CLIENTS=new ClientCache();
      ...
          this.client = CLIENTS.getClient(conf, factory);
      

      Meanwhile in ClientCache

      public synchronized Client getClient(Configuration conf,
            SocketFactory factory, Class<? extends Writable> valueClass) {
      ...
         Client client = clients.get(factory);
          if (client == null) {
            client = new Client(valueClass, conf, factory);
            clients.put(factory, client);
          } else {
            client.incCount();
          }
      

      All invokers end up calling these methods, resulting in IPC clients choking up.



      Attachments

        1. sync-client-bt.png
          69 kB
          Gopal Vijayaraghavan
        2. sync-client-threads.png
          18 kB
          Gopal Vijayaraghavan
        3. HADOOP-11772-001.patch
          3 kB
          Akira Ajisaka
        4. dfs-sync-ipc.png
          103 kB
          Gopal Vijayaraghavan
        5. HADOOP-11772-wip-001.patch
          7 kB
          Akira Ajisaka
        6. HADOOP-11772-wip-002.patch
          7 kB
          Akira Ajisaka
        7. after-ipc-fix.png
          19 kB
          Gopal Vijayaraghavan
        8. HADOOP-11772-002.patch
          13 kB
          Akira Ajisaka
        9. HADOOP-11772-003.patch
          12 kB
          Akira Ajisaka
        10. HADOOP-11772.004.patch
          8 kB
          Haohui Mai
        11. cached-connections.png
          52 kB
          Gopal Vijayaraghavan
        12. cached-locking.png
          36 kB
          Gopal Vijayaraghavan

        Issue Links

          Activity

            People

              wheat9 Haohui Mai
              gopalv Gopal Vijayaraghavan
              Votes:
              0 Vote for this issue
              Watchers:
              19 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: