public static String getHdfsUsername(ViewContext context) {
    String userName = context.getProperties().get("webhdfs.username");
    if (userName == null || userName.compareTo("null") == 0 || userName.compareTo("") == 0) {
      userName = context.getUsername();
    }
    return userName;
  }
Returns username for HdfsApi from "webhdfs.username" property if set,
if not set then current Ambari username
@param context ViewContext
@return username
contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/HdfsUtil.java