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

Make AllocationFileLoaderService.Listener public

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0-alpha1
    • 2.9.0, 3.0.0-alpha2
    • fairscheduler, yarn
    • None
    • Reviewed

    Description

      We removed public modifier of AllocationFileLoaderService.Listener in YARN-4997 since it trigger a findbugs warning. However it breaks Hive code in FairSchedulerShim.

      AllocationFileLoaderService allocsLoader = new AllocationFileLoaderService();
          allocsLoader.init(conf);
          allocsLoader.setReloadListener(new AllocationFileLoaderService.Listener() {
            @Override
            public void onReload(AllocationConfiguration allocs) {
              allocConf.set(allocs);
            }
          });
          try {
            allocsLoader.reloadAllocations();
          } catch (Exception ex) {
            throw new IOException("Failed to load queue allocations", ex);
          }
          if (allocConf.get() == null) {
            allocConf.set(new AllocationConfiguration(conf));
          }
          QueuePlacementPolicy queuePolicy = allocConf.get().getPlacementPolicy();
          if (queuePolicy != null) {
            requestedQueue = queuePolicy.assignAppToQueue(requestedQueue, userName);
      

      As a result we should set the modifier back to public.

      Attachments

        1. YARN-6000.001.patch
          1 kB
          Tao Jie

        Issue Links

          Activity

            People

              Tao Jie Tao Jie
              Tao Jie Tao Jie
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: