Examples of startAndWait()


Examples of org.apache.twill.zookeeper.ZKClientService.startAndWait()

      new TransactionModules().getDistributedModules(),
      new TransactionClientModule()
    );

    ZKClientService zkClient = injector.getInstance(ZKClientService.class);
    zkClient.startAndWait();

    try {
      TransactionServiceClient client = injector.getInstance(TransactionServiceClient.class);
      LOG.info("Starting tx...");
      Transaction tx = client.startShort();
View Full Code Here

Examples of org.apache.twill.zookeeper.ZKClientService.startAndWait()

      new TransactionModules().getDistributedModules(),
      new TransactionClientModule()
    );

    ZKClientService zkClientService = injector.getInstance(ZKClientService.class);
    zkClientService.startAndWait();

    // start a tx server
    txService = injector.getInstance(TransactionService.class);
    Future<?> future = Services.getCompletionFuture(txService);
    try {
View Full Code Here

Examples of org.apache.twill.zookeeper.ZKClientService.startAndWait()

    try {
      final String namespace = Joiner.on('/').join("/twill", RunIds.generate(), "runnables", "Runner1");

      final ZKClientService zkClient = ZKClientService.Builder.of(zkServer.getConnectionStr()).build();
      zkClient.startAndWait();
      zkClient.create(namespace, null, CreateMode.PERSISTENT).get();

      try {
        JsonObject content = new JsonObject();
        content.addProperty("containerId", "container-123");
View Full Code Here

Examples of org.apache.twill.zookeeper.ZKClientService.startAndWait()

    LOG.info("ZKServer: " + zkServer.getConnectionStr());

    try {
      RunId runId = RunIds.generate();
      ZKClientService zkClientService = ZKClientService.Builder.of(zkServer.getConnectionStr()).build();
      zkClientService.startAndWait();

      Service service = createService(zkClientService, runId);
      service.startAndWait();

      TwillController controller = getController(zkClientService, runId);
View Full Code Here

Examples of org.apache.twill.zookeeper.ZKClientService.startAndWait()

    LOG.info("ZKServer: " + zkServer.getConnectionStr());
    try {
      RunId runId = RunIds.generate();
      ZKClientService zkClientService = ZKClientService.Builder.of(zkServer.getConnectionStr()).build();
      zkClientService.startAndWait();

      final CountDownLatch runLatch = new CountDownLatch(1);
      final CountDownLatch stopLatch = new CountDownLatch(1);
      TwillController controller = getController(zkClientService, runId);
      controller.addListener(new ServiceListenerAdapter() {
View Full Code Here

Examples of org.apache.twill.zookeeper.ZKClientService.startAndWait()

    LOG.info("ZKServer: " + zkServer.getConnectionStr());
    try {
      RunId runId = RunIds.generate();
      ZKClientService zkClientService = ZKClientService.Builder.of(zkServer.getConnectionStr()).build();
      zkClientService.startAndWait();

      Service service = createService(zkClientService, runId);
      service.startAndWait();

      final CountDownLatch runLatch = new CountDownLatch(1);
View Full Code Here

Examples of org.erlide.runtime.OtpNodeProxy.startAndWait()

            }
        } else {
            erts = null;
        }
        final IOtpNodeProxy nodeProxy = new OtpNodeProxy(data);
        nodeProxy.startAndWait();

        final IBackendManager backendManager = BackendCore.getBackendManager();
        final Backend b = data.isInternal() ? new InternalBackend(data, nodeProxy, erts)
                : new ExternalBackend(data, nodeProxy, erts);
View Full Code Here

Examples of org.erlide.runtime.api.IOtpNodeProxy.startAndWait()

            }
        } else {
            erts = null;
        }
        final IOtpNodeProxy nodeProxy = new OtpNodeProxy(data);
        nodeProxy.startAndWait();

        final IBackendManager backendManager = BackendCore.getBackendManager();
        final Backend b = data.isInternal() ? new InternalBackend(data, nodeProxy, erts)
                : new ExternalBackend(data, nodeProxy, erts);
View Full Code Here

Examples of org.hibernate.search.MassIndexer.startAndWait()

     */
    public static void reindex(Class clazz, EntityManager entityManager) {
        FullTextEntityManager txtentityManager = Search.getFullTextEntityManager(entityManager);
        MassIndexer massIndexer = txtentityManager.createIndexer(clazz);
        try {
            massIndexer.startAndWait();
        } catch (InterruptedException e) {
            log.error("mass reindexing interrupted: " + e.getMessage());
        } finally {
            txtentityManager.flushToIndexes();
        }
View Full Code Here

Examples of org.hibernate.search.MassIndexer.startAndWait()

        FullTextEntityManager txtentityManager = Search.getFullTextEntityManager(entityManager);
        MassIndexer massIndexer = txtentityManager.createIndexer();
        massIndexer.purgeAllOnStart(true);
        try {
            if (!async) {
                massIndexer.startAndWait();
            } else {
                massIndexer.start();
            }
        } catch (InterruptedException e) {
            log.error("mass reindexing interrupted: " + e.getMessage());
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.