Package com.google.common.util.concurrent

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


          stopLatch.countDown();
        }
      }, Threads.SAME_THREAD_EXECUTOR);

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

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

      service.stop();
View Full Code Here


  @Test
  public void testCompletion() throws ExecutionException, InterruptedException {
    Service service = new DummyService("s1", new AtomicBoolean());
    ListenableFuture<Service.State> completion = Services.getCompletionFuture(service);

    service.start();
    service.stop();

    completion.get();

    AtomicBoolean transiting = new AtomicBoolean();
View Full Code Here

          stopLatch.countDown();
        }
      }, Threads.SAME_THREAD_EXECUTOR);

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

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

      service.stop();
View Full Code Here

                                                          program.getJarLocation(), locationFactory,
                                                          txSystemClient);
    ProgramController controller = new SparkProgramController(sparkRuntimeService, context);

    LOG.info("Starting Spark Job: {}", context.toString());
    sparkRuntimeService.start();
    return controller;
  }
}
View Full Code Here

                                                                  program.getJarLocation(), locationFactory,
                                                                  streamAdmin, txSystemClient);
    ProgramController controller = new MapReduceProgramController(mapReduceRuntimeService, context);

    LOG.info("Starting MapReduce Job: {}", context.toString());
    mapReduceRuntimeService.start();
    return controller;
  }
}
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.