cassandra

Cassandra cleanup on several servers at once

倖福魔咒の 提交于 2020-01-13 10:37:08
问题 We have a big Cassandra cluster 18 Servers (on one server near 5T data ) http://docs.datastax.com/en/cassandra/2.0/cassandra/operations/ops_add_node_to_cluster_t.html - We have added a new nodes following this documentation . After we have added new servers, we began the process of cleaning data (nodetool cleanup) In the documentation advise: After all new nodes are running, run nodetool cleanup on each of the previously existing nodes to remove the keys no longer belonging to those nodes.

Is there a way to retroactively create time/node based UUID in PHP?

回眸只為那壹抹淺笑 提交于 2020-01-13 10:16:19
问题 Most time-based (type 1) UUIDs are created using the current time. I'm migrating a MySQL database to cassandra and would like to create timebased UUIDs for archived items. Can someone provide an example of how type-1 UUIDs are created using past time periods? 回答1: All uuids version 1 are a combination of node identifier (MAC address), timestamp and a random seed. Yes its possible. The process is reversible. From RFC4122 about the timestamp part of UUID version 1 (section 4.1.4): "For UUID

利用Docker构建Cassandra集群

爷,独闯天下 提交于 2020-01-13 10:07:34
VM内存:8G 利用docker构建三节点两数据中心的Cassandra集群 1、拉取镜像 docker pull cassandra 2、创建第一个节点 docker run --name cas1 -p 9042:9042 -e CASSANDRA_CLUSTER_NAME=MyCluster -e CASSANDRA_ENDPOINT_SNITCH=GossipingPropertyFileSnitch -e CASSANDRA_DC=datacenter1 -d cassandra 3、创建第二、三个节点 docker run --name cas2 -e CASSANDRA_SEEDS="$(docker inspect --format='{{ .NetworkSettings.IPAddress }}' cas1)" -e CASSANDRA_CLUSTER_NAME=MyCluster -e CASSANDRA_ENDPOINT_SNITCH=GossipingPropertyFileSnitch -e CASSANDRA_DC=datacenter1 -d cassandra docker run --name cas3 -e CASSANDRA_SEEDS="$(docker inspect --format='{{ .NetworkSettings

Update an existing column value

十年热恋 提交于 2020-01-13 09:29:10
问题 What happens when a new value for an existing column is added? Will the older value be overwritten by the new value? Or the older value will also retain and can be retrieved (similar to simpleDB)? 回答1: The older value is overwritten (technically, hidden by the new and eventually garbage collected). 来源: https://stackoverflow.com/questions/1847426/update-an-existing-column-value

Cassandra load balancing with an ordered partitioner?

非 Y 不嫁゛ 提交于 2020-01-13 09:25:13
问题 So I see here that Cassandra does not have automatic load balancing, which comes into view when using the ordered partitioner (a certain common range of values of a group of rows would be stored on a relatively few machines which would then serve most of the queries). What's The Best Practice In Designing A Cassandra Data Model? I'm still new to Cassandra and how it works. how would one go about avoiding this issue, so that range queries are still possible? I didn't really get the above

How does Cassandra scale horizontally ?

别说谁变了你拦得住时间么 提交于 2020-01-13 08:51:07
问题 I've watched a video on Cassandra database, which turns to be very effective and really explains a lot about Cassandra. I've also ready some article and books about Cassandra but the thing I could not understand is how does Cassandra scale horizontally. By horizontally scale I mean add more nodes to gain more space. As I understand each node has the identical data i.e if one node has 1TB of data and is replicated to other nodes this means all n nodes will each contain 1TB of data. Am I

Cassandra asks for ALLOW FILTERING even though column is clustering key

◇◆丶佛笑我妖孽 提交于 2020-01-13 07:55:15
问题 Very new to Cassandra so apologies if the question is simple. I created a table: create table ApiLog ( LogId uuid, DateCreated timestamp, ClientIpAddress varchar, primary key (LogId, DateCreated)); This work fine: select * from apilog If I try to add a where clause with the DateCreated like this: select * from apilog where datecreated <= '2016-07-14' I get this: Cannot execute this query as it might involve data filtering and thus may have unpredictable performance. If you want to execute

Spring-Data-Cassandra causes XSD validation error using XML configuration

匆匆过客 提交于 2020-01-13 06:31:06
问题 Heyy hello, I have some kind of error that won't affect on my project's compilation,deployment and running But it shows red mark at my configuration file for Spring-data-Cassandra also shows problem in problems menu. Can any one please tell what's the issue? I have seen same question related to spring-data-JPA and Spring-data-* but they are not helping so I am posting this one. here is error message:- The errors below were detected when validating the file "spring-tool.xsd" via the file

How to increment a counter in Cassandra?

淺唱寂寞╮ 提交于 2020-01-12 07:38:13
问题 I'd like to use Cassandra to store a counter. For example how many times a given page has been viewed. The counter will never decrement. The value of the counter does not need to be exact but it should be accurate over time. My first thought was to store the value as a column and just read the current count, increment it by one and then put it back in. However if another operation is also trying to increment the counter, I think the final value would just be the one with the latest timestamp.

How to use cql queries to get different datatypes out of cassandra with java client hector

时光毁灭记忆、已成空白 提交于 2020-01-12 07:11:27
问题 I'm new to cassandra and hector so i'm trying to execute cql queries but the problem is that not all columns are of type string so how dow I execute the query "select * from users"? My column family looks like this: UPDATE COLUMN FAMILY users WITH comparator = UTF8Type AND key_validation_class=UTF8Type AND column_metadata = [ {column_name: full_name, validation_class: UTF8Type} {column_name: email, validation_class: UTF8Type} {column_name: state, validation_class: UTF8Type, index_type: KEYS}