datastax

How to return a Vertex in the tinkerpop/gremlin format instead of the DSE graph format?

风格不统一 提交于 2019-12-02 07:33:32
I am trying to return a Vertex (in tinkerpop format) that it was just created with Gremlin: DseCluster dseCluster = DseCluster.builder() .addContactPoint(DbC.dseHost) .build(); DseSession dseSession = dseCluster.connect(); GraphTraversal traversal = graph.addV(VertexLabels.User) .property("username", "testuser") GraphStatement graphStatement = DseGraph.statementFromTraversal( traversal ); GraphResultSet grs = dseSession.executeGraph(graphStatement.setGraphName(DbC.graphName)); Vertex v = grs.one().as(Vertex.class); and I am getting this exception... java.lang.ClassCastException: com.datastax

Opscenter 6.0 Start up issue

北城余情 提交于 2019-12-02 05:29:49
问题 Yesterday, I tried to install opscenter and initiated import of existing DSE 5.0 cluster. It failed with certain errors which pointed out that installed version was not opscenter 6.0. root cause - opscenter installation was done from datastax community repo and not enterprise one. I corrected repo information to pointed to enterprose repo, removed existing opscenter 5.2.4, installed new opscenter 6.0 - All looks good. finally when i started the service - startup failed, opscenter fails to

What are native transport requests in Cassandra?

青春壹個敷衍的年華 提交于 2019-12-02 05:15:08
问题 When looking at node details in Datastax OpsCenter: We can see that there were 34903422 "native-transport-requests", but 1072 were blocked. Could someone explain what is native transport request? What is that in relation to mutation? Is it normal that they are being blocked and what does it mean? BTW. We can also see that there were 93 mutations dropped and we know what that means: What is mutation in cassandra?. 回答1: The native transport is the CQL Native Protocol (as opposed to the Thrift

Having performance issues with Datastax cassandra

若如初见. 提交于 2019-12-02 03:31:35
I have installed datastax Cassandra in 2 independent machines(one with 16gb RAM and other with 32GB RAM) and going with most of the default configuration. I have created a table with some 700 columns, when I try to insert records using java its able to insert 1000 records per 30 seconds, which seems be very less for me as per datastax benchmark it should be around 18000+. For my surprise performance is same in both 32GB & 16GB RAM machines. I am new to Cassandra, can any one help me in this regard. I feel I doing something wrong with Cassandra.yaml configurations. I did a Benchmarking and

Writing Spark Structure Streaming data into Cassandra

烈酒焚心 提交于 2019-12-02 03:10:36
I want to write Structure Streaming Data into Cassandra using Pyspark API. My data flow is like below: Nifi -> Kafka -> Spark Structure Streaming -> Cassandra I have tried below way: query = df.writeStream\ .format("org.apache.spark.sql.cassandra")\ .option("keyspace", "demo")\ .option("table", "test")\ .start() But getting below error message: "org.apache.spark.sql.cassandra" does not support streaming write. Also another approach I have tried: [ Source - DSE 6.0 Administrator Guide] query = df.writeStream\ .cassandraFormat("test", "demo")\ .start() But got exception: AttributeError:

Cassandra Datastax Driver set paging state on Accessor

陌路散爱 提交于 2019-12-02 02:19:52
I'm using Datastax's lovely java driver for cassandra. I was trying to encapsulate all of my query strings into the built in accessors for mapping, but I require the ability to set the paging state for a query. I see that this is possible with a normal Statement (SimpleStatement), but I haven't found the corresponding functionality for an Accessor. Does it exist, or do I have skip using Accessors for this functionality? I agree that this would be really nice to have. One way to work with this for now would be to have your accessor return a Statement, i.e.: @Query("SELECT * FROM ks.tbl WHERE id

Cassandra Datastax Driver set paging state on Accessor

巧了我就是萌 提交于 2019-12-02 00:19:44
问题 I'm using Datastax's lovely java driver for cassandra. I was trying to encapsulate all of my query strings into the built in accessors for mapping, but I require the ability to set the paging state for a query. I see that this is possible with a normal Statement (SimpleStatement), but I haven't found the corresponding functionality for an Accessor. Does it exist, or do I have skip using Accessors for this functionality? 回答1: I agree that this would be really nice to have. One way to work with

Prepared statement caching issue in Cassandra Csharp driver

北战南征 提交于 2019-12-01 21:50:25
I believe I have found a bug with the logic of how a prepared statement is cached in the StatementFactory in the Cassandra csharp driver (version 2.7.3). Here is the use case. Guid key = Guid.NewGuid(); // your key ISession session_foo = new Session("foo"); //This is pseudo code ISession session_bar = new Session("bar"); var foo_mapper = new Mapper(session_foo); //table foo_bar var bar_mapper = new Mapper(session_bar); //table foo_bar await Task.WhenAll( foo_mapper.DeleteAsync<Foo>("WHERE id = ?", key), bar_mapper.DeleteAsync<Bar>("WHERE id = ?", key)); We have found that after running this

Copy data from one table to other in Cassandra using Java

為{幸葍}努か 提交于 2019-12-01 15:01:35
I am trying to move all my data from one column-family (table) to the other. Since both the tables have different descriptions, I would have to pull all data from table-1 and create a new object for table-2 and then do a bulk aync insert. My table-1 has millions of records so I cannot get all the data directly in my data structure and work that out. I am looking out for solutions to do that easily using Spring Data Cassandra with Java. I initially planned for moving all the data to a temp table first followed by creating some composite key relations and then querying back my master table.

Spark and Cassandra Java application: Exception in thread “main” java.lang.NoClassDefFoundError: org/apache/spark/sql/Dataset

前提是你 提交于 2019-12-01 14:23:55
I got an amazingly siplme java application which I almost copied from this one example: http://markmail.org/download.xqy?id=zua6upabiylzeetp&number=2 All I wanted to do is to read the table data and display in the Eclipse console. My pom.xml: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>chat_connaction_test</groupId> <artifactId>ChatSparkConnectionTest</artifactId> <version>0.0.1-SNAPSHOT<