Examples of create()


Examples of org.apache.ambari.server.api.services.persistence.PersistenceManager.create()

    expect(resource2.getPropertyValue(resourceKeyProperty)).andReturn("id2").anyTimes();

    expect(resourceInstanceFactory.createResource(Resource.Type.Component, mapIds)).
        andReturn(createResource).anyTimes();

    expect(pm.create(createResource, setCreateProps)).andReturn(status);
    expect(status.getStatus()).andReturn(RequestStatus.Status.Complete).anyTimes();
    expect(status.getAssociatedResources()).andReturn(setStatusResources).anyTimes();

    expect(statusResource1.getType()).andReturn(Resource.Type.Component).anyTimes();
    expect(statusResource2.getType()).andReturn(Resource.Type.Component).anyTimes();

Examples of org.apache.ambari.server.orm.dao.ClusterDAO.create()

    ClusterDAO clusterDAO = injector.getInstance(ClusterDAO.class);
    ClusterEntity clusterEntity = new ClusterEntity();
    clusterEntity.setClusterId(1L);
    clusterEntity.setClusterName(CLUSTER_NAME);
    clusterEntity.setDesiredStackVersion(DESIRED_STACK_VERSION);
    clusterDAO.create(clusterEntity);
    return clusterEntity;
  }

  private ClusterServiceEntity createService(ClusterEntity clusterEntity) {
    ClusterServiceDAO clusterServiceDAO = injector.getInstance(ClusterServiceDAO.class);

Examples of org.apache.ambari.server.orm.dao.ClusterServiceDAO.create()

    ClusterServiceDAO clusterServiceDAO = injector.getInstance(ClusterServiceDAO.class);
    ClusterServiceEntity clusterServiceEntity = new ClusterServiceEntity();
    clusterServiceEntity.setClusterId(1L);
    clusterServiceEntity.setClusterEntity(clusterEntity);
    clusterServiceEntity.setServiceName(SERVICE_NAME);
    clusterServiceDAO.create(clusterServiceEntity);
    return clusterServiceEntity;
  }
 
  private ClusterServiceEntity addService(ClusterEntity clusterEntity, String serviceName) {
    ClusterDAO clusterDAO = injector.getInstance(ClusterDAO.class);

Examples of org.apache.ambari.server.orm.dao.ClusterStateDAO.create()

          if (clusterStateDAO.findByPK(clusterEntity.getClusterId()) == null) {
            ClusterStateEntity clusterStateEntity = new ClusterStateEntity();
            clusterStateEntity.setClusterEntity(clusterEntity);
            clusterStateEntity.setCurrentStackVersion(clusterEntity.getDesiredStackVersion());

            clusterStateDAO.create(clusterStateEntity);

            clusterEntity.setClusterStateEntity(clusterStateEntity);

            clusterDAO.merge(clusterEntity);
          }

Examples of org.apache.ambari.server.orm.dao.HostComponentDesiredStateDAO.create()

    desiredStateEntity.setHostEntity(hostEntity);
    stateEntity.setServiceComponentDesiredStateEntity(serviceComponentDesiredStateEntity);
    stateEntity.setHostEntity(hostEntity);

    hostComponentStateDAO.create(stateEntity);
    hostComponentDesiredStateDAO.create(desiredStateEntity);

    serviceComponentDesiredStateDAO.create(serviceComponentDesiredStateEntity);
    hostDAO.merge(hostEntity);
  }

Examples of org.apache.ambari.server.orm.dao.HostComponentStateDAO.create()

    desiredStateEntity.setServiceComponentDesiredStateEntity(serviceComponentDesiredStateEntity);
    desiredStateEntity.setHostEntity(hostEntity);
    stateEntity.setServiceComponentDesiredStateEntity(serviceComponentDesiredStateEntity);
    stateEntity.setHostEntity(hostEntity);

    hostComponentStateDAO.create(stateEntity);
    hostComponentDesiredStateDAO.create(desiredStateEntity);

    serviceComponentDesiredStateDAO.create(serviceComponentDesiredStateEntity);
    hostDAO.merge(hostEntity);
  }

Examples of org.apache.ambari.server.orm.dao.HostDAO.create()

    HostDAO hostDAO = injector.getInstance(HostDAO.class);
    ClusterDAO clusterDAO = injector.getInstance(ClusterDAO.class);
    HostEntity hostEntity = new HostEntity();
    hostEntity.setHostName(HOST_NAME);
    hostEntity.setClusterEntities(Collections.singletonList(clusterEntity));
    hostDAO.create(hostEntity);
    clusterEntity.getHostEntities().add(hostEntity);
    clusterDAO.merge(clusterEntity);
    return hostEntity;
  }
 

Examples of org.apache.ambari.server.orm.dao.KeyValueDAO.create()

      }
      // Rename saved key value entity so that the move is finalized
      KeyValueEntity newEntity = new KeyValueEntity();
      newEntity.setKey("decommissionDataNodesTag-Moved");
      newEntity.setValue(value);
      keyValueDAO.create(newEntity);
      keyValueDAO.remove(keyValueEntity);
    }
  }

  private String getPostgresServiceConfigMappingQuery() {

Examples of org.apache.ambari.server.orm.dao.MetainfoDAO.create()

        metainfoDAO.merge(versionEntity);
      } else {
        versionEntity = new MetainfoEntity();
        versionEntity.setMetainfoName("version");
        versionEntity.setMetainfoValue(version);
        metainfoDAO.create(versionEntity);
      }

    }

    return rows;

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

    stateEntity.setHostEntity(hostEntity);

    hostComponentStateDAO.create(stateEntity);
    hostComponentDesiredStateDAO.create(desiredStateEntity);

    serviceComponentDesiredStateDAO.create(serviceComponentDesiredStateEntity);
    hostDAO.merge(hostEntity);
  }

  protected void addMissingLog4jConfigs() {
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.