@Override public synchronized void init(HiveConf hiveConf) { for (Service service : serviceList) { service.init(hiveConf); } super.init(hiveConf); }
@Override public synchronized void start() { super.start(); }
@Override public synchronized void stop() { super.stop(); }
/** * {@inheritDoc} * * @throws IllegalStateException * if the current service state does not permit * this action */ @Override public synchronized void init(HiveConf hiveConf) { ensureCurrentState(STATE.NOTINITED); setHiveConf(hiveConf); changeState(STATE.INITED); LOG.info("Service:" + getName() + " is inited."); }
/** * {@inheritDoc} * * @throws IllegalStateException * if the current service state does not permit * this action */ @Override public synchronized void start() { startTime = System.currentTimeMillis(); ensureCurrentState(STATE.INITED); changeState(STATE.STARTED); LOG.info("Service:" + getName() + " is started."); }
/** * {@inheritDoc} * * @throws IllegalStateException * if the current service state does not permit * this action */ @Override public synchronized void stop() { if (state == STATE.STOPPED || state == STATE.INITED || state == STATE.NOTINITED) { // already stopped, or else it was never // started (eg another service failing canceled startup) return; } ensureCurrentState(STATE.STARTED); changeState(STATE.STOPPED); LOG.info("Service:" + getName() + " is stopped."); }
/** * {@inheritDoc} * * @throws IllegalStateException * if the current service state does not permit * this action */ @Override public synchronized void init(HiveConf hiveConf) { ensureCurrentState(STATE.NOTINITED); setHiveConf(hiveConf); changeState(STATE.INITED); LOG.info("Service:" + getName() + " is inited."); }
/** * {@inheritDoc} * * @throws IllegalStateException * if the current service state does not permit * this action */ @Override public synchronized void init(HiveConf hiveConf) { ensureCurrentState(STATE.NOTINITED); this.hiveConf = hiveConf; changeState(STATE.INITED); LOG.info("Service:" + getName() + " is inited."); }
@Override public synchronized void init(HiveConf hiveConf) { LogDivertAppender.registerRoutingAppender(hiveConf); LogDivertAppenderForTest.registerRoutingAppenderIfInTest(hiveConf); if (hiveConf.isWebUiQueryInfoCacheEnabled()) { historicalQueryInfos = new QueryInfoCache( hiveConf.getIntVar(ConfVars.HIVE_SERVER2_WEBUI_MAX_HISTORIC_QUERIES)); } super.init(hiveConf); }
@Override public synchronized void stop() { if (isStarted && !isEmbedded) { if (serverThread != null) { serverThread.interrupt(); serverThread = null; } stopServer(); isStarted = false; } super.stop(); }
@Override public synchronized void start() { super.start(); if (!isStarted && !isEmbedded) { initServer(); serverThread = new Thread(this); serverThread.setName("Thrift Server"); serverThread.start(); isStarted = true; } }
/** * {@inheritDoc} * * @throws IllegalStateException * if the current service state does not permit * this action */ @Override public synchronized void init(HiveConf hiveConf) { ensureCurrentState(STATE.NOTINITED); this.hiveConf = hiveConf; changeState(STATE.INITED); LOG.info("Service:" + getName() + " is inited."); }
super.init(hiveConf);
@Override public synchronized void stop() { if (this.getServiceState() == STATE.STOPPED) { // The base composite-service is already stopped, don't do anything again. return; } if (serviceList.size() > 0) { stop(serviceList.size() - 1); } super.stop(); }
@Override public synchronized void start() { int i = 0; try { for (int n = serviceList.size(); i < n; i++) { Service service = serviceList.get(i); service.start(); } super.start(); } catch (Throwable e) { LOG.error("Error starting services " + getName(), e); // Note that the state of the failed service is still INITED and not // STARTED. Even though the last service is not started completely, still // call stop() on all services including failed service to make sure cleanup // happens. stop(i); throw new ServiceException("Failed to Start " + getName(), e); } }
/** * {@inheritDoc} * * @throws IllegalStateException * if the current service state does not permit * this action */ @Override public synchronized void init(HiveConf hiveConf) { ensureCurrentState(STATE.NOTINITED); this.hiveConf = hiveConf; changeState(STATE.INITED); LOG.info("Service:" + getName() + " is inited."); }
@Override public synchronized void init(HiveConf hiveConf) { for (Service service : serviceList) { service.init(hiveConf); } super.init(hiveConf); }
@Override public synchronized void stop() { // TODO super.stop(); }
@Override public synchronized void start() { super.start(); // TODO }
/** * {@inheritDoc} * * @throws IllegalStateException * if the current service state does not permit * this action */ @Override public synchronized void init(HiveConf hiveConf) { ensureCurrentState(STATE.NOTINITED); this.hiveConf = hiveConf; changeState(STATE.INITED); LOG.info("Service:" + getName() + " is inited."); }