Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-4547

LeafQueue#getApplications() is read-only interface, but it provides reference to caller

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Done
    • None
    • None
    • capacity scheduler
    • None

    Description

      The below API is read-only interface, but returning reference to the caller. This causing caller to modify the orderingPolicy entities. If required reference of ordering policy, caller can use LeagQueue#getOrderingPolicy()#getSchedulableEntities()

      The returning object should be clone of orderingPolicy.getSchedulableEntities()

        /**
         * Obtain (read-only) collection of active applications.
         */
        public Collection<FiCaSchedulerApp> getApplications() {
          return orderingPolicy.getSchedulableEntities();
        }
      

      Attachments

        Activity

          People

            rohithsharma Rohith Sharma K S
            rohithsharma Rohith Sharma K S
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: