Package org.apache.ambari.server.state

Examples of org.apache.ambari.server.state.ServiceComponent.persist()


    nameNode.persist();
    ServiceComponent dataNode = hdfs.addServiceComponent("DATANODE");
    dataNode.persist();
   
    ServiceComponent serviceCheckNode = hdfs.addServiceComponent("HDFS_CLIENT");
    serviceCheckNode.persist();

    ServiceComponentHost nameNodeHost = nameNode.addServiceComponentHost(h1);
    nameNodeHost.persist();

    ServiceComponentHost dataNodeHost = dataNode.addServiceComponentHost(h2);
View Full Code Here


    try {
      sc = s.getServiceComponent(svcComponent);
    } catch (ServiceComponentNotFoundException e) {
      sc = serviceComponentFactory.createNew(s, svcComponent);
      s.addServiceComponent(sc);
      sc.persist();
    }

    ServiceComponentHost impl = serviceComponentHostFactory.createNew(
        sc, hostName);
    impl.persist();
View Full Code Here

      if (request.getConfigVersions() != null) {
      }

      sc.updateDesiredConfigs(configs);
      s.addServiceComponent(sc);
      sc.persist();
    }

  }

  @Override
View Full Code Here

    Service s = serviceFactory.createNew(c1, "HDFS");
    c1.addService(s);
    s.persist();
    ServiceComponent sc = serviceComponentFactory.createNew(s, "NAMENODE");
    s.addServiceComponent(sc);
    sc.persist();
    ServiceComponentHost sch =
        serviceComponentHostFactory.createNew(sc, "h1", false);
    sc.addServiceComponentHost(sch);
    sch.persist();
View Full Code Here

    c1.addService("MAPREDUCE").persist();

    Service hdfs = c1.addService("HDFS");
    hdfs.persist();
    ServiceComponent nameNode = hdfs.addServiceComponent("NAMENODE");
    nameNode.persist();


    assertEquals(2, c1.getServices().size());
    assertEquals(2, injector.getProvider(EntityManager.class).get().
        createQuery("SELECT service FROM ClusterServiceEntity service").getResultList().size());
View Full Code Here

    hdfs.persist();

    Assert.assertNotNull(injector.getInstance(ClusterServiceDAO.class).findByClusterAndServiceNames(c1, "HDFS"));

    ServiceComponent nameNode = hdfs.addServiceComponent("NAMENODE");
    nameNode.persist();
    ServiceComponent dataNode = hdfs.addServiceComponent("DATANODE");
    dataNode.persist();
   
    ServiceComponent serviceCheckNode = hdfs.addServiceComponent("HDFS_CLIENT");
    serviceCheckNode.persist();
View Full Code Here

    Assert.assertNotNull(injector.getInstance(ClusterServiceDAO.class).findByClusterAndServiceNames(c1, "HDFS"));

    ServiceComponent nameNode = hdfs.addServiceComponent("NAMENODE");
    nameNode.persist();
    ServiceComponent dataNode = hdfs.addServiceComponent("DATANODE");
    dataNode.persist();
   
    ServiceComponent serviceCheckNode = hdfs.addServiceComponent("HDFS_CLIENT");
    serviceCheckNode.persist();

    ServiceComponentHost nameNodeHost = nameNode.addServiceComponentHost(h1);
View Full Code Here

    nameNode.persist();
    ServiceComponent dataNode = hdfs.addServiceComponent("DATANODE");
    dataNode.persist();
   
    ServiceComponent serviceCheckNode = hdfs.addServiceComponent("HDFS_CLIENT");
    serviceCheckNode.persist();

    ServiceComponentHost nameNodeHost = nameNode.addServiceComponentHost(h1);
    nameNodeHost.persist();

    ServiceComponentHost dataNodeHost = dataNode.addServiceComponentHost(h2);
View Full Code Here

      // Expected
    }

    ServiceComponent sc1 = serviceComponentFactory.createNew(s1, "NAMENODE");
    s1.addServiceComponent(sc1);
    sc1.persist();
    ServiceComponent sc2 = serviceComponentFactory.createNew(s2, "NAMENODE");
    s2.addServiceComponent(sc2);
    sc2.persist();
    ServiceComponent sc3 = serviceComponentFactory.createNew(s3, "NAMENODE");
    s3.addServiceComponent(sc3);
View Full Code Here

    ServiceComponent sc1 = serviceComponentFactory.createNew(s1, "NAMENODE");
    s1.addServiceComponent(sc1);
    sc1.persist();
    ServiceComponent sc2 = serviceComponentFactory.createNew(s2, "NAMENODE");
    s2.addServiceComponent(sc2);
    sc2.persist();
    ServiceComponent sc3 = serviceComponentFactory.createNew(s3, "NAMENODE");
    s3.addServiceComponent(sc3);
    sc3.persist();

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.