有没有办法在Spark Shell中重新运行粘贴的代码块?

发布于 2025-01-24 11:30:59 字数 189 浏览 2 评论 0原文

我定期将代码块复制到Spark-shell中,并使用

:paste 运行块 CTRL-D

有时会出错,因为首先需要另一行代码,例如导入。一旦添加了其他任何要求,我想重新运行整个粘贴的块。是否有这样做的快捷方式,而不是重新复制它,重新贴上?诸如反向搜索之类的东西,但要用于整个块。

I regularly copy blocks of code into spark-shell and run the block using

:paste
ctrl-d

Sometimes it errors because another line of code is required first e.g. an import. Once I have added any other requirements in, I would like to rerun the whole pasted block. Is there a shortcut for doing this, rather than re-copying it, re-pasting? Something like reverse search but for whole blocks.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

调妓 2025-01-31 11:30:59

您可以尝试将所有块放在文件中并运行

scala> :加载[文件路径]

You can try to put together all the blocks in a file and run

scala> :load [path of file]

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文