public static synchronized HdfsApi connectToHDFSApi(ViewContext context, Map<String, String> customViewProperties)
    throws HdfsApiException {
    ClassLoader currentClassLoader = Thread.currentThread().getContextClassLoader();
    Thread.currentThread().setContextClassLoader(HdfsUtil.class.getClassLoader());
    try {
      ConfigurationBuilder configurationBuilder = new ConfigurationBuilder(context, customViewProperties);
      return getHdfsApi(context, configurationBuilder);
    } finally {
      Thread.currentThread().setContextClassLoader(currentClassLoader);
    }
  }
takes any custom properties that a view wants to be included into the config
@param context
@param customViewProperties
@return
@throws HdfsApiException
contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/HdfsUtil.java