Hi Achim,
I thought I provided some update by e-mail, my bad (we just quickly
discussed on IRC).
For the "special characters", why not just using a variable in the
session (like for the completion mode), and having a specific shell
instantiated when the variable is there.
I'm +1 on the specific shell in that case.
Regards
JB
On 01/05/2015 06:44 PM, Achim Nierbeck wrote:
Hi,
my guess is that it lacks of feedback due to the holidays, so I thought I
just bring this up one more time.
While adding the CQL Commands to my showcase I was in need to change the
way the current gogo-shell is handling brackets and other characters.
Now what would be the best to have those changes back in Karaf?
Right now it's just a flag set by the session that is interpreted by
specialized implementation of the standard gogo-shell classes.
This isn't really nice as it would cause code-duplication.
An alternative that Guillaume already mentioned to me on IRC would be to
have a specialized shell for these cases.
The benefit for this would be to have a shell capable of handling any kind
of SQL like syntax, the completers for it can be based on the ones I made
for CQL.
I'm open to ideas :-)
regards, Achim
2014-12-22 18:07 GMT+01:00 Achim Nierbeck <[email protected]>:
Hi,
I worked on a showcase to embed a Apache Cassandra DB inside Apache Karaf
[1].
This could be used for either prototyping with Cassandra or as an
alternative backend for the Decanter project.
Additionally I played with some shell commands for easy debugging
purposes, for details take a look [2].
For example you're able to connect to any given Cassandra cluster issue
some CQL statements either from the command line or from a file.
Additionally I added some CQLSH like commands including completion for
easy usage of USE, CREATE, SELECT or INSERT statements. For this I needed
to alter the Karaf shell a bit (with the help of gnodet :-) ) To disable
the shell interpretation of quotes and brackets.
Now that I altered the handling in Karaf/GOGO shell in a custom Karaf [3],
the question is, can we port this back to Karaf in a way that we don't need
to alter the gogo shell stuff again and have our own classes [4]. Another
Idea that came to my mind was to have a stripped down shell that could be
used for any SQL-like command. A similar completion syntax could be used
for any SQL Select, not only for the CQL syntax of Cassandra.
regards, Achim
[1] - https://github.com/ANierbeck/Karaf-Cassandra
[2] -
https://blog.codecentric.de/en/2014/12/combining-apache-cassandra-apache-karaf/
[3] - https://github.com/ANierbeck/CustomKaraf
[4] - http://notizblog.nierbeck.de/2014/12/embedding-apache-cassandra/
--
Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
Software Architect / Project Manager / Scrum Master
--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com