/** * Prints all environment variables in debug mode. */ private void ackEnvironmentVariables() { assert log != null; if (log.isDebugEnabled()) for (Map.Entry<?, ?> envVar : System.getenv().entrySet()) log.debug("Environment variable [" + envVar.getKey() + '=' + envVar.getValue() + ']'); }
/** * Prints all system properties in debug mode. */ private void ackSystemProperties() { assert log != null; if (log.isDebugEnabled()) for (Object key : U.asIterable(System.getProperties().keys())) log.debug("System property [" + key + '=' + System.getProperty((String) key) + ']'); }
/** * Prints out class paths in debug mode. * * @param rtBean Java runtime bean. */ private void ackClassPaths(RuntimeMXBean rtBean) { assert log != null; // Ack all class paths. if (log.isDebugEnabled()) { log.debug("Boot class path: " + rtBean.getBootClassPath()); log.debug("Class path: " + rtBean.getClassPath()); log.debug("Library path: " + rtBean.getLibraryPath()); } }
/** * Prints all configuration properties in info mode and SPIs in debug mode. */ private void ackSpis() { assert log != null; if (log.isDebugEnabled()) { log.debug("+-------------+"); log.debug("START SPI LIST:"); log.debug("+-------------+"); log.debug("Grid checkpoint SPI : " + Arrays.toString(cfg.getCheckpointSpi())); log.debug("Grid collision SPI : " + cfg.getCollisionSpi()); log.debug("Grid communication SPI : " + cfg.getCommunicationSpi()); log.debug("Grid deployment SPI : " + cfg.getDeploymentSpi()); log.debug("Grid discovery SPI : " + cfg.getDiscoverySpi()); log.debug("Grid event storage SPI : " + cfg.getEventStorageSpi()); log.debug("Grid failover SPI : " + Arrays.toString(cfg.getFailoverSpi())); log.debug("Grid load balancing SPI : " + Arrays.toString(cfg.getLoadBalancingSpi())); log.debug("Grid authentication SPI : " + cfg.getAuthenticationSpi()); log.debug("Grid secure session SPI : " + cfg.getSecureSessionSpi()); log.debug("Grid swap space SPI : " + cfg.getSwapSpaceSpi()); } }
/** * Unregisters given mbean. * * @param mbean MBean to unregister. * @return {@code True} if successfully unregistered, {@code false} otherwise. */ private boolean unregisterMBean(@Nullable ObjectName mbean) { if (mbean != null) try { cfg.getMBeanServer().unregisterMBean(mbean); if (log.isDebugEnabled()) log.debug("Unregistered MBean: " + mbean); return true; } catch (JMException e) { U.error(log, "Failed to unregister MBean.", e); return false; } return true; }
log.debug("Failed to load spring component, will not be able to extract userVersion from " + "META-INF/gridgain.xml.");
/** @throws GridException If registration failed. */ private void registerKernalMBean() throws GridException { try { kernalMBean = U.registerMBean( cfg.getMBeanServer(), cfg.getGridName(), "Kernal", getClass().getSimpleName(), this, GridKernalMBean.class); if (log.isDebugEnabled()) log.debug("Registered kernal MBean: " + kernalMBean); } catch (JMException e) { kernalMBean = null; throw new GridException("Failed to register kernal MBean.", e); } }
/** @throws GridException If registration failed. */ private void registerLocalNodeMBean() throws GridException { GridNodeMetricsMBean mbean = new GridLocalNodeMetrics(ctx.discovery().localNode()); try { locNodeMBean = U.registerMBean( cfg.getMBeanServer(), cfg.getGridName(), "Kernal", mbean.getClass().getSimpleName(), mbean, GridNodeMetricsMBean.class); if (log.isDebugEnabled()) log.debug("Registered local node MBean: " + locNodeMBean); } catch (JMException e) { locNodeMBean = null; throw new GridException("Failed to register local node MBean.", e); } }
/** * @param exec Executor service to register. * @param name Property name for executor. * @return Name for created MBean. * @throws GridException If registration failed. */ private ObjectName registerExecutorMBean(ExecutorService exec, String name) throws GridException { assert exec != null; try { ObjectName res = U.registerMBean( cfg.getMBeanServer(), cfg.getGridName(), "Thread Pools", name, new GridExecutorServiceMBeanAdapter(exec), GridExecutorServiceMBean.class); if (log.isDebugEnabled()) log.debug("Registered executor service MBean: " + res); return res; } catch (JMException e) { throw new GridException("Failed to register executor service MBean [name=" + name + ", exec=" + exec + ']', e); } }
log.debug("Notifying lifecycle beans."); log.debug("Grid " + (gridName == null ? "" : '\'' + gridName + "' ") + "is stopping."); log.debug("Component stopped: " + comp); log.debug("Grid is already stopped. Nothing to do."); else log.debug("Grid is being stopped by another thread. Aborting this stop sequence " + "allowing other thread to finish.");
log.debug("Failed to create GridUpdateNotifier: " + e);