Hazelcast Map 重启后密钥长度不同

发布于 2024-12-20 21:10:50 字数 320 浏览 3 评论 0原文

我正在开发一个项目,其中我使用 Hazelcast(版本:1.9.3.1)作为我们系统的分布式缓存,并将所有缓存数据写入 Hbase 中。但我面临着一个非常奇怪的问题。当我使用 Hazelcast 映射(使用字符串键)缓存数据并将其写入 Hbase 时。并重新启动我的 Hazelcast,然后尝试使用密钥检索数据 Hazelcast 将所有数据从 Hbase 加载到 Map。我注意到密钥的长度现在与之前存储到映射中时的长度不同。

例如真实密钥:“ada1:user1” 格式错误的密钥:“ada1:user1 ” 真实密钥长度= 9,畸形密钥长度= 10

Im working on a project in which I'm using Hazelcast (version : 1.9.3.1) as our system's distributed cache and writes' behind all that cached data into the Hbase. But I'm facing a very strange problem. When I cache my data using Hazelcast map using string key and write behind it to Hbase. And restart my Hazelcast and then try to retrieve data using key after
Hazelcast loads all the data from Hbase to Map. I have noticed that the length of key is now different from its previous length when it was stored into the Map.

For example Real key : "ada1:user1"
Malformed Key: "ada1:user1 "
Real key Length= 9,Malformed Key Length= 10

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

天暗了我发光 2024-12-27 21:10:50

HBase存储可能有问题。也许 HBase 用空格填充你的字符串。

你检查过了吗?

您还检查过 MapLoader 接口的存储实现吗?

there may be a problem on storing by HBase. Maybe HBase fills your String with spaces.

Have you checked that?

Also have you checked store implementations of MapLoader interface?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文