Package org.springframework.data.hadoop.configuration

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


    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

TOP

Related Classes of org.springframework.data.hadoop.configuration.ConfigurationFactoryBean

Copyright © 2018 www.massapicom. 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.