o19s / trireme Goto Github PK
View Code? Open in Web Editor NEWMigration tool providing support for Apache Cassandra, DataStax Enterprise Cassandra, & DataStax Enterprise Solr.
License: BSD 4-Clause "Original" or "Old" License
Migration tool providing support for Apache Cassandra, DataStax Enterprise Cassandra, & DataStax Enterprise Solr.
License: BSD 4-Clause "Original" or "Old" License
There should be something we can put in place to bootstrap a fresh Solr Core.
This tool should work against a secured cluster.
I would like to fork and develop on this, but am wondering if this repository is being maintained?
This is important, as I would like to be able to publish changes made into Pip, whether this be done by you or myself.
I ask this as the last change is a while ago.
We should only run migrations when there are changes. Currently the Solr implementation is basic at best.
For example, I may want a stopwords.txt file uploaded along with my core. Currently only the schema.xml and solrconfig.xml file are pushed.
Can you give me a hint how you write scripts for a migration from one schema to another, please? It's offtopic a little bit but I just don't understand how to use this solution without such knowledge. For example,
Thanks!
These should be omitted. They will be added when the Solr core is brought up.
When tried to list all the task supported by trireme using inv -l
, the command failed with the following stacktrace:
Traceback (most recent call last):
File "/usr/local/bin/inv", line 11, in <module>
sys.exit(program.run())
File "/usr/local/lib/python2.7/dist-packages/invoke/program.py", line 286, in run
self._parse(argv)
File "/usr/local/lib/python2.7/dist-packages/invoke/program.py", line 352, in _parse
self.load_collection()
File "/usr/local/lib/python2.7/dist-packages/invoke/program.py", line 500, in load_collection
coll = loader.load(coll_name) if coll_name else loader.load()
File "/usr/local/lib/python2.7/dist-packages/invoke/loader.py", line 53, in load
module = imp.load_module(name, fd, path, desc)
File "/home/ajmal/test/migrate/tasks.py", line 2, in <module>
from trireme import trireme
File "/usr/local/lib/python2.7/dist-packages/trireme/trireme.py", line 4, in <module>
from trireme.migrators import cassandra, solr
File "/usr/local/lib/python2.7/dist-packages/trireme/migrators/cassandra.py", line 53, in <module>
@task
File "/usr/local/lib/python2.7/dist-packages/invoke/tasks.py", line 275, in task
return Task(args[0], **kwargs)
File "/usr/local/lib/python2.7/dist-packages/invoke/tasks.py", line 61, in __init__
self.positional = self.fill_implicit_positionals(positional)
File "/usr/local/lib/python2.7/dist-packages/invoke/tasks.py", line 152, in fill_implicit_positionals
args, spec_dict = self.argspec(self.body)
File "/usr/local/lib/python2.7/dist-packages/invoke/tasks.py", line 147, in argspec
raise TypeError("Tasks must have an initial Context argument!")
I think the error is related to a recent change in the invoke library, and can be worked around by adding a context parameter to every task function.
I like how light this tool is, and how clean the source is, but I do miss having rollbacks in a migration tool.
I think it would require 2 changes to get them though:
.down.cql
files.rollback --target 20160101-new-table
, which would run all the .down.cql
files after the provided migration. Basically undo all the migrations after the 20160101-new-table
.How does this sound? I could write up a PR if it sounds good.
Thanks,
Charles
This is driving me crazy
This can help the migrations table to act as a sort of audit trail
If a collection is running warn the user and do NOT perform the RELOAD call.
TODO Determine if we want to push the updated files if a RELOAD will not be performed.
CQL or Solr
Also add a task to load the schema from the dumped export into a clean keyspace.This would save time as migrations wouldn't need to be run when initially setting up the project. Optionally inspect the migrations table to see if the keyspace is in a state to accept the schema load.
inv cassandra.create cassandra.load_schema
The keyspace is created and db/schema.cql
will be loaded.
inv cassandra.add_migration --name add_foo_table
developer fills out the new migration file
inv cassandra.migrate
The migration file is run (along with any other migrations that have not run). The db/schema.cql file is replaced with an updated version that contains all CREATE statements that include the new migration.
Currently the process to install is a little involved. Make this easier by providing the package via a tool like pip.
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.