cqlsh

Warning on starting cqlsh

。_饼干妹妹 提交于 2019-12-07 05:06:12
问题 The following warning appears every time I start cqlsh:- warning: pyreadline dependency missing. Install to enable tab completion. Please help me through this.. 回答1: Install pyreadline for DataStax Cassandra Set PATH variable for Python to C:\Program Files\DataStax Community\python 1. Download pyreadline: https://github.com/pyreadline/pyreadline 2. Click on "ZIP" to download a zip file of PyReadline repository 3. Extract to C:\pyreadline 4. At the command prompt: navigate to C:\pyreadline 5.

Cassandra CQLSH OperationTimedOut error=Client request timeout. See Session.execute[_async](timeout)

夙愿已清 提交于 2019-12-06 17:40:58
问题 I want to transfer data from one Cassandra cluster (reached via 192.168.0.200) to another Cassandra cluster (reached via 127.0.0.1). The data is 523 rows but each row is about 1 MB. I am using the COPY FROM and COPY TO command. I get the following error when I issue the COPY TO command: Error for (8948428671687021382, 9075041744804640605): OperationTimedOut - errors={ '192.168.0.200': 'Client request timeout. See Session.execute[_async](timeout)'}, last_host=192.168.0.200 (will try again

How to list column families in keyspace?

别来无恙 提交于 2019-12-06 16:50:36
问题 How can I get list of all column families in keyspace in Cassandra using CQL 3? 回答1: cqlsh> select columnfamily_name from system.schema_columnfamilies where keyspace_name = 'test'; columnfamily_name ------------------- commits foo has_all_types item_by_user test test2 user_by_item (7 rows) 回答2: Or even more simply (if you are using cqlsh), switch over to your keyspace with use and then execute describe tables : cqlsh> use products; cqlsh:products> describe tables; itemmaster itemhierarchy

Cqlsh with client to node SSL encryption

南笙酒味 提交于 2019-12-06 05:23:39
Am trying to enable client to node SSL encryption in my DSE server. My cqlshrc file looks like below [connection] hostname = 127.0.0.1 port = 9160 factory = cqlshlib.ssl.ssl_transport_factory [ssl] certfile = /path/to/dse_node0.cer validate = true ;; Optional, true by default. [certfiles] ;; Optional section, overrides the default certfile in the [ssl] section. 1.2.3.4 = /path/to/dse_node0.cer When I tried to login into cqlsh shell then am getting the below error Connection error: Could not connect to 127.0.0.1:9160 There are several possible causes I hope one of these solutions is helpful. 1)

“Bad Request: PRIMARY KEY part to_id cannot be restricted” when trying to select using where condition

妖精的绣舞 提交于 2019-12-05 02:05:35
问题 Here is my cassandra table for chat kind of application: CREATE TABLE tax_keyspace_dev.chat_messages ( message text, when timestamp, from_id text, to_id text, read boolean, participants text, PRIMARY KEY(participants, when, to_id) ); This query work: select * from tax_keyspace_dev.chat_messages where participants='caone@one.com_shashank_shrivastava@acme.com' order by when; but following queries don't work: select * from tax_keyspace_dev.chat_messages where to_id='caone@one.com' order by when;

How to list column families in keyspace?

女生的网名这么多〃 提交于 2019-12-04 22:27:09
How can I get list of all column families in keyspace in Cassandra using CQL 3? cqlsh> select columnfamily_name from system.schema_columnfamilies where keyspace_name = 'test'; columnfamily_name ------------------- commits foo has_all_types item_by_user test test2 user_by_item (7 rows) Or even more simply (if you are using cqlsh), switch over to your keyspace with use and then execute describe tables : cqlsh> use products; cqlsh:products> describe tables; itemmaster itemhierarchy companyitemfavorites testtable Note: The describe command is specific to cqlsh only. prayagupd CQL API supports both

COPY cassandra table from csv file

旧街凉风 提交于 2019-12-04 21:25:51
问题 I'm setting up a demo landscape for Cassandra, Apache Spark and Flume on my Mac (Mac OS X Yosemite with Oracle jdk1.7.0_55). The landscape shall work as a proof of concept for a new analytics platform and therefore I need some test data in my cassandra db. I am using cassandra 2.0.8. I created some demo data in excel and exported that as a CSV file. The structure is like this: ProcessUUID;ProcessID;ProcessNumber;ProcessName;ProcessStartTime;ProcessStartTimeUUID;ProcessEndTime

Getting “unable to complete request: one or more nodes were unavailable” when performing insert statement using cqlsh

坚强是说给别人听的谎言 提交于 2019-12-04 09:50:40
I'm trying to perform an insert on a brand new install of Cassandra 2, and while I was able to set up a new keyspace and table just fine, I get the eror mentioned above when attempting to perform an insert. I dont' have any fancy multi server setup, it's just running one one computer with a test db hence my confusion with node configuration Commands used to create said items are: CREATE KEYSPACE demodb WITH REPLICATION = { 'class' : 'NetworkTopologyStrategy', 'DC1' : 3 }; USE demodb; CREATE TABLE users (user_name varchar, state varchar, birth_year bigint, PRIMARY KEY (user_name)); INSERT INTO

Cassandra CQLSH TEXT field limit on COPY FROM CSV (field larger than field limit (131072))

[亡魂溺海] 提交于 2019-12-03 23:22:50
When importing a record with a large field inside (longer than 124214 characters) I am getting the error "field larger than field limit (131072)" I saw form other posts how to solve this on Python but I don't know if it is possible on CQLSH. Thanks mikea Take a look at this answer: _csv.Error: field larger than field limit (131072) You will need to add this solution to the top of the cqlsh file. So after: import csv import getpass csv.field_size_limit(sys.maxsize) Rather than hacking into the cqlsh file, there is a standard option provided by cassandra to change the field_size_limit . The

PicklingError when copying a very large cassandra table using cqlsh

一笑奈何 提交于 2019-12-03 21:29:15
问题 When I try to copy a table to cassandra using the command: copy images from 'images.csv' I get the error: 'PicklingError: Can't pickle <class 'cqlshlib.copyutil.ImmutableDict'>: attribute lookup cqlshlib.copyutil.ImmutableDict failed' I have successfully imported all of my other tables, but this one is not working. The only difference with this one is that it contains large binary blobs for images. Here is a sample row from the csv file: b267ba01-5420-4be5-b962-7e563dc245b0,,0x89504e...[large