datastax

Datastax Cassandra Driver throwing CodecNotFoundException

江枫思渺然 提交于 2019-12-01 01:03:18
问题 The exact Exception is as follows com.datastax.driver.core.exceptions.CodecNotFoundException: Codec not found for requested operation: [varchar <-> java.math.BigDecimal] These are the versions of Software I am using Spark 1.5 Datastax-cassandra 3.2.1 CDH 5.5.1 The code I am trying to execute is a Spark program using the java api and it basically reads data (csv's) from hdfs and loads it into cassandra tables . I am using the spark-cassandra-connector. I had a lot of issues regarding the

IAM Policy for OpsCenter backup to S3 user

余生长醉 提交于 2019-12-01 00:35:41
Using OpsCenter 5.1.0 and trying to add S3 as a location for snapshot backups. What are the necessary permissions in AWS IAM for the opscenter user? So far, I have the following policy: "Statement": [ { "Effect": "Allow", "Action": [ "s3:ListAllMyBuckets", "s3:GetBucketLocation" ], "Resource": "arn:aws:s3:::*" }, { "Effect": "Allow", "Action": [ "s3:ListBucket", "s3:GetBucketLocation" ], "Resource": [ "arn:aws:s3:::cassandra-bkup" ] }, { "Effect": "Allow", "Action": [ "s3:DeleteObject", "s3:GetObject", "s3:PutObject" ], "Resource": [ "arn:aws:s3:::cassandra-bkup/*" ] } ] but backups are still

Starting cassandra as a service does not work for 2.0.5, sudo cassandra -f works

情到浓时终转凉″ 提交于 2019-11-30 23:06:08
When I try to start cassandra on ubuntu 12.04 (installed via Datastax's dsc20 package) as a service as follows : $ sudo service cassandra start it says *could not access pidfile for Cassandra & no other messages or anything in logs. But when I try to run as a root user( sudo cassandra -f ) it just works properly & cassandra is started. While trying to debug I found that when trying to run as a non-root user I was getting these messages: ERROR 17:48:08,432 Exception encountered during startup java.lang.AssertionError: Directory /var/lib/cassandra/data is not accessible. .. java.io

Datastax Mismatch for Key Issue

陌路散爱 提交于 2019-11-30 20:52:08
问题 Our current setup contain DSE 5.0.2 version with 3 node cluster.Currently we are facing issue with heavy load and node failure issue.Debug.log details is given below: DEBUG [ReadRepairStage:8] 2016-09-27 14:11:58,781 ReadCallback.java:234 - Digest mismatch: org.apache.cassandra.service.DigestMismatchException: Mismatch for key DecoratedKey(5503649670304043860, 343233) (45cf191fb10d902dc052aa76f7f0b54d vs ffa7b4097e7fa05de794371092c51c68) at org.apache.cassandra.service.DigestResolver.resolve

Cassandra Datastax Enterprise using Amazon Elastic IP

浪尽此生 提交于 2019-11-30 15:34:13
问题 I would like to run Cassandra Datastax Enterprise on Amazon EC2 instances using not the node private IP address but Elastic Public IPs My current configuration looks as follows: /etc/dse/cassandra/cassandra.yaml seed_provider: - class_name: org.apache.cassandra.locator.SimpleSeedProvider parameters: seeds: "publicIP" listen_address: "publicIP" endpoint_snitch:Ec2Snitch rpc_address: "publicIP" The "dse" service is not starting properly. /var/log/cassandra/system.log is showing the following

Cassandra Datastax Enterprise using Amazon Elastic IP

烈酒焚心 提交于 2019-11-30 13:57:56
I would like to run Cassandra Datastax Enterprise on Amazon EC2 instances using not the node private IP address but Elastic Public IPs My current configuration looks as follows: /etc/dse/cassandra/cassandra.yaml seed_provider: - class_name: org.apache.cassandra.locator.SimpleSeedProvider parameters: seeds: "publicIP" listen_address: "publicIP" endpoint_snitch:Ec2Snitch rpc_address: "publicIP" The "dse" service is not starting properly. /var/log/cassandra/system.log is showing the following error: org.apache.cassandra.exceptions.ConfigurationException: Unable to bind to address /<publicIP>:7000

Getting sometimes NullPointerException while saving into cassandra

老子叫甜甜 提交于 2019-11-30 09:58:33
问题 I have following method to write into cassandra some time it saving data fine. When I run it again , sometimes it is throwing NullPointerException Not sure what is going wrong here ... Can you please help me. ' @throws(classOf[IOException]) def writeDfToCassandra(o_model_family:DataFrame , keyspace:String, columnFamilyName: String) = { logger.info(s"writeDfToCassandra") o_model_family.write.format("org.apache.spark.sql.cassandra") .options(Map( "table" -> columnFamilyName, "keyspace" ->

Get current date in cassandra cql select

佐手、 提交于 2019-11-30 02:44:38
问题 In SQL, I am able to do: select getdate(), getdate() - 7 Which returns the current date as well as current date - 7 days. I want to achieve the same in Cassandra CQL. I tried: select dateof(now()) But that does not work. It works only on insert and not in select. How can I get the same? Any help would be appreciated. 回答1: select dateof(now()) On its own, you are correct, that does not work. But if you have a table that you know only has one row (like system.local ): aploetz@cqlsh

How to obtain number of rows in Cassandra table

倖福魔咒の 提交于 2019-11-30 02:43:21
This is a super basic question but it's actually been bugging me for days. Is there a good way to obtain the equivalent of a COUNT(*) of a given table in Cassandra? I will be moving several hundreds of millions of rows into C* for some load testing and I'd like to at least get a row count on some sample ETL jobs before I move massive amounts of data over the network. The best idea I have is to basically loop over each row with Python and auto increment a counter. Is there a better way to determine (or even estimate) the row size of a C* table? I've also poked around Datastax Ops Center to see

How can I restore Cassandra snapshots?

柔情痞子 提交于 2019-11-30 01:49:56
I'm building a backup and restore process for a Cassandra database so that it's ready when I need it, and so that I understand the details in order to build something that will work for production. I'm following Datastax's instructions here: http://www.datastax.com/documentation/cassandra/2.0/cassandra/operations/ops_backup_restore_c.html . As a start, I'm seeding the database on a dev box then attempting to make the backup/restore work. Here's the backup script: #!/bin/bash cd /opt/apache-cassandra-2.0.9 ./bin/nodetool clearsnapshot -t after_seeding makeyourcase ./bin/nodetool snapshot -t