Examples of GatewayConfig


Examples of org.apache.hadoop.gateway.config.GatewayConfig

public class DeploymentFactoryTest {

  @Test
  public void testEmptyTopology() throws IOException, SAXException, ParserConfigurationException {
    GatewayConfig config = new GatewayConfigImpl();

    Topology topology = new Topology();
    topology.setName( "test-cluster" );

    WebArchive war = DeploymentFactory.createDeployment( config, topology );
View Full Code Here

Examples of org.apache.hadoop.gateway.config.GatewayConfig

    assertThat( gateway, hasXPath( "/gateway" ) );
  }

  @Test
  public void testSimpleTopology() throws IOException, SAXException, ParserConfigurationException {
    GatewayConfig config = new GatewayConfigImpl();
    Topology topology = new Topology();
    topology.setName( "test-cluster" );
    Service service = new Service();
    service.setRole( "NAMENODE" );
    service.setUrl( new URL( "http://localhost:50070/webhdfs/v1" ) );
View Full Code Here

Examples of org.apache.hadoop.gateway.config.GatewayConfig

      FileAlterationMonitor monitor = new FileAlterationMonitor(Long.MAX_VALUE);

      TopologyService provider = new DefaultTopologyService();
      Map<String, String> c = new HashMap<String, String>();

      GatewayConfig config = EasyMock.createNiceMock(GatewayConfig.class);
      EasyMock.expect(config.getGatewayTopologyDir()).andReturn(dir.toString()).anyTimes();
      EasyMock.replay(config);

      provider.init(config, c);

View Full Code Here

Examples of org.apache.hadoop.gateway.config.GatewayConfig

  GatewayServices getGatewayServices() {
    return services;
  }

  private void initializeServices(boolean persisting) throws ServiceLifecycleException {
    GatewayConfig config = new GatewayConfigImpl();
    Map<String,String> options = new HashMap<String,String>();
    options.put(GatewayCommandLine.PERSIST_LONG, Boolean.toString(persisting));
    if (master != null) {
      options.put("master", master);
    }
View Full Code Here

Examples of org.apache.hadoop.gateway.config.GatewayConfig

   public MasterCreateCommand() {
   }

   private GatewayConfig getGatewayConfig() {
     GatewayConfig result;
     Configuration conf = getConf();
     if( conf != null && conf instanceof GatewayConfig ) {
       result = (GatewayConfig)conf;
     } else {
       result = new GatewayConfigImpl();
View Full Code Here

Examples of org.apache.hadoop.gateway.config.GatewayConfig

     return result;
   }

   public boolean validate() {
     boolean valid = true;
     GatewayConfig config = getGatewayConfig();
     File dir = new File( config.getGatewaySecurityDir() );
     File file = new File( dir, "master" );
     if( file.exists() ) {
       if( force ) {
         if( !file.canWrite() ) {
           out.println(
View Full Code Here

Examples of org.apache.hadoop.gateway.config.GatewayConfig

        buildProperties = loadBuildProperties();
        services = instantiateGatewayServices();
        if (services == null) {
          log.failedToInstantiateGatewayServices();
        }
        GatewayConfig config = new GatewayConfigImpl();
        if (config.isHadoopKerberosSecured()) {
          configureKerberosSecurity( config );
        }
        Map<String,String> options = new HashMap<String,String>();
        options.put(GatewayCommandLine.PERSIST_LONG, Boolean.toString(cmd.hasOption(GatewayCommandLine.PERSIST_LONG)));
        services.init(config, options);
View Full Code Here

Examples of org.apache.hadoop.gateway.config.GatewayConfig

  }

  @Test
  public void testFullConfig() {
    System.setProperty( GatewayConfigImpl.GATEWAY_HOME_VAR, getHomeDirName( "conf-full/conf/gateway-default.xml" ) );
    GatewayConfig config = new GatewayConfigImpl();
    assertThat( config.getGatewayPort(), is( 7777 ) );
    assertNull("ssl.exclude.protocols should be null.", config.getExcludedSSLProtocols());
    //assertThat( config.getShiroConfigFile(), is( "full-shiro.ini") );
  }
View Full Code Here

Examples of org.apache.hadoop.gateway.config.GatewayConfig

  }

  @Test
  public void testDemoConfig() {
    System.setProperty( GatewayConfigImpl.GATEWAY_HOME_VAR, getHomeDirName( "conf-demo/conf/gateway-default.xml" ) );
    GatewayConfig config = new GatewayConfigImpl();
    assertThat(config.getGatewayPort(), is( 8888 ) );
    assertTrue( config.getExcludedSSLProtocols().get(0).equals("SSLv3"));
    //assertThat( config.getShiroConfigFile(), is( "full-shiro.ini") );
  }
View Full Code Here

Examples of org.apache.hadoop.gateway.config.GatewayConfig

  }

  @Test
  public void testSiteConfig() {
    System.setProperty( GatewayConfigImpl.GATEWAY_HOME_VAR, getHomeDirName( "conf-site/conf/gateway-site.xml" ) );
    GatewayConfig config = new GatewayConfigImpl();
    assertThat( config.getGatewayPort(), is( 5555 ) );
    //assertThat( config.getShiroConfigFile(), is( "site-shiro.ini") );
  }
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.