Per the file hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/web/resources/UserParam.java, the DOMAIN pattern is set to: ^[A-Za-z_][A-Za-z0-9._-]*[$]?$.
Given this, using a username such as "123" seems to fail for some reason (tried on insecure setup):
[123@host-1 ~]$ whoami 123 [123@host-1 ~]$ hadoop fs -fs webhdfs://host-2.domain.com -ls / -ls: Invalid value: "123" does not belong to the domain ^[A-Za-z_][A-Za-z0-9._-]*[$]?$ Usage: hadoop fs [generic options] -ls [-d] [-h] [-R] [<path> ...]
- relates to
HDFS-11391 Numeric usernames do no work with WebHDFS FS (write access)