[ 
https://issues.apache.org/jira/browse/CASSANDRA-11574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15251149#comment-15251149
 ] 

Nandakishore Arvapaly commented on CASSANDRA-11574:
---------------------------------------------------

Hi Stefania,

I have tried the way you said but still faced the same issue.


Here is my simple schema for table "movie"

CREATE TABLE movie (
movieid int,
moviename text,
releasedyear int,
PRIMARY KEY(releasedyear,movieid,moviename)
);

My sample data

1,Toy Story,1995
2,Jumanji,1995
3,Grumpier Old Men,1995
4,Waiting to Exhale,1995
5,Father of the Bride Part II,1995
6,Heat,1995
7,Sabrina,1995
8,Tom and Huck,1995
9,Sudden Death,1995
10,GoldenEye,1995

The command I used to get into cqlsh

cqlsh 172.17.3.77 9042 --debug


The COPY command I executed

copy movie from '/root/cassandra_data/moviebyyear.csv';


The error I got
cqlsh:moviesdb> copy movie12 from '/root/cassandra_data/moviebyyear12.csv';
Traceback (most recent call last):
  File "/usr/bin/cqlsh.py", line 1191, in onecmd
    self.handle_statement(st, statementtext)
  File "/usr/bin/cqlsh.py", line 1228, in handle_statement
    return custom_handler(parsed)
  File "/usr/bin/cqlsh.py", line 1937, in do_copy
    task = ImportTask(self, ks, table, columns, fname, opts, 
DEFAULT_PROTOCOL_VERSION, CONFIG_FILE)
  File "cqlshlib/copyutil.py", line 1052, in 
cqlshlib.copyutil.ImportTask.__init__ (cqlshlib/copyutil.c:27710)
    CopyTask.__init__(self, shell, ks, table, columns, fname, opts, 
protocol_version, config_file, 'from')
  File "cqlshlib/copyutil.py", line 219, in cqlshlib.copyutil.CopyTask.__init__ 
(cqlshlib/copyutil.c:9708)
    self.options = self.parse_options(opts, direction)
  File "cqlshlib/copyutil.py", line 320, in 
cqlshlib.copyutil.CopyTask.parse_options (cqlshlib/copyutil.c:11850)
    copy_options['numprocesses'] = int(opts.pop('numprocesses', 
self.get_num_processes(16)))
TypeError: get_num_processes() takes no keyword arguments


> COPY FROM command in cqlsh throws error
> ---------------------------------------
>
>                 Key: CASSANDRA-11574
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11574
>             Project: Cassandra
>          Issue Type: Bug
>          Components: CQL
>         Environment: Operating System: Ubuntu Server 14.04
> JDK: Oracle JDK 8 update 77
> Python: 2.7.6
>            Reporter: Mahafuzur Rahman
>            Assignee: Stefania
>             Fix For: 3.0.6
>
>
> Any COPY FROM command in cqlsh is throwing the following error:
> "get_num_processes() takes no keyword arguments"
> Example command: 
> COPY inboxdata 
> (to_user_id,to_user_network,created_time,attachments,from_user_id,from_user_name,from_user_network,id,message,to_user_name,updated_time)
>  FROM 'inbox.csv';
> Similar commands worked parfectly in the previous versions such as 3.0.4



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to