admin管理员组文章数量:1130349
最近在使用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另有一条特殊的规定:
也就是说,每个partition只能有一个来自于同一个consumer group的应用读取。默认的$default,可能有其它应用在读取,所以再使用它就会产生问题。解决的办法就是创建一个新的consumer group,专门用它来连接Azure Stream Analytics job,这样就不会有问题了。 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.
最近在使用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另有一条特殊的规定:
也就是说,每个partition只能有一个来自于同一个consumer group的应用读取。默认的$default,可能有其它应用在读取,所以再使用它就会产生问题。解决的办法就是创建一个新的consumer group,专门用它来连接Azure Stream Analytics job,这样就不会有问题了。 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.
本文标签: 错误StreamAzureBadArgumentAnalytics
版权声明:本文标题:Azure Stream Analytics的BadArgument错误 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/jiaocheng/1754582331a2704118.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论