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

ipc.Client.stop() may sleep too long to wait for all connections

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.10.0, 3.3.0, 2.8.6, 2.9.3, 3.1.4, 3.2.2
    • Component/s: ipc
    • Labels:
      None

      Description

      //Client.java
        public void stop() {
          ...
          // wait until all connections are closed
          while (!connections.isEmpty()) {
            try {
              Thread.sleep(100);
            } catch (InterruptedException e) {
            }
          }
          ...
        }
      

      In the code above, the sleep time is 100ms. We found that simply changing the sleep time to 10ms could improve a Hive job running time by 10x.

        Attachments

        1. c16126_20190219.patch
          0.6 kB
          Tsz-wo Sze
        2. c16126_20190220.patch
          1.0 kB
          Tsz-wo Sze
        3. c16126_20190221.patch
          1.0 kB
          Tsz-wo Sze

          Issue Links

            Activity

              People

              • Assignee:
                szetszwo Tsz-wo Sze
                Reporter:
                szetszwo Tsz-wo Sze
              • Votes:
                0 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: