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)
-------------------
* issue #744: Add usage example arangoimp from Command line
* issue #738: added __dirname, __filename pseudo-globals. Fixes #733. (@by pluma)
* 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
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

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
arangob - the ArangoDB benchmark and test tool
.SH SYNOPSIS
@ -32,35 +32,41 @@ complexity value for test case (meaning depends on test case)
.IP "--server.endpoint <string>"
server endpoint to connect to, consisting of protocol, ip address and port
.IP "--server.database <string>"
database name to use when connection (default: "_system")
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. 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
.EX
shell> arangob
starts arangob with the default user and server endpoint
.EE
.EX
shell> arangob --server.username fuchsia
starts arangob with a specific user. Password prompt will follow
.EE
.EX
shell> arangob --server.username fuchsia --server.password "abcd@34"
starts arangob with a specific user and password given on command line
shell> arangob --test-case version --requests 1000 --concurrency 1
runs the 'version' test case with 1000 requests, without concurrency
.EE
.EX
shell> arangob --server.endpoint tcp://192.168.173.13:8529
starts arangob connecting to a specific server
.EE
.EX
shell> arangob --server.endpoint ssl://192.168.173.13:8530
starts arangob connecting to a specific server using an SSL connection
shell> arangob --test-case document --requests 1000 --concurrency 2
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

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
arangodump - a tool to create logical dumps of an ArangoDB database
.SH SYNOPSIS
@ -51,7 +51,9 @@ 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. 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 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
arangoimp - a bulk importer for the ArangoDB database
.SH SYNOPSIS
@ -32,12 +32,29 @@ set to "json", "tsv" or "csv", depending on the input file format
.IP "--server.endpoint <string>"
server endpoint to connect to, consisting of protocol, ip address and port
.IP "--server.database <string>"
database name to use when connection (default: "_system")
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. 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
.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
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
arangorestore - a data restore tool for the ArangoDB database
.SH SYNOPSIS
@ -42,7 +42,9 @@ 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. 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 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
arangosh - the ArangoDB shell
.SH SYNOPSIS
@ -13,6 +13,8 @@ online manual, available at http://www.arangodb.org/
The most important startup options are:
.IP "--audit-log <string>"
log input and output to audit log file <string>
.IP "--configuration <string>"
read configuration from file <string>
.IP "--log.level <string>"
@ -20,32 +22,38 @@ set the log level (possible values: "fatal", "error", "warning", "info", "debug"
.IP "--server.endpoint <string>"
server endpoint to connect to, consisting of protocol, ip address and port
.IP "--server.database <string>"
database name to use when connection (default: "_system")
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. 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
.EX
shell> arangosh
starts arangosh with the default user and server endpoint
.EE
.EX
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
.EX
shell> arangosh --server.username fuchsia --server.password "abcd@34"
starts arangosh with a specific user and password given on command line
.EE
.EX
shell> arangosh --server.endpoint tcp://192.168.173.13:8529
starts arangosh connecting to a specific server
.EE
.EX
shell> arangosh --server.endpoint ssl://192.168.173.13:8530
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
arango-dfdb - a datafile debugger for ArangoDB
.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
arangod - the ArangoDB database server
.SH SYNOPSIS
@ -30,6 +30,8 @@ log to file <string>
set the log level (possible values: "fatal", "error", "warning", "info", "debug", "trace")
.IP "--server.endpoint <string>"
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>"
path to the database directory
.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
foxx-manager - a Foxx application manager for ArangoDB
.SH SYNOPSIS
@ -9,8 +9,14 @@ ArangoDB database server. Foxx applications can be installed and
uninstalled.
More specific instructions are displayed when the program is invoked.
.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>"
disable the password prompt when connecting to the server
disable the password prompt and authentication when connecting to the server
.SH EXAMPLES
.EX
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
rcarangod - control script for the ArangoDB database server
.SH SYNOPSIS

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -170,7 +170,7 @@ static void ParseProgramOptions (int argc, char* argv[]) {
description.arguments(&arguments);
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) {
FileName = arguments[0];

View File

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

View File

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

View File

@ -412,7 +412,7 @@ bool ApplicationServer::parse (int argc,
if (! help.empty()) {
// output help, but do not yet exit (we'll exit a little later so we can also
// 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