However, it is found by Wei-Chiu Chuang that WebHdfsFileSystem.getFileStatus() won't return the correct "snapshot enabled" status. The reason is that JsonUtilClient.toFileStatus() did not check and append the "snapshot enabled" flag to the resulting HdfsFileStatus object.
In TestWebHDFS#testWebHdfsAllowandDisallowSnapshots(), add the following lines indicated by prepending "+":
The first assertion will pass, as expected, while the second assertion will fail because of the reason above.
A further investigation shows that FSOperations.toJsonInner() also doesn't check the "snapshot enabled" bit. Therefore, "fs.getFileStatus(path).isSnapshotEnabled()" will always return false for fs type HttpFSFileSystem/WebHdfsFileSystem/SWebhdfsFileSystem. This will be addressed in a separate jira