Tabnine Logo
ResourceManager$RMActiveServices.getServices
Code IndexAdd Tabnine to your IDE (free)

How to use
getServices
method
in
org.apache.hadoop.yarn.server.resourcemanager.ResourceManager$RMActiveServices

Best Java code snippets using org.apache.hadoop.yarn.server.resourcemanager.ResourceManager$RMActiveServices.getServices (Showing top 2 results out of 315)

origin: ch.cern.hadoop/hadoop-yarn-server-resourcemanager

@Test
public void testPolicyInitializeAfterSchedulerInitialized() {
 @SuppressWarnings("resource")
 MockRM rm = new MockRM(conf);
 rm.init(conf);
 
 // ProportionalCapacityPreemptionPolicy should be initialized after
 // CapacityScheduler initialized. We will 
 // 1) find SchedulingMonitor from RMActiveService's service list, 
 // 2) check if ResourceCalculator in policy is null or not. 
 // If it's not null, we can come to a conclusion that policy initialized
 // after scheduler got initialized
 for (Service service : rm.getRMActiveService().getServices()) {
  if (service instanceof SchedulingMonitor) {
   ProportionalCapacityPreemptionPolicy policy =
     (ProportionalCapacityPreemptionPolicy) ((SchedulingMonitor) service)
       .getSchedulingEditPolicy();
   assertNotNull(policy.getResourceCalculator());
   return;
  }
 }
 
 fail("Failed to find SchedulingMonitor service, please check what happened");
}

origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager

SchedulingEditPolicy getSchedulingEditPolicy(MockRM rm) {
 ResourceManager.RMActiveServices activeServices = rm.getRMActiveService();
 SchedulingMonitor mon = null;
 for (Service service : activeServices.getServices()) {
  if (service instanceof SchedulingMonitor) {
   mon = (SchedulingMonitor) service;
   break;
  }
 }
 if (mon != null) {
  return mon.getSchedulingEditPolicy();
 }
 return null;
}
org.apache.hadoop.yarn.server.resourcemanagerResourceManager$RMActiveServicesgetServices

Popular methods of ResourceManager$RMActiveServices

  • <init>
  • addIfService
  • addService
  • init
  • isInState
  • start
  • stop
  • createPolicyMonitors
  • createAndRegisterOpportunisticDispatcher

Popular in Java

  • Finding current android device location
  • notifyDataSetChanged (ArrayAdapter)
  • scheduleAtFixedRate (Timer)
  • getExternalFilesDir (Context)
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now