Comments (5)
Ha, I see that there's already a cli command implemented for nodes, it's just not enabled in the node command list. I guess because it's aimed at older versions of cassandra-cli, and might not be ideal for the modern, readline-y tool we have today.
What if we just ran cassandra-cli connected to the user's tty and let them use it interactively, rather than parsing input commands and funneling its i/o on pipes?
from ccm.
Oops, closed by mistake
from ccm.
The lack of listing of the 'cli' command is a mistake, I've just corrected that. There was no "ccm cli" (only "ccm $node cli") because I've never really bothered but I've just added a simple to connect to some live node since that's trivial.
Now the 'cli' command is meant for the current cli (I'm using it quite a lot). Without the --exec parameter, ccm cli will let you use the cli interactively. The "parsing input commands and funneling its i/o on pipes" happens with the --exec parameter, whose goal is to be used in scripts. More precisely, the parsing of the input is just so that you can write:
ccm cli --exec "create keyspace foo; create column family bar"
instead of having to write
ccm cli --exec "create keyspace foo;\n create column family bar;"
And the funneling with the i/o pipes is so that the standard output is not shown while still reporting when there is an error.
I'm not pretending that code is very clean (and no doubt it can be improved) but at least it is very handy and works relatively well based on my experience.
from ccm.
So I was thinking with the above patch, that the user could use cassandra-cli's --batch option to similar effect:
ccm cli --batch <<<"create keyspace foo;"
not quite good enough? i can revise my patch to maintain the --exec switch
from ccm.
Nevermind, I see you adapted these changes and committed already.
from ccm.
Related Issues (20)
- ccm create -o option doesn't create datastax-agent directory in the nodes
- How to allow remote connection
- deprecation warnings for PyYAML upon yaml loading HOT 1
- How to specify JVM args per cluster instead upon invoking start method? HOT 3
- Upgrading a node resets that node's cassandra-topology.properties
- Getting load warnings on version 3.1.4 HOT 1
- Creating cluster with debug `-d` fails against C* 4.0
- WSL Error - from ccsm HOT 3
- AssertionError: Could not do a git clone HOT 2
- Can't create cluster using 4.0-alpha binary releases
- Connect to node with Database Manager
- Unable to run a multi-node cluster HOT 1
- nodetool info fails with error: `No such attribute: StopNodeReason`
- ccm doesn't seem to work with version 4.0-rc1 HOT 1
- heartbeat HOT 1
- release of 3.1.6 to pypi?
- pip install ccm gives errror: "ImportError: No module named pathlib" HOT 4
- Create DSE without a /conf folder
- IndexError: list index out of range on Fedora release 37 HOT 2
- How to uninstall
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 ccm.