cqlsh in Cassandra 2.1.0 uses the DataStax python driver. The
"cassandra.metadata" module is provided by this package. By default it uses
the driver from an archive included in the Cassandra distribution
(.../lib/cassandra-driver-internal-only-2.1.0.zip).

See /usr/local/apache-cassandra-2.1.0/bin/cqlsh for how everything gets
setup -- it's possible your wrapper or environment are not playing well
with that.

Also note that "9160" will not apply anymore since this driver uses the
native protocol (9042).

Adam

On Sun, Sep 21, 2014 at 7:53 PM, Tim Dunphy <bluethu...@gmail.com> wrote:

> Hey all,
>
>  I've just upgraded to the latest cassandra on my site with version 2.1.0.
>
> But now when I run the command I am getting the following error:
>
> [root@beta-new:/usr/local] #cqlsh
> Traceback (most recent call last):
>   File "/etc/alternatives/cassandrahome/bin/cqlsh-old", line 113, in
> <module>
>     from cqlshlib import cqlhandling, cql3handling, pylexotron
>   File
> "/usr/local/apache-cassandra-2.1.0/bin/../pylib/cqlshlib/cql3handling.py",
> line 18, in <module>
>     from cassandra.metadata import maybe_escape_name
> ImportError: No module named cassandra.metadata
>
> Just to clarify some of the above output, all my 'cqlsh' command does is
> automatically fill in some values I'd like to use as defaults and then
> invoke the real command which I've named 'cqlsh-old'. Just a quirk of my
> setup that's always allowed cqlsh to be invoked without issue across
> multiple upgrades.
>
> [root@beta-new:/usr/local] #cat /etc/alternatives/cassandrahome/bin/cqlsh
> #!/bin/sh
> /etc/alternatives/cassandrahome/bin/cqlsh-old beta-new.mydomain.com 9160
> --cqlversion="3.0.0"
>
> I'd appreciate any advice you  could spare on how to get around this error!
>
> Thanks
> Tim
>
> --
> GPG me!!
>
> gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
>
>

Reply via email to