Per the following logs, we can see that liststatus returns the same pathSuffix "test.txt" for /tmp/yj/yj1 and /tmp/yj/yj1/test.txt, which is wrong. The pathSuffix for the latter should be empty.
Due to this bug, the symptom of running distcp with httpfs to copy a single file /tmp/test.txt is:
WARN org.apache.hadoop.security.UserGroupInformation: PriviledgedActionException as:systest (auth:PROXY) via httpfs (auth:SIMPLE) cause:org.apache.hadoop.security.AccessControlException: Permission denied: user=systest, access=EXECUTE, inode="/tmp/test.txt":systest:supergroup:
rw-r r- (Ancestor /tmp/test.txt is not a directory).
because /tmp/test.txt is treated as /tmp/test.txt/test.txt.