super.init(hiveConf);
@Override public synchronized void start() { super.start(); }
@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 stop() { super.stop(); // Release the HMS connection for this service thread Hive.closeCurrent(); }
public STATE getServiceState() { return super.getServiceState(); }
@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 stop() { super.stop(); shutdownTimeoutChecker(); if (backgroundOperationPool != null) { backgroundOperationPool.shutdown(); long timeout = hiveConf.getTimeVar( ConfVars.HIVE_SERVER2_ASYNC_EXEC_SHUTDOWN_TIMEOUT, TimeUnit.SECONDS); try { backgroundOperationPool.awaitTermination(timeout, TimeUnit.SECONDS); } catch (InterruptedException e) { LOG.warn("HIVE_SERVER2_ASYNC_EXEC_SHUTDOWN_TIMEOUT = " + timeout + " seconds has been exceeded. RUNNING background operations will be shut down", e); } backgroundOperationPool = null; } cleanupLoggingRootDir(); }
@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); } }
@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(); }
LOG.info("Shutting down HiveServer2"); HiveConf hiveConf = this.getHiveConf(); super.stop(); if (hs2HARegistry != null) { hs2HARegistry.stop();
@Override public synchronized void start() { super.start(); if (checkInterval > 0) { startTimeoutChecker(); } }
@Override public synchronized void init(HiveConf hiveConf) { this.hiveConf = hiveConf; //Create operation log root directory, if operation logging is enabled if (hiveConf.getBoolVar(ConfVars.HIVE_SERVER2_LOGGING_OPERATION_ENABLED)) { initOperationLogRootDir(); } createBackgroundOperationPool(); addService(operationManager); initSessionImplClassName(); Metrics metrics = MetricsFactory.getInstance(); if(metrics != null){ registerOpenSesssionMetrics(metrics); registerActiveSesssionMetrics(metrics); } userLimit = hiveConf.getIntVar(ConfVars.HIVE_SERVER2_LIMIT_CONNECTIONS_PER_USER); ipAddressLimit = hiveConf.getIntVar(ConfVars.HIVE_SERVER2_LIMIT_CONNECTIONS_PER_IPADDRESS); userIpAddressLimit = hiveConf.getIntVar(ConfVars.HIVE_SERVER2_LIMIT_CONNECTIONS_PER_USER_IPADDRESS); LOG.info("Connections limit are user: {} ipaddress: {} user-ipaddress: {}", userLimit, ipAddressLimit, userIpAddressLimit); 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 stop() { super.stop(); }
@Override public synchronized void start() { super.start();
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(); }