@Override
  public CommandProcessorResponse run(String command) throws CommandProcessorException {
    try {
      String[] tokens = command.split("\\s+");
      boolean isCorrectSubCommand = HiveCommand.PROCESSLIST.name().equalsIgnoreCase(tokens[0]);

      if (tokens.length != 1 || !isCorrectSubCommand) {
        throw new CommandProcessorException("Show ProcessList Failed: Unsupported sub-command option");
      }
      // TODO : Authorization?
      if (CollectionUtils.isEmpty(liveQueries)) {
        return new CommandProcessorResponse(getSchema(), "No queries running currently");
      }
      SessionState ss = SessionState.get();
      liveQueries.forEach(query -> {
            ss.out.println(
                Joiner.on("\t").join(
                    query.getUserName(),
                    query.getIpAddr(),
                    query.getExecutionEngine(),
                    query.getSessionId(),
                    query.getSessionActiveTime(),
                    query.getSessionIdleTime(),
                    query.getQueryId(),
                    query.getState(),
                    query.getBeginTime(),
                    query.getElapsedTime(),
                    query.getRuntime()
                ));
          }
      );
      return new CommandProcessorResponse(getSchema(), null);
    } catch (Exception e) {
      console.printError("Exception raised from ShowProcessListProcessor.run "
          + e.getLocalizedMessage(), org.apache.hadoop.util.StringUtils
          .stringifyException(e));
      throw new CommandProcessorException(e.getLocalizedMessage(), e);
    }
  }
Creates a Schema object with running operation details

@return
ql/src/java/org/apache/hadoop/hive/ql/processors/ShowProcessListProcessor.java