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

Make AllocationFileLoaderService.Listener public

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0-alpha1
    • Fix Version/s: 2.9.0, 3.0.0-alpha2
    • Component/s: fairscheduler, yarn
    • Labels:
      None
    • Hadoop Flags:
      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

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: