Couchbase(例如 membase)解决方案将所有密钥转储到存储桶中

发布于 2025-01-08 09:47:48 字数 778 浏览 6 评论 0原文

我在谷歌上搜索,发现了各种 python + tap 解决方案,这些解决方案应该使我能够从存储桶中转储所有密钥,但它们都不适合我。我在端口 11230 有一个存储桶,我需要转储所有密钥,以便将它们填充到 sphinx 搜索引擎中。

如果我执行:

# python /opt/couchbase/lib/python/tap_example.py 127.0.0.1:11230

我得到以下输出:

info: New bin connection from None
error: uncaptured python exception, closing channel <tap.TapConnection connected at 0x7f5d287184d0> (<type 'exceptions.AssertionError'>: [/usr/lib/python2.6/asyncore.py|read|78] [/usr/lib/python2.6/asyncore.py|handle_read_event|428] [/opt/couchbase/lib/python/mc_bin_server.py|handle_read|325])

即使我尝试其他主机或端口,此错误也是相同的。我还尝试了在论坛和群组中找到的许多其他 python 脚本,但它们都产生了相同的错误。

我的主要开发环境包括PHP和Perl 在 Debian linux 机器上,但我会采取任何解决方案,将所有密钥转储到纯文本文件中。

感谢您的帮助!

I was googling around and found various python + tap solutions that should enable me to dump all keys from a bucket but none of them worked for me. I have a bucket at port 11230 and I need to get a dump of all keys in order to fill them into sphinx search engine.

If I execute:

# python /opt/couchbase/lib/python/tap_example.py 127.0.0.1:11230

I get the following output:

info: New bin connection from None
error: uncaptured python exception, closing channel <tap.TapConnection connected at 0x7f5d287184d0> (<type 'exceptions.AssertionError'>: [/usr/lib/python2.6/asyncore.py|read|78] [/usr/lib/python2.6/asyncore.py|handle_read_event|428] [/opt/couchbase/lib/python/mc_bin_server.py|handle_read|325])

this error is the same even if I try some other host or port. I also tried many other python scripts that I found on forums and groups but all of them produced the same error.

My primary development environment includes PHP & Perl on Debian linux box but I will take any solution that would just dump all the keys into plain text file.

Thank you for any help!

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

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

发布评论

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

评论(1

十年九夏 2025-01-15 09:47:48

回复晚了,但您可以为此使用 couchbase 视图。

function (doc, meta) {
  if(meta.type == 'json') {
   emit(doc.key, null);    
  }
}

这将发出 json 存储桶中的每个键。

Late reply, but you could use a couchbase view for this.

function (doc, meta) {
  if(meta.type == 'json') {
   emit(doc.key, null);    
  }
}

This would emit every key in the bucket that is json.

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