如何使用Cassandra工具sstableloader? [英] How do you use the Cassandra tool sstableloader?

查看:1280
本文介绍了如何使用Cassandra工具sstableloader?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用sstableloader将数据加载到现有的Cassandra环,但无法确定如何实际使它工作。我试图运行它上面有一个运行cassandra节点的机器,但是当我运行它,我得到一个错误,说端口7000已经在使用,这是运行Cassandra节点正在使用的端口gossip。

I'm trying to use the sstableloader to load data into an existing Cassandra ring, but cant figure out how to actually get it to work. I'm trying to run it on a machine that has a running cassandra node on it, but when I run it I get an error saying that port 7000 is already in use, which is the port the running Cassandra node is using for gossip.

这是否意味着我只能在与目标cassandra环境在同一网络中的机器上使用sstableloader,但实际上并不运行cassandra节点?

So does that mean I can only use sstableloader on a machine that is in the same network as the target cassandra ring, but isn't actually running a cassandra node?

任何细节都会对您有所帮助。

Any details would be useful, thanks.

推荐答案

使用sstableloader,读取源代码,最后找出如何在托管运行的cassandra节点的同一台机器上运行sstableloader。有两个关键点要得到这个运行。首先,您需要为sstableloader创建cassandra安装文件夹的副本。这是因为sstableloader读取yaml文件以找出用于gossip的ipaddress,并且现有的yaml文件正在被Cassandra使用。第二点是,你需要在你的机器上创建一个新的loopback ipaddress(类似127.0.0.2)。一旦这完成,请更改复制的Cassandra安装文件夹中的yaml文件以侦听此ipaddress。

Played around with sstableloader, read the source code, and finally figured out how to run sstableloader on the same machine that hosts a running cassandra node. There are two key points to get this running. First you need to create a copy of the cassandra install folder for sstableloader. This is becase sstableloader reads the yaml file to figure out what ipaddress to use for gossip, and the existing yaml file is being used by Cassandra. The second point is that you'll need to create a new loopback ipaddress (something like 127.0.0.2) on your machine. Once this is done, change the yaml file in the copied Cassandra install folder to listen to this ipaddress.

我写了一个教程,更详细地介绍如何做这里: http://geekswithblogs.net/johnsPerfBlog/archive/2011 /07/26/how-to-use-cassandrs-sstableloader.aspx

I wrote a tutorial going more into detail about how to do this here: http://geekswithblogs.net/johnsPerfBlog/archive/2011/07/26/how-to-use-cassandrs-sstableloader.aspx

这篇关于如何使用Cassandra工具sstableloader?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆