A thought: the filesystem cache keys are now <user,scheme,authority>. Since URIs have a user field, it is tempting to use a URI for the key, instead of defining a new class: scheme://user@host:port/. The only problem would be if the FileSystem URI's authority includes a user, especially if it is a different user. For example, the S3 FileSystem puts a user in the authority, but that should be consistent with the S3 login. Unfortunately, its probably not consistent with the way we're determining the username used by the cache, using UnixUserGroupInformation.login(). The bug is that login() should be per-filesystem, not static.