Examples of stopAndWait()


Examples of ca.uhn.hl7v2.app.SimpleServer.stopAndWait()

         * for an example of this.
         */
        connectionHub.discard(connection);
       
        // Stop the receiving server and client
        server.stopAndWait();
        ConnectionHub.shutdown();

    }

}
View Full Code Here

Examples of co.cask.tephra.TransactionManager.stopAndWait()

      Transaction tx2 = txManager.startShort();
      Assert.assertTrue(txManager.canCommit(tx2, Collections.singleton(b)));
      // start a tx3
      Transaction tx3 = txManager.startShort();
      // restart
      txManager.stopAndWait();
      TransactionSnapshot origState = txManager.getCurrentState();
      LOG.info("Orig state: " + origState);

      Thread.sleep(100);
      // starts a new tx manager
View Full Code Here

Examples of co.cask.tephra.coprocessor.TransactionStateCache.stopAndWait()

    cache.startAndWait();
    // verify that the transaction snapshot read matches what we wrote in setupBeforeClass()
    TransactionSnapshot cachedSnapshot = cache.getLatestState();
    assertNotNull(cachedSnapshot);
    assertEquals(invalidSet, cachedSnapshot.getInvalid());
    cache.stopAndWait();
  }
}
View Full Code Here

Examples of co.cask.tephra.persist.HDFSTransactionStateStorage.stopAndWait()

        new HashMap<Long, Set<ChangeId>>(), new TreeMap<Long, Set<ChangeId>>());
    HDFSTransactionStateStorage tmpStorage =
      new HDFSTransactionStateStorage(conf, new SnapshotCodecProvider(conf));
    tmpStorage.startAndWait();
    tmpStorage.writeSnapshot(snapshot);
    tmpStorage.stopAndWait();
  }

  @AfterClass
  public static void shutdownAfterClass() throws Exception {
    dfsCluster.shutdown();
View Full Code Here

Examples of com.cloudera.kitten.appmaster.service.ApplicationMasterServiceImpl.stopAndWait()

    ApplicationMasterService service = new ApplicationMasterServiceImpl(params, getConf());
    service.startAndWait();
    while (service.hasRunningContainers()) {
      Thread.sleep(1000);
    }
    service.stopAndWait();
    return 0;
  }

  public static void main(String[] args) throws Exception {
    try {
View Full Code Here

Examples of com.google.common.util.concurrent.Service.stopAndWait()

        }
      }, Threads.SAME_THREAD_EXECUTOR);

      Assert.assertTrue(runLatch.await(2, TimeUnit.SECONDS));

      service.stopAndWait();

      zkClientService.stopAndWait();
    } finally {
      zkServer.stopAndWait();
    }
View Full Code Here

Examples of com.google.common.util.concurrent.Service.stopAndWait()

        }
      }, Threads.SAME_THREAD_EXECUTOR);

      Assert.assertTrue(runLatch.await(2, TimeUnit.SECONDS));

      service.stopAndWait();

      zkClientService.stopAndWait();
    } finally {
      zkServer.stopAndWait();
    }
View Full Code Here

Examples of org.apache.twill.api.TwillController.stopAndWait()

      } catch (TimeoutException e) {
        // OK, expected.
      }
    }

    controller.stopAndWait();
  }

  private boolean expireAppMasterZKSession(TwillController controller, long timeout, TimeUnit timeoutUnit) {
    MBeanServer mbeanServer = MBeanRegistry.getInstance().getPlatformMBeanServer();
    QueryExp query = Query.isInstanceOf(new StringValueExp(ConnectionMXBean.class.getName()));
View Full Code Here

Examples of org.apache.twill.api.TwillController.stopAndWait()

    try {
      ServiceDiscovered discovered = controller.discoverService("sleep");
      Assert.assertTrue(YarnTestUtils.waitForSize(discovered, 2, 60));
    } finally {
      controller.stopAndWait();
    }
  }


  /**
 
View Full Code Here

Examples of org.apache.twill.api.TwillController.stopAndWait()

    ListenableFuture<Service.State> completion = Services.getCompletionFuture(controller);
    try {
      completion.get(60, TimeUnit.SECONDS);
    } finally {
      controller.stopAndWait();
    }
  }

  /**
   * An application that contains two {@link ServiceRunnable}.
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.