Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typo3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在cassandra cli命令行中运行脚本_Cassandra - Fatal编程技术网

如何在cassandra cli命令行中运行脚本

如何在cassandra cli命令行中运行脚本,cassandra,Cassandra,我有一个脚本来创建cassandra键空间和列族 cd C:\Tools\apache-cassandra-1.0.12 bin/cassandra-cli -host 127.0.0.1 -f C:\example_script.txt pause 脚本包含在批处理文件中。执行时,不会发生任何事情,脚本将关闭。能否尝试使用'-f'而不是'--f' 如果这不起作用,请提供“example_script.txt”中的命令示例。这实际上是我的输入错误。我已经更新了上面的帖子以反映更正。它仍然不能与

我有一个脚本来创建cassandra键空间和列族

cd C:\Tools\apache-cassandra-1.0.12
bin/cassandra-cli -host 127.0.0.1 -f C:\example_script.txt
pause

脚本包含在批处理文件中。执行时,不会发生任何事情,脚本将关闭。

能否尝试使用'-f'而不是'--f'


如果这不起作用,请提供“example_script.txt”中的命令示例。

这实际上是我的输入错误。我已经更新了上面的帖子以反映更正。它仍然不能与-f开关一起工作。实际的脚本很好,当我在cli控制台上复制并粘贴它时,它工作正常。我不知道问题出在哪里,可能是您必须使用-k选项使用特定的键空间。
bin/cassandra-cli -host 127.0.0.1 -f C:\example_script.txt