Examples of client()


Examples of juzu.test.protocol.mock.MockApplication.client()

  }

  @Test
  public void testValidation() throws Exception {
    MockApplication app = application("juzu.simple").init();
    MockClient client = app.client();
    MockViewBridge render = client.render();
    ValidationError va = assertInstanceOf(ValidationError.class, render.getResponse());
    Set<ConstraintViolation<Object>> violations = va.getViolations();
    assertEquals(1, violations.size());
    ConstraintViolation<Object> violation = violations.iterator().next();
View Full Code Here

Examples of net.kuujo.copycat.internal.cluster.RemoteNode.client()

    if (context.currentLeader() != null) {
      @SuppressWarnings("rawtypes")
      RemoteNode leader = context.clusterManager().remoteNode(context.currentLeader());
      if (leader != null) {
        logger().debug("{} - Forwarding {} to leader {}", context.clusterManager().localNode(), request, leader);
        leader.client().connect().whenComplete((r, e) -> {
          if (e != null) {
            future.completeExceptionally(e);
          } else {
            leader.client().submit(request).whenComplete((result, error) -> {
              if (error != null) {
View Full Code Here

Examples of org.apache.accumulo.server.test.scalability.ScaleTest.client()

      test.setup();
    } else if (action.equalsIgnoreCase("client")) {
      InetAddress addr = InetAddress.getLocalHost();
      String host = addr.getHostName();
      fs.createNewFile(new Path("/accumulo-scale/clients/" + host));
      test.client();
      fs.copyFromLocalFile(new Path("/tmp/scale.out"), new Path("/accumulo-scale/results/" + host));
    } else if (action.equalsIgnoreCase("teardown")) {
      test.teardown();
    }
  }
View Full Code Here

Examples of org.apache.accumulo.test.scalability.ScaleTest.client()

      test.setup();
    } else if (opts.action.equalsIgnoreCase("client")) {
      InetAddress addr = InetAddress.getLocalHost();
      String host = addr.getHostName();
      fs.createNewFile(new Path("/accumulo-scale/clients/" + host));
      test.client();
      fs.copyFromLocalFile(new Path("/tmp/scale.out"), new Path("/accumulo-scale/results/" + host));
    } else if (opts.action.equalsIgnoreCase("teardown")) {
      test.teardown();
    }
  }
View Full Code Here

Examples of org.apache.accumulo.test.scalability.ScaleTest.client()

      test.setup();
    } else if (opts.action.equalsIgnoreCase("client")) {
      InetAddress addr = InetAddress.getLocalHost();
      String host = addr.getHostName();
      fs.createNewFile(new Path("/accumulo-scale/clients/" + host));
      test.client();
      fs.copyFromLocalFile(new Path("/tmp/scale.out"), new Path("/accumulo-scale/results/" + host));
    } else if (opts.action.equalsIgnoreCase("teardown")) {
      test.teardown();
    }
  }
View Full Code Here

Examples of org.apache.qpid.proton.engine.Sasl.client()

            connection.setContext(new ConnectionContext(service, connector));
            connector.setConnection(connection);
            Sasl sasl = connector.sasl();
            if (sasl != null)
            {
                sasl.client();
                sasl.setMechanisms(new String[]{"ANONYMOUS"});
            }
            connection.open();
        }
View Full Code Here

Examples of org.elasticsearch.node.Node.client()

    logger.info("Using ElasticSearch AutoDiscovery mode");
    Node node = NodeBuilder.nodeBuilder().client(true).local(true).node();
    if (client != null) {
      client.close();
    }
    client = node.client();
  }

  @Override
  public void configure(Context context) {
    //To change body of implemented methods use File | Settings | File Templates.
View Full Code Here

Examples of org.elasticsearch.node.Node.client()

    logger.info("Using ElasticSearch AutoDiscovery mode");
    Node node = NodeBuilder.nodeBuilder().client(true).local(true).node();
    if (client != null) {
      client.close();
    }
    client = node.client();
  }

  @Override
  public void configure(Context context) {
    //To change body of implemented methods use File | Settings | File Templates.
View Full Code Here

Examples of org.elasticsearch.node.Node.client()

            nodes[i] = nodeBuilder().settings(settingsBuilder().put(settings).put("name", "node" + i)).node();
        }

        Node client = nodeBuilder().settings(settingsBuilder().put(settings).put("name", "client")).client(true).node();

        Client client1 = client.client();

        Thread.sleep(1000);
        client1.admin().indices().prepareCreate("test").setSettings(settings).addMapping("type1", XContentFactory.jsonBuilder().startObject().startObject("type1")
                .startObject("_source").field("enabled", false).endObject()
                .startObject("_all").field("enabled", false).endObject()
View Full Code Here

Examples of org.elasticsearch.node.Node.client()

                stopWatch.start();
            }
        }
        System.out.println("Indexing took " + stopWatch.totalTime() + ", TPS " + (((double) COUNT) / stopWatch.totalTime().secondsFrac()));

        client.client().admin().indices().prepareRefresh().execute().actionGet();
        System.out.println("Count: " + client.client().prepareCount().setQuery(matchAllQuery()).execute().actionGet().count());

        client.close();

        for (Node node : nodes) {
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.