cassandra-2.1

cassandra 2.1.8, adding new nodes(s), out of memory

匆匆过客 提交于 2019-12-24 05:17:16
问题 I have cassandra 2.1.8 cluster with 16 nodes (Centos 6.6, 1x4core xeon, 32Gb RAM, 3x3Tb HDD, java 1.8.0_65) and trying to add 16 more, one by one, but stuck with the first one. After starting cassandra process on the new node, 16 streams from previously existing nodes to newly added node are starting: nodetool netstats |grep Already Receiving 131 files, 241797656689 bytes total. Already received 100 files, 30419228367 bytes total Receiving 150 files, 227954962242 bytes total. Already received

Cassandra CQL where clause with multiple collection values?

China☆狼群 提交于 2019-12-24 04:13:09
问题 My data model:- tid | codes | raw | type -------------------------------------+--------------+--------------+------ a64fdd60-1bc4-11e5-9b30-3dca08b6a366 | {12, 34, 53} | {sdafb=safd} | cmd CREATE TABLE MyTable ( tid TIMEUUID, type TEXT, codes SET<INT>, raw TEXT, PRIMARY KEY (tid) ); CREATE INDEX ON myTable (codes); How to query the table to return rows based on multiple set values. This works:- select * from logData where codes contains 34; But i want to get row based on multiple set values

Cassandra GC takes 30 seconds and hangs node

[亡魂溺海] 提交于 2019-12-24 02:23:38
问题 Environment I have a following environment: Cassandra 2.1.0 5 nodes in one DC, 4 nodes in second DC 2500 writes per seconds minimal reads (usually none, sometimes few) Problem After a long running node, GC starts to take longer and longer, until the nodetool reports this node as down. I visualize gc.log and have a following screenshot: JVM settings After comment the full command line of working Cassandra is: java -ea -javaagent:/usr/lib/cassandra/bin/../lib/jamm-0.2.6.jar -XX:

Is Cassandra for OLAP or OLTP or both?

☆樱花仙子☆ 提交于 2019-12-23 17:55:44
问题 Cassandra does not comply with ACID like RDBMS but CAP. So Cassandra picks AP out of CAP and leaves it to the user for tuning consistency. I definitely cannot use Cassandra for core banking transaction because C* is slightly inconsistent. But Cassandra writes are extremely fast which is good for OLTP. I can use C* for OLAP because reads are extremely fast which is good for reporting too. So i understood that C* is good only when your application do not need your data to be consistent for some

Does Spring-data-Cassandra 1.3.2.RELEASE support UDT annotations?

醉酒当歌 提交于 2019-12-23 02:17:15
问题 Is @UDT (http://docs.datastax.com/en/developer/java-driver/2.1/java-driver/reference/mappingUdts.html) supported by Spring-data-Cassandra 1.3.2.RELEASE? If not, how can I add workaround for this Thanks 回答1: See the details here: https://jira.spring.io/browse/DATACASS-172 I faced with the same issue and it sounds like it does not( debug process shows me that spring data cassandra check for @Table, @Persistent or @PrimaryKeyClass Annotation only and raise exception in other case > Invocation of

How can I create User Defined Functions in Cassandra with Custom Java Class?

你。 提交于 2019-12-22 06:45:22
问题 I couldn't find this anywhere online. How can I create a custom user defined function in cassandra?. For Ex : CREATE OR REPLACE FUNCTION customfunc(custommap map<text, int>) CALLED ON NULL INPUT RETURNS map<int,bigint> LANGUAGE java AS 'return MyClass.mymethod(custommap);'; Where "MyClass" is a class that I can register in the Classpath? 回答1: Just adding my 2 cents to this thread as I tried building an external class method to support something similar. After trying for hours with Datastax

How to get Last 6 Month data comparing with timestamp column using cassandra query?

☆樱花仙子☆ 提交于 2019-12-18 09:48:34
问题 How to get Last 6 Month data comparing with timestamp column using cassandra query? I need to get all account statement which belongs to last 3/6 months comparing with updatedTime(TimeStamp column) and CurrentTime . For example in SQL we are using DateAdd() function tor this to get. i dont know how to proceed this in cassandra. If anyone know,reply.Thanks in Advance. 回答1: Cassandra 2.2 and later allows users to define functions (UDT) that can be applied to data stored in a table as part of a

Cassandra node can't complete joining operation

橙三吉。 提交于 2019-12-13 13:51:35
问题 Trying to add a new node to an existing C* 2.1.11 cluster, the node appears to have completed the streaming phase of the bootstrap, but I can't find an explanation of why it has not moved from the JOINING state; the cassandra logs for all the nodes don't show errors during all the streaming process. nodetool status reports the node as UJ in all the nodes, and the amount of load is greater that the rest of nodes: # nodetool status Datacenter: us-east-vpc Status=Up/Down |/ State=Normal/Leaving

CQL with a wide row - how to get most recent set?

安稳与你 提交于 2019-12-12 10:54:19
问题 How would I write the CQL to get the most recent set of data from each row? I'm investigating transitioning from MSSQL to Cassandra and am starting to grasp the concepts. Lots of research has help tremendously, but I haven't found answer to this (I know there must be a way): CREATE TABLE WideData { ID text, Updated timestamp, Title text, ReportData text, PRIMARY KEY (ID, Updated) } WITH CLUSTERING ORDER (Updated DESC) INSERT INTO WideData (ID, Updated, Title, ReportData) VALUES ('aaa', NOW,

InvalidQueryException when trying to create column family in Cassandra via unit

你。 提交于 2019-12-12 06:08:27
问题 I have a 3 node cassandra cluster and via my unit test in Java, I first create a keyspace and then create a column family within that keyspace. Sometimes the unit tests passes but randomly I keep getting the following error. I am using the latest datastax 2.1.4 java driver and the cassandra version in 2.1.0. com.symc.edp.database.nosql.NoSQLPersistenceException: com.datastax.driver.core.exceptions.InvalidQueryException: Cannot add column family 'testmaxcolumnstable' to non existing keyspace