Application not running message
Understanding the Application not running message from TEZ that appears
  in the YARN application log prevents confusion when inspecting Hive queries.
During startup, HiveServer starts sessions that are available until
    tez.session.am.dag.submit.timeout.secs expires, and then the Application
   Masters are killed. HiveServer transparently restarts dead AMs on demand when you run another
   query.  HiveServer tries to clean up sessions from the Tez pool during shutdown. "Application not
   running" message in a stack trace logging is not an issue. This message is just a trace logged
   when the session is closed or restarted and the AM has timed out.
