1
0
Fork 0
Conflicts:
	lib/ApplicationServer/ApplicationServer.cpp
This commit is contained in:
Jan Steemann 2014-01-23 09:47:22 +01:00
parent f5039a4f54
commit 587c2aef64
22 changed files with 103 additions and 47 deletions

View File

@ -116,6 +116,8 @@ v1.5.0 (XXXX-XX-XX)
v1.4.7 (XXXX-XX-XX) v1.4.7 (XXXX-XX-XX)
------------------- -------------------
* issue #744: Add usage example arangoimp from Command line
* issue #738: added __dirname, __filename pseudo-globals. Fixes #733. (@by pluma) * issue #738: added __dirname, __filename pseudo-globals. Fixes #733. (@by pluma)
* mount all Foxx applications in system apps directory on startup * mount all Foxx applications in system apps directory on startup

View File

@ -307,7 +307,7 @@ latex: Doxygen/.setup-directories Doxygen/arango-latex.doxy $(DOXYGEN)
.PHONY: man .PHONY: man
man: Doxygen/.setup-directories man: Doxygen/.setup-directories
for section in 1 8; do for i in `ls Documentation/man$$section`; do sed -f Documentation/Scripts/man.sed -e "s/\<SECTION\>/$$section/" -e "s/\<COMMAND\>/$$i/g" -e "s/DATE/`date`/g" Documentation/man$$section/$$i > Doxygen/man/man$$section/$$i.$$section; done; done for section in 1 8; do for i in `ls Documentation/man$$section`; do sed -f Documentation/Scripts/man.sed -e "s/\<SECTION\>/$$section/" -e "s/\<COMMAND\>/$$i/g" -e "s/DATE/`date`/g" Documentation/man$$section/$$i > Doxygen/man/man$$section/$$i.$$section; cp "Doxygen/man/man$$section/$$i.$$section" "Documentation/man/man$$section/$$i.$$section"; done; done
## ----------------------------------------------------------------------------- ## -----------------------------------------------------------------------------
## --SECTION-- EXAMPLES ## --SECTION-- EXAMPLES

View File

@ -1,4 +1,4 @@
.TH arangob 1 "So 30. Sep 01:36:14 CEST 2012" "" "ArangoDB" .TH arangob 1 "Do 23. Jan 09:57:20 CET 2014" "" "ArangoDB"
.SH NAME .SH NAME
arangob - the ArangoDB benchmark and test tool arangob - the ArangoDB benchmark and test tool
.SH SYNOPSIS .SH SYNOPSIS
@ -32,35 +32,41 @@ complexity value for test case (meaning depends on test case)
.IP "--server.endpoint <string>" .IP "--server.endpoint <string>"
server endpoint to connect to, consisting of protocol, ip address and port server endpoint to connect to, consisting of protocol, ip address and port
.IP "--server.database <string>" .IP "--server.database <string>"
database name to use when connection (default: "_system") database name to use when connection (default: "_system")
.IP "--server.username <string>" .IP "--server.username <string>"
username to use when connecting (default "root") username to use when connecting (default "root")
.IP "--server.password <string>" .IP "--server.password <string>"
password to use when connecting. Leave empty for a password prompt password to use when connecting. Don't specify this option to get a password prompt
.IP "--server.disable-authentication <boolean>"
disable the password prompt and authentication when connecting to the server
.SH EXAMPLES .SH EXAMPLES
.EX .EX
shell> arangob shell> arangob
starts arangob with the default user and server endpoint starts arangob with the default user and server endpoint
.EE .EE
.EX
shell> arangob --server.username fuchsia
starts arangob with a specific user. Password prompt will follow
.EE
.EX .EX
shell> arangob --server.username fuchsia --server.password "abcd@34" shell> arangob --test-case version --requests 1000 --concurrency 1
starts arangob with a specific user and password given on command line runs the 'version' test case with 1000 requests, without concurrency
.EE .EE
.EX
shell> arangob --server.endpoint tcp://192.168.173.13:8529
starts arangob connecting to a specific server
.EE
.EX .EX
shell> arangob --server.endpoint ssl://192.168.173.13:8530 shell> arangob --test-case document --requests 1000 --concurrency 2
starts arangob connecting to a specific server using an SSL connection runs the 'document' test case with 2000 requests, with concurrency 2
.EE
.EX
shell> arangob --test-case document --requests 1000 --concurrency 2 --async true
runs the 'document' test case with 2000 requests, with concurrency 2, with async requests
.EE
.EX
shell> arangob --test-case document --requests 1000 --concurrency 2 --batch-size 10
runs the 'document' test case with 2000 requests, with concurrency 2, using batch requests
.EE .EE

View File

@ -1,4 +1,4 @@
.TH arangodump 1 "Fr 6. Sep 02:19:07 CEST 2013" "" "ArangoDB" .TH arangodump 1 "Do 23. Jan 09:57:20 CET 2014" "" "ArangoDB"
.SH NAME .SH NAME
arangodump - a tool to create logical dumps of an ArangoDB database arangodump - a tool to create logical dumps of an ArangoDB database
.SH SYNOPSIS .SH SYNOPSIS
@ -51,7 +51,9 @@ database name to use when connection (default: "_system")
.IP "--server.username <string>" .IP "--server.username <string>"
username to use when connecting (default "root") username to use when connecting (default "root")
.IP "--server.password <string>" .IP "--server.password <string>"
password to use when connecting. Leave empty for a password prompt password to use when connecting. Don't specify this option to get a password prompt
.IP "--server.disable-authentication <boolean>"
disable the password prompt and authentication when connecting to the server
.SH EXAMPLES .SH EXAMPLES
.SH AUTHOR .SH AUTHOR

View File

@ -1,4 +1,4 @@
.TH arangoimp 1 "So 30. Sep 01:36:14 CEST 2012" "" "ArangoDB" .TH arangoimp 1 "Do 23. Jan 09:57:20 CET 2014" "" "ArangoDB"
.SH NAME .SH NAME
arangoimp - a bulk importer for the ArangoDB database arangoimp - a bulk importer for the ArangoDB database
.SH SYNOPSIS .SH SYNOPSIS
@ -32,12 +32,29 @@ set to "json", "tsv" or "csv", depending on the input file format
.IP "--server.endpoint <string>" .IP "--server.endpoint <string>"
server endpoint to connect to, consisting of protocol, ip address and port server endpoint to connect to, consisting of protocol, ip address and port
.IP "--server.database <string>" .IP "--server.database <string>"
database name to use when connection (default: "_system") database name to use when connection (default: "_system")
.IP "--server.username <string>" .IP "--server.username <string>"
username to use when connecting (default "root") username to use when connecting (default "root")
.IP "--server.password <string>" .IP "--server.password <string>"
password to use when connecting. Leave empty for a password prompt password to use when connecting. Don't specify this option to get a password prompt
.IP "--server.disable-authentication <boolean>"
disable the password prompt and authentication when connecting to the server
.SH EXAMPLES .SH EXAMPLES
.EX
shell> arangoimp --file heroes.json --type json --collection superheroes --create-collection true
imports JSON data from file heroes.json into collection superhoeres. creates the collection if it does not exist
.EE
.EX
shell> arangoimp --file export.csv --type csv --collection mydata
imports CSV data from export.csv into existing collection mydata
.EE
.EX
shell> arangoimp --file values.json --collection mydata --server.endpoint tcp://127.0.0.1:8529 --server.database mydb
imports JSON data from file values.json into collection mydata, using a different server endpoint and database
.EE
.SH AUTHOR .SH AUTHOR
Copyright triAGENS GmbH, Cologne, Germany Copyright triAGENS GmbH, Cologne, Germany

View File

@ -1,4 +1,4 @@
.TH arangorestore 1 "Fr 6. Sep 02:19:07 CEST 2013" "" "ArangoDB" .TH arangorestore 1 "Do 23. Jan 09:57:20 CET 2014" "" "ArangoDB"
.SH NAME .SH NAME
arangorestore - a data restore tool for the ArangoDB database arangorestore - a data restore tool for the ArangoDB database
.SH SYNOPSIS .SH SYNOPSIS
@ -42,7 +42,9 @@ database name to use when connection (default: "_system")
.IP "--server.username <string>" .IP "--server.username <string>"
username to use when connecting (default "root") username to use when connecting (default "root")
.IP "--server.password <string>" .IP "--server.password <string>"
password to use when connecting. Leave empty for a password prompt password to use when connecting. Don't specify this option to get a password prompt
.IP "--server.disable-authentication <boolean>"
disable the password prompt and authentication when connecting to the server
.SH EXAMPLES .SH EXAMPLES
.SH AUTHOR .SH AUTHOR

View File

@ -1,4 +1,4 @@
.TH arangosh 1 "So 30. Sep 01:36:14 CEST 2012" "" "ArangoDB" .TH arangosh 1 "Do 23. Jan 09:57:20 CET 2014" "" "ArangoDB"
.SH NAME .SH NAME
arangosh - the ArangoDB shell arangosh - the ArangoDB shell
.SH SYNOPSIS .SH SYNOPSIS
@ -13,6 +13,8 @@ online manual, available at http://www.arangodb.org/
The most important startup options are: The most important startup options are:
.IP "--audit-log <string>"
log input and output to audit log file <string>
.IP "--configuration <string>" .IP "--configuration <string>"
read configuration from file <string> read configuration from file <string>
.IP "--log.level <string>" .IP "--log.level <string>"
@ -20,32 +22,38 @@ set the log level (possible values: "fatal", "error", "warning", "info", "debug"
.IP "--server.endpoint <string>" .IP "--server.endpoint <string>"
server endpoint to connect to, consisting of protocol, ip address and port server endpoint to connect to, consisting of protocol, ip address and port
.IP "--server.database <string>" .IP "--server.database <string>"
database name to use when connection (default: "_system") database name to use when connection (default: "_system")
.IP "--server.username <string>" .IP "--server.username <string>"
username to use when connecting (default "root") username to use when connecting (default "root")
.IP "--server.password <string>" .IP "--server.password <string>"
password to use when connecting. Leave empty for a password prompt password to use when connecting. Don't specify this option to get a password prompt
.IP "--server.disable-authentication <boolean>"
disable the password prompt and authentication when connecting to the server
.SH EXAMPLES .SH EXAMPLES
.EX .EX
shell> arangosh shell> arangosh
starts arangosh with the default user and server endpoint starts arangosh with the default user and server endpoint
.EE .EE
.EX .EX
shell> arangosh --server.username fuchsia shell> arangosh --server.username fuchsia
starts arangosh with a specific user. Password prompt will follow starts arangosh with a specific user. Password prompt will follow if --server.disable-authentication is true.
.EE .EE
.EX .EX
shell> arangosh --server.username fuchsia --server.password "abcd@34" shell> arangosh --server.username fuchsia --server.password "abcd@34"
starts arangosh with a specific user and password given on command line starts arangosh with a specific user and password given on command line
.EE .EE
.EX .EX
shell> arangosh --server.endpoint tcp://192.168.173.13:8529 shell> arangosh --server.endpoint tcp://192.168.173.13:8529
starts arangosh connecting to a specific server starts arangosh connecting to a specific server
.EE .EE
.EX .EX
shell> arangosh --server.endpoint ssl://192.168.173.13:8530 shell> arangosh --server.endpoint ssl://192.168.173.13:8530
starts arangosh connecting to a specific server using an SSL connection starts arangosh connecting to a specific server using an SSL connection

View File

@ -1,4 +1,4 @@
.TH arango-dfdb 8 "So 30. Sep 01:36:14 CEST 2012" "" "ArangoDB" .TH arango-dfdb 8 "Do 23. Jan 09:57:20 CET 2014" "" "ArangoDB"
.SH NAME .SH NAME
arango-dfdb - a datafile debugger for ArangoDB arango-dfdb - a datafile debugger for ArangoDB
.SH SYNOPSIS .SH SYNOPSIS

View File

@ -1,4 +1,4 @@
.TH arangod 8 "So 30. Sep 01:36:14 CEST 2012" "" "ArangoDB" .TH arangod 8 "Do 23. Jan 09:57:20 CET 2014" "" "ArangoDB"
.SH NAME .SH NAME
arangod - the ArangoDB database server arangod - the ArangoDB database server
.SH SYNOPSIS .SH SYNOPSIS
@ -30,6 +30,8 @@ log to file <string>
set the log level (possible values: "fatal", "error", "warning", "info", "debug", "trace") set the log level (possible values: "fatal", "error", "warning", "info", "debug", "trace")
.IP "--server.endpoint <string>" .IP "--server.endpoint <string>"
listen endpoint for client requests, consisting of protocol, ip address and port listen endpoint for client requests, consisting of protocol, ip address and port
.IP "--server.disable-authentication <boolean>"
disable authentication for all clients
.IP "--database.directory <string>" .IP "--database.directory <string>"
path to the database directory path to the database directory
.SH EXAMPLES .SH EXAMPLES

View File

@ -1,4 +1,4 @@
.TH foxx-manager 8 "Fr 26. Jul 22:41:49 CEST 2013" "" "ArangoDB" .TH foxx-manager 8 "Do 23. Jan 09:57:20 CET 2014" "" "ArangoDB"
.SH NAME .SH NAME
foxx-manager - a Foxx application manager for ArangoDB foxx-manager - a Foxx application manager for ArangoDB
.SH SYNOPSIS .SH SYNOPSIS
@ -9,8 +9,14 @@ ArangoDB database server. Foxx applications can be installed and
uninstalled. uninstalled.
More specific instructions are displayed when the program is invoked. More specific instructions are displayed when the program is invoked.
.SH OPTIONS .SH OPTIONS
.IP "--server.database <string>"
database name to use when connection (default: "_system")
.IP "--server.username <string>"
username to use when connecting (default "root")
.IP "--server.password <string>"
password to use when connecting. Don't specify this option to get a password prompt
.IP "--server.disable-authentication <boolean>" .IP "--server.disable-authentication <boolean>"
disable the password prompt when connecting to the server disable the password prompt and authentication when connecting to the server
.SH EXAMPLES .SH EXAMPLES
.EX .EX
shell> foxx-manager search "foobar" shell> foxx-manager search "foobar"

View File

@ -1,4 +1,4 @@
.TH rcarangod 8 "So 30. Sep 01:36:14 CEST 2012" "" "ArangoDB" .TH rcarangod 8 "Do 23. Jan 09:57:20 CET 2014" "" "ArangoDB"
.SH NAME .SH NAME
rcarangod - control script for the ArangoDB database server rcarangod - control script for the ArangoDB database server
.SH SYNOPSIS .SH SYNOPSIS

View File

@ -42,12 +42,12 @@ disable the password prompt and authentication when connecting to the server END
EXAMPLES EXAMPLES
EXAMPLE COMMAND EXAMPLE COMMAND
starts COMMAND with the default user and server endpoint ENDEXAMPLE starts COMMAND with the default user and server endpoint ENDEXAMPLE
EXAMPLE COMMAND --server.username fuchsia EXAMPLE COMMAND --test-case version --requests 1000 --concurrency 1
starts COMMAND with a specific user. Password prompt will follow ENDEXAMPLE runs the 'version' test case with 1000 requests, without concurrency ENDEXAMPLE
EXAMPLE COMMAND --server.username fuchsia --server.password "abcd@34" EXAMPLE COMMAND --test-case document --requests 1000 --concurrency 2
starts COMMAND with a specific user and password given on command line ENDEXAMPLE runs the 'document' test case with 2000 requests, with concurrency 2 ENDEXAMPLE
EXAMPLE COMMAND --server.endpoint tcp://192.168.173.13:8529 EXAMPLE COMMAND --test-case document --requests 1000 --concurrency 2 --async true
starts COMMAND connecting to a specific server ENDEXAMPLE runs the 'document' test case with 2000 requests, with concurrency 2, with async requests ENDEXAMPLE
EXAMPLE COMMAND --server.endpoint ssl://192.168.173.13:8530 EXAMPLE COMMAND --test-case document --requests 1000 --concurrency 2 --batch-size 10
starts COMMAND connecting to a specific server using an SSL connection ENDEXAMPLE runs the 'document' test case with 2000 requests, with concurrency 2, using batch requests ENDEXAMPLE
AUTHOR AUTHOR

View File

@ -40,4 +40,10 @@ password to use when connecting. Don't specify this option to get a password pro
OPTION "--server.disable-authentication <boolean>" OPTION "--server.disable-authentication <boolean>"
disable the password prompt and authentication when connecting to the server ENDOPTION disable the password prompt and authentication when connecting to the server ENDOPTION
EXAMPLES EXAMPLES
EXAMPLE COMMAND --file heroes.json --type json --collection superheroes --create-collection true
imports JSON data from file heroes.json into collection superhoeres. creates the collection if it does not exist ENDEXAMPLE
EXAMPLE COMMAND --file export.csv --type csv --collection mydata
imports CSV data from export.csv into existing collection mydata ENDEXAMPLE
EXAMPLE COMMAND --file values.json --collection mydata --server.endpoint tcp://127.0.0.1:8529 --server.database mydb
imports JSON data from file values.json into collection mydata, using a different server endpoint and database ENDEXAMPLE
AUTHOR AUTHOR

View File

@ -202,7 +202,7 @@ static void ParseProgramOptions (int argc, char* argv[]) {
// and parse the command line and config file // and parse the command line and config file
ProgramOptions options; ProgramOptions options;
BaseClient.parse(options, description, argc, argv, "arangoirb.conf"); BaseClient.parse(options, description, "<options>", argc, argv, "arangoirb.conf");
// check module path // check module path
if (StartupModules.empty()) { if (StartupModules.empty()) {

View File

@ -256,6 +256,7 @@ void ArangoClient::setupServer (ProgramOptionsDescription& description) {
void ArangoClient::parse (ProgramOptions& options, void ArangoClient::parse (ProgramOptions& options,
ProgramOptionsDescription& description, ProgramOptionsDescription& description,
string const& example,
int argc, int argc,
char* argv[], char* argv[],
string const& initFilename) { string const& initFilename) {
@ -267,6 +268,9 @@ void ArangoClient::parse (ProgramOptions& options,
set<string> help = options.needHelp("help"); set<string> help = options.needHelp("help");
if (! help.empty()) { if (! help.empty()) {
if (! example.empty()) {
cout << "USAGE: " << argv[0] << " " << example << endl << endl;
}
cout << description.usage(help) << endl; cout << description.usage(help) << endl;
TRI_EXIT_FUNCTION(EXIT_SUCCESS, NULL); TRI_EXIT_FUNCTION(EXIT_SUCCESS, NULL);
} }

View File

@ -207,6 +207,7 @@ namespace triagens {
void parse (triagens::basics::ProgramOptions&, void parse (triagens::basics::ProgramOptions&,
triagens::basics::ProgramOptionsDescription& description, triagens::basics::ProgramOptionsDescription& description,
string const& example,
int argc, int argc,
char* argv[], char* argv[],
string const& initFilename); string const& initFilename);

View File

@ -220,7 +220,7 @@ static void ParseProgramOptions (int argc, char* argv[]) {
description.arguments(&arguments); description.arguments(&arguments);
ProgramOptions options; ProgramOptions options;
BaseClient.parse(options, description, argc, argv, "arangob.conf"); BaseClient.parse(options, description, "--concurrency <concurrency> --requests <request> --test-case <case> ...", argc, argv, "arangob.conf");
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////

View File

@ -192,7 +192,7 @@ static void ParseProgramOptions (int argc, char* argv[]) {
description.arguments(&arguments); description.arguments(&arguments);
ProgramOptions options; ProgramOptions options;
BaseClient.parse(options, description, argc, argv, "arangodump.conf"); BaseClient.parse(options, description, "", argc, argv, "arangodump.conf");
if (1 == arguments.size()) { if (1 == arguments.size()) {
OutputDirectory = arguments[0]; OutputDirectory = arguments[0];

View File

@ -170,7 +170,7 @@ static void ParseProgramOptions (int argc, char* argv[]) {
description.arguments(&arguments); description.arguments(&arguments);
ProgramOptions options; ProgramOptions options;
BaseClient.parse(options, description, argc, argv, "arangoimp.conf"); BaseClient.parse(options, description, "--file <file> --type <type> --collection <collection>", argc, argv, "arangoimp.conf");
if (FileName == "" && arguments.size() > 0) { if (FileName == "" && arguments.size() > 0) {
FileName = arguments[0]; FileName = arguments[0];

View File

@ -193,7 +193,7 @@ static void ParseProgramOptions (int argc, char* argv[]) {
description.arguments(&arguments); description.arguments(&arguments);
ProgramOptions options; ProgramOptions options;
BaseClient.parse(options, description, argc, argv, "arangorestore.conf"); BaseClient.parse(options, description, "", argc, argv, "arangorestore.conf");
if (1 == arguments.size()) { if (1 == arguments.size()) {
InputDirectory = arguments[0]; InputDirectory = arguments[0];

View File

@ -482,7 +482,7 @@ static vector<string> ParseProgramOptions (int argc, char* argv[]) {
TRI_FreeString(TRI_CORE_MEM_ZONE, p); TRI_FreeString(TRI_CORE_MEM_ZONE, p);
conf += ".conf"; conf += ".conf";
BaseClient.parse(options, description, argc, argv, conf); BaseClient.parse(options, description, "<options>", argc, argv, conf);
// set V8 options // set V8 options
v8::V8::SetFlagsFromCommandLine(&argc, argv, true); v8::V8::SetFlagsFromCommandLine(&argc, argv, true);

View File

@ -412,7 +412,7 @@ bool ApplicationServer::parse (int argc,
if (! help.empty()) { if (! help.empty()) {
// output help, but do not yet exit (we'll exit a little later so we can also // output help, but do not yet exit (we'll exit a little later so we can also
// check the specified configuration for errors) // check the specified configuration for errors)
cout << argv[0] << " " << _title << "\n\n" << _description.usage(help) << endl; cout << argv[0] << " " << _title << endl << endl << _description.usage(help) << endl;
} }
// check for version request // check for version request