cqlsh

Cassandra SELECT DISTINCT and timeout issue

偶尔善良 提交于 2020-02-08 06:18:58
问题 When running the following CQL query: SELECT DISTINCT partition_key FROM table_name; This is supposedly meant to return the list of partition keys that are in use for the given table. However, with the default timeout settings of 10s, it always times out: ReadTimeout: Error from server: code=1200 [Coordinator node timed out waiting for replica nodes' responses] message="Operation timed out - received only 0 responses." info={'received_responses': 0, 'required_responses': 1, 'consistency':

Cassandra SELECT DISTINCT and timeout issue

白昼怎懂夜的黑 提交于 2020-02-08 06:18:04
问题 When running the following CQL query: SELECT DISTINCT partition_key FROM table_name; This is supposedly meant to return the list of partition keys that are in use for the given table. However, with the default timeout settings of 10s, it always times out: ReadTimeout: Error from server: code=1200 [Coordinator node timed out waiting for replica nodes' responses] message="Operation timed out - received only 0 responses." info={'received_responses': 0, 'required_responses': 1, 'consistency':

Cassandra: Create a partitioned table without including the partitioned column name in primary key

China☆狼群 提交于 2020-02-06 07:55:47
问题 I want to create a partitioned table without including the partitioned column name in primary key. I am not getting any clue how to create it because most of the examples declaring the clustering column in the primary key section. I am not sure whether it is doable in Cassandra or not hence seeking some help. CREATE TABLE crossfit_gyms_by_city ( country_code text, state_province text, city text, gym_name text, year int, month int, day int); My requirement is : The table should be able to

cassandra: ~.cqlshrc does not work for float_precision

北城以北 提交于 2020-01-24 19:19:56
问题 I created file in .cassandra directory and changed the cqlshrc file. [ui] float_precision = 10 But that did not work. I am using ccm with Cassandra in Ubuntu. 回答1: Inside your cqlshrc file, you need to designate your [ui] section and define your float_precision on separate lines. In your example, it shows that you are defining them on the same line. Here you can see that I have my cqlshrc file defined as you do. When querying a float in cqlsh, it defaults to a precision of 5. aploetz

Cassandra gives no data even if data exists

江枫思渺然 提交于 2020-01-16 00:38:18
问题 I have a keyspace with replication factor of 3. I am inserting data into Cassandra (4 node cluster with single data center) with write consistency level one. After completion of insertions I am reading data with consistency level quorum (2). But I am not getting data sometimes even if data exists, after some time I am getting data with same query. I don't know why Cassandra behaves like this. My column family schema CREATE TABLE input_data_profile.input_log_profile_1 ( cid text, ctdon bigint,

Using cqlsh with ssl

若如初见. 提交于 2020-01-14 11:57:12
问题 I have enabled ssl encryption in my cassandra node and I am trying to figure out how to connect to my node using cqlsh with ssl: When I run ./cqlsh --ssl I get the following error: Validation is enabled; SSL transport factory requires a valid certfile to be specified. Please provide path to the certfile in [ssl] section as 'certfile' option in /root/.cassandra/cqlshrc (or use [certfiles] section) or set SSL_CERTFILE environment variable. I followed the link on https://docs.datastax.com/en

Using cqlsh with ssl

我只是一个虾纸丫 提交于 2020-01-14 11:55:22
问题 I have enabled ssl encryption in my cassandra node and I am trying to figure out how to connect to my node using cqlsh with ssl: When I run ./cqlsh --ssl I get the following error: Validation is enabled; SSL transport factory requires a valid certfile to be specified. Please provide path to the certfile in [ssl] section as 'certfile' option in /root/.cassandra/cqlshrc (or use [certfiles] section) or set SSL_CERTFILE environment variable. I followed the link on https://docs.datastax.com/en

How to connect to Cassandra(remotehost) using cqlsh

落花浮王杯 提交于 2020-01-11 08:14:07
问题 I cannot cqlsh to remote host ./cqlsh xx.xx.x.xxx 9042 Connection error: ('Unable to connect to any servers', {'10.101.33.163': ConnectionException(u'Did not get expected SupportedMessage response; instead, got: <ErrorMessage code=0000 [Server error] message="io.netty.handler.codec.DecoderException: org.apache.cassandra.transport.ProtocolException: Invalid or unsupported protocol version: 4">',)}) I am using cqlsh 5.0.1 and python 2.7.10 ./cqlsh --version cqlsh 5.0.1 python -V Python 2.7.10 I

Is there a clear equivalent of 'show keyspaces' in cqlsh 2?

自作多情 提交于 2020-01-10 06:52:33
问题 What cqlsh command can I use to quickly see the keyspaces in a cluster? cqlsh does not provide show keyspaces and describe cluster isn't as concise as I want. I'm working using the following specifications: cqlsh 2.2.0, Cassandra 1.1.10, CQL spec 2.0.0, Thrift protocol 19.33.0 回答1: Very simple. Just enter this command in your cqlsh shell and enjoy select * from system.schema_keyspaces; In C*3.x, we can simply use describe keyspaces 回答2: Just try this: describe keyspaces However you may need

Cqlsh query for wildcard characters

那年仲夏 提交于 2020-01-07 02:57:05
问题 I want a query to perform following operation List employees name either start or end with A but i seen on some sites that cassandra do not support wildcard characters is it true or not i also refered solr_query but cqlsh gives error undefined name solr_query select * from emp where solr_query='name:A* or name:*A'; where name is coloumn please help me out with this 回答1: Full Text Search is only a feature of DataStax Enterprise. So for Apache Cassandra, you have no such facility. Hope it helps