get_num_processes() takes no keyword arguments (CSV <-> CASSANDRA)

眉间皱痕 提交于 2019-12-11 02:37:34

问题


I want to export a cassandra DB to a csv file, but

cqlsh:marvel> SELECT * FROM personajes ;

  name       | skills
 ------------+--------
  Iron Man   | Tech  
  Spider Man | Lab

cqlsh:marvel> COPY personajes (name, skills) TO 'temp.csv';
get_num_processes() takes no keyword arguments

Tested in:
[cqlsh 5.0.1 | Cassandra 2.1.14 | CQL spec 3.2.1 | Native protocol v3]
[cqlsh 5.0.1 | Cassandra 3.0.5 | CQL spec 3.4.0 | Native protocol v4]

Thank you


回答1:


Delete pylib/cqlshlib/copyutil.so and copyutil.c (if you have it - I didn't).

The exact path depends on your OS I guess. On Ubuntu 14.04 copyutil.so would be a symlink inside /usr/lib/pymodules/python2.7/cqlshlib.

Just delete or rename it and you should be good to go. Worked for me at least.

For reference: This is indeed a bug and the same bug as https://issues.apache.org/jira/browse/CASSANDRA-11574, which I've learned after opening https://issues.apache.org/jira/browse/CASSANDRA-11816. Turned out the fix-version in the first ticket was wrong for Cassandra 2.2



来源:https://stackoverflow.com/questions/37077446/get-num-processes-takes-no-keyword-arguments-csv-cassandra

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!