python - Pickling Error running COPY command: CQLShell on Windows -
we're running copy command in cqlshell on windows 7. @ first, ran "improper copy command":
copy ourdata(data_time, data_id, datablob) 'testdata.csv' header = true; we later started receiving error after running same command:
error starting import process: can't pickle <type 'thread.lock'>: it's not found thread.lock can join started process cqlsh:testkeyspace> traceback (most recent call last): file "<string>", line 1, in <module> file "c:\program files\datastax\community\python\lib\multiprocessing\forking.py", line 373, in main prepare(preparation_date) file "c:\program files\datastax community\python\lib\multiprocessing\forking.py", line 482, in prepare file, path_name, etc = imp.find_module(main_name, dirs) importerror: no module named cqlsh we're not sure if issue path (no module named cqlsh), or python pickling objects csv file.
so went , tested out. created 2 simple tables in cassandra 2.1.5 (btw- version using?) on both windows , linux. tested copy to/from on each.
linux (ubuntu 14.04.2 lts):
connected test cluster @ dockingbay94:9042. [cqlsh 5.0.1 | cassandra 2.1.5 | cql spec 3.2.0 | native protocol v3] use help. aploetz@cqlsh> use stackoverflow2; aploetz@cqlsh:stackoverflow2> copy dummy3(id,time) '/home/aploetz/dummy3.txt' header=true , delimiter='|'; 4 rows exported in 0.071 seconds. aploetz@cqlsh:stackoverflow2> copy dummy4(id,time) '/home/aploetz/dummy3.txt' header=true , delimiter='|'; 4 rows imported in 0.427 seconds. windows 8.1:
connected window$ cluster @ 127.0.0.1:9042. [cqlsh 5.0.1 | cassandra 2.1.5 | cql spec 3.2.0 | native protocol v3] use help. warning: pyreadline dependency missing. install enable tab completion. aploetz@cqlsh> use stackoverflow; aploetz@cqlsh:stackoverflow> copy dummy3(id,time) 'e:\dummy3.txt' header=true , delimiter='|'; 4 rows exported in 0.020 seconds. aploetz@cqlsh:stackoverflow> copy dummy4(id,time) 'e:\dummy3.txt' header=true , delimiter='|'; error starting import process: can't pickle <type 'thread.lock'>: it's not found thread.lock can join started process aploetz@cqlsh:stackoverflow> traceback (most recent call last): file "<string>", line 1, in <module> file "e:\program files\datastax community\python\lib\multiprocessing\forking.py", line 373, in main prepare(preparation_data) file "e:\program files\datastax community\python\lib\multiprocessing\forking.py", line 482, in prepare file, path_name, etc = imp.find_module(main_name, dirs) importerror: no module named cqlsh so copy (export) works fine, copy (import) fails on windows.
josh mckenzie of datastax made post in december titled: cassandra , windows: past, present, , future. in it, discusses details of longstanding issues cassandra has on windows. windows ntfs prevents other processes changing/deleting files in use(locked) different process. , these issues directly affect cqlsh's ability copy data cassandra.
there jira ticket (cassandra-9670) addresses similar issue (running cql scripts cqlsh on windows, yields same error message). suspect these 2 issues related. in case, cassandra expected supported on windows version 3.0, "in development." tried few tricks see if find work-around on windows, , i'll report if find one. time-being, might have use cassandra on linux benefit full functionality.
Comments
Post a Comment