Java Code Examples for org.apache.hadoop.yarn.server.resourcemanager.ResourceManager#getServiceState()
The following examples show how to use
org.apache.hadoop.yarn.server.resourcemanager.ResourceManager#getServiceState() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ClusterInfo.java From hadoop with Apache License 2.0 | 6 votes |
public ClusterInfo(ResourceManager rm) { long ts = ResourceManager.getClusterTimeStamp(); this.id = ts; this.state = rm.getServiceState(); this.haState = rm.getRMContext().getHAServiceState(); this.rmStateStoreName = rm.getRMContext().getStateStore().getClass() .getName(); this.startedOn = ts; this.resourceManagerVersion = YarnVersionInfo.getVersion(); this.resourceManagerBuildVersion = YarnVersionInfo.getBuildVersion(); this.resourceManagerVersionBuiltOn = YarnVersionInfo.getDate(); this.hadoopVersion = VersionInfo.getVersion(); this.hadoopBuildVersion = VersionInfo.getBuildVersion(); this.hadoopVersionBuiltOn = VersionInfo.getDate(); }
Example 2
Source File: ClusterInfo.java From big-c with Apache License 2.0 | 6 votes |
public ClusterInfo(ResourceManager rm) { long ts = ResourceManager.getClusterTimeStamp(); this.id = ts; this.state = rm.getServiceState(); this.haState = rm.getRMContext().getHAServiceState(); this.rmStateStoreName = rm.getRMContext().getStateStore().getClass() .getName(); this.startedOn = ts; this.resourceManagerVersion = YarnVersionInfo.getVersion(); this.resourceManagerBuildVersion = YarnVersionInfo.getBuildVersion(); this.resourceManagerVersionBuiltOn = YarnVersionInfo.getDate(); this.hadoopVersion = VersionInfo.getVersion(); this.hadoopBuildVersion = VersionInfo.getBuildVersion(); this.hadoopVersionBuiltOn = VersionInfo.getDate(); }
Example 3
Source File: TestGetGroups.java From hadoop with Apache License 2.0 | 5 votes |
@BeforeClass public static void setUpResourceManager() throws IOException, InterruptedException { conf = new YarnConfiguration(); resourceManager = new ResourceManager() { @Override protected void doSecureLogin() throws IOException { }; }; resourceManager.init(conf); new Thread() { public void run() { resourceManager.start(); }; }.start(); int waitCount = 0; while (resourceManager.getServiceState() == STATE.INITED && waitCount++ < 10) { LOG.info("Waiting for RM to start..."); Thread.sleep(1000); } if (resourceManager.getServiceState() != STATE.STARTED) { throw new IOException( "ResourceManager failed to start. Final state is " + resourceManager.getServiceState()); } LOG.info("ResourceManager RMAdmin address: " + conf.get(YarnConfiguration.RM_ADMIN_ADDRESS)); }
Example 4
Source File: TestResourceManagerAdministrationProtocolPBClientImpl.java From hadoop with Apache License 2.0 | 5 votes |
/** * Start resource manager server */ @BeforeClass public static void setUpResourceManager() throws IOException, InterruptedException { Configuration.addDefaultResource("config-with-security.xml"); Configuration configuration = new YarnConfiguration(); resourceManager = new ResourceManager() { @Override protected void doSecureLogin() throws IOException { } }; resourceManager.init(configuration); new Thread() { public void run() { resourceManager.start(); } }.start(); int waitCount = 0; while (resourceManager.getServiceState() == STATE.INITED && waitCount++ < 10) { LOG.info("Waiting for RM to start..."); Thread.sleep(1000); } if (resourceManager.getServiceState() != STATE.STARTED) { throw new IOException("ResourceManager failed to start. Final state is " + resourceManager.getServiceState()); } LOG.info("ResourceManager RMAdmin address: " + configuration.get(YarnConfiguration.RM_ADMIN_ADDRESS)); client = new ResourceManagerAdministrationProtocolPBClientImpl(1L, getProtocolAddress(configuration), configuration); }
Example 5
Source File: TestGetGroups.java From big-c with Apache License 2.0 | 5 votes |
@BeforeClass public static void setUpResourceManager() throws IOException, InterruptedException { conf = new YarnConfiguration(); resourceManager = new ResourceManager() { @Override protected void doSecureLogin() throws IOException { }; }; resourceManager.init(conf); new Thread() { public void run() { resourceManager.start(); }; }.start(); int waitCount = 0; while (resourceManager.getServiceState() == STATE.INITED && waitCount++ < 10) { LOG.info("Waiting for RM to start..."); Thread.sleep(1000); } if (resourceManager.getServiceState() != STATE.STARTED) { throw new IOException( "ResourceManager failed to start. Final state is " + resourceManager.getServiceState()); } LOG.info("ResourceManager RMAdmin address: " + conf.get(YarnConfiguration.RM_ADMIN_ADDRESS)); }
Example 6
Source File: TestResourceManagerAdministrationProtocolPBClientImpl.java From big-c with Apache License 2.0 | 5 votes |
/** * Start resource manager server */ @BeforeClass public static void setUpResourceManager() throws IOException, InterruptedException { Configuration.addDefaultResource("config-with-security.xml"); Configuration configuration = new YarnConfiguration(); resourceManager = new ResourceManager() { @Override protected void doSecureLogin() throws IOException { } }; resourceManager.init(configuration); new Thread() { public void run() { resourceManager.start(); } }.start(); int waitCount = 0; while (resourceManager.getServiceState() == STATE.INITED && waitCount++ < 10) { LOG.info("Waiting for RM to start..."); Thread.sleep(1000); } if (resourceManager.getServiceState() != STATE.STARTED) { throw new IOException("ResourceManager failed to start. Final state is " + resourceManager.getServiceState()); } LOG.info("ResourceManager RMAdmin address: " + configuration.get(YarnConfiguration.RM_ADMIN_ADDRESS)); client = new ResourceManagerAdministrationProtocolPBClientImpl(1L, getProtocolAddress(configuration), configuration); }