我正在尝试使用python调用一个猪脚本。但其返回退出状态1

时间:2014-05-12 15:10:46

标签: apache-pig

#PIG script execution
hadoop_channel_obj = hadoop_transport_obj.open_session()
command = 'cd ' + pig_path
LOG.do_log('INFO', 'command is ' + command)
#hadoop_channel_obj.exec_command(command)
command = '/usr/local/pig/bin/pig ' + 'DL_Base.pig'
#sys.path.append('.')
#time.sleep(1)
LOG.do_log('DEBUG', 'Executing ' + pig_filename)
LOG.do_log('INFO', 'command is ' + command)
#hadoop_channel_obj = hadoop_transport_obj.open_session()
hadoop_channel_obj.exec_command(command)
exit_status = hadoop_channel_obj.recv_exit_status()
LOG.do_log('INFO', exit_status)

日志显示如下

2014-05-13 01:58:37,161 DEBUG : Archiving DL_DLY_PRE_CUST_MASTER_20140512.csv.gz
2014-05-13 01:58:38,008 INFO : command is cd /home/hadoop/scripts/Base
2014-05-13 01:58:38,008 DEBUG : Executing DL_Base.pig
2014-05-13 01:58:38,008 INFO : command is /usr/local/pig/bin/pig DL_Base.pig
2014-05-13 01:58:38,022 INFO : 1
2014-05-13 01:58:38,022 WARNING : Pig execution failed
2014-05-13 01:58:38,122 INFO : transport_obj closed 

0 个答案:

没有答案