Re: how to know a hive query failed

2013-07-16 Thread Brad Ruderman
Sry - sent email prematurely. You need to poll and read the stderr and stdout for text messages alerting there is an error. In python this is what I use: def execute_hive_query(query, hive_exception = None): return_code = None cmd = ["hive","-S", "-e", query] proc = subprocess.Popen(cmd, stdout=s

Re: how to know a hive query failed

2013-07-16 Thread Brad Ruderman
You need to stream and read the stderr and stdout for text messages alerting there is an error. In python this is what I use: On Tue, Jul 16, 2013 at 7:42 PM, kentkong_work wrote: > ** > hi, > I use a shell script to run hive query in background, like this > hive -e "select uname, age fr

how to know a hive query failed

2013-07-16 Thread kentkong_work
hi, I use a shell script to run hive query in background, like this hive -e "select uname, age from usertable" >> result.csv & sometimes, the hive query failed, but I can't find. only thing I can do is waiting for long time, 5 or 6 hours, if I still can't see the result.csv, I kno