Examples of findByPK()


Examples of org.apache.ambari.server.orm.dao.ServiceComponentDesiredStateDAO.findByPK()

    primaryKey.setClusterId(cluster.getClusterId());
    primaryKey.setComponentName(componentName);
    primaryKey.setServiceName(serviceName);

    ServiceComponentDesiredStateEntity serviceComponentDesiredStateEntity =
        serviceComponentDesiredStateDAO.findByPK(primaryKey);

    ServiceComponent sc1 = serviceComponentFactory.createExisting(service,
        serviceComponentDesiredStateEntity);
    Assert.assertNotNull(sc1);
    Assert.assertEquals(State.INSTALLED, sc1.getDesiredState());
View Full Code Here

Examples of org.apache.ambari.server.orm.dao.ServiceComponentDesiredStateDAO.findByPK()

    primaryKey.setClusterId(cluster.getClusterId());
    primaryKey.setComponentName(componentName);
    primaryKey.setServiceName(serviceName);

    ServiceComponentDesiredStateEntity serviceComponentDesiredStateEntity =
        serviceComponentDesiredStateDAO.findByPK(primaryKey);

    ServiceComponent sc1 = serviceComponentFactory.createExisting(service,
        serviceComponentDesiredStateEntity);
    Assert.assertNotNull(sc1);
    Assert.assertEquals(State.INSTALLED, sc1.getDesiredState());
View Full Code Here

Examples of org.apache.ambari.server.orm.dao.ServiceComponentDesiredStateDAO.findByPK()

    primaryKey.setClusterId(cluster.getClusterId());
    primaryKey.setComponentName(componentName);
    primaryKey.setServiceName(serviceName);

    ServiceComponentDesiredStateEntity serviceComponentDesiredStateEntity =
        serviceComponentDesiredStateDAO.findByPK(primaryKey);

    ServiceComponent sc1 = serviceComponentFactory.createExisting(service,
        serviceComponentDesiredStateEntity);
    Assert.assertNotNull(sc1);
    Assert.assertEquals(State.INSTALLED, sc1.getDesiredState());
View Full Code Here

Examples of org.apache.ambari.server.orm.dao.ServiceComponentDesiredStateDAO.findByPK()

      ServiceComponentDesiredStateEntityPK pkHS = new ServiceComponentDesiredStateEntityPK();
      pkHS.setComponentName("HISTORYSERVER");
      pkHS.setClusterId(clusterEntity.getClusterId());
      pkHS.setServiceName("MAPREDUCE");
     
      ServiceComponentDesiredStateEntity serviceComponentDesiredStateEntityHS = serviceComponentDesiredStateDAO.findByPK(pkHS);
     
      // already have historyserver
      if(serviceComponentDesiredStateEntityHS != null)
        continue;
     
View Full Code Here

Examples of org.apache.ambari.server.orm.dao.ServiceComponentDesiredStateDAO.findByPK()

      ServiceComponentDesiredStateEntityPK pkJT = new ServiceComponentDesiredStateEntityPK();
      pkJT.setComponentName("JOBTRACKER");
      pkJT.setClusterId(clusterEntity.getClusterId());
      pkJT.setServiceName("MAPREDUCE");
     
      ServiceComponentDesiredStateEntity serviceComponentDesiredStateEntityJT = serviceComponentDesiredStateDAO.findByPK(pkJT);
     
      // no jobtracker present probably mapreduce is not installed
      if(serviceComponentDesiredStateEntityJT == null)
        continue;
View Full Code Here

Examples of org.apache.ambari.server.orm.dao.ServiceComponentDesiredStateDAO.findByPK()

    primaryKey.setClusterId(cluster.getClusterId());
    primaryKey.setComponentName(componentName);
    primaryKey.setServiceName(serviceName);

    ServiceComponentDesiredStateEntity serviceComponentDesiredStateEntity =
        serviceComponentDesiredStateDAO.findByPK(primaryKey);

    ServiceComponent sc1 = serviceComponentFactory.createExisting(service,
        serviceComponentDesiredStateEntity);
    Assert.assertNotNull(sc1);
    Assert.assertEquals(State.INSTALLED, sc1.getDesiredState());
View Full Code Here

Examples of org.apache.ambari.server.orm.dao.ServiceComponentDesiredStateDAO.findByPK()

    primaryKey.setClusterId(cluster.getClusterId());
    primaryKey.setComponentName(componentName);
    primaryKey.setServiceName(serviceName);

    ServiceComponentDesiredStateEntity serviceComponentDesiredStateEntity =
        serviceComponentDesiredStateDAO.findByPK(primaryKey);

    ServiceComponent sc1 = serviceComponentFactory.createExisting(service,
        serviceComponentDesiredStateEntity);
    Assert.assertNotNull(sc1);
    Assert.assertEquals(State.INSTALLED, sc1.getDesiredState());
View Full Code Here

Examples of org.apache.ambari.server.orm.dao.ServiceComponentDesiredStateDAO.findByPK()

      ServiceComponentDesiredStateEntityPK pkHS = new ServiceComponentDesiredStateEntityPK();
      pkHS.setComponentName("HISTORYSERVER");
      pkHS.setClusterId(clusterEntity.getClusterId());
      pkHS.setServiceName("MAPREDUCE");
     
      ServiceComponentDesiredStateEntity serviceComponentDesiredStateEntityHS = serviceComponentDesiredStateDAO.findByPK(pkHS);
     
      // already have historyserver
      if(serviceComponentDesiredStateEntityHS != null)
        continue;
     
View Full Code Here

Examples of org.apache.ambari.server.orm.dao.ServiceComponentDesiredStateDAO.findByPK()

      ServiceComponentDesiredStateEntityPK pkJT = new ServiceComponentDesiredStateEntityPK();
      pkJT.setComponentName("JOBTRACKER");
      pkJT.setClusterId(clusterEntity.getClusterId());
      pkJT.setServiceName("MAPREDUCE");
     
      ServiceComponentDesiredStateEntity serviceComponentDesiredStateEntityJT = serviceComponentDesiredStateDAO.findByPK(pkJT);
     
      // no jobtracker present probably mapreduce is not installed
      if(serviceComponentDesiredStateEntityJT == null)
        continue;
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.