@Override protected void serviceStart() throws Exception { boolean recoveryEnabled = getConfig().getBoolean( XLearningConfiguration.XLEARNING_HS_RECOVERY_ENABLE, XLearningConfiguration.DEFAULT_XLEARNING_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(); }
@Override protected void storeNewMasterKey(DelegationKey key) throws IOException { if (LOG.isDebugEnabled()) { LOG.debug("Storing master key " + key.getKeyId()); } try { store.storeTokenMasterKey(key); } catch (IOException e) { LOG.error("Unable to store master key " + key.getKeyId(), e); } }
@Override protected void storeNewToken(MRDelegationTokenIdentifier tokenId, long renewDate) { if (LOG.isDebugEnabled()) { LOG.debug("Storing token " + tokenId.getSequenceNumber()); } try { store.storeToken(tokenId, renewDate); } catch (IOException e) { LOG.error("Unable to store token " + tokenId.getSequenceNumber(), e); } }
@Override protected void updateStoredToken(MRDelegationTokenIdentifier tokenId, long renewDate) { if (LOG.isDebugEnabled()) { LOG.debug("Updating token " + tokenId.getSequenceNumber()); } try { store.updateToken(tokenId, renewDate); } catch (IOException e) { LOG.error("Unable to update token " + tokenId.getSequenceNumber(), e); } }
/** * Start the state storage for use * * @throws IOException */ @Override public void serviceStart() throws IOException { startStorage(); }
@Override protected void removeStoredMasterKey(DelegationKey key) { if (LOG.isDebugEnabled()) { LOG.debug("Removing master key " + key.getKeyId()); } try { store.removeTokenMasterKey(key); } catch (IOException e) { LOG.error("Unable to remove master key " + key.getKeyId(), e); } }
/** * Initialize the state storage * * @param conf the configuration * @throws IOException */ @Override public void serviceInit(Configuration conf) throws IOException { initStorage(conf); }
@Override protected void removeStoredToken(MRDelegationTokenIdentifier tokenId) throws IOException { if (LOG.isDebugEnabled()) { LOG.debug("Storing token " + tokenId.getSequenceNumber()); } try { store.removeToken(tokenId); } catch (IOException e) { LOG.error("Unable to remove token " + tokenId.getSequenceNumber(), e); } }
/** * Shutdown the state storage. * * @throws IOException */ @Override public void serviceStop() throws IOException { closeStorage(); }
@Override protected void storeNewMasterKey(DelegationKey key) throws IOException { if (LOG.isDebugEnabled()) { LOG.debug("Storing master key " + key.getKeyId()); } try { store.storeTokenMasterKey(key); } catch (IOException e) { LOG.error("Unable to store master key " + key.getKeyId(), e); } }
@Override protected void storeNewToken(MRDelegationTokenIdentifier tokenId, long renewDate) { if (LOG.isDebugEnabled()) { LOG.debug("Storing token " + tokenId.getSequenceNumber()); } try { store.storeToken(tokenId, renewDate); } catch (IOException e) { LOG.error("Unable to store token " + tokenId.getSequenceNumber(), e); } }
@Override protected void updateStoredToken(MRDelegationTokenIdentifier tokenId, long renewDate) { if (LOG.isDebugEnabled()) { LOG.debug("Updating token " + tokenId.getSequenceNumber()); } try { store.updateToken(tokenId, renewDate); } catch (IOException e) { LOG.error("Unable to update token " + tokenId.getSequenceNumber(), e); } }
/** * Start the state storage for use * * @throws IOException */ @Override public void serviceStart() throws IOException { startStorage(); }
@Override protected void removeStoredMasterKey(DelegationKey key) { if (LOG.isDebugEnabled()) { LOG.debug("Removing master key " + key.getKeyId()); } try { store.removeTokenMasterKey(key); } catch (IOException e) { LOG.error("Unable to remove master key " + key.getKeyId(), e); } }
/** * Initialize the state storage * * @param conf the configuration * @throws IOException */ @Override public void serviceInit(Configuration conf) throws IOException { initStorage(conf); }
@Override protected void removeStoredToken(MRDelegationTokenIdentifier tokenId) throws IOException { if (LOG.isDebugEnabled()) { LOG.debug("Storing token " + tokenId.getSequenceNumber()); } try { store.removeToken(tokenId); } catch (IOException e) { LOG.error("Unable to remove token " + tokenId.getSequenceNumber(), e); } }
/** * Shutdown the state storage. * * @throws IOException */ @Override public void serviceStop() throws IOException { closeStorage(); }
@Override protected void serviceStart() throws Exception { boolean recoveryEnabled = getConfig().getBoolean( JHAdminConfig.MR_HS_RECOVERY_ENABLE, JHAdminConfig.DEFAULT_MR_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(); }
@Override protected void storeNewMasterKey(DelegationKey key) throws IOException { if (LOG.isDebugEnabled()) { LOG.debug("Storing master key " + key.getKeyId()); } try { store.storeTokenMasterKey(key); } catch (IOException e) { LOG.error("Unable to store master key " + key.getKeyId(), e); } }
@Override protected void storeNewToken(MRDelegationTokenIdentifier tokenId, long renewDate) { if (LOG.isDebugEnabled()) { LOG.debug("Storing token " + tokenId.getSequenceNumber()); } try { store.storeToken(tokenId, renewDate); } catch (IOException e) { LOG.error("Unable to store token " + tokenId.getSequenceNumber(), e); } }