apache/hadoop · error · RuntimeException
Failed to get delegation key id in SQL secret manager
Error message
Failed to get delegation key id in SQL secret manager
What it means
Wraps a SQLException raised by selectKeyId in getCurrentKeyId: the SQL store could not be queried for the last allocated delegation key id, so id allocation cannot continue and the failure is rethrown as a RuntimeException.
Solutions
- Reading the current delegation key id from SQL failed. Check connectivity and that the key-id counter row exists; see the chained SQLException.
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/SQLDelegationTokenSecretManager.java:423 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/55e8c66958e2f034.
Report an issue: GitHub.
Appendix: source
Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/SQLDelegationTokenSecretManager.java:423
}
} catch (IOException | SQLException e) {
LOG.error("Failed to get delegation key in SQL secret manager", e);
}
}
return delegationKey;
}
/**
* Obtains the value of the last delegation key id.
* @return Last delegation key id.
*/
@Override
public int getCurrentKeyId() {
try {
return selectKeyId();
} catch (SQLException e) {
throw new RuntimeException(
"Failed to get delegation key id in SQL secret manager", e);
}
}
/**
* Updates the value of the last delegation key id.
* @param keyId Value to update the delegation key id to.
*/
@Override
public void setCurrentKeyId(int keyId) {
try {
updateKeyId(keyId);
} catch (SQLException e) {
throw new RuntimeException(
"Failed to set delegation key id in SQL secret manager", e);
}
}
View on GitHub (pinned to 2add963021)