eprothro / cassie Goto Github PK
View Code? Open in Web Editor NEWRuby application support for Apache Cassandra
Home Page: https://rubygems.org/gems/cassie
License: MIT License
Ruby application support for Apache Cassandra
Home Page: https://rubygems.org/gems/cassie
License: MIT License
When a task dumps the schema, it calls out to cqlsh
, but this exepects that the vanilla call to the command without options will just work.
It could use the cluster options to populate options (like auth).
If cursor_by
has been called on a cassie query class, fetch_first
will fail, with:
A singleton method has already been defined for `limit`. `with_limit` can't be implemented.
# ./lib/cassie/statements/statement/limiting.rb:89:in `assert_no_limit_singleton'
# ./lib/cassie/statements/statement/limiting.rb:70:in `define_limit_singleton'
# ./lib/cassie/statements/statement/limiting.rb:46:in `with_limit'
# ./lib/cassie/statements/execution/peeking.rb:12:in `execute'
# ./lib/cassie/statements/execution/fetching.rb:25:in `fetch'
# ./lib/cassie/statements/execution/fetching.rb:38:in `block in fetch_first'
to_cql
falls over with certain UDTs with exception message like
ArgumentError:
value must be an instance of Time, ["foo_at", 2017-10-31 12:10:00 -0500] given
type
#=> #<Cassandra::Types::Simple:0x007fed37c33300 @kind=:bigint>
params[i]
#=> nil
params
#=> ["55e05d24-513b-11e7-b6b8-33c23e6e0000", 2017-06-14 14:54:54 -0500, nil, nil, "55e0893e-513b-11e7-bd08-0f7a965973cc", "testuser94517816"]
bound_cql
#=> "INSERT INTO some_table (id, other_id, url, other_url, user_id, username) VALUES (?, ?, ?, ?, ?, ?);"
type
#<Cassandra::Types::Simple:0x007fed37c33300 @kind=:bigint>
type.new(nil)
TypeError:
can't convert nil into Integer
would be nice to catch type errors and give more info about what param is the culprit.
Cassandra::Errors::TimeoutError
for non-trivial schemas when running:
schmea:drop
schema:reset
migrate:reset
Cassandra received request and executes successfully, but times out while doing so, so rest of task doesn't run after that failure.
In all cases there should be no harm in simply re-running.
However, probably a good idea to set the query timeout longer for these queries.
preparing a statement through the fake session results in a fake prepared statement being put in the statement cache.
If that fake prepared statement is then executed later with a real session, there can be type hinting issues like
Cassandra::Errors::InvalidError:
Expected 4 or 0 byte int (8)
Only affects test/spec query usage.
run rake full_spec
to see failures.
Page explaining motivation and some of the "why's"
cassie schema management keyspace is created with simple replication strategy, if you have a cluster with a multiple DC configuration, the cassie schema tasks will fail.
Workaround:
cassie schema:init
Edit the cassie_schema
keyspace manually (in cqlsh) to have the proper replication settings.
cassie schema:init
expect(query.statement).to have_cql_assignment(:field)
expect(query.statement).to have_cql_assignment(:field, value)
expect(query.statement).to have_cql_relation(:field)
expect(query.statement).to have_cql_relation(:field, value)
Would go a long way for clients to be able to stop their testing plane sooner and have faster cassandra query coverage.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.