cassandra-2.0

Spark Submit fails with java.lang.NoSuchMethodError: scala.Predef$.$conforms()Lscala/Predef$$less$colon$less;

醉酒当歌 提交于 2019-11-27 23:47:45
问题 I am using spark 1.3.1 prebuild version spark-1.3.1-bin-hadoop2.6.tgz Exception in thread "main" java.lang.NoSuchMethodError: scala.Predef$.$conforms()Lscala/Predef$$less$colon$less; at org.apache.spark.util.Utils$.getSystemProperties(Utils.scala:1418) at org.apache.spark.SparkConf.(SparkConf.scala:58) at org.apache.spark.SparkConf.(SparkConf.scala:52) at com.zoho.zbi.Testing.test(Testing.java:43) at com.zoho.zbi.Testing.main(Testing.java:39) Using Spark's default log4j profile: org/apache

Cassandra Java driver: how many contact points is reasonable?

▼魔方 西西 提交于 2019-11-27 20:56:51
问题 In Java I connect to Cussandra cluster as this: Cluster cluster = Cluster.builder().addContactPoints("host-001","host-002").build(); Do I need to specify all hosts of the cluster in there? What If I have a cluster of 1000 nodes? Do I randomly choose few? How many, and do I really do that randomly? 回答1: I would say that configuring your client to use the same list of nodes as the list of seed nodes you configured Cassandra to use will give you the best results. As you know Cassandra nodes use

how do i know if nodetool repair is finished

两盒软妹~` 提交于 2019-11-27 20:33:46
问题 I have a 2 node apache cassandra (2.0.3) cluster with rep factor of 1. I change rep factor to 2 using the following command in cqlsh ALTER KEYSPACE "mykeyspace" WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 2 }; I then tried to run recommended "nodetool repair" after doing this type of alter. The problem is that this command sometimes finishes very quickly. When it does finishes like that it will normally say 'Lost notification...' and exit code is not zero. So I

how to avoid secondary indexes in cassandra?

亡梦爱人 提交于 2019-11-27 13:08:51
问题 I have heard repeatedly that secondary indexes (in cassandra) is only for convenience but not for better performance. The only case where it is recommended to use secondary indexes when you have low cardinality (such as gender column which has two values male or female) consider this example: CREATE TABLE users ( userID uuid, firstname text, lastname text, state text, zip int, PRIMARY KEY (userID) ); right now I cannot do this query unless I create a secondary index on users on firstname

How do secondary indexes work in Cassandra?

血红的双手。 提交于 2019-11-27 10:52:37
Suppose I have a column family: CREATE TABLE update_audit ( scopeid bigint, formid bigint, time timestamp, record_link_id bigint, ipaddress text, user_zuid bigint, value text, PRIMARY KEY ((scopeid, formid), time) ) WITH CLUSTERING ORDER BY (time DESC) With two secondary indexes, where record_link_id is a high-cardinality column: CREATE INDEX update_audit_id_idx ON update_audit (record_link_id); CREATE INDEX update_audit_user_zuid_idx ON update_audit (user_zuid); According to my knowledge Cassandra will create two hidden column families like so: CREATE TABLE update_audit_id_idx( record_link_id

insert speed in mysql vs cassandra

不问归期 提交于 2019-11-27 08:24:13
问题 I have a lot of (about 1 million in second)structural data that must be insert to database I see a lot of benchmark about sql vs noSql and type of Nosql then collect cassandra as database but I create a benchmark to test mysql vs cassandra in write/update/select speed mysql have better performance in my benchmark, I want to know what is my mistake?? php use as programming language YACassandraPDO and cataloniaframework use as php driver and PDO use as mysql driver my server is centOS 6.5 with

Use of Order by clause in cassandra

本秂侑毒 提交于 2019-11-27 07:49:02
问题 When creating table in cassandra, we can give clustering keys with ordering like below. Create table user(partitionkey int, id int, name varchar, age int, address text, insrt_ts timestamp, Primary key(partitionkey, name, insrt_ts, id) with clustering order by (name asc, insrt_ts desc, id asc); when we insert data into that table, As per cassandra documentation records are sorted based on clustering keys. When i retrieve records with CQL1 and CQL2, I am getting in the same sorted order. CQL1:

Apache Cassandra: Unable to gossip with any seeds

匆匆过客 提交于 2019-11-27 06:57:28
I have built Cassandra server 2.0.3, then run it. It is starting and then stopped with messages: X:\MyProjects\cassandra\apache-cassandra-2.0.3-src\bin>cassandra.bat >log.txt java.lang.RuntimeException: Unable to gossip with any seeds at org.apache.cassandra.gms.Gossiper.doShadowRound(Gossiper.java:1160) at org.apache.cassandra.service.StorageService.checkForEndpointCollision (StorageService.java:416) at org.apache.cassandra.service.StorageService.joinTokenRing(StorageServ ice.java:608) at org.apache.cassandra.service.StorageService.initServer(StorageService .java:576) at org.apache.cassandra

Cassandra - Is there a way to limit number of async queries?

隐身守侯 提交于 2019-11-27 05:12:41
I would like to know if there is way to limit the number of queries executed simultaneously by the cassandra java driver ? Currently, I execute a lot of queries as follows : ... PreparedStatement stmt = session.prepare("SELECT * FROM users WHERE id = ?"); BoundStatement boundStatement = new BoundStatement(stmt); List<ResultSetFuture> futures = Lists.newArrayListWithExpectedSize(list.length); for(String id : list ) { futures.add(session.executeAsync(boundStatement.bind(id))); } for (ListenableFuture<ResultSet> future : futures) { ResultSet rs = future.get(); ... // do some stuff } Unfortunately

Querying Cassandra by a partial partition key

纵然是瞬间 提交于 2019-11-27 01:58:09
问题 In Cassandra, I can create a composite partition key, separate from my clustering key: CREATE TABLE footable ( column1 text, column2 text, column3 text, column4 text, PRIMARY KEY ((column1, column2)) ) As I understand it, quering by partition key is an extremely efficient (the most efficient?) method for retrieving data. What I don't know, however, is whether it's also efficient to query by only part of a composite partition key. In MSSQL, this would be efficient, as long as components are