apache/hadoop · error · InvalidUriException

- account name is not fully qualified.

Error message

 - account name is not fully qualified.

What it means

When a separate metrics account is configured (fs.azure.metrics.account.name + fs.azure.metrics.account.key both set and metrics collection enabled), AbfsMetricsManager requires the account name to be a fully qualified endpoint containing a dot at index > 0 — it splits 'account' from 'account.dfs.core.windows.net' via the first '.'. A name with no dot (or a leading dot) throws InvalidUriException("... - account name is not fully qualified.") during filesystem initialization.

Solutions

  1. Set fs.azure.metrics.account.name to the fully qualified endpoint, e.g., mymetricsacct.blob.core.windows.net
  2. If you do not want a separate metrics account, unset BOTH fs.azure.metrics.account.name and fs.azure.metrics.account.key so the base endpoint is used

Example fix

<!-- before -->
<property>
  <name>fs.azure.metrics.account.name</name>
  <value>mymetricsacct</value>
</property>

<!-- after -->
<property>
  <name>fs.azure.metrics.account.name</name>
  <value>mymetricsacct.blob.core.windows.net</value>
</property>
Defensive patterns

Strategy: validation

Validate before calling

// Validate the metrics account name before initializing the FS
String name = conf.get("fs.azure.metrics.account.name");
String key  = conf.get("fs.azure.metrics.account.key");
if (name != null && key != null) {
  int dot = name.indexOf('.');
  if (dot <= 0) throw new IllegalArgumentException(
      "fs.azure.metrics.account.name must be fully qualified"
      + " (e.g., acct.blob.core.windows.net): " + name);
}

Prevention

When it happens

Trigger: Setting fs.azure.metrics.account.name to a bare storage account name like 'metricsacct' instead of 'metricsacct.blob.core.windows.net'; setting a leading-dot value; enabling the separate-metrics-account feature with a placeholder value.

Common situations: Copying only the account name from the Azure portal into the metrics config; templates that document the key as 'account name' rather than the FQDN endpoint; env-specific config files where the metrics endpoint was never filled in.

Related errors


AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22). Data as JSON: /api/errors/54f0d0d042ab9c8a. Report an issue: GitHub.

Appendix: source

Thrown at hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsMetricsManager.java:141

    this.isMetricCollectionEnabled.set(
        abfsConfiguration.isMetricsCollectionEnabled());
    this.isMetricCollectionStopped = new AtomicBoolean(false);
    this.aggregateMetricsManager = AggregateMetricsManager.getInstance(
        abfsConfiguration.getMetricsEmitIntervalInMins(),
        abfsConfiguration.getMaxMetricsCallsPerSecond());
    this.metricAnalysisPeriod = abfsConfiguration.getMetricAnalysisTimeout();
    this.metricIdlePeriod = abfsConfiguration.getMetricIdleTimeout();
    this.accountName = accountName;
    if (isMetricCollectionEnabled()) {
      try {
        String metricAccountName = abfsConfiguration.getMetricAccount();
        String metricAccountKey = abfsConfiguration.getMetricAccountKey();
        this.metricFormat = abfsConfiguration.getMetricFormat();
        if (isNotEmpty(metricAccountName) && isNotEmpty(
            metricAccountKey)) {
          int dotIndex = metricAccountName.indexOf(AbfsHttpConstants.DOT);
          if (dotIndex <= 0) {
            throw new InvalidUriException(
                metricAccountName + " - account name is not fully qualified.");
          }
          try {
            metricSharedkeyCredentials = new SharedKeyCredentials(
                metricAccountName.substring(0, dotIndex),
                metricAccountKey);
            hasSeparateMetricAccount = true;
            setMetricsUrl(metricAccountName.startsWith(HTTPS_SCHEME)
                ? metricAccountName : HTTPS_SCHEME + COLON
                + FORWARD_SLASH + FORWARD_SLASH + metricAccountName);
          } catch (IllegalArgumentException e) {
            throw new IOException(
                "Exception while initializing metric credentials ", e);
          }
        } else {
          setMetricsUrl(baseUrlString.substring(0, indexLastForwardSlash + 1));
        }
        // Once the metric URL is set, initialize the metrics

View on GitHub (pinned to 2add963021)