@Override
        protected void serviceStart() throws Exception {
            boolean recoveryEnabled = getConfig()
                    .getBoolean(
                            HboxConfiguration.HBOX_HS_RECOVERY_ENABLE,
                            HboxConfiguration.DEFAULT_HBOX_HS_RECOVERY_ENABLE);
            if (recoveryEnabled) {
                assert stateStore.isInState(STATE.STARTED);
                HistoryServerState state = stateStore.loadState();
                jhsDTSecretManager.recover(state);
            }

            try {
                jhsDTSecretManager.startThreads();
            } catch (IOException io) {
                LOG.error("Error while starting the Secret Manager threads", io);
                throw io;
            }

            super.serviceStart();
        }
Priority of the JobHistoryServer shutdown hook.
history-server/src/main/java/net/qihoo/hbox/jobhistory/JobHistoryServer.java