List of usage examples for org.apache.hadoop.yarn.conf YarnConfiguration NM_CLIENT_MAX_NM_PROXIES
String NM_CLIENT_MAX_NM_PROXIES
To view the source code for org.apache.hadoop.yarn.conf YarnConfiguration NM_CLIENT_MAX_NM_PROXIES.
Click Source Link
From source file:gobblin.yarn.GobblinApplicationMasterTest.java
License:Open Source License
@BeforeClass public void setUp() throws Exception { this.testingZKServer = new TestingServer(TEST_ZK_PORT); URL url = GobblinApplicationMasterTest.class.getClassLoader() .getResource(GobblinApplicationMasterTest.class.getSimpleName() + ".conf"); Assert.assertNotNull(url, "Could not find resource " + url); Config config = ConfigFactory.parseURL(url).resolve(); YarnConfiguration yarnConfiguration = new YarnConfiguration(); yarnConfiguration.set(YarnConfiguration.NM_CLIENT_MAX_NM_PROXIES, "1"); String zkConnectionString = config.getString(GobblinYarnConfigurationKeys.ZK_CONNECTION_STRING_KEY); YarnHelixUtils.createGobblinYarnHelixCluster(zkConnectionString, config.getString(GobblinYarnConfigurationKeys.HELIX_CLUSTER_NAME_KEY)); this.helixManager = HelixManagerFactory.getZKHelixManager( config.getString(GobblinYarnConfigurationKeys.HELIX_CLUSTER_NAME_KEY), TestHelper.TEST_HELIX_INSTANCE_NAME, InstanceType.PARTICIPANT, zkConnectionString); this.helixManager.connect(); this.helixManager.getMessagingService().registerMessageHandlerFactory( Message.MessageType.SHUTDOWN.toString(), new TestShutdownMessageHandlerFactory(this)); this.gobblinApplicationMaster = new GobblinApplicationMaster(TestHelper.TEST_APPLICATION_NAME, ConverterUtils.toContainerId(TestHelper.TEST_CONTROLLER_CONTAINER_ID), config, yarnConfiguration); this.gobblinApplicationMaster.getEventBus().register(this.gobblinApplicationMaster); this.gobblinApplicationMaster.connectHelixManager(); }