cassandra

Inserting data in table with umlaut is not possible

萝らか妹 提交于 2020-01-05 05:51:34
问题 I am using Cassandra 1.2.5 (cqlsh 3.0.2) and trying to inserting data in a small test-database with german characters which is not possible. I get back the message from cqlsh: "Bad Request: Input length = 1" below is the setup of the keyspace, the table and the insert. CREATE KEYSPACE test WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 }; use test; CREATE TABLE testdata ( id varchar, text varchar, PRIMARY KEY (id) This is working: insert into testdata (id, text)

Cassandra Upgrade 0.8.2->0.8.4 get error “failed connecting to all endpoints”

天涯浪子 提交于 2020-01-05 04:54:09
问题 After upgrade of cassandra from 0.8.2 to 0.8.4, got this error I have restarted cassandra, removed data, etc. nothing helps I have 6 identical machines in the cloud, before it was working fine. If I make netstat then it shows port 9160 listening nodetool ... ring - responces with 6 machines UP. what could be the problem? : ( Exception in thread "main" java.io.IOException: Could not get input splits at org.apache.cassandra.hadoop.ColumnFamilyInputFormat.getSplits(ColumnFamilyInputFormat.java

How to change defaults.last_index_time format in solr

我与影子孤独终老i 提交于 2020-01-05 04:52:45
问题 I am using Apache Solr 6.2, and need a timestamp for defaults.last_index_time field or need separate field for a Core config. Default value was defaults.last_index_time=2016-09-19 14:55:17 . I need something like defaults.last_index_time=1474297085558 回答1: Use Property Writer to change last_index_time format in solr.Add the element to the DIH configuration file, directly under the dataConfig element <propertyWriter dateFormat="yyyy-MM-dd'T'HH:mm:ss.SSSXXX" type="SimplePropertiesWriter" /> In

Syntax error at position 7: no viable alternative at input 'table'

柔情痞子 提交于 2020-01-05 04:38:11
问题 Environment: Cassandra and CLI version is 1.2.12 OS Windows7 Enterprise, 64 Bit. ran cassendra-cli.bat , When running the create table command I get following: [default@unknown] create table us(name varchar); Syntax error at position 7: no viable alternative at input 'table' Any idea why its throwing error ? 回答1: You are using the older CLI client. This is pre-CQL and uses the Thrit API. If you want to use that client then check out the older docs. The general view is that CQL is the way to

CQLSH is not recognized in google cloud datastax cluster nodes

元气小坏坏 提交于 2020-01-05 04:21:37
问题 I have deployed a 4 node datastax cluster in GCP. I can ssh into each of the VM nodes but cqlsh is not recognized.Can you please help me to understand where I am going wrong error: Connection error: ('Unable to connect to any servers', {'127.0.0.1': error(111, "Tried connecting to [('127.0.0.1', 9042)]. Last error: Connection refused")}) 回答1: If your cluster is working correctly, then the nodes must know about each other by their own IPs (internal or external). So Cassandra isn't configured

How to persist enums as ordinals with Spring Boot and Cassandra?

有些话、适合烂在心里 提交于 2020-01-05 04:15:08
问题 To the enum field of my entity I have added @CassandraType(type = DataType.Name.INT) . However not the ordinal of the enum, but the string representation instead, is used in the statement sent to Cassandra. Thus I get the following error: org.springframework.data.cassandra.CassandraInvalidQueryException: SessionCallback; CQL [INSERT INTO thing (thing_id,some_enum) VALUES (1,'Foo');]; Expected 4 or 0 byte int (3); nested exception is com.datastax.driver.core.exceptions.InvalidQueryException:

Is there a way to effectively count rows of a very huge partition in Cassandra?

删除回忆录丶 提交于 2020-01-05 04:07:12
问题 I have very huge Cassandra table containing over 1 billion records. My primary key forms like this: " (partition_id, cluster_id1, cluster_id2) ". Now for several particular partition_id, I have too many records that I can't run row count on these partition keys without timeout exception raised. What I ran in cqlsh is: SELECT count(*) FROM relation WHERE partition_id='some_huge_partition'; I got this exception: ReadTimeout: Error from server: code=1200 [Coordinator node timed out waiting for

Stop Cassandra Materialized View Build

情到浓时终转凉″ 提交于 2020-01-05 04:07:07
问题 Is there any way to stop the build of a materialized view in Cassandra (3.7)? Background: I created two materialized views A and B (full disclosure - I may have attempted to drop them before the build was complete) and those views seem to be perpetually stuck...any attempt to create another view C on the same table seems to hang. Using nodetool nodetool.viewbuildstatus <keyspace>.<view> shows a combination of STARTED and UNKNOWN for A and B , and STARTED for views in C . Using cql: select *

Cassandra node is taking hours to join

别等时光非礼了梦想. 提交于 2020-01-05 03:09:08
问题 My cluster of size 2 had entered into somewhat inconsistent state. On one node (call it node A) nodetool status was correctly showing 2 nodes. While on another node (call it B) it was showing only one i.e. itself. After several attempts I could not fixed the issue. So I decommissioned node B. But nodetool status on node A was still showing the node B that to in UN state. I had to restart cassandra on node A so that it forget node B. But this has lead to another problem. I am making new node

cqlsh under cygwin fails without an error message

杀马特。学长 韩版系。学妹 提交于 2020-01-04 14:06:50
问题 I'm trying to run cassandra's cqlsh under cygwin, and it exits without displaying an error: /c/apps/apache-cassandra-2.0.9 >./bin/cqlsh > It looks like a python script: #!/bin/sh # -*- mode: Python -*- ... # bash code here; finds a suitable python interpreter and execs this file. # prefer unqualified "python" if suitable: python -c 'import sys; sys.exit(not (0x020500b0 < sys.hexversion < 0x03000000))' 2>/dev/null \ && exec python "$0" "$@" for pyver in 2.6 2.7 2.5; do which python$pyver >