Databricks 连接到 Azure 事件中心的 Apache Spark Streaming 连接字符串错误

发布于 2025-01-15 08:48:34 字数 589 浏览 3 评论 0原文

我收到错误:

Exception: ERROR: 'int' object has no attribute 'value'
AttributeError: 'str' object has no attribute '_jvm'
ehConf['eventhubs.connectionString'] = self.connectionProperties.sc._jvm.org.apache.spark.eventhubs.EventHubsUtils.encrypt(connectionString)

当我尝试调用以下函数时:

def EventHubConnectionProperties(self,processId,startOffset,endTime):
        ehConf = {}
        ehConf['eventhubs.connectionString'] = self.connectionProperties.sc._jvm.org.apache.spark.eventhubs.EventHubsUtils.encrypt(connectionString)

有人有任何想法吗?

I'm getting the error:

Exception: ERROR: 'int' object has no attribute 'value'
AttributeError: 'str' object has no attribute '_jvm'
ehConf['eventhubs.connectionString'] = self.connectionProperties.sc._jvm.org.apache.spark.eventhubs.EventHubsUtils.encrypt(connectionString)

When I try and call the following function:

def EventHubConnectionProperties(self,processId,startOffset,endTime):
        ehConf = {}
        ehConf['eventhubs.connectionString'] = self.connectionProperties.sc._jvm.org.apache.spark.eventhubs.EventHubsUtils.encrypt(connectionString)

Does anyone have any thoughts?

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

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

发布评论

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

评论(1

风流物 2025-01-22 08:48:34

它应该按如下方式使用 -

ehConf['eventhubs.connectionString'] = sc._jvm.org.apache.spark.eventhubs.EventHubsUtils.encrypt(connectionString)

It should be used as below -

ehConf['eventhubs.connectionString'] = sc._jvm.org.apache.spark.eventhubs.EventHubsUtils.encrypt(connectionString)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文