Examples of DeployClient


Examples of com.caucho.server.admin.DeployClient

    throws DeploymentManagerCreationException
  {
    _user = user;
    _password = password;

    _deployClient = new DeployClient(_host, _port, _user, _password);
  }
View Full Code Here

Examples of com.caucho.server.admin.DeployClient

  }

  // XXX: hack
  private void reset()
  {
    _deployClient = new DeployClient(_host, _port, _user, _password);
  }
View Full Code Here

Examples of com.caucho.server.admin.DeployClient

    throws DeploymentManagerCreationException
  {
    _user = user;
    _password = password;

    _deployClient = new DeployClient(_host, _port, _user, _password);
  }
View Full Code Here

Examples of com.caucho.server.admin.DeployClient

  }

  // XXX: hack
  private void reset()
  {
    _deployClient = new DeployClient(_host, _port, _user, _password);
  }
View Full Code Here

Examples of net.sf.katta.client.DeployClient

    }
    return optionMap;
  }

  protected static void addIndex(InteractionProtocol protocol, String name, String path, int replicationLevel) {
    IDeployClient deployClient = new DeployClient(protocol);
    if (name.trim().equals("*")) {
      throw new IllegalArgumentException("Index with name " + name + " isn't allowed.");
    }
    if (deployClient.existsIndex(name)) {
      throw new IllegalArgumentException("Index with name " + name + " already exists.");
    }

    try {
      long startTime = System.currentTimeMillis();
      IIndexDeployFuture deployFuture = deployClient.addIndex(name, path, replicationLevel);
      while (true) {
        long duration = System.currentTimeMillis() - startTime;
        if (deployFuture.getState() == IndexState.DEPLOYED) {
          System.out.println("\ndeployed index '" + name + "' in " + duration + " ms");
          break;
View Full Code Here

Examples of net.sf.katta.client.DeployClient

      printError("interrupted wait on index deployment");
    }
  }

  protected static void removeIndex(InteractionProtocol protocol, final String indexName) {
    IDeployClient deployClient = new DeployClient(protocol);
    if (!deployClient.existsIndex(indexName)) {
      throw new IllegalArgumentException("index '" + indexName + "' does not exist");
    }
    deployClient.removeIndex(indexName);
  }
View Full Code Here

Examples of net.sf.katta.client.DeployClient

    }
  }

  private static void deployIndex(InteractionProtocol protocol, String indexName, File index)
          throws InterruptedException {
    DeployClient deployClient1 = new DeployClient(protocol);
    IIndexDeployFuture deployment = deployClient1.addIndex(indexName, index.getAbsolutePath(), 1);
    LOG.info("Joining deployment on " + deployment.getClass().getName());
    deployment.joinDeployment();
  }
View Full Code Here

Examples of net.sf.katta.client.DeployClient

    InteractionProtocol protocol = new InteractionProtocol(zkClient, _miniCluster.getZkConfiguration());
    Master master = new Master(protocol, false);
    master.start();
    TestUtil.waitUntilBecomeMaster(master);

    final IDeployClient deployClient = new DeployClient(_protocol);
    WatchedEvent event = new WatchedEvent(new WatcherEvent(EventType.None.getIntValue(), KeeperState.Expired
            .getIntValue(), null));
    for (int i = 0; i < 25; i++) {
      final String indexName = "index" + i;
      IIndexDeployFuture deployFuture = deployClient.addIndex(indexName, INDEX_FILE.getAbsolutePath(), 1);
      zkClient.getEventLock().lock();
      zkClient.process(event);
      zkClient.getEventLock().unlock();
      IndexState indexState = deployFuture.joinDeployment();
      assertEquals("" + deployClient.getIndexMetaData(indexName).getDeployError(), IndexState.DEPLOYED, indexState);

      if (indexState == IndexState.ERROR) {
        IndexDeployError deployError = protocol.getIndexMD(indexName).getDeployError();
        Set<Shard> shards = protocol.getIndexMD(indexName).getShards();
        for (Shard shard : shards) {
View Full Code Here

Examples of net.sf.katta.client.DeployClient

    super(2);
  }

  @Test
  public void measureSearchPerformance() throws Exception {
    DeployClient deployClient = new DeployClient(_miniCluster.getProtocol());
    deployClient.addIndex("index1", TestResources.INDEX1.getAbsolutePath(), 1).joinDeployment();
    deployClient.addIndex("index2", TestResources.INDEX2.getAbsolutePath(), 1).joinDeployment();

    final ILuceneClient client = new LuceneClient(_miniCluster.getZkConfiguration());
    final Query query = new QueryParser(Version.LUCENE_30, "", new KeywordAnalyzer()).parse("foo: bar");
    long start = System.currentTimeMillis();
    for (int i = 0; i < 10000; i++) {
View Full Code Here

Examples of net.sf.katta.client.DeployClient

    super(2, false, false);
  }

  @Override
  protected void afterClusterStart() throws Exception {
    IDeployClient _deployClient = new DeployClient(_miniCluster.getProtocol());
    // generate 3 index (2 shards + once combined index)
    _luceneIndex = File.createTempFile(LuceneClientTest.class.getSimpleName(), "-lucene");
    _kattaIndex = File.createTempFile(LuceneClientTest.class.getSimpleName(), "-katta");
    _kattaIndex.delete();
    _luceneIndex.delete();
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.