{"record":{"id":"54f0d0d042ab9c8a","repo":"apache/hadoop","slug":"account-name-is-not-fully-qualified","errorCode":null,"errorMessage":" - account name is not fully qualified.","messagePattern":" - account name is not fully qualified\\.","errorType":"validation","errorClass":"InvalidUriException","httpStatus":null,"severity":"error","filePath":"hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsMetricsManager.java","lineNumber":141,"sourceCode":"    this.isMetricCollectionEnabled.set(\n        abfsConfiguration.isMetricsCollectionEnabled());\n    this.isMetricCollectionStopped = new AtomicBoolean(false);\n    this.aggregateMetricsManager = AggregateMetricsManager.getInstance(\n        abfsConfiguration.getMetricsEmitIntervalInMins(),\n        abfsConfiguration.getMaxMetricsCallsPerSecond());\n    this.metricAnalysisPeriod = abfsConfiguration.getMetricAnalysisTimeout();\n    this.metricIdlePeriod = abfsConfiguration.getMetricIdleTimeout();\n    this.accountName = accountName;\n    if (isMetricCollectionEnabled()) {\n      try {\n        String metricAccountName = abfsConfiguration.getMetricAccount();\n        String metricAccountKey = abfsConfiguration.getMetricAccountKey();\n        this.metricFormat = abfsConfiguration.getMetricFormat();\n        if (isNotEmpty(metricAccountName) && isNotEmpty(\n            metricAccountKey)) {\n          int dotIndex = metricAccountName.indexOf(AbfsHttpConstants.DOT);\n          if (dotIndex <= 0) {\n            throw new InvalidUriException(\n                metricAccountName + \" - account name is not fully qualified.\");\n          }\n          try {\n            metricSharedkeyCredentials = new SharedKeyCredentials(\n                metricAccountName.substring(0, dotIndex),\n                metricAccountKey);\n            hasSeparateMetricAccount = true;\n            setMetricsUrl(metricAccountName.startsWith(HTTPS_SCHEME)\n                ? metricAccountName : HTTPS_SCHEME + COLON\n                + FORWARD_SLASH + FORWARD_SLASH + metricAccountName);\n          } catch (IllegalArgumentException e) {\n            throw new IOException(\n                \"Exception while initializing metric credentials \", e);\n          }\n        } else {\n          setMetricsUrl(baseUrlString.substring(0, indexLastForwardSlash + 1));\n        }\n        // Once the metric URL is set, initialize the metrics","sourceCodeStart":123,"sourceCodeEnd":159,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsMetricsManager.java#L123-L159","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Set fs.azure.metrics.account.name to the fully qualified endpoint, e.g., mymetricsacct.blob.core.windows.net","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"],"exampleFix":"<!-- before -->\n<property>\n  <name>fs.azure.metrics.account.name</name>\n  <value>mymetricsacct</value>\n</property>\n\n<!-- after -->\n<property>\n  <name>fs.azure.metrics.account.name</name>\n  <value>mymetricsacct.blob.core.windows.net</value>\n</property>","handlingStrategy":"validation","validationCode":"// Validate the metrics account name before initializing the FS\nString name = conf.get(\"fs.azure.metrics.account.name\");\nString key  = conf.get(\"fs.azure.metrics.account.key\");\nif (name != null && key != null) {\n  int dot = name.indexOf('.');\n  if (dot <= 0) throw new IllegalArgumentException(\n      \"fs.azure.metrics.account.name must be fully qualified\"\n      + \" (e.g., acct.blob.core.windows.net): \" + name);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use full endpoints, never bare account names, in fs.azure.metrics.account.name","Add the check to a config lint step so bad values fail before runtime","If not using a separate metrics account, leave both metrics keys unset"],"tags":["azure-blob","abfs","metrics","configuration","uri-validation","hadoop"],"backgroundTag":"unqualified-account-name","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}