本文介绍了使用事件中心将数据流式传输到Azure Databricks的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我想将消息从Twitter应用程序发送到Azure事件中心。但是,我收到以下错误, $ 而不是java.util.concurrent.ExecutorService使用java.util.concurrent.ScheduledExecutorService。 I我现在没有得到如何创建EventHubClient.create。请帮忙。 我从链接引用代码, https://docs.microsoft.com/en-us/azure/ azure-databricks / databricks-stream-from-eventhubs 错误:这是我得到的错误。 notebook:15:错误:类型不匹配;发现:java.util.concurrent.ExecutorService 需要:java.util.concurrent.ScheduledExecutorService val pool = Executors。 newFixedThreadPool(1) $ val eventHubClient = EventHubClient.create(connStr.toString(),pool) $ 这是我的代码, import java.util._ import scala.collection.JavaConverters._ import com.microsoft.azure .eventhubs._ $ import java.util.concurrent。{Executors,ExecutorService} val pool:ExecutorService = Executors.newFixedThreadPool(1 )$ val eventHubClient = EventHubClient.create(connStr.toString(),pool)解决方案 I want to send messages from Twitter application to Azure event hub. However, I am getting this below error, it say instead of java.util.concurrent.ExecutorService use java.util.concurrent.ScheduledExecutorService. I am not getting how to create the EventHubClient.create now. Please help.I am referring code from link,https://docs.microsoft.com/en-us/azure/azure-databricks/databricks-stream-from-eventhubsError : This is error I am getting.notebook:15: error: type mismatch;found : java.util.concurrent.ExecutorServicerequired: java.util.concurrent.ScheduledExecutorServiceval pool = Executors.newFixedThreadPool(1)val eventHubClient = EventHubClient.create(connStr.toString(), pool)Here is my code,import java.util._import scala.collection.JavaConverters._import com.microsoft.azure.eventhubs._import java.util.concurrent.{Executors, ExecutorService}val pool: ExecutorService = Executors.newFixedThreadPool(1)val eventHubClient = EventHubClient.create(connStr.toString(), pool) 解决方案 这篇关于使用事件中心将数据流式传输到Azure Databricks的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-21 11:30