Package org.apache.hadoop.service

Examples of org.apache.hadoop.service.Service.stop()


    //this triggers a callback that is caught and ignored
    Service current = currentService;
    previousService = current;
    currentService = null;
    if (current != null) {
      current.stop();
    }
  }


  /**
 
View Full Code Here


    if (service == null) {
      return;
    }
    try {
      // Stop the  Service
      service.stop();
    } catch (Throwable t) {
      LOG.info("Error stopping " + service.getName(), t);
    }
  }
}
View Full Code Here

    final AuxServices aux = new AuxServices();
    aux.init(conf);
    aux.start();

    Service s = aux.getServices().iterator().next();
    s.stop();
    assertEquals("Auxiliary service stopped, but AuxService unaffected.",
        STOPPED, aux.getServiceState());
    assertTrue(aux.getServices().isEmpty());
  }
View Full Code Here

    final AuxServices aux = new AuxServices();
    aux.init(conf);
    aux.start();

    Service s = aux.getServices().iterator().next();
    s.stop();
    assertEquals("Auxiliary service stopped, but AuxService unaffected.",
        STOPPED, aux.getServiceState());
    assertTrue(aux.getServices().isEmpty());
  }
View Full Code Here

    //this triggers a callback that is caught and ignored
    Service current = activeService;
    previousService = current;
    activeService = null;
    if (current != null) {
      current.stop();
    }
  }

  /**
   * Start the next service in the list.
View Full Code Here

      log = LoggerFactory.getLogger(TestWorkflowCompositeService.class);

  @Test
  public void testSingleChild() throws Throwable {
    Service parent = startService(new MockService());
    parent.stop();
  }

  @Test
  public void testSingleChildTerminating() throws Throwable {
    ServiceParent parent =
View Full Code Here

    if (service == null) {
      return;
    }
    try {
      // Stop the  Service
      service.stop();
    } catch (Throwable t) {
      LOG.info("Error stopping {}: {}", service.getName(), t);
    }
  }
}
View Full Code Here

    final AuxServices aux = new AuxServices();
    aux.init(conf);
    aux.start();

    Service s = aux.getServices().iterator().next();
    s.stop();
    assertEquals("Auxiliary service stopped, but AuxService unaffected.",
        STOPPED, aux.getServiceState());
    assertTrue(aux.getServices().isEmpty());
  }
View Full Code Here

    final AuxServices aux = new AuxServices();
    aux.init(conf);
    aux.start();

    Service s = aux.getServices().iterator().next();
    s.stop();
    assertEquals("Auxiliary service stopped, but AuxService unaffected.",
        STOPPED, aux.getServiceState());
    assertTrue(aux.getServices().isEmpty());
  }
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.