cassandra

Unable to perform range queries in Cassandra 1.2

筅森魡賤 提交于 2020-01-04 14:01:07
问题 I'm accessing Cassandra 1.2 via FluentCassandra and C#. I used the DataStax installation package. The issue I have is I cannot execute the range query I show below. I have tried the following table create methods: CREATE TABLE Test (KEY text, p1 int, p2 int, p3 int, p4 int, p5 int, p6 int, p7 int, p8 int, data text, PRIMARY KEY (KEY)) CREATE TABLE Test (KEY text, p1 int, p2 int, p3 int, p4 int, p5 int, p6 int, p7 int, p8 int, data text, PRIMARY KEY (KEY, p1, p2, p3, p4, p5, p6, p7, p8)) Here

Cassandra/Spark showing incorrect entries count for large table

风流意气都作罢 提交于 2020-01-04 09:23:31
问题 I am trying to use spark to process a large cassandra table (~402 million entries and 84 columns) but I am getting inconsistent results. Initially the requirement was to copy some columns from this table to another table. After copying the data, I noticed that some entries in the new table were missing. To verify that I took count of the large source table but I am getting different values each time. I tried the queries on a smaller table (~7 million records) and the results were fine.

How to access a Cassandra distributed database from Delphi

女生的网名这么多〃 提交于 2020-01-04 09:15:28
问题 I am looking at whether Cassandra might be an option for a distributed database store for our server software. The server software is written in Delphi, but I'm having difficulty locating descriptions of how to access a Cassandra database from Delphi. 回答1: One suggestion elsewhere on SO is to write your own Delphi generator for the Thrift framework. 回答2: I see two options, either write your own native Delphi driver or use available drivers somehow. One solution could be to use Python4Delphi

How to access a Cassandra distributed database from Delphi

跟風遠走 提交于 2020-01-04 09:15:08
问题 I am looking at whether Cassandra might be an option for a distributed database store for our server software. The server software is written in Delphi, but I'm having difficulty locating descriptions of how to access a Cassandra database from Delphi. 回答1: One suggestion elsewhere on SO is to write your own Delphi generator for the Thrift framework. 回答2: I see two options, either write your own native Delphi driver or use available drivers somehow. One solution could be to use Python4Delphi

Can't export Cassandra table using Python

此生再无相见时 提交于 2020-01-04 08:15:10
问题 I am trying to export Cassandra table to CSV format using Python. But I couldn't do it. However, I am able to execute 'select' statement from Python. I have used the following code: from cassandra.cluster import Cluster cluster = Cluster () session = cluster.connect('chandan') ### 'chandan' is the name of the keyspace ## name of the table is 'emp' session.execute(""" copy emp (id,name) to 'E:\HANA\emp.csv' with HEADER = true """ ) print "Exported to the CSV file" Please help me in this regard

How to cast varchar to MAP(VARCHAR,VARCHAR) in presto

与世无争的帅哥 提交于 2020-01-04 05:36:52
问题 I have table in presto, one column named ("mappings") have key-value pair as string select mappings from hello; Ex: {"foo": "baar", "foo1": "bar1" } I want to cast "mappings" column into a MAP like select CAST("mappings" as MAP) from hello; This will throw error in presto. How can we translate this to map? 回答1: There is no canonical string representation for a MAP in Presto, so so there's no way to cast it directly to MAP(VARCHAR, VARCHAR) . But, if your string contains a JSON map, you can

Cassandra query on secondary index is very slow

放肆的年华 提交于 2020-01-04 05:31:08
问题 We have a table with about 40k rows, querying on secondary index is slow(30 seconds on production). Our cassandra is 1.2.8. The table schema is as following: CREATE TABLE usertask ( tid uuid PRIMARY KEY, content text, ts int ) WITH bloom_filter_fp_chance=0.010000 AND caching='KEYS_ONLY' AND comment='' AND dclocal_read_repair_chance=0.000000 AND gc_grace_seconds=864000 AND read_repair_chance=0.100000 AND replicate_on_write='true' AND populate_io_cache_on_flush='false' AND compaction={'class':

How to configure Cassandra on Azure

末鹿安然 提交于 2020-01-04 04:38:07
问题 How do you configure Cassandra to run in Azure? According to the guide linked below you should make one Cloud Service per Cassandra node, and have one VM on each Cloud Service. These VMs should be on the same virtual network. http://blog.metricshub.com/2012/12/27/running-cassandra-on-azure-step-by-step-gotcha-by-gotcha/ It this still the recommended way? In this set up each VM is exposed with a public IP from the Cloud Service and they does also have an internal IP for use on the virtual

Why MongoDB is Consistent not available and Cassandra is Available not consistent?

谁都会走 提交于 2020-01-04 03:49:57
问题 Mongo From this resource I understand why mongo is not A(Highly Available) based on below statement MongoDB supports a “single master” model. This means you have a master node and a number of slave nodes. In case the master goes down, one of the slaves is elected as master. This process happens automatically but it takes time, usually 10-40 seconds. During this time of new leader election, your replica set is down and cannot take writes Is it for the same reason Mongo is said to be Consistent

Why MongoDB is Consistent not available and Cassandra is Available not consistent?

孤者浪人 提交于 2020-01-04 03:49:54
问题 Mongo From this resource I understand why mongo is not A(Highly Available) based on below statement MongoDB supports a “single master” model. This means you have a master node and a number of slave nodes. In case the master goes down, one of the slaves is elected as master. This process happens automatically but it takes time, usually 10-40 seconds. During this time of new leader election, your replica set is down and cannot take writes Is it for the same reason Mongo is said to be Consistent