如何避免在 ScalaTest 运行期间重复使用现有 SparkSession
我都会收到警告
WARN SparkSession$Builder: Using an existing SparkSession; the static sql configurations will not take effect.
每当我运行涉及 SparkSession 的测试时,
。我认为这是因为我使用 SparkSession.builder.{_}.getOrCreate()
并在 {_}
中设置了一些选项。
我不确定警告是什么,甚至表明 .getOrCreate()
肯定需要存在重新使用(获取)现有 SparkSession 的情况?
这不是致命的,但会阻塞我的测试日志。
I get the warning
WARN SparkSession$Builder: Using an existing SparkSession; the static sql configurations will not take effect.
whenever I run tests which involve engaging a SparkSession.
I think this is because I use SparkSession.builder.{_}.getOrCreate()
with some options set in {_}
.
I'm not sure what the warning is even indicating as surely .getOrCreate()
necessitates there being a case where you are re-using (getting) an existing SparkSession?
It's not fatal but clogs my test logs.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论