apache/hadoop · error · InvalidConfigurationValueException
Failed to determine account type
Error message
Failed to determine account type
What it means
getIsNamespaceEnabled() converts the account's hierarchical-namespace Trilean to a boolean; conversion failed (TrileanConversionException, i.e. the value is unknown), and is rethrown as InvalidConfigurationValueException 'Failed to determine account type'. The client could not determine whether the account is HNS-enabled at a point where a definite answer is required.
Source
Thrown at hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsClient.java:1689
protected String getUserAgent() {
return userAgent;
}
/**
* Checks if the namespace is enabled.
* Filesystem init will fail if namespace is not correctly configured,
* so instead of swallowing the exception, we should throw the exception
* in case namespace is not configured correctly.
*
* @return True if the namespace is enabled, false otherwise.
* @throws AzureBlobFileSystemException if the conversion fails.
*/
public boolean getIsNamespaceEnabled() throws AzureBlobFileSystemException {
try {
return getAbfsConfiguration().getIsNamespaceEnabledAccount().toBoolean();
} catch (TrileanConversionException ex) {
LOG.error("Failed to convert namespace enabled account property to boolean", ex);
throw new InvalidConfigurationValueException("Failed to determine account type", ex);
}
}
protected boolean isRenameResilience() {
return renameResilience;
}
/**
* Parses response of Listing API from server based on Endpoint used.
* @param result AbfsHttpOperation of list Operation.
* @param uri to be used for the path conversion.
* @return {@link ListResponseData} containing the list of entries.
* @throws IOException if parsing fails
*/
public abstract ListResponseData parseListPathResults(AbfsHttpOperation result, URI uri) throws IOException;
/**
* Parses response of Get Block List from server based on Endpoint used.View on GitHub (pinned to 2add963021)
Solutions
- Set fs.azure.account.hns.enabled explicitly (true for hierarchical-namespace accounts, false for flat accounts) in core-site or the job configuration.
- Verify the value matches the actual account — a wrong explicit value causes different failures downstream.
- If authenticating with SAS/user-delegation keys, always pin the hns flag since probing may be unavailable.
Example fix
# before <property><name>fs.azure.account.hns.enabled</name><value/></property> # after (HNS-enabled account) <property> <name>fs.azure.account.hns.enabled</name> <value>true</value> </property>
Defensive patterns
Strategy: validation
Validate before calling
String hns = conf.get("fs.azure.account.hns.enabled");
if (!"true".equals(hns) && !"false".equals(hns)) {
throw new IllegalArgumentException(
"Set fs.azure.account.hns.enabled to true or false for this account");
} Try / catch
catch (InvalidConfigurationValueException ex) {
if ("Failed to determine account type".equals(ex.getMessage())) {
// set fs.azure.account.hns.enabled explicitly, then re-create the FileSystem
} else throw ex;
} Prevention
- Always set fs.azure.account.hns.enabled explicitly, especially with SAS or user-delegation auth where probing may be restricted.
- Template account configs per account type (HNS vs flat) so the flag is never omitted.
- Validate the flag in deployment checks before jobs run.
When it happens
Trigger: fs.azure.account.hns.enabled is not set and the client never resolved the account type (e.g. account-property probing did not run or was not permitted under the auth mode), leaving the Trilean as unknown when toBoolean() is called.
Common situations: SAS-auth or OAuth setups where account-property calls are restricted; configurations copied between HNS and non-HNS accounts without the explicit hns flag; embedded/test usage that skips full filesystem initialization.
Related errors
- "%s" must be set for user-bound SAS auth type.
- ABFS endpoint is not set correctly : %s, Do not specify sche
- This operation is only valid for storage accounts with the h
- Invalid URI %s
- Invalid URI %s - account name is not fully qualified.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/61e5bd8d212c1ece.
Report an issue: GitHub.