Java知识分享网 - 轻松学习从此开始!    

Java知识分享网

Java1234官方群25:java1234官方群17
Java1234官方群25:838462530
        
SpringBoot+SpringSecurity+Vue+ElementPlus权限系统实战课程 震撼发布        

最新Java全栈就业实战课程(免费)

springcloud分布式电商秒杀实战课程

IDEA永久激活

66套java实战课程无套路领取

锋哥开始收Java学员啦!

Python学习路线图

锋哥开始收Java学员啦!
当前位置: 主页 > Java文档 > 大数据云计算 >

Spark Streaming + Event Hubs Integration Guide PDF 下载


分享到:
时间:2020-08-05 09:36来源:http://www.java1234.com 作者:小锋  侵权举报
Spark Streaming + Event Hubs Integration Guide PDF 下载
失效链接处理
Spark Streaming + Event Hubs Integration Guide PDF 下载


本站整理下载:
提取码:5dlf 
 
 
相关截图:
 
主要内容:


The Spark Streaming integration for Azure Event Hubs provides simple parallelism, 1:1 correspondence between Event Hubs partitions and Spark partitions, and access to sequence numbers and metadata. Table of Contents Linking User Configurations Connection String EventHubsConf Creating a Direct Stream Creating an RDD Obtaining Offests Storing Offsets Checkpoints Your own data store Recovering from Failures with Checkpointing Managing Throughput Deploying Linking For Scala/Java applications using SBT/Maven project definitions, link your application with the following artifact: 1 groupId = com.microsoft.azure 2 artifactId = azure‐eventhubs‐spark_2.11 3 version = 2.3.16 45 or
67 groupId = com.microsoft.azure 8 artifactId = azure‐eventhubs‐spark_2.12 9 version = 2.3.16 For Python applications, you need to add this above library and its dependencies when deploying your application. See the Deploying subsection below. User Configuration Connection String An Event Hubs connection string is required to connect to the Event Hubs service. You can get the connection string for your Event Hubs instance from the Azure Portal or by using the ConnectionStringBuilder in our library. Azure Portal When you get the connection string from the Azure Portal, it may or may not have the EntityPath key. Consider: 1 // Without an entity path 2 val without = "Endpoint=ENDPOINT;SharedAccessKeyName=KEY_NAME;SharedAccessKey=KEY" 34 // With an entity path 5 val with = "Endpoint=sb://SAMPLE;SharedAccessKeyName=KEY_NAME;SharedAccessKey=KEY;Enti tyPath=EVENTHUB_NAME" To connect to your EventHubs, an EntityPath must be present. If your connection string doesn't have one, don't worry! This will take care of it: 1 import org.apache.spark.eventhubs.ConnectionStringBuilder 2
3 val connectionString = ConnectionStringBuilder(without) // defined in the previous code block 4 .setEventHubName("EVENTHUB_NAME") 5 .build ConnectionStringBuilder Alternatively, you can use the ConnectionStringBuilder to make your connection string. 1 import org.apache.spark.eventhubs.ConnectionStringBuilder 23 val connectionString = ConnectionStringBuilder() 4 .setNamespaceName("NAMESPACE_NAME") 5 .setEventHubName("EVENTHUB_NAME") 6 .setSasKeyName("KEY_NAME") 7 .setSasKey("KEY") 8 .build EventHubsConf All configuration relating to Event Hubs happens in your EventHubsConf . To create an EventHubsConf , you must pass a connection string: 1 val connectionString = "YOUR.CONNECTION.STRING" 2 val ehConf = EventHubsConf(connectionString) Please read the Connection String subsection for more information on obtaining a valid connection string. Additionally, the following configurations are optional:


 

------分隔线----------------------------

锋哥公众号


锋哥微信


关注公众号
【Java资料站】
回复 666
获取 
66套java
从菜鸡到大神
项目实战课程

锋哥推荐