-1

I had created a shell script to invoke beeline shell. But, how can I handle errors in the beeline shell with the below two scenarios.

  1. If suppose there are any connection errors in the beeline shell, it should print the error message in the log file.

  2. If suppose, there is an error in the beeline shell command then it should print the corresponding error message in the log file.

What can I try to accomplish this?

halfer
  • 19,824
  • 17
  • 99
  • 186
dev333
  • 713
  • 2
  • 17
  • 38

1 Answers1

0

I think what you want is a redirection of stderr in a file, refer this.

In case you want to handle errors in the script itself, refer this.

halfer
  • 19,824
  • 17
  • 99
  • 186
Chitral Verma
  • 2,695
  • 1
  • 17
  • 29
  • Thanks a lot for ur info. Actually, I'm able to log the errors in the unix prompt. Whenever, I'm trying to invoke the beeline shell, inside the beeline shell, I'm unable to log the errors. – dev333 Jun 22 '17 at 11:33
  • here, check this, https://stackoverflow.com/questions/39527601/logs-for-hive-query-executed-via-beeline – Chitral Verma Jun 22 '17 at 11:36