Giter Club home page Giter Club logo

cassandra's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cassandra's Issues

Add SSL support

As a user, I'm trying to integrate the cassandra-sink against an SSL secured Cassandra cluster; however, I'm getting the following error and the app eventually crashes in PCF.

Error:

OUT Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'session' defined in org.springframework.cloud.stream.app.cassandra.lemCassandraConfiguration: Invocation of init method failed; nested exception is com.datasta
x.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: /<HOST>:9042 (com.datastax.driver.core.exceptions.TransportException: [/<HOST>:9042] Channel has been closed), /<HOST>:9042 (com.datastax.driver.core.exceptions.TransportException: [/<HOST>:9042] Channel has been closed), /<HOST>:9042 (com.datastax.driver.core.exceptions.TransportException: [/<HOST>:9042] Channel has been closed), /<HOST>:9042, /<HOST>:9042, /<HOST>:9042 [only showing errors of first 3 hosts, use getErrors() for more details])

Notes:
It appears that the traffic between the driver and Cassandra needs to be secured via SSL as well and we will have to provide the compatibility with the existing app.

Acceptance:

  • Expose a new property (maybe: "enableSSL=true/false") to enable SSL
  • Add trustStore and trustStorePassword as overriddable properties
  • Add unit tests

Stream pipeline silently fails to write

Hello, I am trying to follow the tutorial for deploying a stream pipeline to docker that has a simple HTTP source and sinks to Cassandra, but having trouble debugging.

Everything seems setup correctly, as far as I can tell:

I have my stream pipeline setup and deployed, and there are no error messages.

image

Currently the source is setup correctly and receives HTTP requests:

  • The kafka topics list:
=> docker exec dataflow-kafka kafka-topics --zookeeper zookeeper:2181 --list
__confluent.support.metrics
__consumer_offsets
cassandrastream.http
  • Sample HTTP request:
dataflow:>http post --contentType 'application/json' --data '{"isbn": "1599869772", "title": "The Art of War", "author": "Sun Tzu"}' --target http://localhost:20000
> POST (application/json) http://localhost:20000 {"isbn": "1599869772", "title": "The Art of War", "author": "Sun Tzu"}
> 202 ACCEPTED
  • Output in Kafka consumer:
=> docker exec dataflow-kafka kafka-console-consumer --bootstrap-server localhost:9092 --topic cassandrastream.http
{"isbn": "1599869772", "title": "The Art of War", "author": "Sun Tzu"}

However, nothing gets written to Cassandra

image

What I tried to debug:

  • I checked the cassandra sink app logs, but nothing out of the ordinary is shown in either STDOUT or STDERR besides possibly this warning:

    WARNING: An illegal reflective access operation has occurred
    WARNING: Illegal reflective access by org.codehaus.groovy.vmplugin.v7.Java7$1 (jar:file:/home/cnb/.m2/repository/org/springframework/cloud/stream/app/cassandra-sink-kafka/3.0.2/cassandra-sink-kafka-3.0.2.jar!/BOOT-INF/lib/groovy-2.5.7-indy.jar!/) to constructor java.lang.invoke.MethodHandles$Lookup(java.lang.Class,int)
    WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.vmplugin.v7.Java7$1
    WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
    WARNING: All illegal access operations will be denied in a future release

  • I checked the cassandra docker container logs, and nothing is shown there

  • I turned on query tracing in a cqlsh session, and no queries are recorded coming in to do the inserts.

Any guesses on what is going wrong? And any guesses on where I should look in the future to debug cassandra sink issues?

(note: I also asked more generally about how to debug SCDF sinks in this SO post, but here in this Github issue, I am asking more specifically how to debug this particular Cassandra app starter).

Cassandra sink insert query regexp validation

From @akosratku on May 14, 2016 14:27

Hi!

I would like to update counters in cassandra but the current query validation won't let me. My query looks like this:

UPDATE views SET view_count = view_count + 1 WHERE id = :id

Since it doesn't match the pattern my sink won't start up.

Is there a way to loosen the restrictions on the query? I am wondering if the pattern check is even necessary at all?!

Edit: Since cassandra already accepts queryType, the quey parsing could be based on that.

Edit2: I made a quick fix for it so I can progress, I could make it a PR and finalize it if you are interested. Compare

Regards,
Ákos

Copied from original issue: spring-cloud/spring-cloud-stream-app-starters#93

Cassandra sink's --initScript option is not working

From @sabbyanandan on May 6, 2016 17:8

From @sabbyanandan on December 16, 2015 0:1

As a user, I'm creating a stream [on local SPI] with --initScript option to create the table for the cassandra sink; however, I'm unable to get the table created successfully.

stream:

stream create cassandraTest --definition "http | cassandra --initScript=file:<absolut-path-to>/int-db.cql --ingestQuery='insert into book (isbn, title, author) values (uuid(), ?, ?)'" --deploy

data:

dataflow:>http post --contentType 'application/json' --data "{\"title\": \"Test\", \"author\": \"Sabby\"}" --target http://localhost:16784/messages
POST (application/json;charset=UTF-8) http://localhost:16784/messages {"title": "Test", "author": "Sabby"}
202 ACCEPTED

error:

org.springframework.messaging.MessageHandlingException: error occurred in message handler [cassandraSinkMessageHandler]; nested exception is com.datastax.driver.core.exceptions.InvalidQueryException: unconfigured columnfamily book
    at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:139) ~[spring-integration-core-4.2.3.RELEASE.jar!/:na]
    at org.springframework.integration.dispatcher.AbstractDispatcher.tryOptimizedDispatch(AbstractDispatcher.java:116) ~[spring-integration-core-4.2.3.RELEASE.jar!/:na]
    at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:147) ~[spring-integration-core-4.2.3.RELEASE.jar!/:na]
    at org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:120) ~[spring-integration-core-4.2.3.RELEASE.jar!/:na]
    at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:77) ~[spring-integration-core-4.2.3.RELEASE.jar!/:na]
    at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:442) [spring-integration-core-4.2.3.RELEASE.jar!/:na]
    at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:392) [spring-integration-core-4.2.3.RELEASE.jar!/:na]
    at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:115) [spring-messaging-4.2.4.BUILD-SNAPSHOT.jar!/:4.2.4.BUILD-SNAPSHOT]
    at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:45) [spring-messaging-4.2.4.BUILD-SNAPSHOT.jar!/:4.2.4.BUILD-SNAPSHOT]
    at org.springframework.messaging.core.AbstractMessageSendingTemplate.send(AbstractMessageSendingTemplate.java:105) [spring-messaging-4.2.4.BUILD-SNAPSHOT.jar!/:4.2.4.BUILD-SNAPSHOT]
    at org.springframework.integration.handler.AbstractMessageProducingHandler.sendOutput(AbstractMessageProducingHandler.java:231) ~[spring-integration-core-4.2.3.RELEASE.jar!/:na]
    at org.springframework.integration.handler.AbstractMessageProducingHandler.produceOutput(AbstractMessageProducingHandler.java:154) ~[spring-integration-core-4.2.3.RELEASE.jar!/:na]
    at org.springframework.integration.handler.AbstractMessageProducingHandler.sendOutputs(AbstractMessageProducingHandler.java:102) ~[spring-integration-core-4.2.3.RELEASE.jar!/:na]
    at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:105) ~[spring-integration-core-4.2.3.RELEASE.jar!/:na]

Copied from original issue: spring-cloud/spring-cloud-stream-modules#129

Copied from original issue: spring-cloud/spring-cloud-stream-app-starters#66

Validate combinations of options used for Cassandra Sink

From @sabbyanandan on May 6, 2016 17:7

From @trisberg on December 4, 2015 15:3

Some option combinations are not valid, like schemaOption is only valid when entityBasePackages are defined. We should try to validate that the combinations specified are valid.

Copied from original issue: spring-cloud/spring-cloud-stream-modules#119

Copied from original issue: spring-cloud/spring-cloud-stream-app-starters#64

Improve docs

Add an Input/Output section, as well as an example

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.