code: public static boolean isAlluxioRunning(String className) {
      String[] command = {"bash", "-c",
                          "ps -Aww -o command | grep -i \"[j]ava\" | grep " + className};
      try {
        Process p = Runtime.getRuntime().exec(command);
        try (InputStreamReader input = new InputStreamReader(p.getInputStream())) {
          if (input.read() >= 0) {
            return true;
          }
        }
        return false;
      } catch (IOException e) {
        System.err.format("Unable to check Alluxio status: %s.%n", e.getMessage());
        return false;
      }
    }
docs: Checks whether an Alluxio service is running.
  
  @param className class name of the Alluxio service
  @return whether the Alluxio service is running