-
Notifications
You must be signed in to change notification settings - Fork 379
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[gh-241] Rename tarantool_box to tarantool
Update mans, docs. A lot of resources still need to be updated (build scripts, etc).
- Loading branch information
Showing
42 changed files
with
158 additions
and
440 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
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/bin/sh | ||
|
||
test -x /usr/bin/tarantool_box || exit 0 | ||
test -x /usr/bin/tarantool || exit 0 | ||
test -x /usr/sbin/tarantool_snapshot_rotate || exit 0 | ||
|
||
exec /usr/sbin/tarantool_snapshot_rotate |
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
usr/bin/tarantool_box | ||
usr/bin/tarantool | ||
#usr/bin/tarantar |
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 +1 @@ | ||
tarantool: unstripped-binary-or-object usr/bin/tarantool_box | ||
tarantool: unstripped-binary-or-object usr/bin/tarantool |
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,3 @@ | ||
build-area/doc/man/tarantool_box.1 | ||
build-area/doc/man/tarantool.1 | ||
#build-area/tarantar.1 | ||
|
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,11 +1,5 @@ | ||
add_custom_target(man ALL | ||
COMMAND ${POD2MAN} -c 'high performance key/value storage server' | ||
${CMAKE_SOURCE_DIR}/doc/man/tarantool_box.pod > ${PROJECT_BINARY_DIR}/doc/man/tarantool_box.1 | ||
COMMAND ${POD2MAN} -c 'readline SQL-client for tarantool' | ||
COMMAND ${POD2MAN} -c 'Lua application server and NoSQL database' | ||
${CMAKE_SOURCE_DIR}/doc/man/tarantool.pod > ${PROJECT_BINARY_DIR}/doc/man/tarantool.1 | ||
) | ||
|
||
install(FILES ${PROJECT_BINARY_DIR}/doc/man/tarantool_box.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1/) | ||
if (ENABLE_CLIENT) | ||
install(FILES ${PROJECT_BINARY_DIR}/doc/man/tarantool.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1/) | ||
endif() | ||
install(FILES ${PROJECT_BINARY_DIR}/doc/man/tarantool.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1/) |
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,199 +1,70 @@ | ||
=head1 NAME | ||
|
||
tarantool - readline-based client for L<tarantool>. | ||
tarantool- a Lua application server and a NoSQL database | ||
|
||
=head1 SYNOPSIS | ||
|
||
tarantool [OPTIONS] [QUERY] | ||
|
||
=head1 Command-line options | ||
|
||
=over | ||
|
||
=item -h, --host <host name> | ||
|
||
Server address. | ||
|
||
=item -p, --port <port number> | ||
|
||
Server port. | ||
|
||
=item -a, --admin-port <port number> | ||
|
||
Server admin port. | ||
|
||
=item -C, --cat <file name> | ||
|
||
Print xlog or snapshot file content. | ||
|
||
=item -P, --play <file name> | ||
|
||
Replay xlog file to the specified server. | ||
|
||
=item -S, --space <space number> | ||
|
||
Filter by space number. | ||
|
||
=item -F, --from <log serial number> | ||
|
||
Start xlog file from the specified lsn. | ||
|
||
=item -T, --to <log serial number> | ||
|
||
Stop on specified xlog lsn. | ||
|
||
=item -M, --format <name> | ||
|
||
Cat output format (tarantool, raw). | ||
|
||
=item -H, --header | ||
|
||
Add file header for the raw output. | ||
|
||
=item -R, --rpl <log serial number> | ||
|
||
Act as replica for the specified server. | ||
|
||
=item -B, --bin | ||
|
||
Print STR in lua printer instead of NUM32 and NUM64, | ||
except arithmetic update arguments. | ||
|
||
=item -D, --delim <delim> | ||
|
||
If you use --cat, then it will add delim to end of | ||
every line of your Lua file. when used at CLI start | ||
of client, then it's replacement of setopt | ||
delim='<delim>' command. | ||
|
||
=item -?, --help | ||
|
||
Display this help and exit. | ||
|
||
=item -V, --version | ||
|
||
Display version information and exit. | ||
|
||
=back | ||
tarantool [OPTIONS] | ||
|
||
=head1 DESCRIPTION | ||
|
||
Statements in alphabetical order | ||
|
||
Although an initial statement may be entered on the tarantool command line, generally they are entered following the prompt in interactive mode while tarantool is running. (A prompt will be the name of the host and a greater-than sign, for example localhost>). The end-of-statement marker is a newline (line feed). | ||
Tarantool is a Lua application server and a NoSQL database. | ||
|
||
=over | ||
|
||
=item CALL | ||
|
||
Syntax: CALL procedure-identifier (). Effect: The client tells the server to execute the procedure identified by procedure-identifier. Example: CALL proc50(). Notes: The client sends to the server's read/write data port. | ||
|
||
=item DELETE | ||
|
||
Syntax: DELETE FROM tuple-set-name WHERE field-name = literal. Effect: Client tells server to delete the tuple identified by the WHERE clause. Example: DELETE FROM t0 WHERE k0='a'. Notes: field-name must identify the primary key. The client sends to the server's read/write data port after converting from SQL to binary protocol. | ||
|
||
=item EXIT | ||
|
||
Syntax: E[XIT]. Effect: The tarantool program stops. Example: EXIT. Notes: The QUIT statement does the same thing. The client sends nothing to the server. | ||
|
||
=item HELP | ||
|
||
Syntax: H[ELP]. Effect: Client displays a message including a list of possible statements. Example: HELP. Notes: The client sends nothing to the server. | ||
|
||
=item INSERT | ||
|
||
Syntax: INSERT [INTO] tuple-set-identifier VALUES (literal [,literal...]). Effect: The client tells the server to add the tuple consisting of the literal values. Example: INSERT INTO t0 VALUES ('a',0). Notes: The client sends to the server's read/write data port after converting from SQL to binary protocol. | ||
|
||
=item LOADFILE | ||
|
||
Syntax: LOADFILE string-literal. Effect: The client loads instructions from the file identified by string-literal. Example: LOADFILE '/home/tarantool_user/file5.txt'. | ||
|
||
=item LUA | ||
|
||
Syntax: LUA token [token...]. Effect: The client tells the server to execute the tokens as Lua statements. Example: LUA "hello".." world". Notes: The client sends to the server's administrative port. | ||
|
||
=item PING | ||
|
||
Syntax: PING. Effect: The client sends a ping to the server. Example: PING. Notes: The client sends to the server's read/write data port. | ||
|
||
=item QUIT | ||
Its key properties include: | ||
|
||
Syntax: Q[UIT]. Effect: The client stops. This statement is handled entirely by the client. Example: QUIT. Notes: The EXIT statement does the same thing. The client sends nothing to the server. | ||
|
||
=item RELOAD | ||
|
||
Syntax: RELOAD CONFIGURATION. Effect: The client tells the server to re-read the configuration file. Example: RELOAD CONFIGURATION. Notes: The client sends to the server's administrative port. | ||
|
||
=item REPLACE | ||
|
||
Syntax; REPLACE [INTO] tuple-set-identifier VALUES (literal [,literal...]). Effect: The client tells the server to add the tuple consisting of the literal values. Example: REPLACE INTO t0 VALUES ('a',0). Notes: REPLACE and INSERT are the same, except that INSERT will return an error if a tuple already exists with the same primary key. The client sends to the server's read/write data port after converting from SQL to binary protocol. | ||
|
||
=item SAVE | ||
|
||
Syntax: SAVE COREDUMP | SNAPSHOT. Effect: The client tells the server to save the designated object. Example: SAVE SNAPSHOT. Notes: The client sends to the server's administrative port. | ||
|
||
=item SELECT | ||
|
||
Syntax: SELECT * FROM tuple-set-identifier WHERE field-identifier = literal [AND|OR field-identifier = literal...] [LIMIT numeric-literal [,numeric-literal]]. Effect: Client tells server to find the tuple or tuples identified in the WHERE clause. Example: SELECT * FROM t0 WHERE k0 = 5 AND k1 = 7 LIMIT 1. Notes: The client sends to the server's read/write data port. | ||
|
||
=item SET | ||
|
||
Syntax: SET INJECTION name-token state-token. Effect: In normal mode: error. Notes: This statement is only available in debug mode. | ||
|
||
=item SETOPT | ||
|
||
Syntax: SETOPT DELIMITER = string-literal. The string must be a value in single quotes. Effect: string becomes end-of-statement delimiter, so newline alone is not treated as end of statement. Example: SETOPT DELIMITER = '!'. Notes: The client sends nothing to the server. | ||
|
||
Syntax: SETOPT PAGER = string-literal. The string must be a value in single quotes. Effect: string becomes the pager that will be invoked for subsequent commands; usually the values are '/usr/bin/less' or '/bin/more' for the common Linux pagers. Example: SETOPT PAGER = '/usr/bin/less'. Notes: The client sends nothing to the server. | ||
=over | ||
|
||
=item SHOW | ||
=item * | ||
|
||
Licence: simplified BSD | ||
|
||
Syntax: SHOW CONFIGURATION | FIBER | INFO | INJECTIONS | PALLOC | PLUGINS | SLAB | STAT. Effect: The client asks the server for information about environment or statistics. Example: SHOW INFO. Notes: The client sends to the server's administrative port. SHOW INJECTIONS is only available in debug mode. | ||
=item * | ||
|
||
All data is maintained in RAM | ||
|
||
=item UPDATE | ||
=item * | ||
|
||
Data persistence is implemented using Write Ahead Log and snapshotting | ||
|
||
Syntax: UPDATE tuple-set-identifier SET field-identifier = literal [,field-identifier = literal...] WHERE field-identifier = literal. Effect: Client tells server to change the tuple identified in the WHERE clause. Example: UPDATE t1 SET k1= 'K', k2 = 7 WHERE k0 = 0. Notes: The client sends to the server's read/write data port after converting from SQL to binary protocol. | ||
=item * | ||
|
||
Supports asynchronous replication and hot standby | ||
|
||
For a condensed Backus-Naur Form [BNF] description of some of the statements, see doc/box-protocol.txt and doc/sql.txt. | ||
=item * | ||
|
||
Uses coroutines and asynchronous I/O to implement | ||
high-performance lock-free access to data | ||
|
||
=item * | ||
|
||
Available on Linux, FreeBSD, Mac OS X | ||
|
||
=item * | ||
|
||
Stored procedures in Lua are supported. | ||
|
||
=back | ||
|
||
=head1 EXAMPLES | ||
=head2 Data model | ||
|
||
The basic atom of storage in Tarantool is called tuple. A tuple | ||
can have arbitrary number of fields. The first field or fields | ||
in the tuple | ||
are always the identifying unique key. Tuples form spaces. It is | ||
possible to search tuples in spaces using the primary or secondary | ||
keys. It is possible to change, as well as add or remove fields. | ||
|
||
Depending how one combines the tarantool client's options, there are in effect three modes of operation: "interactive", "print and play", or "replication" mode. | ||
=head1 Command-line options | ||
|
||
In interactive mode, one types statements and gets results. One can specify a statement file when starting (tarantool < file_name) or one can specify a statement file with the LOADFILE statement: (LOADFILE file_name), but typically the statements are typed in by the user following prompts. Here is an example of an interactive-mode tarantool client session: | ||
=over | ||
|
||
$ tarantool | ||
localhost> INSERT INTO t0 VALUES ('X-1',100) | ||
Insert OK, 1 rows affected | ||
localhost> INSERT INTO t0 VALUES ('X-2',200,'On Order') | ||
Insert OK, 1 rows affected | ||
localhost> INSERT INTO t0 VALUES ('X-3',300,'') | ||
Insert OK, 1 rows affected | ||
localhost> UPDATE t0 SET k1 = 300 WHERE k0 = 'X-1' | ||
Update OK, 1 rows affected | ||
localhost> DELETE FROM t0 WHERE k0 = 'X-2' | ||
Delete OK, 1 rows affected | ||
localhost> SELECT * FROM t0 WHERE k0 = 'X-1' | ||
Select OK, 1 rows affected | ||
['X-1', 300] | ||
localhost> EXIT | ||
$ | ||
=item -h, --help | ||
|
||
In print and play mode, one uses --cat and --play and --from and --to and --space options to print write-ahead-log contents, or to send write-ahead-log contents to the server. Here is an example of a print-and-play-mode tarantool client session: | ||
Displays helpscreen and exits. | ||
|
||
$ tarantool --cat /home/user1/tarantool_test/work_dir/00000000000000000005.xlog --from 22 --to 26 | ||
Insert, lsn: 22, time: 1385327353.345869, len: 33, space: 0, cookie: 127.0.0.1:44787 ['X-1', 100] | ||
Insert, lsn: 23, time: 1385327353.346745, len: 42, space: 0, cookie: 127.0.0.1:44787 ['X-2', 200, 8243105135088135759] | ||
Insert, lsn: 24, time: 1385327353.347352, len: 34, space: 0, cookie: 127.0.0.1:44787 ['X-3', 300, ''] | ||
Update, lsn: 25, time: 1385327353.348209, len: 42, space: 0, cookie: 127.0.0.1:44787 ['X-1'] | ||
Delete, lsn: 26, time: 1385327353.348879, len: 28, space: 0, cookie: 127.0.0.1:44787 ['X-2'] | ||
$ | ||
=item -V, --version | ||
|
||
In replication mode, one connects as a replica, and then writes a binary log to a file. | ||
Prints program version and exits. | ||
|
||
=back | ||
|
Oops, something went wrong.