Exemplo n.º 1
0
 @Before
 public final void before() throws IOException {
   System.setProperty("tachyon.user.quota.unit.bytes", "1000");
   mLocalTachyonCluster = new LocalTachyonCluster(1000);
   mLocalTachyonCluster.start();
   mMasterInfo = mLocalTachyonCluster.getMasterInfo();
 }
 private LocalTachyonCluster setupSingleMasterCluster()
     throws IOException, ConnectionFailedException {
   // Setup and start the local tachyon cluster.
   LocalTachyonCluster cluster = new LocalTachyonCluster(100, 100, TEST_BLOCK_SIZE);
   cluster.start();
   mMasterTachyonConf = cluster.getMasterTachyonConf();
   mCreateFileThread = new ClientThread(0, cluster.getClient());
   mExecutorsForClient.submit(mCreateFileThread);
   return cluster;
 }
  public static void main(String[] args) throws Exception {
    LocalTachyonCluster cluster = new LocalTachyonCluster(100, 8 * Constants.MB, Constants.GB);
    cluster.start();
    CommonUtils.sleepMs(Constants.SECOND_MS);
    cluster.stop();
    CommonUtils.sleepMs(Constants.SECOND_MS);

    cluster = new LocalTachyonCluster(100, 8 * Constants.MB, Constants.GB);
    cluster.start();
    CommonUtils.sleepMs(Constants.SECOND_MS);
    cluster.stop();
    CommonUtils.sleepMs(Constants.SECOND_MS);
  }
 @Test
 public void singleMasterJournalCrashIntegrationTest() throws Exception {
   LocalTachyonCluster cluster = setupSingleMasterCluster();
   CommonUtils.sleepMs(TEST_TIME_MS);
   // Shutdown the cluster
   cluster.stopTFS();
   CommonUtils.sleepMs(TEST_TIME_MS);
   // Ensure the client threads are stopped.
   mExecutorsForClient.shutdown();
   mExecutorsForClient.awaitTermination(TEST_TIME_MS, TimeUnit.MILLISECONDS);
   reproduceAndCheckState(mCreateFileThread.getSuccessNum());
   // clean up
   cluster.stopUFS();
 }
Exemplo n.º 5
0
 @After
 public final void after() throws Exception {
   mLocalTachyonCluster.stop();
   System.clearProperty("tachyon.user.quota.unit.bytes");
 }