@Override public STATE getServiceState() { return service.getServiceState(); }
/** * Stop a service. * <p/>Do nothing if the service is null or not * in a state in which it can be/needs to be stopped. * <p/> * The service state is checked <i>before</i> the operation begins. * This process is <i>not</i> thread safe. * @param service a service or null */ public static void stop(Service service) { if (service != null) { Service.STATE state = service.getServiceState(); if (state == Service.STATE.STARTED) { service.stop(); } } }
/** * Start a service. * <p/> * The service state is checked <i>before</i> the operation begins. * This process is <i>not</i> thread safe. * @param service a service that must be in the state * {@link Service.STATE#INITED} * @throws RuntimeException on a state change failure * @throws IllegalStateException if the service is in the wrong state */ public static void start(Service service) { Service.STATE state = service.getServiceState(); ensureCurrentState(state, Service.STATE.INITED); service.start(); }
/** * Initialize a service. * <p/> * The service state is checked <i>before</i> the operation begins. * This process is <i>not</i> thread safe. * @param service a service that must be in the state * {@link Service.STATE#NOTINITED} * @param configuration the configuration to initialize the service with * @throws RuntimeException on a state change failure * @throws IllegalStateException if the service is in the wrong state */ public static void init(Service service, HiveConf configuration) { Service.STATE state = service.getServiceState(); ensureCurrentState(state, Service.STATE.NOTINITED); service.init(configuration); }
@Override public STATE getServiceState() { return service.getServiceState(); }
@Override public STATE getServiceState() { return service.getServiceState(); }
@Override public STATE getServiceState() { return service.getServiceState(); }
@Override public STATE getServiceState() { return service.getServiceState(); }
@Override public STATE getServiceState() { return service.getServiceState(); }
/** * Stop a service. * <p/>Do nothing if the service is null or not * in a state in which it can be/needs to be stopped. * <p/> * The service state is checked <i>before</i> the operation begins. * This process is <i>not</i> thread safe. * @param service a service or null */ public static void stop(Service service) { if (service != null) { Service.STATE state = service.getServiceState(); if (state == Service.STATE.STARTED) { service.stop(); } } }
/** * Stop a service. * <p/>Do nothing if the service is null or not * in a state in which it can be/needs to be stopped. * <p/> * The service state is checked <i>before</i> the operation begins. * This process is <i>not</i> thread safe. * @param service a service or null */ public static void stop(Service service) { if (service != null) { Service.STATE state = service.getServiceState(); if (state == Service.STATE.STARTED) { service.stop(); } } }
/** * Initialize a service. * <p/> * The service state is checked <i>before</i> the operation begins. * This process is <i>not</i> thread safe. * @param service a service that must be in the state * {@link Service.STATE#NOTINITED} * @param configuration the configuration to initialize the service with * @throws RuntimeException on a state change failure * @throws IllegalStateException if the service is in the wrong state */ public static void init(Service service, HiveConf configuration) { Service.STATE state = service.getServiceState(); ensureCurrentState(state, Service.STATE.NOTINITED); service.init(configuration); }
/** * Start a service. * <p/> * The service state is checked <i>before</i> the operation begins. * This process is <i>not</i> thread safe. * @param service a service that must be in the state * {@link Service.STATE#INITED} * @throws RuntimeException on a state change failure * @throws IllegalStateException if the service is in the wrong state */ public static void start(Service service) { Service.STATE state = service.getServiceState(); ensureCurrentState(state, Service.STATE.INITED); service.start(); }
/** * Start a service. * <p/> * The service state is checked <i>before</i> the operation begins. * This process is <i>not</i> thread safe. * @param service a service that must be in the state * {@link Service.STATE#INITED} * @throws RuntimeException on a state change failure * @throws IllegalStateException if the service is in the wrong state */ public static void start(Service service) { Service.STATE state = service.getServiceState(); ensureCurrentState(state, Service.STATE.INITED); service.start(); }
/** * Initialize a service. * * The service state is checked <i>before</i> the operation begins. * This process is <i>not</i> thread safe. * @param service a service that must be in the state * {@link Service.STATE#NOTINITED} * @param configuration the configuration to initialize the service with * @throws RuntimeException on a state change failure * @throws IllegalStateException if the service is in the wrong state */ public static void init(Service service, HiveConf configuration) { Service.STATE state = service.getServiceState(); ensureCurrentState(state, Service.STATE.NOTINITED); service.init(configuration); }
/** * Start a service. * <p/> * The service state is checked <i>before</i> the operation begins. * This process is <i>not</i> thread safe. * @param service a service that must be in the state * {@link Service.STATE#INITED} * @throws RuntimeException on a state change failure * @throws IllegalStateException if the service is in the wrong state */ public static void start(Service service) { Service.STATE state = service.getServiceState(); ensureCurrentState(state, Service.STATE.INITED); service.start(); }
/** * Start a service. * * The service state is checked <i>before</i> the operation begins. * This process is <i>not</i> thread safe. * @param service a service that must be in the state * {@link Service.STATE#INITED} * @throws RuntimeException on a state change failure * @throws IllegalStateException if the service is in the wrong state */ public static void start(Service service) { Service.STATE state = service.getServiceState(); ensureCurrentState(state, Service.STATE.INITED); service.start(); }
/** * Start a service. * * The service state is checked <i>before</i> the operation begins. * This process is <i>not</i> thread safe. * @param service a service that must be in the state * {@link Service.STATE#INITED} * @throws RuntimeException on a state change failure * @throws IllegalStateException if the service is in the wrong state */ public static void start(Service service) { Service.STATE state = service.getServiceState(); ensureCurrentState(state, Service.STATE.INITED); service.start(); }
/** * Initialize a service. * * The service state is checked <i>before</i> the operation begins. * This process is <i>not</i> thread safe. * @param service a service that must be in the state * {@link Service.STATE#NOTINITED} * @param configuration the configuration to initialize the service with * @throws RuntimeException on a state change failure * @throws IllegalStateException if the service is in the wrong state */ public static void init(Service service, HiveConf configuration) { Service.STATE state = service.getServiceState(); ensureCurrentState(state, Service.STATE.NOTINITED); service.init(configuration); }
/** * Initialize a service. * <p/> * The service state is checked <i>before</i> the operation begins. * This process is <i>not</i> thread safe. * @param service a service that must be in the state * {@link Service.STATE#NOTINITED} * @param configuration the configuration to initialize the service with * @throws RuntimeException on a state change failure * @throws IllegalStateException if the service is in the wrong state */ public static void init(Service service, HiveConf configuration) { Service.STATE state = service.getServiceState(); ensureCurrentState(state, Service.STATE.NOTINITED); service.init(configuration); }