code: private void list() throws IOException {
      LOG.log(Level.FINE, "Listing applications");
      final List<ApplicationState> applications = this.hdInsightInstance.listApplications();
      for (final ApplicationState appState : applications) {
        if (appState.getState().equals("RUNNING")) {
          System.out.println(appState.getId() + "\t" + appState.getName());
        }
      }
    }
docs: Fetches a list of all running applications.
  
  @throws IOException