{"record":{"id":"f8fcf174e88c41d5","repo":"apache/hadoop","slug":"s-is-invalid","errorCode":null,"errorMessage":"%s is invalid.","messagePattern":"(.+?) is invalid\\.","errorType":"exception","errorClass":"InvalidFileSystemPropertyException","httpStatus":null,"severity":"error","filePath":"hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystemStore.java","lineNumber":1986,"sourceCode":"        && resourceType.equalsIgnoreCase(AbfsHttpConstants.DIRECTORY);\n  }\n\n  private Hashtable<String, String> parseCommaSeparatedXmsProperties(String xMsProperties) throws\n          InvalidFileSystemPropertyException, InvalidAbfsRestOperationException {\n    Hashtable<String, String> properties = new Hashtable<>();\n\n    final CharsetDecoder decoder = Charset.forName(XMS_PROPERTIES_ENCODING).newDecoder();\n\n    if (xMsProperties != null && !xMsProperties.isEmpty()) {\n      String[] userProperties = xMsProperties.split(AbfsHttpConstants.COMMA);\n\n      if (userProperties.length == 0) {\n        return properties;\n      }\n\n      for (String property : userProperties) {\n        if (property.isEmpty()) {\n          throw new InvalidFileSystemPropertyException(xMsProperties);\n        }\n\n        String[] nameValue = property.split(AbfsHttpConstants.EQUAL, 2);\n        if (nameValue.length != 2) {\n          throw new InvalidFileSystemPropertyException(xMsProperties);\n        }\n\n        byte[] decodedValue = Base64.decode(nameValue[1]);\n\n        final String value;\n        try {\n          value = decoder.decode(ByteBuffer.wrap(decodedValue)).toString();\n        } catch (CharacterCodingException ex) {\n          throw new InvalidAbfsRestOperationException(ex);\n        }\n        properties.put(nameValue[0], value);\n      }\n    }","sourceCodeStart":1968,"sourceCodeEnd":2004,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystemStore.java#L1968-L2004","documentation":"When ABFS reads filesystem-level metadata, it parses the x-ms-properties header into name/value pairs. The header is a comma-separated list where every entry must be a non-empty name=base64(value) pair. This variant throws InvalidFileSystemPropertyException when split(',') yields an empty segment - a leading, trailing, or doubled comma - and includes the whole raw header in the message.","triggerScenarios":"The filesystem (container) has metadata whose serialized x-ms-properties form contains a dangling comma, e.g. 'key1=aGVsbG8=,'. Surfaced by code paths calling AbfsDfsClient.getXMSProperties(), such as filesystem property/status reads on the DFS endpoint.","commonSituations":"Container metadata written by external tools (az storage fs metadata, Storage SDK, Portal) that append commas or emit empty entries; hand-edited metadata; metadata migrated from other systems without normalization.","solutions":["Rewrite the container metadata in the exact expected form 'name1=<base64>,name2=<base64>' with no trailing or doubled commas.","Remove the malformed entries first: az storage fs metadata update with --remove for the broken keys, then re-add clean values.","Base64-encode all values (this also hides commas inside values).","After fixing, verify with a filesystem status read that the mount initializes."],"exampleFix":"# before: metadata serialized as 'owner=alice,,' or 'owner=alice,' -> throws\n\n# after (values base64-encoded, no trailing comma)\n Metadata key=owner value=$(printf %s 'alice' | base64)","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  fs.getStatus(root); // triggers filesystem-property parsing\n} catch (InvalidFileSystemPropertyException e) {\n  // x-ms-properties has a dangling comma; fix container metadata via az storage fs metadata update\n}","preventionTips":["Write container metadata only as name=base64(value), comma-separated with no trailing comma.","Use one tool for metadata management on Hadoop-facing containers.","Normalize values through base64 to hide commas and unicode."],"tags":["azure","abfs","metadata","x-ms-properties","base64","parsing"],"backgroundTag":"malformed-metadata-encoding","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}