我有一个本地安装的Cassandra数据库,在那里我记住了一些数据。我需要在谷歌实验室里加载这些数据。有可能吗?你是怎么做到的?
我尝试了在pycharm中使用的从cassandra导入数据的代码,但不起作用。代码如下:
从cassandra.cluster导入集群
cluster=cluster(['127.0.0.1'],端口=9042)
会话=cluster.connect()
出现以下错误
nohostavailable回溯(最近一次调用last)in()2 3 cluster=cluster(['127.0.0.1'],port=9042)--->4 session=cluster.connect()
/cassandra.cluster.cluster.connect()中的usr/local/lib/python3.6/dist-packages/cassandra/cluster.cpython-36m-x86_-linux-gnu.so
/cassandra.cluster.cluster.connect()中的usr/local/lib/python3.6/dist-packages/cassandra/cluster.cpython-36m-x86_-linux-gnu.so
/cassandra.cluster.cluster.connect()中的usr/local/lib/python3.6/dist-packages/cassandra/cluster.cpython-36m-x86_-linux-gnu.so
/cassandra.cluster.controlconnection.connect()中的usr/local/lib/python3.6/dist-packages/cassandra/cluster.cpython-36m-x86_-linux-gnu.so
/usr/local/lib/python3.6/dist-packages/cassandra/cluster.cpython-36m-x86\u 64-linux-gnu.so在cassandra.cluster.controlconnection.\u reconnect\u internal()
nohostavailable:('unable to connect to any servers',{'127.0.0.1':connectionrefusederror(111),“tryied connecting to[('127.0.0.1',9042)]。上一个错误:连接被拒绝(“)})
暂无答案!
目前还没有任何答案,快来回答吧!