博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Azure Stream Analytics的BadArgument错误
阅读量:3977 次
发布时间:2019-05-24

本文共 1583 字,大约阅读时间需要 5 分钟。

       最近在使用Azure Stream Analytics链接到event hub处理其中的数据时,遇到了下面的BadArgument的错误。该错误发生在Sample Data阶段,在此之前Test检测时正常的。难道是数据格式有错误? 配置的event hub读取格式为JSON UTF-8,经过检查可以排除是由于数据格式造成的这个问题。

Error code:BadArgument\nError message: There was an error while reading sample input.Please check if the input source is configured correctly and data is in correctformat

          反复尝试后发现,这个问题实际上是由于event hub的Consumer Group的问题。默认情况下, event hub创建了名为$default的 Consumer Group,如果在从event hub读取数据是不指明consumer group,那么$default将被用来读取数据。但是,event hub另有的规定:

The publish/subscribe mechanism of Event Hubs is enabled throughconsumer groups. A consumer group is a view (state, position, or offset) of an entire Event Hub. Consumer groups enable multiple consuming applications to each have a separate view of the event stream, and to read the stream independently at their own pace and with their own offsets.

In a stream processing architecture, each downstream application equates to a consumer group. If you want to write event data to long-term storage, then that storage writer application is a consumer group. Complex event processing can then be performed by another, separate consumer group. You can only access partitions through a consumer group. Each partition can only have one active reader from a given consumer group at a time. There is always a default consumer group in an Event Hub, and you can create up to 20 consumer groups for a Standard tier Event Hub.

      也就是说,每个partition只能有一个来自于同一个consumer group的应用读取。默认的$default,可能有其它应用在读取,所以再使用它就会产生问题。解决的办法就是创建一个新的consumer group,专门用它来连接Azure Stream Analytics job,这样就不会有问题了。



转载地址:http://pwgki.baihongyu.com/

你可能感兴趣的文章
2010年11月19日
查看>>
2010年11月19日
查看>>
TC35i 单片机
查看>>
TC35i 单片机
查看>>
AT 命令详解
查看>>
AT 命令详解
查看>>
AT指令发送PDU中文短信——使用串口…
查看>>
AT指令发送PDU中文短信——使用串口…
查看>>
指针的使用注意事项(个人体…
查看>>
指针的使用注意事项(个人体…
查看>>
~c++中的指针使用注意事项
查看>>
~c++中的指针使用注意事项
查看>>
函数返回值、引用和指针的区别思考
查看>>
函数返回值、引用和指针的区别思考
查看>>
AT指令中文手册
查看>>
AT指令中文手册
查看>>
module_param&&MODULE_PARM_DESC
查看>>
struct inode 和 struct file
查看>>
mknod
查看>>
模板匹配函数cvMatchTemplate中的…
查看>>