Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-21426

Remove Utilities Global Random

    XMLWordPrintableJSON

Details

    Description

      https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java#L253

      Remove global Random object in favor of ThreadLocalRandom.

      ThreadLocalRandom is initialized with an internally generated seed that may not otherwise be modified. When applicable, use of ThreadLocalRandom rather than shared Random objects in concurrent programs will typically encounter much less overhead and contention.

      https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ThreadLocalRandom.html

      Attachments

        1. HIVE-21426.1.patch
          9 kB
          David Mollitor
        2. HIVE-21426.2.patch
          9 kB
          David Mollitor

        Issue Links

          Activity

            People

              belugabehr David Mollitor
              belugabehr David Mollitor
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h