@SuppressWarnings("unchecked") @Override protected void doStart() throws Exception { for (Map.Entry<String, String> entry : containerLiveNodeData.getLogLevels().entrySet()) { String loggerName = entry.getKey(); String oldLogLevel = setLogLevel(loggerName, entry.getValue()); if (!defaultLogLevels.containsKey(loggerName)) { oldLogLevels.put(loggerName, oldLogLevel); } } commandExecutor = Executors.newSingleThreadExecutor( Threads.createDaemonThreadFactory("runnable-command-executor")); Class<?> runnableClass = classLoader.loadClass(specification.getClassName()); Preconditions.checkArgument(TwillRunnable.class.isAssignableFrom(runnableClass), "Class %s is not instance of TwillRunnable.", specification.getClassName()); runnable = Instances.newInstance((Class<TwillRunnable>) runnableClass); runnable.initialize(context); }
@SuppressWarnings("unchecked") @Override protected void doStart() throws Exception { for (Map.Entry<String, String> entry : containerLiveNodeData.getLogLevels().entrySet()) { String loggerName = entry.getKey(); String oldLogLevel = setLogLevel(loggerName, entry.getValue()); if (!defaultLogLevels.containsKey(loggerName)) { oldLogLevels.put(loggerName, oldLogLevel); } } commandExecutor = Executors.newSingleThreadExecutor( Threads.createDaemonThreadFactory("runnable-command-executor")); Class<?> runnableClass = classLoader.loadClass(specification.getClassName()); Preconditions.checkArgument(TwillRunnable.class.isAssignableFrom(runnableClass), "Class %s is not instance of TwillRunnable.", specification.getClassName()); runnable = Instances.newInstance((Class<TwillRunnable>) runnableClass); runnable.initialize(context); }