@Override public void run() { srvServices.cancel("testServiceRemove"); } });
services.cancel(reader.readString());
services.cancelAll(); else services.cancel(SERVICE_NAME);
/** * Stops Apache Ignite services that represent distributed inference infrastructure. */ private void stopService() { ignite.services().cancel(String.format(INFERENCE_SERVICE_NAME_PATTERN, suffix)); }
services.cancel(reader.readString());
/** * Stops TensorFlow cluster. * * @param clusterId Cluster identifier. */ public void stopClusterIfExists(UUID clusterId) { ignite.services().cancel(String.format(SERVICE_NAME_TEMPLATE, clusterId)); log.info("Cluster maintained cancelled as a service [clusterId=" + clusterId + "]"); }
/** {@inheritDoc} */ @Override protected Void run(final VisorCancelServiceTaskArg arg) { IgniteServices services = ignite.services(); services.cancel(arg.getName()); return null; }
@Override public Object call() throws Exception { System.out.println("Undeploy " + SERVICE_NAME); ignite.services().cancel(SERVICE_NAME); return null; } });
ignite.services().cancel("service1");
grid(F.first(startedGrids)).services().cancel(SERVICE_NAME);
/** * @throws Exception If failed. */ @Test public void testCancelSingleton() throws Exception { Ignite g = randomGrid(); String name = "serviceCancel"; CountDownLatch latch = new CountDownLatch(1); DummyService.exeLatch(name, latch); g.services().deployClusterSingleton(name, new DummyService()); info("Deployed service: " + name); latch.await(); assertEquals(name, 1, DummyService.started(name)); assertEquals(name, 0, DummyService.cancelled(name)); latch = new CountDownLatch(1); DummyService.cancelLatch(name, latch); g.services().cancel(name); info("Cancelled service: " + name); latch.await(); assertEquals(name, 1, DummyService.started(name)); assertEquals(name, 1, DummyService.cancelled(name)); }
/** * @throws Exception If failed. */ @Test public void testCancelEachNode() throws Exception { Ignite g = randomGrid(); String name = "serviceCancelEachNode"; CountDownLatch latch = new CountDownLatch(nodeCount()); DummyService.exeLatch(name, latch); g.services().deployNodeSingleton(name, new DummyService()); info("Deployed service: " + name); latch.await(); assertEquals(name, nodeCount(), DummyService.started(name)); assertEquals(name, 0, DummyService.cancelled(name)); latch = new CountDownLatch(nodeCount()); DummyService.cancelLatch(name, latch); g.services().cancel(name); info("Cancelled service: " + name); latch.await(); assertEquals(name, nodeCount(), DummyService.started(name)); assertEquals(name, nodeCount(), DummyService.cancelled(name)); }
/** * @throws Exception If failed. */ @Test public void testServiceDeployment1() throws Exception { startGrid(0).services().deploy(serviceConfig(true)); startGrid(1).services().deploy(serviceConfig(false)); client = true; startGrid(2).services().deploy(serviceConfig(true)); startGrid(3).services().deploy(serviceConfig(false)); for (int i = 0; i < 4; i++) ignite(i).services().serviceDescriptors(); ignite(0).services().cancel("TestDeploymentService1"); ignite(1).services().cancel("TestDeploymentService2"); }
/** {@inheritDoc} */ @Override protected Void run(final VisorCancelServiceTaskArg arg) { IgniteServices services = ignite.services(); services.cancel(arg.getName()); return null; }