cassandra-2.0

What are best practices for backing up a cassandra cluster?

久未见 提交于 2020-01-03 08:52:55
问题 I have a cassandra cluster with ~20 nodes in multiple datacenters. I want to back up the cassandra database. I want it to be possible to restore the backup to a new cluster even if every node in the existing one is simultaneously hit by a meteor. What exactly do I need to copy off of the server(s) and preserve in order to make a from-scratch restore of a cassandra database possible, and where are these items stored? I gather that this is not as simple as "take a snapshot and rsync it

R and cassandra connection error

£可爱£侵袭症+ 提交于 2020-01-01 19:43:14
问题 library(RJDBC) cassdrv <- JDBC("org.apache.cassandra.cql.jdbc.CassandraDriver", list.files("/home/beyhan/Downloads/jars/",pattern="jar$",full.names=T)) casscon <- dbConnect(cassdrv, "jdbc:cassandra://localhost:9042") Output > cassdrv <- JDBC("org.apache.cassandra.cql.jdbc.CassandraDriver", + list.files("/home/beyhan/Downloads/jars/",pattern="jar$",full.names=T)) > casscon <- dbConnect(cassdrv, "jdbc:cassandra://localhost:9042") Error in .jcall(drv@jdrv, "Ljava/sql/Connection;", "connect", as

Delete from cassandra Table in Spark

て烟熏妆下的殇ゞ 提交于 2020-01-01 12:00:10
问题 I'm using Spark with cassandra. And i'm reading some rows from my table in order to delete theme using the PrimaryKey. This is my code : val lines = sc.cassandraTable[(String, String, String, String)](CASSANDRA_SCHEMA, table). select("a","b","c","d"). where("d=?", d).cache() lines.foreach(r => { val session: Session = connector.openSession val delete = s"DELETE FROM "+CASSANDRA_SCHEMA+"."+table+" where channel='"+r._1 +"' and ctid='"+r._2+"'and cvid='"+r._3+"';" session.execute(delete)

Move production env cassandra cluster to AWS cassandra without downtime

断了今生、忘了曾经 提交于 2019-12-31 04:51:07
问题 I have cassandra cluster of 4 nodes running in production environment in on-premise DC. I have to move it to AWS cassandra. I don't want move cassandra to dynamoDB due to some reason. Cassandra version used is pretty old i.e. 1.2.9. How do I move cassandra from on-premise DC to AWS cassandra without data loss and zero downtime. Regards, Vivek 回答1: Create a new DC in AWS. Configure inter DC sync between the both DCs. Decommision the old DC. https://docs.datastax.com/en/cassandra/3.0/cassandra

Does Cassandra write to a node(which is up) even if Consistency cannot be met?

雨燕双飞 提交于 2019-12-30 10:45:21
问题 The below statement from Cassandra documentation is the reason for my doubt. For example, if using a write consistency level of QUORUM with a replication factor of 3, Cassandra will replicate the write to all nodes in the cluster and wait for acknowledgement from two nodes. If the write fails on one of the nodes but succeeds on the other, Cassandra reports a failure to replicate the write on that node. However, the replicated write that succeeds on the other node is not automatically rolled

How can we set nodetool and cqlsh to be run from anywhere and by any user on linux server

无人久伴 提交于 2019-12-25 07:58:26
问题 I am trying to setup environment variables so that any user on a particular server can run commands like nodetool or cqlsh from any where in linux file system . The effort to traverse to bin directory everytime should be saved . How can we achieve this ? My DSE 4.8 is a tarball install . 回答1: Nodetool is usually available to any user that has execution privileges in your linux boxes For cqlsh, you can set any configuration inside the cqlshrc file (usually found in $HOME/.cassandra/cqlshrc; we

Spark Cassandra Connector Error

家住魔仙堡 提交于 2019-12-25 04:04:15
问题 Trying to connect Cassandra from spark-Shell and spark-Submit, but both throwing same error. SPARK version : 1.2.0 Apache Cassandra version 2.1.1 connect with Spark 1.2.0 using Datastax Cassandra Driver and connector ( versions are listed in POM file). Other than cassandra, scala or java programs works fine. Please some one help to resolve this error. Error: `**java.lang.AbstractMethodError at org.apache.spark.Logging$class.log(Logging.scala:52) at com.datastax.spark.connector.cql

Huge number of sstables after adding server to existing cluster

痞子三分冷 提交于 2019-12-24 17:29:41
问题 we are running test cassandra cluster of 8 nodes running in single DC using Simple snitch and DateTieredCompactionStrategy Cassandra Version 2.1.3 after adding new node(9th) to the cluster we see that number of sstables on newly joined server roughly equals to sum of all sstables on all servers in the cluster. and that number is huge as tens of thousands of sstables on newly added server. Q1:is that what we should expect to happen? Furthermore newly added server seems isn't overloaded,

Insert image into cassandra blob using C#

怎甘沉沦 提交于 2019-12-24 17:27:08
问题 I am trying to insert an image into Cassandra table of column datatype blob While inserting i get the error: no variable alternative at input ISession CluSession = cluster.Connect("dbs"); MemoryStream ms = new MemoryStream(); OpenFileDialog f = new OpenFileDialog(); f.InitialDirectory = @"H:\MobilePics_sufian\"; f.Filter = "All Files |*.*|JPEGs|*.jpg|Bitmaps|*.bmp|GIFs|*.gif"; f.Multiselect = true; DialogResult dr = f.ShowDialog(); int i = 0; if (dr == System.Windows.Forms.DialogResult.OK) {

Exception encountered during startup: Unable to gossip with any seeds

血红的双手。 提交于 2019-12-24 16:29:57
问题 i am pretty new to cassandra and i am trying to setup a 2 node cluster in my home VM...i got 2 machines up and running NAME - IP Address machine#1 - cassa - 192.168.1.200 machine#2 - cassa2 - 192.168.1.201 i have gotten cassandra up and running on machine#1 but now when i try to bring up cassandra on machine#2 i get below msg http://pastebin.com/qsRraVb5 here are the things changed on machine#1 cluster_name: 'demo' data_file_directories: - /home/cass/cassandra/data commitlog_directory: /home