DS201 Cassandra killrvideo - Python驱动程序和节点

时间:2016-07-14 17:11:06

标签: python cassandra datastax datastax-enterprise

环境:DSE DS201 VM

错误1: 练习5:Drivers.ipynb enter image description here

尝试使用Python驱动程序连接到Cassandra时。

    from cassandra.cluster import Cluster
    cluster = Cluster()
    session = cluster.connect('killrvideo')

    NoHostAvailable    Traceback (most recent call last)
    <ipython-input-1-535660701145> in <module>()
    1 from cassandra.cluster import Cluster
    2 cluster = Cluster()
    ----> 3 session = cluster.connect('killrvideo')

   /usr/local/lib/python2.7/dist-packages/cassandra/cluster.so in     
    cassandra.cluster.Cluster.connect (cassandra/cluster.c:11471)()

错误2: 练习:7 Ring.ipynb

按照笔记本中的建议进行更改并启动节点1;面对错误。

    root@sample:~/Desktop/node1/bin# ./cassandra
    Cannot change the number of tokens from 256 to 1
    Fatal configuration error; unable to start server.  See log for stacktrace.
    ERROR 22:08:32 Fatal configuration error

org.apache.cassandra.exceptions.ConfigurationException:无法将令牌数从256更改为1 ...

彻底跟随Jupyter笔记本。但是面临一个错误。

1 个答案:

答案 0 :(得分:0)

所以最后我解决了这个问题。问题出在Python驱动程序