Package org.platformlayer.service.solr.model

Examples of org.platformlayer.service.solr.model.SolrServer


    @Override
    protected SolrServer buildItemTemplate() throws OpsException {
      Tag parentTag = Tag.buildParentTag(cluster.getKey());

      SolrServer server = new SolrServer();

      server.clusterId = clusterId;

      Tag uniqueTag = UniqueTag.build(cluster, clusterId);
      server.getTags().add(uniqueTag);
      server.getTags().add(parentTag);

      server.key = PlatformLayerKey.fromId(cluster.getId() + "-" + clusterId);

      return server;
    }
View Full Code Here


    waitForHealthy(field);

    // Currently, we need to do a manual configure operation...
    // TODO: trigger this automatically

    SolrServer server = getItem(id + "-0", SolrServer.class);
    JobData configureJob = getContext().doConfigure(server);

    waitForJobComplete(configureJob, TimeSpan.FIVE_MINUTES);

    testSolrCustomField(url, customFieldKey);
View Full Code Here

  public void doOperation() {
  }

  @Override
  protected void addChildren() throws OpsException {
    SolrServer model = OpsContext.get().getInstance(SolrServer.class);

    int port = SolrConstants.API_PORT;

    InstanceBuilder vm;

    {
      vm = InstanceBuilder.build(model.dnsName, this, model.getTags());
      vm.publicPorts.add(port);

      vm.hostPolicy.allowRunInContainer = true;

      // TODO: This needs to be configurable...
      vm.minimumMemoryMb = 2048;

      addChild(vm);
    }

    {
      SolrInstall install = injected(SolrInstall.class);
      vm.addChild(install);
    }

    {
      SolrInstance service = injected(SolrInstance.class);
      vm.addChild(service);
    }

    {
      PublicEndpoint endpoint = injected(PublicEndpoint.class);
      // endpoint.network = null;
      endpoint.publicPort = port;
      endpoint.backendPort = port;
      endpoint.dnsName = model.dnsName;

      endpoint.tagItem = model.getKey();
      endpoint.parentItem = model.getKey();

      vm.addChild(endpoint);
    }
  }
View Full Code Here

  public SolrCluster getCluster() throws OpsException {
    if (cluster == null) {
      cluster = OpsContext.get().getInstance(SolrCluster.class);
      if (cluster == null) {
        SolrServer server = getServer();
        PlatformLayerKey parent = Tag.PARENT.findUnique(server);
        if (parent != null) {
          cluster = platformLayer.getItem(parent, SolrCluster.class);
        }
      }
View Full Code Here

TOP

Related Classes of org.platformlayer.service.solr.model.SolrServer

Copyright © 2018 www.massapicom. 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.