@Override protected void doStart() throws InterruptRunException, IllegalStateException { init(); try (final Instance logCtx = put(KEY_STEP_ID, id()).put(KEY_CLASS_NAME, getClass().getSimpleName())) { doStartWrapped(); final int svcThreadCount = config.intVal("load-service-threads"); ServiceTaskExecutor.INSTANCE.setThreadCount(svcThreadCount); final long t; final Object loadStepLimitTimeRaw = config.val("load-step-limit-time"); if (loadStepLimitTimeRaw instanceof String) { t = TimeUtil.getTimeInSeconds((String) loadStepLimitTimeRaw); } else { t = TypeUtil.typeConvert(loadStepLimitTimeRaw, long.class); } if (t > 0) { timeLimitSec = t; } startTimeSec = TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis()); } catch (final InterruptRunException e) { throw e; } catch (final Throwable cause) { LogUtil.exception(Level.WARN, cause, "{} step failed to start", id()); } metricsContexts.stream().peek(MetricsContext::start).forEach(metricsMgr::register); }