Examples of ConfigurationFactoryBean


Examples of org.springframework.data.hadoop.configuration.ConfigurationFactoryBean

    }
  }

  @Test
  public void testURLCycle() throws Exception {
    ConfigurationFactoryBean cfactory;
    cfactory = new ConfigurationFactoryBean();
    cfactory.setRegisterUrlHandler(true);
    cfactory.afterPropertiesSet();

    /* create hdfs resource loader */
    HdfsResourceLoader ldr = new HdfsResourceLoader(cfactory.getObject(), null, null);
    assertNotNull(ldr);
  }
View Full Code Here

Examples of org.springframework.data.hadoop.configuration.ConfigurationFactoryBean

    super("HADOOP_FS");
  }

  @Override
  protected void obtainResource() throws Exception {
    ConfigurationFactoryBean cfb = new ConfigurationFactoryBean();
    Properties props = new Properties();
    String fsUri = System.getProperty("fsUri");
    props.setProperty("fs.defaultFS", fsUri == null ? "hdfs://localhost:8020" : fsUri);
    cfb.setProperties(props);
    cfb.setRegisterUrlHandler(false);
    cfb.afterPropertiesSet();
    this.configuration = cfb.getObject();
    FileSystem fs = FileSystem.get(this.configuration);
    fs.exists(new Path("/"));
    this.resource = fs;
  }
View Full Code Here

Examples of org.springframework.yarn.configuration.ConfigurationFactoryBean

    super(objectPostProcessor);
  }

  @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.springframework.yarn.configuration.ConfigurationFactoryBean

  @Configuration
  static class Config {

    @Bean(name=YarnSystemConstants.DEFAULT_ID_CONFIGURATION)
    public YarnConfiguration yarnConfiguration() throws Exception {
      ConfigurationFactoryBean factory = new ConfigurationFactoryBean();
      factory.afterPropertiesSet();
      return factory.getObject();
    }
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.