forked from oceanbase/miniob
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
observer可以直接在控制台输入命令 (oceanbase#199)
### What problem were solved in this pull request? Issue Number: close oceanbase#162 Problem: 当前的observer启动流程和调试方法比较繁琐,必须使用客户端服务端的方式,先启动服务端程序,再使用客户端启动调试 ### What is changed and how it works? observer可以直接启动,不监听tcp或unix socket,直接通过终端/控制台输入命令并执行,极大的方便了调试 ### Other information 新的启动方法: ./bin/observer -P cli -f ../etc/observer.ini
- Loading branch information
Showing
62 changed files
with
878 additions
and
614 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
MACRO (MINIOB_FIND_READLINE) | ||
|
||
FIND_PATH(READLINE_INCLUDE_DIR readline.h PATH_SUFFIXES readline) | ||
FIND_LIBRARY(READLINE_LIBRARY NAMES readline) | ||
IF (READLINE_INCLUDE_DIR AND READLINE_LIBRARY) | ||
SET(HAVE_READLINE 1) | ||
ELSE () | ||
MESSAGE("cannot find readline") | ||
ENDIF() | ||
|
||
ENDMACRO (MINIOB_FIND_READLINE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
|
||
|
||
ADD_SUBDIRECTORY(common) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# 如何运行 | ||
|
||
编译完成后,可以在build目录(可能是build_debug或build_release)下找到bin/observer,就是我们的服务端程序,bin/obclient是自带的客户端程序。 | ||
当前服务端程序启动已经支持了多种模式,可以以TCP、unix socket方式启动,这时需要启动客户端以发起命令。observer还支持直接执行命令的模式,这时不需要启动客户端,直接在命令行输入命令即可。 | ||
|
||
**以直接执行命令的方式启动服务端程序** | ||
```bash | ||
./bin/observer -f ../etc/observer.ini -P cli | ||
``` | ||
这会以直接执行命令的方式启动服务端程序,可以直接输入命令,不需要客户端。所有的请求都会以单线程的方式运行,配置项中的线程数不再有实际意义。 | ||
|
||
**以监听TCP端口的方式启动服务端程序** | ||
|
||
```bash | ||
./bin/observer -f ../etc/observer.ini -p 6789 | ||
``` | ||
这会以监听6789端口的方式启动服务端程序。 | ||
启动客户端程序: | ||
```bash | ||
./bin/obclient -p 6789 | ||
``` | ||
这会连接到服务端的6789端口。 | ||
|
||
**以监听unix socket的方式启动服务端程序** | ||
```bash | ||
./bin/observer -f ../etc/observer.ini -s miniob.sock | ||
``` | ||
这会以监听unix socket的方式启动服务端程序。 | ||
启动客户端程序: | ||
```bash | ||
./bin/obclient -s miniob.sock | ||
``` | ||
这会连接到服务端的miniob.sock文件。 | ||
|
||
**更多** | ||
observer还提供了一些其它参数,可以通过./bin/observer -h查看。 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.