Gargi-jais11 commented on PR #10589:
URL: https://github.com/apache/ozone/pull/10589#issuecomment-4829305883
> Thanks @Gargi-jais11 for working on this.
>
> As far as I know, HDFS doesn't support filenames with spaces. I'm
concerning about how this change impact that. Have you looked into it?
I have tested creating hdfs filenames with spaces and it does support.
Evidence:
```
[datanode -1 ~]# echo "test" | hdfs dfs -put - "/tmp/ "
[datanode-1 ~]# hdfs dfs -ls "/tmp" | cat -A
Found 1 items$
-rw-r--r-- 3 hdfs supergroup 5 2026-06-29 05:25 /tmp/ $
```
and even ozone supports creating key with space :
```
ozone sh key put /vol1/buck1/" " test
[datanode-1 ~]# ozone sh key list /vol1/buck1
[ {
"volumeName" : "vol1",
"bucketName" : "buck1",
"name" : " ",
"owner" : "om",
"dataSize" : 11,
"creationTime" : "2026-06-29T05:28:46.616Z",
"modificationTime" : "2026-06-29T05:28:48.179Z",
"replicationConfig" : {
"replicationFactor" : "THREE",
"requiredNodes" : 3,
"minimumNodes" : 1,
"replicationType" : "RATIS"
},
"metadata" : { },
"tags" : { },
"file" : true
} ]
```
The S3 issue was not “Ozone/HDFS rejects space keys.” It was a **create vs
list mismatch** caused by a bug in how OM builds the internal metadata key. OM
treated " " as “no key segment” and stored it at /vol1/buck1 instead of
/vol1/buck1/.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]