Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-2928 YARN Timeline Service v.2: alpha 1
  3. YARN-3367

Replace starting a separate thread for post entity with event loop in TimelineClient

    XMLWordPrintableJSON

Details

    • Reviewed

    Description

      Since YARN-3039, we add loop in TimelineClient to wait for collectorServiceAddress ready before posting any entity. In consumer of TimelineClient (like AM), we are starting a new thread for each call to get rid of potential deadlock in main thread. This way has at least 3 major defects:
      1. The consumer need some additional code to wrap a thread before calling putEntities() in TimelineClient.
      2. It cost many thread resources which is unnecessary.
      3. The sequence of events could be out of order because each posting operation thread get out of waiting loop randomly.
      We should have something like event loop in TimelineClient side, putEntities() only put related entities into a queue of entities and a separated thread handle to deliver entities in queue to collector via REST call.

      Attachments

        1. YARN-3367.YARN-2928.001.patch
          9 kB
          Naganarasimha G R
        2. YARN-3367-feature-YARN-2928.v1.002.patch
          9 kB
          Naganarasimha G R
        3. YARN-3367-feature-YARN-2928.003.patch
          15 kB
          Naganarasimha G R
        4. YARN-3367-feature-YARN-2928.v1.004.patch
          16 kB
          Naganarasimha G R
        5. YARN-3367-YARN-2928.v1.005.patch
          36 kB
          Naganarasimha G R
        6. YARN-3367-YARN-2928.v1.006.patch
          35 kB
          Naganarasimha G R
        7. sjlee-suggestion.patch
          9 kB
          Sangjin Lee
        8. YARN-3367-YARN-2928.v1.007.patch
          46 kB
          Naganarasimha G R
        9. YARN-3367-YARN-2928.v1.008.patch
          47 kB
          Naganarasimha G R
        10. YARN-3367-YARN-2928.v1.009.patch
          47 kB
          Naganarasimha G R
        11. YARN-3367-YARN-2928.v1.010.patch
          47 kB
          Naganarasimha G R
        12. YARN-3367-YARN-2928.v1.011.patch
          50 kB
          Naganarasimha G R
        13. YARN-3367-YARN-2928.v1.012.patch
          50 kB
          Naganarasimha G R
        14. YARN-3367-YARN-2928.v1.013.patch
          50 kB
          Naganarasimha G R
        15. YARN-3367-YARN-2928.v1.014.patch
          52 kB
          Naganarasimha G R

        Issue Links

          Activity

            People

              Naganarasimha Naganarasimha G R
              junping_du Junping Du
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: