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

Iteration on KeyProviderFactory.serviceLoader is thread-unsafe

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • None
    • security
    • None

    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

        Activity

          People

            benoyantony Benoy Antony
            benoyantony Benoy Antony
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: