private DelegationTokenInformation getTokenInfoFromZK(TokenIdent ident) throws IOException { return getTokenInfoFromZK(ident, false); }
@Override protected DelegationTokenInformation getTokenInfo(TokenIdent ident) { // First check if I have this.. DelegationTokenInformation tokenInfo = currentTokens.get(ident); // Then query ZK if (tokenInfo == null) { try { tokenInfo = getTokenInfoFromZK(ident); if (tokenInfo != null) { currentTokens.put(ident, tokenInfo); } } catch (IOException e) { LOG.error("Error retrieving tokenInfo [" + ident.getSequenceNumber() + "] from ZK", e); } } return tokenInfo; }
/** * This method synchronizes the state of a delegation token information in * local cache with its actual value in Zookeeper. * * @param ident Identifier of the token */ private synchronized void syncLocalCacheWithZk(TokenIdent ident) { try { DelegationTokenInformation tokenInfo = getTokenInfoFromZK(ident); if (tokenInfo != null && !currentTokens.containsKey(ident)) { currentTokens.put(ident, tokenInfo); } else if (tokenInfo == null && currentTokens.containsKey(ident)) { currentTokens.remove(ident); } } catch (IOException e) { LOG.error("Error retrieving tokenInfo [" + ident.getSequenceNumber() + "] from ZK", e); } }
private DelegationTokenInformation getTokenInfoFromZK(TokenIdent ident) throws IOException { return getTokenInfoFromZK(ident, false); }
private DelegationTokenInformation getTokenInfoFromZK(TokenIdent ident) throws IOException { return getTokenInfoFromZK(ident, false); }
private DelegationTokenInformation getTokenInfoFromZK(TokenIdent ident) throws IOException { return getTokenInfoFromZK(ident, false); }
private DelegationTokenInformation getTokenInfoFromZK(TokenIdent ident) throws IOException { return getTokenInfoFromZK(ident, false); }
@Override protected DelegationTokenInformation getTokenInfo(TokenIdent ident) { // First check if I have this.. DelegationTokenInformation tokenInfo = currentTokens.get(ident); // Then query ZK if (tokenInfo == null) { try { tokenInfo = getTokenInfoFromZK(ident); if (tokenInfo != null) { currentTokens.put(ident, tokenInfo); } } catch (IOException e) { LOG.error("Error retrieving tokenInfo [" + ident.getSequenceNumber() + "] from ZK", e); } } return tokenInfo; }
/** * This method synchronizes the state of a delegation token information in * local cache with its actual value in Zookeeper. * * @param ident Identifier of the token */ private synchronized void syncLocalCacheWithZk(TokenIdent ident) { try { DelegationTokenInformation tokenInfo = getTokenInfoFromZK(ident); if (tokenInfo != null && !currentTokens.containsKey(ident)) { currentTokens.put(ident, tokenInfo); } else if (tokenInfo == null && currentTokens.containsKey(ident)) { currentTokens.remove(ident); } } catch (IOException e) { LOG.error("Error retrieving tokenInfo [" + ident.getSequenceNumber() + "] from ZK", e); } }
@Override protected DelegationTokenInformation getTokenInfo(TokenIdent ident) { // First check if I have this.. DelegationTokenInformation tokenInfo = currentTokens.get(ident); // Then query ZK if (tokenInfo == null) { try { tokenInfo = getTokenInfoFromZK(ident); if (tokenInfo != null) { currentTokens.put(ident, tokenInfo); } } catch (IOException e) { LOG.error("Error retrieving tokenInfo [" + ident.getSequenceNumber() + "] from ZK", e); } } return tokenInfo; }
@Override protected DelegationTokenInformation getTokenInfo(TokenIdent ident) { // First check if I have this.. DelegationTokenInformation tokenInfo = currentTokens.get(ident); // Then query ZK if (tokenInfo == null) { try { tokenInfo = getTokenInfoFromZK(ident); if (tokenInfo != null) { currentTokens.put(ident, tokenInfo); } } catch (IOException e) { LOG.error("Error retrieving tokenInfo [" + ident.getSequenceNumber() + "] from ZK", e); } } return tokenInfo; }
/** * This method synchronizes the state of a delegation token information in * local cache with its actual value in Zookeeper. * * @param ident Identifier of the token */ private synchronized void syncLocalCacheWithZk(TokenIdent ident) { try { DelegationTokenInformation tokenInfo = getTokenInfoFromZK(ident); if (tokenInfo != null && !currentTokens.containsKey(ident)) { currentTokens.put(ident, tokenInfo); } else if (tokenInfo == null && currentTokens.containsKey(ident)) { currentTokens.remove(ident); } } catch (IOException e) { LOG.error("Error retrieving tokenInfo [" + ident.getSequenceNumber() + "] from ZK", e); } }
@Override protected DelegationTokenInformation getTokenInfo(TokenIdent ident) { // First check if I have this.. DelegationTokenInformation tokenInfo = currentTokens.get(ident); // Then query ZK if (tokenInfo == null) { try { tokenInfo = getTokenInfoFromZK(ident); if (tokenInfo != null) { currentTokens.put(ident, tokenInfo); } } catch (IOException e) { LOG.error("Error retrieving tokenInfo [" + ident.getSequenceNumber() + "] from ZK", e); } } return tokenInfo; }