Examples of YarnConfiguration


Examples of org.apache.hadoop.yarn.conf.YarnConfiguration

  @Test
  public void testSimpleConfig() throws Exception {
    assertNotNull(ctx);
    assertTrue(ctx.containsBean("yarnConfiguration"));
    YarnConfiguration config = (YarnConfiguration) ctx.getBean("yarnConfiguration");
    assertNotNull(config);

    assertTrue(ctx.containsBean("yarnLocalresources"));
    ResourceLocalizer localizer = (ResourceLocalizer) ctx.getBean("yarnLocalresources");
    assertNotNull(localizer);
View Full Code Here

Examples of org.apache.hadoop.yarn.conf.YarnConfiguration

  @Override
  protected YarnConfiguration performBuild() throws Exception {
    ConfigurationFactoryBean fb = new ConfigurationFactoryBean();

    if (!loadDefaults) {
      fb.setConfiguration(new YarnConfiguration(new Configuration(false)));
    }

    fb.setResources(resources);
    fb.setProperties(properties);
    fb.setFsUri(fileSystemUri);
    fb.setRmAddress(rmAddress);
    fb.setSchedulerAddress(schedulerAddress);

    if (hadoopSecurity != null) {
      fb.setSecurityAuthMethod(hadoopSecurity.getSecurityAuthMethod());
      fb.setUserPrincipal(hadoopSecurity.getUserPrincipal());
      fb.setUserKeytab(hadoopSecurity.getUserKeytab());
      fb.setNamenodePrincipal(hadoopSecurity.getNamenodePrincipal());
      fb.setRmManagerPrincipal(hadoopSecurity.getRmManagerPrincipal());
    }

    fb.afterPropertiesSet();

    YarnConfiguration c = fb.getObject();
    c = postProcess(c);
    return c;
  }
View Full Code Here

Examples of org.apache.hadoop.yarn.conf.YarnConfiguration

   * @param context the application context
   * @return the installed report
   * @throws Exception the exception
   */
  protected String getInstalledReport(ApplicationContext context) throws Exception {
    YarnConfiguration yarnConfiguration = context.getBean(YarnConfiguration.class);
    SpringYarnProperties springYarnProperties = context.getBean(SpringYarnProperties.class);

    String applicationBaseDir = springYarnProperties.getApplicationBaseDir();
    Path path = new Path(applicationBaseDir);
    FileSystem fs = path.getFileSystem(yarnConfiguration);
View Full Code Here

Examples of org.apache.hadoop.yarn.conf.YarnConfiguration

 
  @Before
  public void setUp() throws IOException {
    scheduler = new FairScheduler();
   
    Configuration conf = new YarnConfiguration();
    conf.setClass(YarnConfiguration.RM_SCHEDULER, FairScheduler.class,
        ResourceScheduler.class);
    conf.set("yarn.scheduler.fair.event-log-enabled", "true");

    // All tests assume only one assignment per node update
    conf.set(FairSchedulerConfiguration.ASSIGN_MULTIPLE, "false");
    resourceManager = new ResourceManager();
    resourceManager.init(conf);
    ((AsyncDispatcher)resourceManager.getRMContext().getDispatcher()).start();
    scheduler.init(conf);
    scheduler.start();
View Full Code Here

Examples of org.apache.hadoop.yarn.conf.YarnConfiguration

    OutputCommitter mockCommitter = mock(OutputCommitter.class);
    Clock mockClock = mock(Clock.class);
   
    CommitterEventHandler handler = new CommitterEventHandler(mockContext,
        mockCommitter, new TestingRMHeartbeatHandler());
    YarnConfiguration conf = new YarnConfiguration();
    conf.set(MRJobConfig.MR_AM_STAGING_DIR, stagingDir);
    JobContext mockJobContext = mock(JobContext.class);
    ApplicationAttemptId attemptid =
      ConverterUtils.toApplicationAttemptId("appattempt_1234567890000_0001_0");
    JobId jobId =  TypeConverter.toYarn(
        TypeConverter.fromYarn(attemptid.getApplicationId()));
View Full Code Here

Examples of org.apache.hadoop.yarn.conf.YarnConfiguration

    OutputCommitter mockCommitter = mock(OutputCommitter.class);
    Clock mockClock = mock(Clock.class);
   
    CommitterEventHandler handler = new CommitterEventHandler(mockContext,
        mockCommitter, new TestingRMHeartbeatHandler());
    YarnConfiguration conf = new YarnConfiguration();
    conf.set(MRJobConfig.MR_AM_STAGING_DIR, stagingDir);
    JobContext mockJobContext = mock(JobContext.class);
    ApplicationAttemptId attemptid =
      ConverterUtils.toApplicationAttemptId("appattempt_1234567890000_0001_0");
    JobId jobId =  TypeConverter.toYarn(
        TypeConverter.fromYarn(attemptid.getApplicationId()));
View Full Code Here

Examples of org.apache.hadoop.yarn.conf.YarnConfiguration

  }
 
  @Test
  public void testDelegationToken() throws IOException, InterruptedException {
   
    final YarnConfiguration conf = new YarnConfiguration();
    conf.set(YarnConfiguration.RM_PRINCIPAL, "testuser/localhost@apache.org");

    conf.set(CommonConfigurationKeysPublic.HADOOP_SECURITY_AUTHENTICATION, "kerberos");
    UserGroupInformation.setConfiguration(conf);
   
    ResourceScheduler scheduler = createMockScheduler(conf);
   
    long initialInterval = 10000l;
View Full Code Here

Examples of org.apache.hadoop.yarn.conf.YarnConfiguration

  private final int GB = 1024;
  private static YarnConfiguration conf;

  @BeforeClass
  public static void setup() {
    conf = new YarnConfiguration();
    conf.setClass(YarnConfiguration.RM_SCHEDULER,
        FifoScheduler.class, ResourceScheduler.class);
  }
View Full Code Here

Examples of org.apache.hadoop.yarn.conf.YarnConfiguration

  }

  @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) {
View Full Code Here

Examples of org.apache.hadoop.yarn.conf.YarnConfiguration

  @Test
  public void testDefaultMinimumAllocation() throws Exception {
    // Test with something lesser than default
    testMinimumAllocation(
        new YarnConfiguration(TestFifoScheduler.conf),
        YarnConfiguration.DEFAULT_RM_SCHEDULER_MINIMUM_ALLOCATION_MB / 2);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.