Examples of reloadTopologies()


Examples of org.apache.hadoop.gateway.services.topology.TopologyService.reloadTopologies()

        "Redeploys one or all of the gateway's clusters (a.k.a topologies).";

    @Override
    public void execute() throws Exception {
      TopologyService ts = getTopologyService();
      ts.reloadTopologies();
      if (cluster != null) {
        if (validateClusterName(cluster, ts)) {
          ts.redeployTopologies(cluster);
        }
        else {
View Full Code Here

Examples of org.apache.hadoop.gateway.services.topology.TopologyService.reloadTopologies()

  }


  public static void redeployTopologies( String topologyName  ) {
    TopologyService ts = getGatewayServices().getService(GatewayServices.TOPOLOGY_SERVICE);
    ts.reloadTopologies();
    ts.redeployTopologies(topologyName);
  }

  public static GatewayServer startGateway( GatewayConfig config, GatewayServices svcs ) {
    try {
View Full Code Here

Examples of org.apache.hadoop.gateway.services.topology.impl.DefaultTopologyService.reloadTopologies()

      provider.init(config, c);


      provider.addTopologyChangeListener(topoListener);

      provider.reloadTopologies();


      Collection<Topology> topologies = provider.getTopologies();
      assertThat(topologies, notNullValue());
      assertThat(topologies.size(), is(1));
View Full Code Here

Examples of org.apache.hadoop.gateway.services.topology.impl.DefaultTopologyService.reloadTopologies()

      assertThat(topoListener.events.size(), is(1));
      topoListener.events.clear();

      // Add a file to the directory.
      File two = createFile(dir, "two.xml", "org/apache/hadoop/gateway/topology/file/topology-two.xml", 1L);
      provider.reloadTopologies();
      topologies = provider.getTopologies();
      assertThat(topologies.size(), is(2));
      Set<String> names = new HashSet<String>(Arrays.asList("one", "two"));
      Iterator<Topology> iterator = topologies.iterator();
      topology = iterator.next();
View Full Code Here

Examples of org.apache.hadoop.gateway.services.topology.impl.DefaultTopologyService.reloadTopologies()

      assertThat(event.getType(), is(TopologyEvent.Type.CREATED));
      assertThat(event.getTopology(), notNullValue());

      // Update a file in the directory.
      two = createFile(dir, "two.xml", "org/apache/hadoop/gateway/topology/file/topology-three.xml", 2L);
      provider.reloadTopologies();
      topologies = provider.getTopologies();
      assertThat(topologies.size(), is(2));
      names = new HashSet<String>(Arrays.asList("one", "two"));
      iterator = topologies.iterator();
      topology = iterator.next();
View Full Code Here

Examples of org.apache.hadoop.gateway.services.topology.impl.DefaultTopologyService.reloadTopologies()

      names.remove(topology.getName());
      assertThat(names.size(), is(0));

      // Remove a file from the directory.
      two.delete();
      provider.reloadTopologies();
      topologies = provider.getTopologies();
      assertThat(topologies.size(), is(1));
      topology = topologies.iterator().next();
      assertThat(topology.getName(), is("one"));
      assertThat(topology.getTimestamp(), is(time));
View Full Code Here

Examples of org.apache.hadoop.gateway.topology.file.FileTopologyProvider.reloadTopologies()

  public static void redeployTopologies( GatewayConfig config, String topologyName ) {
    try {
      File topologiesDir = calculateAbsoluteTopologiesDir( config );
      FileTopologyProvider provider = new FileTopologyProvider( topologiesDir );
      provider.reloadTopologies();
      for( Topology topology : provider.getTopologies() ) {
        if( topologyName == null || topologyName.equals( topology.getName() ) )  {
          redeployTopology( topology );
        }
      }
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.