Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-10830

Replace ConcurrentHashMap with HashMap protected by ReadWriteLock in NodeStateMap

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Done
    • None
    • 2.0.0
    • SCM

    Description

      There is a class NodeStateMap with 3 fields:

      1. ConcurrentHashMap<UUID, DatanodeInfo> nodeMap
      2. ConcurrentHashMap<UUID, Set<ContainerID>> nodeToContainer
      3. private final ReadWriteLock lock

      Both read and write in NodeStateMap are protected by lock.

      We can safely replace ConcurrentHashMap with pure HashMap

      Attachments

        Issue Links

          Activity

            People

              montura Andrei Mikhalev
              montura Andrei Mikhalev
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: