在Cassandra中使用CQLSH与SSL:更改CQLSHRC位置
我想与SSL一起使用CQLSH。我遵循DataStax文档推荐的过程,效果很好。 但是,我想更改CQLSHRC文件的位置,而不是按照Cassandra文档中所述的 /myhomedirectry/.cassandra将其放置 怎么办? 感谢您的帮助。
I would like to use cqlsh with ssl. I followed the procedure recommended by the datastax documentation, and it worked well.
However, I would like to change the location of the cqlshrc file, and not place it in /myHomeDirectry/.cassandra as described in the cassandra documentation
how can this be done?
thanks for help..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以通过指定
- - CQLSHRC
选项和新的CQLSHRC文件位置在从命令行运行CQLSH时。这是Apache Cassandra网站上文档的链接,以获取更多信息:
> 在
bin/cqlsh.py
中:cqlsh存储
cqlsh_history
file file ,它还使用history_dir
定义设置CQLSHRC文件的默认位置。在命令行上指定CQLSHRC文件的情况下,您需要通过在上面的os.path.join
中指定目录名称来覆盖该默认位置。请注意,这绝对是那些“以您自身的风险进行”时刻之一。
You can do this by specifying the
—-cqlshrc
option and new cqlshrc file location when running cqlsh from the command line.Here's a link to the docs on the Apache Cassandra site for more info: https://cassandra.apache.org/doc/latest/cassandra/tools/cqlsh.html#cqlshrc
Edit -
The only other way to do this, is to modify this line in
bin/cqlsh.py
:Cqlsh stores the
cqlsh_history
file in~/.cassandra
and it also uses thatHISTORY_DIR
definition to set the default location of the cqlshrc file. Without specifying the cqlshrc file on the command line, you'll need to override that default location by specifying the directory name(s) in theos.path.join
above.Note that this is definitely one of those "proceed at your own risk" moments.