[英]Apache Spark Streaming Connection String error with Databricks connection to Azure Event Hub
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:当我尝试拨打以下 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?有人有想法吗?
It should be used as below -它应该如下使用 -
ehConf['eventhubs.connectionString'] = sc._jvm.org.apache.spark.eventhubs.EventHubsUtils.encrypt(connectionString)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.