Comments (2)
I think the first step would be to allow creating a new column family with an index. Currently we don't have a way to update a column family/keyspace after it is created. Hopefully adding the functionality to the cf creation call will make it easy to add a fn for updating column families that takes advantage of that. At first glance I would imagine this would be an additional possible option passed to the 'make-column-family' function in ddl.clj
The implementation would actually be generalized to allow setting the column_metadata for a column family. That will allow you to create an index as well as just set validators for certain columns. Column metadata is just a list of individual column definitions so something like:
(make-column-family "my_keyspace"
{:name "cf1"
:type :standard
:column_metadata
[{:name "c1" :index-name "c1_idx" :index-type :keys :validator :utf8}
{:name "c2" :validator :integer}])
Above would be an example of both an indexed column as well as just column with a validator. You can see a good example of what the hector code looks like here too: https://github.com/zznate/hector-examples/blob/master/src/main/java/com/riptano/cassandra/hector/example/SchemaManipulation.java#L44
Once that is in place, an update column family function can be added that can retrieve the existing ColumnFamilyDefinition from hector, update the fields passed in by the user, and call the hector method for updating a column family.
from clj-hector.
Fixed with pull request 22.
from clj-hector.
Related Issues (16)
- Update to latest Hector + Cassandra releases HOT 1
- Use an in-process Cassandra daemon HOT 1
- Add support for composite column types HOT 2
- TTL support in defschema HOT 1
- Update README and documentation
- Add support for composite keys
- Consolidate ser/deser in serialize.clj and ddl.clj
- Allow querying on a secondary index
- Upgrade clojure version HOT 5
- Super columns: supercolumn parameter is not optional for super CF Documents HOT 2
- Wrap createRangeSlicesQuery HOT 1
- Upgrade Hector/Cassandra
- Fix or Document issue with integer serialization
- suppress log output in test run HOT 1
- How to use CQL HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clj-hector.