> Would it be make sense to use UserGroupInformation to determine the home dir?
Yes, someday. Long-term, username's should be filesystem-specific. But we don't yet have an API to get the username for a particular filesystem. Once that's added, it should be returned as a UserGroupInformation and used to determine the home directory, but until then, I think this is not worth adding.
Note that this patch does not change how the home directory in HDFS is computed, it only adds a method to expose the home directory already implicit in HDFS. Changing how we compute it should perhaps be the subject of another issue.