public static void hdfsSmokeTest(ViewContext context) {
    try {
      HdfsApi api = HdfsUtil.connectToHDFSApi(context);
      api.getStatus();
    } catch (WebApplicationException ex) {
      throw ex;
    } catch (Exception ex) {
      throw new ServiceFormattedException(ex.getMessage(), ex);
    }
  }
Checks connection to HDFS
@param context View Context
contrib/views/commons/src/main/java/org/apache/ambari/view/commons/hdfs/HdfsService.java