FifoScheduler extends
    AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> implements
    Configurable { @Override public void serviceInit(Configuration conf) throws Exception { initScheduler(conf); super.serviceInit(conf); } FifoScheduler(); @Override void serviceInit(Configuration conf); @Override void serviceStart(); @Override void serviceStop(); @Override synchronized void setConf(Configuration conf); @Override synchronized Configuration getConf(); @Override int getNumClusterNodes(); @Override synchronized void setRMContext(RMContext rmContext); @Override synchronized void reinitialize(Configuration conf, RMContext rmContext); @Override Allocation allocate(ApplicationAttemptId applicationAttemptId,
      List<ResourceRequest> ask, List<ContainerId> release,
      List<String> blacklistAdditions, List<String> blacklistRemovals,
      List<ContainerResourceChangeRequest> increaseRequests,
      List<ContainerResourceChangeRequest> decreaseRequests); @VisibleForTesting synchronized void addApplication(ApplicationId applicationId,
      String queue, String user, boolean isAppRecovering); @VisibleForTesting synchronized void addApplicationAttempt(ApplicationAttemptId appAttemptId,
          boolean transferStateFromPreviousAttempt,
          boolean isAttemptRecovering); @Override void handle(SchedulerEvent event); @Override QueueInfo getQueueInfo(String queueName,
      boolean includeChildQueues, boolean recursive); @Override List<QueueUserACLInfo> getQueueUserAclInfo(); @Override ResourceCalculator getResourceCalculator(); @Override void recover(RMState state); @Override RMContainer getRMContainer(ContainerId containerId); @Override QueueMetrics getRootQueueMetrics(); @Override synchronized boolean checkAccess(UserGroupInformation callerUGI,
      QueueACL acl, String queueName); @Override synchronized List<ApplicationAttemptId> getAppsInQueue(String queueName); Resource getUsedResource();  }
@Test(timeout = 30000) public void testConfValidation() throws Exception { FifoScheduler scheduler = new FifoScheduler(); Configuration conf = new YarnConfiguration(); conf.setInt(YarnConfiguration.RM_SCHEDULER_MINIMUM_ALLOCATION_MB, 2048); conf.setInt(YarnConfiguration.RM_SCHEDULER_MAXIMUM_ALLOCATION_MB, 1024); try { scheduler.serviceInit(conf); fail("Exception is expected because the min memory allocation is" + " larger than the max memory allocation."); } catch (YarnRuntimeException e) { assertTrue("The thrown exception is not the expected one.", e .getMessage().startsWith("Invalid resource scheduler memory")); } }