code: private static void dumpOutDebugInfo() {
  
          LOG.info("Dump debug output");
          Map<String, String> envs = System.getenv();
          for (Map.Entry<String, String> env : envs.entrySet()) {
              LOG.info("System env: key=" + env.getKey() + ", val=" + env.getValue());
              System.out.println("System env: key=" + env.getKey() + ", val="
                      + env.getValue());
          }
  
          BufferedReader buf = null;
          try {
              String lines = Shell.WINDOWS ? Shell.execCommand("cmd", "/c", "dir") :
                      Shell.execCommand("ls", "-al");
              buf = new BufferedReader(new StringReader(lines));
              String line = "";
              while ((line = buf.readLine()) != null) {
                  LOG.info("System CWD content: " + line);
                  System.out.println("System CWD content: " + line);
              }
          } catch (IOException e) {
              e.printStackTrace();
          } finally {
              org.apache.hadoop.io.IOUtils.cleanup(LOG, buf);
          }
      }
docs: Dump out contents of $CWD and the environment to stdout for debugging