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

Iteration on KeyProviderFactory.serviceLoader is thread-unsafe

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.6.0
    • Component/s: security
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      KeyProviderFactory uses ServiceLoader framework to load KeyProviderFactory

        private static final ServiceLoader<KeyProviderFactory> serviceLoader =
            ServiceLoader.load(KeyProviderFactory.class);
      

      The ServiceLoader framework does lazy initialization of services which makes it thread unsafe. If accessed from multiple threads, it is better to synchronize the access.
      Similar synchronization has been done while loading compression codec providers via HADOOP-8406.

        Attachments

        1. HADOOP-10826.patch
          1 kB
          Benoy Antony
        2. HADOOP-10826.patch
          1 kB
          Benoy Antony
        3. HADOOP-10826.patch
          2 kB
          Benoy Antony
        4. HADOOP-10826.patch
          1 kB
          Benoy Antony

        Issue Links

          Activity

            People

            • Assignee:
              benoyantony Benoy Antony
              Reporter:
              benoyantony Benoy Antony

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment