在SSH上运行Hive Shell命令的问题

发布于 2025-02-01 05:00:06 字数 403 浏览 3 评论 0原文

在执行过程中,我需要在Hive脚本中通过SSH发送Shell命令。主要目标是能够用各种外壳命令(例如压力ng,netem等)进行压力测试Apache臭氧群集。

注意:SSH用户没有密码,它只是一个测试环境。

从CLI中,这个简单的命令正在工作:

!sudo -u user ssh user@host 'ls'

但是此命令无法正常工作:

!sudo -u user ssh user@host 'ls -al'

结果:bash:ls -al:未找到命令失败,exit code = 127

命令'!ls -al'将在服务器本身上工作,但没有SSH。

我在水线上得到了相同的结果。

感谢您的帮助!

I need to send shell commands over ssh within a Hive script during its execution. The main goal is to be able to stress test an Apache Ozone cluster with various shell commands like stress-ng, netem, etc.

Note: The ssh user has no passphrase, it is just a test environment.

From the CLI, this simple command is working:

!sudo -u user ssh user@host 'ls'

But this one isn't working:

!sudo -u user ssh user@host 'ls -al'

Result: bash: ls -al: command not found Command failed with exit code = 127

The command '!ls -al' will work on the server itself, but no with ssh.

I got the same results with beeline.

Thanks for your help!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文