Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/cassandra/3.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/bin/cassandra-f“;,如何把候机楼的窗户打开?_Cassandra_Thrift - Fatal编程技术网

以“开始”开始cassandra/bin/cassandra-f“;,如何把候机楼的窗户打开?

以“开始”开始cassandra/bin/cassandra-f“;,如何把候机楼的窗户打开?,cassandra,thrift,Cassandra,Thrift,使用/bin/cassandra-f时,它会显示: Cz@z-EX465-MX:~/cassandra$ ./bin/cassandra -f INFO 09:12:19,460 Logging initialized INFO 09:12:19,484 Heap size: 1033895936/1033895936 INFO 09:12:19,486 JNA not found. Native methods will be disabled. INFO 09:12:19,501 L

使用
/bin/cassandra-f
时,它会显示:

Cz@z-EX465-MX:~/cassandra$ ./bin/cassandra -f
 INFO 09:12:19,460 Logging initialized
 INFO 09:12:19,484 Heap size: 1033895936/1033895936
 INFO 09:12:19,486 JNA not found. Native methods will be disabled.
 INFO 09:12:19,501 Loading settings from file:/home/z/cassandra/conf/cassandra.yaml
 INFO 09:12:19,711 DiskAccessMode 'auto' determined to be standard, indexAccessMode is standard
 INFO 09:12:19,829 Creating new commitlog segment /var/lib/cassandra/commitlog/CommitLog-1297127539829.log
 INFO 09:12:19,888 Deleted /var/lib/cassandra/data/system/LocationInfo-f-12
 INFO 09:12:19,889 Deleted /var/lib/cassandra/data/system/LocationInfo-f-9
 INFO 09:12:19,890 Deleted /var/lib/cassandra/data/system/LocationInfo-f-11
 INFO 09:12:19,891 Deleted /var/lib/cassandra/data/system/LocationInfo-f-10
 INFO 09:12:19,939 reading saved cache /var/lib/cassandra/saved_caches/system-IndexInfo-KeyCache
 INFO 09:12:19,946 reading saved cache /var/lib/cassandra/saved_caches/system-Schema-KeyCache
 INFO 09:12:19,949 reading saved cache /var/lib/cassandra/saved_caches/system-Migrations-KeyCache
 INFO 09:12:19,952 reading saved cache /var/lib/cassandra/saved_caches/system-LocationInfo-KeyCache
 INFO 09:12:19,962 Opening /var/lib/cassandra/data/system/LocationInfo-f-13
 INFO 09:12:19,984 reading saved cache /var/lib/cassandra/saved_caches/system-HintsColumnFamily-KeyCache
 INFO 09:12:20,043 Couldn't detect any schema definitions in local storage.
 INFO 09:12:20,045 Found table data in data directories. Consider using JMX to call org.apache.cassandra.service.StorageService.loadSchemaFromYaml().
 INFO 09:12:20,058 Replaying /var/lib/cassandra/commitlog/CommitLog-1297127304757.log
 INFO 09:12:20,060 Finished reading /var/lib/cassandra/commitlog/CommitLog-1297127304757.log
 INFO 09:12:20,061 Log replay complete
 INFO 09:12:20,147 Cassandra version: 0.7.1-SNAPSHOT
 INFO 09:12:20,147 Thrift API version: 19.4.0
 INFO 09:12:20,168 Loading persisted ring state
 INFO 09:12:20,175 Starting up server gossip
 INFO 09:12:20,195 switching in a fresh Memtable for LocationInfo at CommitLogContext(file='/var/lib/cassandra/commitlog/CommitLog-1297127539829.log', position=89)
 INFO 09:12:20,197 Enqueuing flush of Memtable-LocationInfo@14850080(29 bytes, 1 operations)
 INFO 09:12:20,199 Writing Memtable-LocationInfo@14850080(29 bytes, 1 operations)
 INFO 09:12:20,604 Completed flushing /var/lib/cassandra/data/system/LocationInfo-f-14-Data.db (80 bytes)
 INFO 09:12:20,623 Starting Messaging Service on port 7000
 INFO 09:12:20,669 Using saved token 66456586001264063553489133185713650713
 INFO 09:12:20,670 switching in a fresh Memtable for LocationInfo at CommitLogContext(file='/var/lib/cassandra/commitlog/CommitLog-1297127539829.log', position=270)
 INFO 09:12:20,671 Enqueuing flush of Memtable-LocationInfo@5006112(53 bytes, 2 operations)
 INFO 09:12:20,671 Writing Memtable-LocationInfo@5006112(53 bytes, 2 operations)
 INFO 09:12:20,938 Completed flushing /var/lib/cassandra/data/system/LocationInfo-f-15-Data.db (163 bytes)
 INFO 09:12:20,945 Will not load MX4J, mx4j-tools.jar is not in the classpath
 INFO 09:12:21,008 Binding thrift service to localhost/127.0.0.1:9160
 INFO 09:12:21,013 Using TFastFramedTransport with a max frame size of 15728640 bytes.
 INFO 09:12:21,016 Listening for thrift clients...
因此,当浏览
127.0.0.1:9160
时,它会显示空白的白色页面。但是我不能使用这个终端窗口,除非按下
Ctrl+c
并停止cassandra

我正在查看是否可以使用
/bin/cassandra-f&
返回终端窗口,但在尝试
pgrep-thrift
pgrep-cassandra
时,我什么也没找到。使用其他终端窗口时,我不知道如何停止。
使用
pgrepjava
查看流程

f代表前台。如果您想让Cassandra进行daemonize,只需省略它。

在*nix系统上,您应该能够键入ctrl-z来停止前台Cassandra进程。这将给您一个提示,如果您在提示处键入bg,则cassandra进程将被后台处理。您可以使用任何需要添加到后台的前台进程来执行此操作

如果您确实使用-f和&的组合,那么您的工作就在后台

您只需输入:

fg
使其回到前台,然后按CTRL-C键

或使用:

jobs
看看你有什么背景。然后您可以将fg与作业编号一起使用

您还可以使用CTRL-Z挂起终端上当前正在运行的任何内容,然后使用:

bg
给它加背景

下面是一个示例会话,我在其中运行了两次tail,并演示如何将其放在终端上和终端下

rob@deathstar:~$ tail -f /var/log/messages &
[1] 13074                                            <-- that's the PID :) 
rob@deathstar:~$ tail -f /var/log/daemon.log &
[2] 13089
rob@deathstar:~$ jobs
[1]-  Running                 tail -f /var/log/messages &
[2]+  Running                 tail -f /var/log/daemon.log &
rob@deathstar:~$ fg 1
tail -f /var/log/messages
^Z
[1]+  Stopped                 tail -f /var/log/messages
rob@deathstar:~$ bg
[1]+ tail -f /var/log/messages &
rob@deathstar:~$ jobs
[1]-  Running                 tail -f /var/log/messages &
[2]+  Running                 tail -f /var/log/daemon.log &
rob@deathstar:~$ fg 2
tail -f /var/log/daemon.log
^Z
[2]+  Stopped                 tail -f /var/log/daemon.log
rob@deathstar:~$ bg
[2]+ tail -f /var/log/daemon.log &
rob@deathstar:~$ jobs
[1]-  Running                 tail -f /var/log/messages &
[2]+  Running                 tail -f /var/log/daemon.log &
rob@deathstar:~$ 
rob@deathstar:~$tail-f/var/log/messages&
[1] 13074使用

./cassandra-f pid.txt


您的进程将自动在后台运行,并将进程id推送到文件中。使用pid.txt中的进程id停止cassandra进程将很有帮助。

对于Windows。。。。您需要重新启动集群,因为一旦服务在前台运行,集群就需要重新启动