Etching Error While Running COPY: CQLShell on Windows

We run the copy command in CQLShell on Windows 7. First, we came across the “IMPROPER COPY COMMANDS”:

COPY ourdata(data_time, data_ID, dataBlob)
FROM 'TestData.csv'
WITH HEADER = true;

Later we started getting this error after executing the same command:

Error starting import process:

Can't pickle <type 'thread.lock'>: it not found as thread.lock
can only join a 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 are not sure if there is a problem with this path (without the cqlsh module), or with peering etch objects with a csv file.

+4
source share
2 answers

So, I went and checked it. I created two simple tables in Cassandra 2.1.5 (BTW - which version are you using?) For both Windows and Linux. Then I tested COPY TO / FROM on each.

Linux (Ubuntu 14.04.2 LTS):

Connected to Test Cluster at dockingbay94:9042.
[cqlsh 5.0.1 | Cassandra 2.1.5 | CQL spec 3.2.0 | Native protocol v3]
Use HELP for help.
aploetz@cqlsh> use stackoverflow2;
aploetz@cqlsh:stackoverflow2> COPY dummy3(id,time) TO '/home/aploetz/dummy3.txt' 
    WITH HEADER=true AND DELIMITER='|';

4 rows exported in 0.071 seconds.
aploetz@cqlsh:stackoverflow2> COPY dummy4(id,time) FROM '/home/aploetz/dummy3.txt' 
    WITH HEADER=true AND DELIMITER='|';

4 rows imported in 0.427 seconds.

Windows 8.1:

Connected to Window$ Cluster at 127.0.0.1:9042.
[cqlsh 5.0.1 | Cassandra 2.1.5 | CQL spec 3.2.0 | Native protocol v3]
Use HELP for help.
WARNING: pyreadline dependency missing.  Install to enable tab completion.
aploetz@cqlsh> use stackoverflow;
aploetz@cqlsh:stackoverflow> COPY dummy3(id,time) TO 'e:\dummy3.txt' 
    WITH HEADER=true AND DELIMITER='|';

4 rows exported in 0.020 seconds.
aploetz@cqlsh:stackoverflow> COPY dummy4(id,time) FROM 'e:\dummy3.txt' 
    WITH HEADER=true AND DELIMITER='|';

Error starting import process:

Can't pickle <type 'thread.lock'>: it not found as thread.lock
can only join a 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

, COPY TO () , COPY FROM () Windows.

DataStax : Windows: , . , Cassandra Windows. Windows NTFS / , () . CQLSH COPY Cassandra.

JIRA (CASSANDRA-9670), ( cql CQLSH Windows ​​ ). , . , Cassandra Windows 3.0, " ". , , Windows, , . Cassandra Linux, .

+3

, Cassandra 2.1. Cassandra 2.2, . .

+1

All Articles