bash—使用nohup和输入文件运行hortonworks apache phoenix sqlline.py,即使出现错误

zsbz8rwp  于 2021-05-29  发布在  Hadoop
关注(0)|答案(0)|浏览(269)

我想用hortonworks sqlline.py运行一个充满upsert行(大约20k行)的sql脚本。我还想使用nohup来完成,因为这可能需要一段时间(考虑到我的系统的资源限制)。如果我也能用bash的time实用程序来计时执行,那就太好了。
我尝试的是:

$ nohup bash -c '/path/to/sqlline.py /path/to/file.sql' > ~/outputfile.txt

它工作,直到找到第一个 upsert 失败的指令。我得到的错误是:

Aborting command set because "force" is false and command failed: <failed upsert line here>

如果我尝试计时,命令行如下所示:

$nohup bash -c 'time /path/to/sqlline.py /path/to/file.sql' > ~/outputfile.txt'

但我还是会出错,然后流产就第一次坏了 upsert .
如何在sqlline.py中设置“force”参数?

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题