首页 \ 问答 \ 风暴卡夫卡鲸鱼嘴不发出信息(Storm Kafka spout not emitting messages)

风暴卡夫卡鲸鱼嘴不发出信息(Storm Kafka spout not emitting messages)

在我的风暴拓扑结构中(有2个喷口和1个螺栓),其中一个kafka-spout消费者的偏移正在推进,但msgs不会通过kafka spout发送到螺栓。 我可以在暴风雨中看到,对于特定的喷口,消息发出和传输的消息为0.所以,我的问题是消费者如何前进,我可以看到消费者与动物园管理员客户端的偏移逐渐增加。


In my storm topology(with 2 spouts and 1 bolt) the offset for one of the the kafka-spout consumer is advancing but the msgs are not sent via kafka spout to the bolt. I can see in the storm ui that for that particular spout the msgs emitted and transferred is 0. So, my question is how come the consumer is advancing, i can see the gradual increase in the offset of the consumer from the zookeeper client.


原文:https://stackoverflow.com/questions/40041925
更新时间:2022-02-26 07:02

最满意答案

这似乎得到了预期的结果:

file_fullpath = file_fullpath.force_encoding('UTF-16LE').encode!('UTF-8')

好像我首先需要“说服”Ruby,该字符串是UTF-16LE,然后才转换为UTF-8。


This seems to get the desired result:

file_fullpath = file_fullpath.force_encoding('UTF-16LE').encode!('UTF-8')

Seems like I first need to "convince" Ruby that the string is UTF-16LE, and only then convert to UTF-8.

相关问答

更多
  • 您需要导入dart:utf并使用其encodeUtf8函数。 实际上现在有一个现有的Dart Redis客户端,它使用这些功能。 You need to import dart:utf and use its encodeUtf8 function. There is actually a existing redis client for Dart here which makes use of these functions.
  • 告诉您要实现什么有点困难,但假设您尝试获取一个Base64字符串,当解码为abcdef== ,以下内容应该有效: byte[] bytes = Encoding.UTF8.GetBytes("abcdef=="); string base64 = Convert.ToBase64String(bytes); Console.WriteLine(base64); 这将输出: YWJjZGVmPT0=这是abcdef==编码在Base64中。 编辑: 要解码一个Base64字符串,只需使用Convert.Fr ...
  • 看看String的构造函数 String str = new String(bytes, StandardCharsets.UTF_8); 如果你感觉很懒,可以使用Apache Commons IO库将InputStream直接转换成String: String str = IOUtils.toString(inputStream, StandardCharsets.UTF_8); Look at the constructor for String String str = new String(by ...
  • 您正在使用UTF-8编码混合代码点。 在内部,所有.NET字符串都使用UTF-16,因此您只需指定Unicode代码点, 而不是 UTF-8字节数据: Const FigureSpaceChar As Char = ChrW(&H2007) 来自www.fileformats.info的Codepoint 。 You're mixing code points with UTF-8 encoding. Internally, all .NET strings use UTF-16 so you just ...
  • 此错误不是由字符编码引起的。 这意味着UTF数据的长度是错误的。 编辑:只是意识到这是一个写错误,不读错误。 UTF长度只有2个字节,所以它只能容纳64K UTF-8字节。 你正在努力写100K,它不会工作。 这个限制是硬编码的,无法解决这个问题, if (utflen > 65535) throw new UTFDataFormatException( "encoded string too long: " + utflen + " bytes"); This error ...
  • 将“Hello”转换为UTF-16LE时,最终会得到这个字节序列(以十六进制显示): 48 00 65 00 6C 00 6C 00 6F 00 00 00 printf调用表示打印字符串,好像它是一个常规的以零结尾的字符串。 它看到48并打印一个H ,然后它看到00并认为它已经完成。 您需要一个可以将字符串解释为UTF-16LE的打印功能。 C中没有标准的。 When you convert "Hello" to UTF-16LE, you end up with this byte sequence ...
  • 字符串只不过是一个字节数组。 因此,UTF-8字符串与字节数组完全相同,除此之外您还知道字节数组所代表的内容。 因此,您的输入字节数组还需要一个附加信息:字符集(字符编码)。 如果您知道输入字符集,则可以将字节数组转换为另一个表示UTF-8字符串的字节数组。 执行此操作的PHP方法称为mb_convert_encoding() 。 PHP本身不知道字符集(字符编码)。 所以字符串实际上只不过是一个字节数组。 应用程序必须知道如何处理它。 因此,如果您有一个字节数组并希望将其转换为PHP字符串以便使用mb_c ...
  • 这是问题所在: size_t readBytes = sizeof(inBuf); size_t writeBytes = sizeof(outBuf); 将数组传递给函数时,它们会衰减到指向第一个元素的指针。 你的来电 fn2Utf8(inBuf, outBuf); 等于 fn2Utf8(&inBuf[0], &outBuf[0]); 这意味着在函数中,参数不是数组,而是指针 。 当你在指针上执行sizeof ,你会得到指针的大小,而不是它指向的大小。 有两种解决方案:第一种是将数组的长度作为函数的 ...
  • 这似乎得到了预期的结果: file_fullpath = file_fullpath.force_encoding('UTF-16LE').encode!('UTF-8') 好像我首先需要“说服”Ruby,该字符串是UTF-16LE,然后才转换为UTF-8。 This seems to get the desired result: file_fullpath = file_fullpath.force_encoding('UTF-16LE').encode!('UTF-8') Seems like I ...
  • 用UTF-16编写程序以处理UTF-16文件听起来像是用俄语命名变量以创建俄语网站。 :) Ruby 1.9支持字符串编码,James Grey在这个主题上有一系列优秀的文章 - 我认为它们是Ruby编码的参考指南。 简而言之,您可以在打开它们时指定输入文件的编码: s = '' File.open('utf16le.txt', 'rb:UTF-16LE') do |f| # here you set the encoding s = f.read end p s.encoding #=> #

相关文章

更多

最新问答

更多
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)
  • 是否可以嵌套hazelcast IMaps?(Is it possible to nest hazelcast IMaps? And whick side effects can I expect? Is it a good Idea anyway?)
  • UIViewAnimationOptionRepeat在两个动画之间暂停(UIViewAnimationOptionRepeat pausing in between two animations)
  • 在x-kendo-template中使用Razor查询(Using Razor query within x-kendo-template)
  • 在BeautifulSoup中替换文本而不转义(Replace text without escaping in BeautifulSoup)
  • 如何在存根或模拟不存在的方法时配置Rspec以引发错误?(How can I configure Rspec to raise error when stubbing or mocking non-existing methods?)
  • asp用javascript(asp with javascript)
  • “%()s”在sql查询中的含义是什么?(What does “%()s” means in sql query?)
  • 如何为其编辑的内容提供自定义UITableViewCell上下文?(How to give a custom UITableViewCell context of what it is editing?)
  • c ++十进制到二进制,然后使用操作,然后回到十进制(c++ Decimal to binary, then use operation, then back to decimal)
  • 以编程方式创建视频?(Create videos programmatically?)
  • 无法在BeautifulSoup中正确解析数据(Unable to parse data correctly in BeautifulSoup)
  • webform和mvc的区别 知乎
  • 如何使用wadl2java生成REST服务模板,其中POST / PUT方法具有参数?(How do you generate REST service template with wadl2java where POST/PUT methods have parameters?)
  • 我无法理解我的travis构建有什么问题(I am having trouble understanding what is wrong with my travis build)
  • iOS9 Scope Bar出现在Search Bar后面或旁边(iOS9 Scope Bar appears either behind or beside Search Bar)
  • 为什么开机慢上面还显示;Inetrnet,Explorer
  • 有关调用远程WCF服务的超时问题(Timeout Question about Invoking a Remote WCF Service)