datastax

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

核能气质少年 提交于 2019-12-17 07:38:37
问题 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

Unable to print node properties in DSE graph

我只是一个虾纸丫 提交于 2019-12-14 03:29:08
问题 Apologies as this might be very basic question on the topic but I am new to Gremlin/DSE Graph and i tried many ways to extract data i am inserting to my graph but somehow i am unable to make it work. Here is what i have: 1. Graph with allow_scans set to true 2. Schema with propertyKey and vertexes defined and materialized index on NodeID of all Vertexes. There are no relationships right now, just vertexes with data points. I wrote a program to insert all my nodes to DSE Graph which is working

Cassandra SOLR Rolling Upgrade

家住魔仙堡 提交于 2019-12-14 03:13:54
问题 We have a cluster of 12 nodes, 6 DSE-SOLR and 6 DSE-Cassandra. When upgrading from 3.0 to 3.1 we noticed that requests through the SOLR interface were broken until all nodes had been upgraded. Is this limitation still present when upgrading from 3.1 to 3.2? Are there any gotchas to note when making the upgrade? In the upgrade path docs it says to enable the old gossip protocol until all nodes have been upgraded, is this per DC or for the entire cluster? 回答1: Russ, What errors are you getting

Cassandra single node installation

对着背影说爱祢 提交于 2019-12-13 18:04:35
问题 I just try to install cassandra on my ubuntu:12.04 . Steps i have followed Installed java version 1.7.XX and verified with java -version apt-get install libjna-java //Installs jna python 2.7 is installed already Extracted to /usr/local/installables/ Successfully extracted. Then I set cassandra home export CASSANDRA_HOME=/usr/local/installables/dse-2.2.2/resources/cassandra export PATH=$PATH:$CASSANDRA_HOME/bin pscenter.tar.gz dse.tar.gz I created /var/cassandra/saved_caches, /var/cassandra

Remote Spark Job fails: No assemblies found

落爺英雄遲暮 提交于 2019-12-13 17:22:51
问题 I am running a Spark job in a Vanilla Spark (Datastax) with this conf: val conf: SparkConf = new SparkConf() .setAppName("Fuzzy") .setMaster("spark://127.0.0.1:7077") .set("spark.cores.max", "2") .setJars(Seq("my-jar")) val sc: SparkContext = SparkContext.getOrCreate(conf) val NUM_SAMPLES: Int = 500 val join = sc.parallelize(1 to NUM_SAMPLES).filter { _ => val x = math.random val y = math.random x*x + y*y < 1 }.count() println(s"Pi is roughly ${4.0 * join / NUM_SAMPLES}") This is an Spark

How can we convert com.datastax.driver.core.LocalDate to java.util.Date?

China☆狼群 提交于 2019-12-13 14:18:03
问题 I am working with dates. Datastax's CQL cassandra API Row.getDate() returns a com.datastax.driver.core.LocalDate . I want to convert the com.datastax.driver.core.LocalDate object returned by the API to java.util.Date . How can I do that? 回答1: The LocalDate.getMillisSinceEpoch() Javadoc says Returns the number of milliseconds since January 1st, 1970 GMT. And, the Date(long) constructor Javadoc says Allocates a Date object and initializes it to represent the specified number of milliseconds

Using Datastax Java Driver to query a row as a JSON

南笙酒味 提交于 2019-12-13 13:25:45
问题 I am trying to use the datastax java driver and retrieve the row as a JSON. I do the classic SELECT JSON * from myTable WHERE id=1 and this returns a Json formatted string on CQL. e.g { "uuid" : "12324567-...." } This works. Now when, I try to do the same use the Java driver, I use (in scala) val resultSet = session.execute(queryString) I pick up one row from this result set using: "resultSet.one()" . This has the string I need, but how do I pick this up? Experiment: resultSet.one()

Listen to a cassandra database with datastax

自闭症网瘾萝莉.ら 提交于 2019-12-13 11:28:08
问题 How can I get a record from cassandra database every time that it is add using datastax for java? That is, how can I "listen" cassandra database? Thanks 回答1: There is no easy way to do it. Cassandra has Change Data Capture functionality, but it's quite low level (and could depend on version of Cassandra), and it's not easy to use it. You can write your own implementation (pointers in link above), or use something like this, but it's very old. And you'll need to handle deduplication yourself,

cluster.cpython-34m.so: undefined symbol: PyException_Check [duplicate]

。_饼干妹妹 提交于 2019-12-13 08:26:11
问题 This question already has answers here : Datastax Python cassandra driver build fails on Ubuntu (2 answers) Closed 3 years ago . I am running a simple python(3.4.3) flask app on amazon linux, which uses datastax cassandra-driver(3.6). My application is failing to import the module. Traceback (most recent call last): File "application.py", line 12, in <module> from cassandra.cluster import Cluster ImportError: /opt/python/run/venv/local/lib64/python3.4/site-packages/cassandra/cluster.cpython

Datastax 5.0.3 Solr node does not reindex just goes down

青春壹個敷衍的年華 提交于 2019-12-13 08:09:45
问题 I am trying to reindex one of my indexes deleting old data and full-index. When i try to do this. The node immediately goes down, i cannot run nodetool commands such as nodetool status, nodetool tpstats.Also, i cannot see CPU, disk, network. The node is idle. When i look at the processes on my machine, I can see that is cassandra process. my schema.xml like that <field indexed="true" name="key1" stored="true" type="StrField"/> <field indexed="true" name="key2" stored="true" type="StrField"/>