From 653bcd1e20488e2d1b2f2174325fd382f21e2df3 Mon Sep 17 00:00:00 2001 From: Frank Celler Date: Sat, 11 Jan 2014 12:00:18 +0100 Subject: [PATCH 01/45] TRI_HAVE_ICU is now longer used --- m4/all-in-one.icu | 2 +- m4/external.icu | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/m4/all-in-one.icu b/m4/all-in-one.icu index da33afb06f..be15ae73f8 100644 --- a/m4/all-in-one.icu +++ b/m4/all-in-one.icu @@ -26,7 +26,7 @@ AC_SUBST(ICU_LDFLAGS) AC_SUBST(ICU_LIBS) AC_SUBST(ICU_BUILT) -ICU_CPPFLAGS="${ICU_CPPFLAGS} -DTRI_ICU_VERSION='\"${TRI_ICU_VERSION}\"' -DTRI_HAVE_ICU=1" +ICU_CPPFLAGS="${ICU_CPPFLAGS} -DTRI_ICU_VERSION='\"${TRI_ICU_VERSION}\"'" dnl ---------------------------------------------------------------------------- dnl informational output diff --git a/m4/external.icu b/m4/external.icu index c6df18554e..24e05d146d 100644 --- a/m4/external.icu +++ b/m4/external.icu @@ -41,7 +41,7 @@ if test "x$tr_ICU" = xyes; then AC_MSG_ERROR([ICU config program "${ICU_CONFIG}" not found. Use supplied ICU from 3rdParty directory (--enable-all-in-one-icu).]) fi - ICU_CPPFLAGS="${ICU_CPPFLAGS} -DTRI_ICU_VERSION='\"${TRI_ICU_VERSION}\"' -DTRI_HAVE_ICU=1" + ICU_CPPFLAGS="${ICU_CPPFLAGS} -DTRI_ICU_VERSION='\"${TRI_ICU_VERSION}\"'" fi dnl ---------------------------------------------------------------------------- From c2c574d828dbc20ba3502ea3e555952b8313b9e9 Mon Sep 17 00:00:00 2001 From: Frank Celler Date: Thu, 16 Jan 2014 14:08:28 +0100 Subject: [PATCH 02/45] added missing encoding --- js/server/version-check.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 js/server/version-check.js diff --git a/js/server/version-check.js b/js/server/version-check.js old mode 100644 new mode 100755 index 01680b2be3..e9b01fcf55 --- a/js/server/version-check.js +++ b/js/server/version-check.js @@ -416,7 +416,7 @@ "do": "org/arangodb/actions/redirectRequest", options: { permanently: true, - destination: "/_db/" + db._name() + "/_admin/aardvark/index.html" + destination: "/_db/" + encodeURIComponent(db._name()) + "/_admin/aardvark/index.html" } }, priority: -1000000 From 87009c7e6e014ae89340bee085d18b3a89c65634 Mon Sep 17 00:00:00 2001 From: Frank Celler Date: Thu, 16 Jan 2014 14:08:45 +0100 Subject: [PATCH 03/45] added missing db prefix --- js/server/modules/org/arangodb/actions.js | 74 +++++++++++-------- .../modules/org/arangodb/foxx/manager.js | 3 +- 2 files changed, 47 insertions(+), 30 deletions(-) mode change 100644 => 100755 js/server/modules/org/arangodb/actions.js mode change 100644 => 100755 js/server/modules/org/arangodb/foxx/manager.js diff --git a/js/server/modules/org/arangodb/actions.js b/js/server/modules/org/arangodb/actions.js old mode 100644 new mode 100755 index b0994a5546..420e9201bf --- a/js/server/modules/org/arangodb/actions.js +++ b/js/server/modules/org/arangodb/actions.js @@ -1487,13 +1487,46 @@ function resultUnsupported (req, res, headers) { /// @brief internal function for handling redirects //////////////////////////////////////////////////////////////////////////////// -function handleRedirect (req, res, destination, headers) { +function handleRedirect (req, res, options, headers) { + var destination; + var url; + + destination = options.destination; + + if (destination.substr(0,5) !== "http:" && destination.substr(0,6) !== "https:") { + url = req.protocol + "://"; + + if (req.headers.hasOwnProperty('host')) { + url += req.headers.host; + } + else { + url += req.server.address + ":" + req.server.port; + } + + if (options.relative) { + var u = req.url; + + if (0 < u.length && u[u.length - 1] === '/') { + url += "/_db/" + encodeURIComponent(req.database) + u + destination; + } + else { + url += "/_db/" + encodeURIComponent(req.database) + u + "/" + destination; + } + } + else { + url += destination; + } + } + else { + url = destination; + } + res.contentType = "text/html"; res.body = "Moved" + "

Moved

This page has moved to " - + destination + + url + ".

"; if (headers !== undefined) { @@ -1503,56 +1536,39 @@ function handleRedirect (req, res, destination, headers) { res.headers = {}; } - res.headers.location = destination; + res.headers.location = url; } //////////////////////////////////////////////////////////////////////////////// /// @brief generates a permanently redirect /// -/// @FUN{actions.resultPermanentRedirect(@FA{req}, @FA{res}, @FA{destination}, @FA{headers})} +/// @FUN{actions.resultPermanentRedirect(@FA{req}, @FA{res}, @FA{options}, @FA{headers})} /// /// The function generates a redirect response. //////////////////////////////////////////////////////////////////////////////// -function resultPermanentRedirect (req, res, destination, headers) { +function resultPermanentRedirect (req, res, options, headers) { 'use strict'; res.responseCode = exports.HTTP_MOVED_PERMANENTLY; - if (destination.substr(0,5) !== "http:" && destination.substr(0,6) !== "https:") { - if (req.headers.hasOwnProperty('host')) { - destination = req.protocol - + "://" - + req.headers.host - + destination; - } - else { - destination = req.protocol - + "://" - + req.server.address - + ":" - + req.server.port - + destination; - } - } - - handleRedirect(req, res, destination, headers); + handleRedirect(req, res, options, headers); } //////////////////////////////////////////////////////////////////////////////// /// @brief generates a temporary redirect /// -/// @FUN{actions.resultTemporaryRedirect(@FA{req}, @FA{res}, @FA{destination}, @FA{headers})} +/// @FUN{actions.resultTemporaryRedirect(@FA{req}, @FA{res}, @FA{options}, @FA{headers})} /// /// The function generates a redirect response. //////////////////////////////////////////////////////////////////////////////// -function resultTemporaryRedirect (req, res, destination, headers) { +function resultTemporaryRedirect (req, res, options, headers) { 'use strict'; res.responseCode = exports.HTTP_TEMPORARY_REDIRECT; - handleRedirect(req, res, destination, headers); + handleRedirect(req, res, options, headers); } // ----------------------------------------------------------------------------- @@ -1867,10 +1883,10 @@ function redirectRequest (req, res, options, next) { 'use strict'; if (options.permanently) { - resultPermanentRedirect(req, res, options.destination); + resultPermanentRedirect(req, res, options); } else { - resultTemporaryRedirect(req, res, options.destination); + resultTemporaryRedirect(req, res, options); } } diff --git a/js/server/modules/org/arangodb/foxx/manager.js b/js/server/modules/org/arangodb/foxx/manager.js old mode 100644 new mode 100755 index 14f208c226..5a420997bf --- a/js/server/modules/org/arangodb/foxx/manager.js +++ b/js/server/modules/org/arangodb/foxx/manager.js @@ -642,7 +642,8 @@ function routingAalApp (app, mount, options) { "do" : "org/arangodb/actions/redirectRequest", "options" : { "permanently" : (app._id.substr(0,4) !== 'dev'), - "destination" : p + defaultDocument + "destination" : defaultDocument, + "relative" : true } } }); From d0c05f662838722579f9e5c10327e9b1ea52785d Mon Sep 17 00:00:00 2001 From: Frank Celler Date: Thu, 16 Jan 2014 14:16:47 +0100 Subject: [PATCH 04/45] fixed issue #734: foxx cookie and route problem --- CHANGELOG | 4 ++++ js/server/modules/org/arangodb/foxx/authentication.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) mode change 100644 => 100755 js/server/modules/org/arangodb/foxx/authentication.js diff --git a/CHANGELOG b/CHANGELOG index 95c01232d4..22ed2b851f 100755 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,10 +1,13 @@ v1.4.6 (XXXX-XX-XX) ------------------- +* fixed issue #734: foxx cookie and route problem + * added method `fm.configJson` for arangosh * include `startupPath` in result of API `/_api/foxx/config` + v1.4.5 (2014-01-15) ------------------- @@ -30,6 +33,7 @@ v1.4.5 (2014-01-15) * added override file "arangod.conf.local" (and co) + v1.4.4 (2013-12-24) ------------------- diff --git a/js/server/modules/org/arangodb/foxx/authentication.js b/js/server/modules/org/arangodb/foxx/authentication.js old mode 100644 new mode 100755 index 7d0277da76..12cf55eb40 --- a/js/server/modules/org/arangodb/foxx/authentication.js +++ b/js/server/modules/org/arangodb/foxx/authentication.js @@ -1017,7 +1017,7 @@ CookieAuthentication = function (applicationContext, options) { this._options = { name: options.name || this._applicationContext.name + "-session", lifetime: options.lifetime || 3600, - path: options.path || this._applicationContext.mount, + path: options.path || "/", domain: options.path || undefined, secure: options.secure || false, httpOnly: options.httpOnly || false From d7c3ac13c9241365fea4768c8a25387ca35a16b5 Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Thu, 16 Jan 2014 17:17:59 +0100 Subject: [PATCH 05/45] fixed compile warning --- lib/BasicsC/files.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/BasicsC/files.c b/lib/BasicsC/files.c index c1ad516ae9..c4d4d5ffba 100644 --- a/lib/BasicsC/files.c +++ b/lib/BasicsC/files.c @@ -281,7 +281,7 @@ static void ListTreeRecursively (char const* full, /// @brief locates a environment given configuration directory //////////////////////////////////////////////////////////////////////////////// -static char* LocateConfigDirectoryEnv () { +static char* LocateConfigDirectoryEnv (void) { char const* v; char* r; From 0ddf9996d848c0d739dd853209f4fd29c2a0fed7 Mon Sep 17 00:00:00 2001 From: Frank Celler Date: Fri, 17 Jan 2014 11:33:31 +0100 Subject: [PATCH 06/45] fix indentation --- Documentation/InstallationManual/InstallingTOC.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/InstallationManual/InstallingTOC.md b/Documentation/InstallationManual/InstallingTOC.md index 7fc2c994f2..568fd16578 100644 --- a/Documentation/InstallationManual/InstallingTOC.md +++ b/Documentation/InstallationManual/InstallingTOC.md @@ -3,8 +3,8 @@ TOC {#InstallingTOC} - @ref Installing - @ref InstallingLinux - - @ref InstallingLinuxPackageManager - - @ref InstallingDebian + - @ref InstallingLinuxPackageManager + - @ref InstallingDebian - @ref InstallingMacOSX - @ref InstallingMacOSXHomebrew - @ref InstallingMacOSXAppStore From c7380398d9047d5f3e602eabb4026156a88ca34e Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Fri, 17 Jan 2014 14:04:10 +0100 Subject: [PATCH 07/45] added fm.rescan() method --- CHANGELOG | 2 ++ js/actions/api-foxx.js | 18 ++++++++++++++++++ js/client/modules/org/arangodb/foxx/manager.js | 17 +++++++++++++++++ js/server/modules/org/arangodb/foxx/manager.js | 11 +++++++++++ 4 files changed, 48 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 22ed2b851f..a8fc04e555 100755 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,8 @@ v1.4.6 (XXXX-XX-XX) ------------------- +* added fm.rescan() method for Foxx-Manager + * fixed issue #734: foxx cookie and route problem * added method `fm.configJson` for arangosh diff --git a/js/actions/api-foxx.js b/js/actions/api-foxx.js index 00c8eaff14..b6d5fde6ed 100644 --- a/js/actions/api-foxx.js +++ b/js/actions/api-foxx.js @@ -145,6 +145,24 @@ actions.defineHttp({ } }) }); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief rescans the FOXX application directory +//////////////////////////////////////////////////////////////////////////////// + +actions.defineHttp({ + url : "_admin/foxx/rescan", + context : "admin", + prefix : false, + + callback: easyPostCallback({ + body: true, + callback: function (body) { + foxxManager.scanAppDirectory(); + return true; + } + }) +}); //////////////////////////////////////////////////////////////////////////////// /// @brief sets up a FOXX application diff --git a/js/client/modules/org/arangodb/foxx/manager.js b/js/client/modules/org/arangodb/foxx/manager.js index c085430a44..0b4659a438 100644 --- a/js/client/modules/org/arangodb/foxx/manager.js +++ b/js/client/modules/org/arangodb/foxx/manager.js @@ -684,6 +684,9 @@ exports.run = function (args) { exports.mount(args[1], args[2]); } } + else if (type === 'rescan') { + exports.rescan(); + } else if (type === 'setup') { exports.setup(args[1]); } @@ -822,6 +825,18 @@ exports.fetch = function (type, location, version) { return arangosh.checkRequestResult(res); }; +//////////////////////////////////////////////////////////////////////////////// +/// @brief rescans the FOXX application directory +//////////////////////////////////////////////////////////////////////////////// + +exports.rescan = function () { + 'use strict'; + + var res = arango.POST("/_admin/foxx/rescan", ""); + + return arangosh.checkRequestResult(res); +}; + //////////////////////////////////////////////////////////////////////////////// /// @brief mounts a FOXX application //////////////////////////////////////////////////////////////////////////////// @@ -1436,6 +1451,8 @@ exports.help = function () { "setup" : "setup executes the setup script (app must already be mounted)", "install" : "fetches a foxx application from the central foxx-apps repository, mounts it to a local URL " + "and sets it up", + "rescan" : "rescans the foxx application directory on the server side (only needed if server-side apps " + + "directory is modified by other processes)", "replace" : "replaces an aleady existing foxx application with the current local version", "teardown" : "teardown execute the teardown script (app must be still be mounted)", "unmount" : "unmounts a mounted foxx application", diff --git a/js/server/modules/org/arangodb/foxx/manager.js b/js/server/modules/org/arangodb/foxx/manager.js index 5a420997bf..149f9ae471 100755 --- a/js/server/modules/org/arangodb/foxx/manager.js +++ b/js/server/modules/org/arangodb/foxx/manager.js @@ -823,6 +823,17 @@ exports.scanAppDirectory = function () { scanDirectory(module.appPath()); }; +//////////////////////////////////////////////////////////////////////////////// +/// @brief rescans the FOXX application directory +/// this function is a trampoline for scanAppDirectory +/// the shorter function name is only here to keep compatibility with the +/// client-side foxx manager +//////////////////////////////////////////////////////////////////////////////// + +exports.rescan = function () { + return exports.scanAppDirectory(); +}; + //////////////////////////////////////////////////////////////////////////////// /// @brief mounts a FOXX application /// From 622edb0fee9d2dab81ade7fbe221730aab62eea4 Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Fri, 17 Jan 2014 17:10:06 +0100 Subject: [PATCH 08/45] updated documentation --- lib/Admin/RestJobHandler.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/Admin/RestJobHandler.cpp b/lib/Admin/RestJobHandler.cpp index 4f005d83bf..25c1dffb22 100644 --- a/lib/Admin/RestJobHandler.cpp +++ b/lib/Admin/RestJobHandler.cpp @@ -413,15 +413,12 @@ void RestJobHandler::getJob () { /// /// @RESTURLPARAM{type,string,required} /// The type of jobs to delete. `type` can be: -/// /// - `all`: deletes all jobs results. Currently executing or queued async jobs /// will not be stopped by this call. -/// /// - `expired`: deletes expired results. To determine the expiration status of /// a result, pass the `stamp` URL parameter. `stamp` needs to be a UNIX /// timestamp, and all async job results created at a lower timestamp will be /// deleted. -/// /// - an actual job-id: in this case, the call will remove the result of the /// specified async job. If the job is currently executing or queued, it will /// not be aborted. From 583878176b6b9a0df24949160ac5851c3ab79ee1 Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Fri, 17 Jan 2014 22:39:04 +0100 Subject: [PATCH 09/45] issue #736: AQL function to parse collection and key from document handle Conflicts: CHANGELOG --- CHANGELOG | 111 +++++++++++++++++++++ Documentation/UserManual/Aql.md | 13 +++ arangod/Ahuacatl/ahuacatl-functions.c | 1 + js/server/modules/org/arangodb/ahuacatl.js | 31 ++++++ js/server/tests/ahuacatl-functions.js | 84 ++++++++++++++++ 5 files changed, 240 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index a8fc04e555..e7c8db9a56 100755 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,117 @@ +v1.5.0 (XXXX-XX-XX) +------------------- + +* issue #738: added __dirname, __filename pseudo-globals. Fixes #733. (@by pluma) + +* allow `\n` (as well as `\r\n`) as line terminator in batch requests sent to + `/_api/batch` HTTP API. + +* use `--data-binary` instead of `--data` parameter in generated cURL examples + +* issue #703: Also show path of logfile for fm.config() + +* issue #675: Dropping a collection used in "graph" module breaks the graph + +* added "static" Graph.drop() method for graphs API + +* fixed issue #695: arangosh server.password error + +* use pretty-printing in `--console` mode by defaul + +* added `check-server` binary for testing + +* simplified ArangoDB startup options + + Some startup options are now superfluous or their usage is simplified. The + following options have been changed: + + * `--javascript.modules-path`: this option has been removed. The modules paths + are determined by arangod and arangosh automatically based on the value of + `--javascript.startup-directory`. + + If the option is set on startup, it is ignored so startup will not abort with + an error `unrecognized option`. + + * `--javascript.action-directory`: this option has been removed. The actions + directory is determined by arangod automatically based on the value of + `--javascript.startup-directory`. + + If the option is set on startup, it is ignored so startup will not abort with + an error `unrecognized option`. + + * `--javascript.package-path`: this option is still available but it is not + required anymore to set the standard package paths (e.g. `js/npm`). arangod + will automatically use this standard package path regardless of whether it + was specified via the options. + + It is possible to use this option to add additional package paths to the + standard value. + + Configuration files included with arangod are adjusted accordingly. + +* layout of the graphs tab adapted to better fit with the other tabs + +* database selection is moved to the bottom right corner of the web interface + +* removed priority queues + + this feature was never advertised nor documented nor tested. + +* display internal attributes in document source view of web interface + +* removed separate shape collections + + When upgrading to ArangoDB 1.5, existing collections will be converted to include + shapes and attribute markers in the datafiles instead of using separate files for + shapes. + + When a collection is converted, existing shapes from the SHAPES directory will + be written to a new datafile in the collection directory, and the SHAPES directory + will be removed afterwards. + + This saves up to 2 MB of memory and disk space for each collection + (savings are higher, the less different shapes there are in a collection). + Additionally, one less file descriptor per opened collection will be used. + + When creating a new collection, the amount of sync calls may be reduced. The same + may be true for documents with yet-unknown shapes. This may help performance + in these cases. + +* added AQL functions `NTH` and `POSITION` + +* added signal handler for arangosh to save last command in more cases + +* added extra prompt placeholders for arangosh: + - `%e`: current endpoint + - `%u`: current user + +* added arangosh option `--javascript.gc-interval` to control amount of + garbage collection performed by arangosh + +* fixed issue #651: Allow addEdge() to take vertex ids in the JS library + +* removed command-line option `--log.format` + + In previous versions, this option did not have an effect for most log messages, so + it got removed. + +* removed C++ logger implementation + + Logging inside ArangoDB is now done using the LOG_XXX() macros. The LOGGER_XXX() + macros are gone. + +* added collection status "loading" + +* added the option to return the number of elements indexed to the + result of .getIndexes() for each index. This is + currently only implemented for hash indices and skiplist indices. + + v1.4.6 (XXXX-XX-XX) ------------------- +* issue #736: AQL function to parse collection and key from document handle + * added fm.rescan() method for Foxx-Manager * fixed issue #734: foxx cookie and route problem diff --git a/Documentation/UserManual/Aql.md b/Documentation/UserManual/Aql.md index 5d80b71d38..07d54e00dc 100644 --- a/Documentation/UserManual/Aql.md +++ b/Documentation/UserManual/Aql.md @@ -1249,6 +1249,19 @@ AQL supports the following functions to operate on document values: RETURN KEEP(doc, 'firstname', 'name', 'likes') +- @FN{PARSE_IDENTIFIER(@FA{document-handle})}: parses the document handle specified in + @FA{document-handle} and returns a the handle's individual parts a separate attributes. + This function can be used to easily determine the collection name and key from a given document. + The @FA{document-handle} can either be a regular document from a collection, or a document + identifier string (e.g. `_users/1234`). Passing either a non-string or a non-document or a + document without an `_id` attribute will result in an error. + + RETURN PARSE_IDENTIFIER('_users/my-user') + [ { "collection" : "_users", "key" : "my-user" } ] + + RETURN PARSE_IDENTIFIER({ "_id" : "mycollection/mykey", "value" : "some value" }) + [ { "collection" : "mycollection", "key" : "mykey" } ] + @subsubsection AqlFunctionsGeo Geo functions AQL offers the following functions to filter data based on geo indexes: diff --git a/arangod/Ahuacatl/ahuacatl-functions.c b/arangod/Ahuacatl/ahuacatl-functions.c index 1ef9d070ec..c7abace7d0 100644 --- a/arangod/Ahuacatl/ahuacatl-functions.c +++ b/arangod/Ahuacatl/ahuacatl-functions.c @@ -712,6 +712,7 @@ TRI_associative_pointer_t* TRI_CreateFunctionsAql (void) { REGISTER_FUNCTION("NOT_NULL", "NOT_NULL", true, false, ".|+", NULL); REGISTER_FUNCTION("FIRST_LIST", "FIRST_LIST", true, false, ".|+", NULL); REGISTER_FUNCTION("FIRST_DOCUMENT", "FIRST_DOCUMENT", true, false, ".|+", NULL); + REGISTER_FUNCTION("PARSE_IDENTIFIER", "PARSE_IDENTIFIER", true, false, ".", NULL); if (! result) { TRI_FreeFunctionsAql(functions); diff --git a/js/server/modules/org/arangodb/ahuacatl.js b/js/server/modules/org/arangodb/ahuacatl.js index 19e0eb6f4a..50dbd34a72 100644 --- a/js/server/modules/org/arangodb/ahuacatl.js +++ b/js/server/modules/org/arangodb/ahuacatl.js @@ -3217,6 +3217,36 @@ function FIRST_DOCUMENT () { return null; } +//////////////////////////////////////////////////////////////////////////////// +/// @brief return the parts of a document identifier separately +/// +/// returns a document with the attributes `collection` and `key` or fails if +/// the individual parts cannot be determined. +//////////////////////////////////////////////////////////////////////////////// + +function PARSE_IDENTIFIER (value) { + "use strict"; + + if (TYPEWEIGHT(value) === TYPEWEIGHT_STRING) { + var parts = value.split('/'); + if (parts.length === 2) { + return { + collection: parts[0], + key: parts[1] + }; + } + // fall through intentional + } + else if (TYPEWEIGHT(value) === TYPEWEIGHT_DOCUMENT) { + if (value.hasOwnProperty('_id')) { + return PARSE_IDENTIFIER(value._id); + } + // fall through intentional + } + + THROW(INTERNAL.errors.ERROR_QUERY_FUNCTION_ARGUMENT_TYPE_MISMATCH, "PARSE_IDENTIFIER"); +} + //////////////////////////////////////////////////////////////////////////////// /// @brief check whether a document has a specific attribute //////////////////////////////////////////////////////////////////////////////// @@ -4009,6 +4039,7 @@ exports.GRAPH_NEIGHBORS = GRAPH_NEIGHBORS; exports.NOT_NULL = NOT_NULL; exports.FIRST_LIST = FIRST_LIST; exports.FIRST_DOCUMENT = FIRST_DOCUMENT; +exports.PARSE_IDENTIFIER = PARSE_IDENTIFIER; exports.HAS = HAS; exports.ATTRIBUTES = ATTRIBUTES; exports.UNSET = UNSET; diff --git a/js/server/tests/ahuacatl-functions.js b/js/server/tests/ahuacatl-functions.js index 0a5501910c..8abf40d3a8 100644 --- a/js/server/tests/ahuacatl-functions.js +++ b/js/server/tests/ahuacatl-functions.js @@ -1726,6 +1726,90 @@ function ahuacatlFunctionsTestSuite () { assertEqual(expected, actual); }, +//////////////////////////////////////////////////////////////////////////////// +/// @brief test parse identifier function +//////////////////////////////////////////////////////////////////////////////// + + testParseIdentifier : function () { + var actual; + + actual = getQueryResults("RETURN PARSE_IDENTIFIER('foo/bar')"); + assertEqual([ { collection: 'foo', key: 'bar' } ], actual); + + actual = getQueryResults("RETURN PARSE_IDENTIFIER('this-is-a-collection-name/and-this-is-an-id')"); + assertEqual([ { collection: 'this-is-a-collection-name', key: 'and-this-is-an-id' } ], actual); + + actual = getQueryResults("RETURN PARSE_IDENTIFIER('MY_COLLECTION/MY_DOC')"); + assertEqual([ { collection: 'MY_COLLECTION', key: 'MY_DOC' } ], actual); + + actual = getQueryResults("RETURN PARSE_IDENTIFIER('_users/AbC')"); + assertEqual([ { collection: '_users', key: 'AbC' } ], actual); + + actual = getQueryResults("RETURN PARSE_IDENTIFIER({ _id: 'foo/bar', value: 'baz' })"); + assertEqual([ { collection: 'foo', key: 'bar' } ], actual); + + actual = getQueryResults("RETURN PARSE_IDENTIFIER({ ignore: true, _id: '_system/VALUE', value: 'baz' })"); + assertEqual([ { collection: '_system', key: 'VALUE' } ], actual); + + actual = getQueryResults("RETURN PARSE_IDENTIFIER({ value: 123, _id: 'Some-Odd-Collection/THIS_IS_THE_KEY' })"); + assertEqual([ { collection: 'Some-Odd-Collection', key: 'THIS_IS_THE_KEY' } ], actual); + }, + +//////////////////////////////////////////////////////////////////////////////// +/// @brief test parse identifier function +//////////////////////////////////////////////////////////////////////////////// + + testParseIdentifierCollection : function () { + var cn = "UnitTestsAhuacatlFunctions"; + + internal.db._drop(cn); + var cx = internal.db._create(cn); + cx.save({ "title" : "123", "value" : 456, "_key" : "foobar" }); + cx.save({ "_key" : "so-this-is-it", "title" : "nada", "value" : 123 }); + + var expected, actual; + + expected = [ { collection: cn, key: "foobar" } ]; + actual = getQueryResults("RETURN PARSE_IDENTIFIER(DOCUMENT(CONCAT(@cn, '/', @key)))", { cn: cn, key: "foobar" }); + assertEqual(expected, actual); + + expected = [ { collection: cn, key: "foobar" } ]; + actual = getQueryResults("RETURN PARSE_IDENTIFIER(DOCUMENT(CONCAT(@cn, '/', @key)))", { cn: cn, key: "foobar" }); + assertEqual(expected, actual); + + expected = [ { collection: cn, key: "foobar" } ]; + actual = getQueryResults("RETURN PARSE_IDENTIFIER(DOCUMENT(CONCAT(@cn, '/', 'foobar')))", { cn: cn }); + assertEqual(expected, actual); + + expected = [ { collection: cn, key: "foobar" } ]; + actual = getQueryResults("RETURN PARSE_IDENTIFIER(DOCUMENT([ @key ])[0])", { key: "UnitTestsAhuacatlFunctions/foobar" }); + assertEqual(expected, actual); + + expected = [ { collection: cn, key: "so-this-is-it" } ]; + actual = getQueryResults("RETURN PARSE_IDENTIFIER(DOCUMENT([ 'UnitTestsAhuacatlFunctions/so-this-is-it' ])[0])"); + assertEqual(expected, actual); + + internal.db._drop(cn); + }, + +//////////////////////////////////////////////////////////////////////////////// +/// @brief test parse identifier function +//////////////////////////////////////////////////////////////////////////////// + + testParseIdentifier : function () { + assertQueryError(errors.ERROR_QUERY_FUNCTION_ARGUMENT_NUMBER_MISMATCH.code, "RETURN PARSE_IDENTIFIER()"); + assertQueryError(errors.ERROR_QUERY_FUNCTION_ARGUMENT_NUMBER_MISMATCH.code, "RETURN PARSE_IDENTIFIER('foo', 'bar')"); + assertQueryError(errors.ERROR_QUERY_FUNCTION_ARGUMENT_TYPE_MISMATCH.code, "RETURN PARSE_IDENTIFIER(null)"); + assertQueryError(errors.ERROR_QUERY_FUNCTION_ARGUMENT_TYPE_MISMATCH.code, "RETURN PARSE_IDENTIFIER(false)"); + assertQueryError(errors.ERROR_QUERY_FUNCTION_ARGUMENT_TYPE_MISMATCH.code, "RETURN PARSE_IDENTIFIER(3)"); + assertQueryError(errors.ERROR_QUERY_FUNCTION_ARGUMENT_TYPE_MISMATCH.code, "RETURN PARSE_IDENTIFIER(\"foo\")"); + assertQueryError(errors.ERROR_QUERY_FUNCTION_ARGUMENT_TYPE_MISMATCH.code, "RETURN PARSE_IDENTIFIER('foo bar')"); + assertQueryError(errors.ERROR_QUERY_FUNCTION_ARGUMENT_TYPE_MISMATCH.code, "RETURN PARSE_IDENTIFIER('foo/bar/baz')"); + assertQueryError(errors.ERROR_QUERY_FUNCTION_ARGUMENT_TYPE_MISMATCH.code, "RETURN PARSE_IDENTIFIER([ ])"); + assertQueryError(errors.ERROR_QUERY_FUNCTION_ARGUMENT_TYPE_MISMATCH.code, "RETURN PARSE_IDENTIFIER({ })"); + assertQueryError(errors.ERROR_QUERY_FUNCTION_ARGUMENT_TYPE_MISMATCH.code, "RETURN PARSE_IDENTIFIER({ foo: 'bar' })"); + }, + //////////////////////////////////////////////////////////////////////////////// /// @brief test document function //////////////////////////////////////////////////////////////////////////////// From 5c5b787e835639a0855d0df87cfbe1096ff58d6c Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Sat, 18 Jan 2014 01:22:26 +0100 Subject: [PATCH 10/45] slightly updated error messages --- arangosh/V8Client/arangoimp.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/arangosh/V8Client/arangoimp.cpp b/arangosh/V8Client/arangoimp.cpp index df331cc388..96bafe932b 100644 --- a/arangosh/V8Client/arangoimp.cpp +++ b/arangosh/V8Client/arangoimp.cpp @@ -304,7 +304,8 @@ int main (int argc, char* argv[]) { BaseClient.sslProtocol(), false); - if (! ClientConnection->isConnected() || ClientConnection->getLastHttpReturnCode() != HttpResponse::OK) { + if (! ClientConnection->isConnected() || + ClientConnection->getLastHttpReturnCode() != HttpResponse::OK) { cerr << "Could not connect to endpoint '" << BaseClient.endpointServer()->getSpecification() << "', database: '" << BaseClient.databaseName() << "'" << endl; cerr << "Error message: '" << ClientConnection->getErrorMessage() << "'" << endl; @@ -359,18 +360,18 @@ int main (int argc, char* argv[]) { // collection name if (CollectionName == "") { - cerr << "collection name is missing." << endl; + cerr << "Collection name is missing." << endl; TRI_EXIT_FUNCTION(EXIT_FAILURE, NULL); } // filename if (FileName == "") { - cerr << "file name is missing." << endl; + cerr << "File name is missing." << endl; TRI_EXIT_FUNCTION(EXIT_FAILURE, NULL); } if (FileName != "-" && ! FileUtils::isRegularFile(FileName)) { - cerr << "file '" << FileName << "' is not a regular file." << endl; + cerr << "Cannot open file '" << FileName << "'" << endl; TRI_EXIT_FUNCTION(EXIT_FAILURE, NULL); } @@ -416,9 +417,6 @@ int main (int argc, char* argv[]) { cerr << "error message: " << ih.getErrorMessage() << endl; } - // calling dispose in V8 3.10.x causes a segfault. the v8 docs says its not necessary to call it upon program termination - // v8::V8::Dispose(); - TRIAGENS_REST_SHUTDOWN; arangoimpExitFunction(ret, NULL); From 259b748e223aad62e00213d310220f73aa774235 Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Sat, 18 Jan 2014 01:44:51 +0100 Subject: [PATCH 11/45] some more notes on importing edges and attribute meanings --- Documentation/ToolsManual/ImpManual.md | 50 ++++++++++++++++++++++- Documentation/ToolsManual/ImpManualTOC.md | 2 + 2 files changed, 51 insertions(+), 1 deletion(-) diff --git a/Documentation/ToolsManual/ImpManual.md b/Documentation/ToolsManual/ImpManual.md index ee8d0611db..083ca54a5a 100644 --- a/Documentation/ToolsManual/ImpManual.md +++ b/Documentation/ToolsManual/ImpManual.md @@ -52,7 +52,8 @@ specify a password, you will be prompted for one. Note that the collection (`users` in this case) must already exist or the import will fail. If you want to create a new collection with the import data, you need to specify the `--create-collection` option. Note that it is only possible to -create a document collection using the `--create-collection` flag. +create a document collection using the `--create-collection` flag, and no edge +collections. unix> arangoimp --file "data.json" --type json --collection "users" --create-collection true @@ -114,3 +115,50 @@ with the `--separator` argument. An example command line to execute the TSV import is: unix> arangoimp --file "data.tsv" --type tsv --collection "users" + +Importing into an Edge Collection {#ImpManualEdges} +=================================================== + +arangoimp can also be used to import data into an existing edge collection. +The import data must, for each edge to import, contain at least the `_from` and +`_to` attributes. These indicate which other two documents the edge should connect. +It is necessary that these attributes are set for all records, and point to +valid document ids in existing collections. + +Example: + + { "_from" : "users/1234", "_to" : "users/4321", "desc" : "1234 is connected to 4321" } + +Note that the edge collection must already exist when the import is started. Using +the `--create-collection` flag will not work because arangoimp will always try to +create a regular document collection if the target collection does not exist. + +Attribute Naming and Special Attributes {#ImpManualAttributes} +============================================================== + +Attributes whose names start with an underscore are treated in a special way by +ArangoDB: + +- the optional `_key` attribute contains the document's key. If specified, the value + must be formally valid (e.g. must be a string and conform to the naming conventions + for @ref DocumentKeys). Additionally, the key value must be unique within the + collection the import is run for. +- `_from`: when importing into an edge collection, this attribute contains the id + of one of the documents connected by the edge. The value of `_from` must be a + syntactially valid document id and the referred collection must exist. +- `_to`: when importing into an edge collection, this attribute contains the id + of the other document connected by the edge. The value of `_to` must be a + syntactially valid document id and the referred collection must exist. +- `_rev`: this attribute contains the revision number of a document. However, the + revision numbers are managed by ArangoDB and cannot be specified on import. Thus + any value in this attribute is ignored on import. +- all other attributes starting with an underscore are discarded on import without + any warnings. + +If you import values into `_key`, you should make sure they are valid and unique. + +When importing data into an edge collection, you should make sure that all import +documents can `_from` and `_to` and that their values point to existing documents. + +Finally you should make sure that all other attributes in the import file do not +start with an underscore - otherwise they might be discarded. diff --git a/Documentation/ToolsManual/ImpManualTOC.md b/Documentation/ToolsManual/ImpManualTOC.md index 9fc77f0fe6..dd3e2a9fbe 100644 --- a/Documentation/ToolsManual/ImpManualTOC.md +++ b/Documentation/ToolsManual/ImpManualTOC.md @@ -5,3 +5,5 @@ TOC {#ImpManualTOC} - @ref ImpManualJson - @ref ImpManualCsv - @ref ImpManualTsv + - @ref ImpManualEdges + - @ref ImpManualAttributes From 251c2fa44837430f809d4e005197d24918a40da4 Mon Sep 17 00:00:00 2001 From: Frank Celler Date: Mon, 20 Jan 2014 22:09:44 +0100 Subject: [PATCH 12/45] release version 1.4.6 --- CHANGELOG | 111 +------- Makefile.in | 19 +- VERSION | 2 +- aclocal.m4 | 154 ++++++++--- build.h | 2 +- config/config.guess | 30 ++- config/config.sub | 17 +- config/missing | 4 +- configure | 247 ++++++++---------- configure.ac | 2 +- js/apps/system/aardvark/api-docs.json | 2 +- js/apps/system/aardvark/api-docs/batch.json | 2 +- .../system/aardvark/api-docs/database.json | 2 +- .../system/aardvark/api-docs/endpoint.json | 2 +- js/apps/system/aardvark/api-docs/job.json | 6 +- .../system/aardvark/api-docs/replication.json | 10 +- js/apps/system/aardvark/api-docs/system.json | 2 +- 17 files changed, 290 insertions(+), 324 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index e7c8db9a56..a41c2378fe 100755 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,113 +1,4 @@ -v1.5.0 (XXXX-XX-XX) -------------------- - -* issue #738: added __dirname, __filename pseudo-globals. Fixes #733. (@by pluma) - -* allow `\n` (as well as `\r\n`) as line terminator in batch requests sent to - `/_api/batch` HTTP API. - -* use `--data-binary` instead of `--data` parameter in generated cURL examples - -* issue #703: Also show path of logfile for fm.config() - -* issue #675: Dropping a collection used in "graph" module breaks the graph - -* added "static" Graph.drop() method for graphs API - -* fixed issue #695: arangosh server.password error - -* use pretty-printing in `--console` mode by defaul - -* added `check-server` binary for testing - -* simplified ArangoDB startup options - - Some startup options are now superfluous or their usage is simplified. The - following options have been changed: - - * `--javascript.modules-path`: this option has been removed. The modules paths - are determined by arangod and arangosh automatically based on the value of - `--javascript.startup-directory`. - - If the option is set on startup, it is ignored so startup will not abort with - an error `unrecognized option`. - - * `--javascript.action-directory`: this option has been removed. The actions - directory is determined by arangod automatically based on the value of - `--javascript.startup-directory`. - - If the option is set on startup, it is ignored so startup will not abort with - an error `unrecognized option`. - - * `--javascript.package-path`: this option is still available but it is not - required anymore to set the standard package paths (e.g. `js/npm`). arangod - will automatically use this standard package path regardless of whether it - was specified via the options. - - It is possible to use this option to add additional package paths to the - standard value. - - Configuration files included with arangod are adjusted accordingly. - -* layout of the graphs tab adapted to better fit with the other tabs - -* database selection is moved to the bottom right corner of the web interface - -* removed priority queues - - this feature was never advertised nor documented nor tested. - -* display internal attributes in document source view of web interface - -* removed separate shape collections - - When upgrading to ArangoDB 1.5, existing collections will be converted to include - shapes and attribute markers in the datafiles instead of using separate files for - shapes. - - When a collection is converted, existing shapes from the SHAPES directory will - be written to a new datafile in the collection directory, and the SHAPES directory - will be removed afterwards. - - This saves up to 2 MB of memory and disk space for each collection - (savings are higher, the less different shapes there are in a collection). - Additionally, one less file descriptor per opened collection will be used. - - When creating a new collection, the amount of sync calls may be reduced. The same - may be true for documents with yet-unknown shapes. This may help performance - in these cases. - -* added AQL functions `NTH` and `POSITION` - -* added signal handler for arangosh to save last command in more cases - -* added extra prompt placeholders for arangosh: - - `%e`: current endpoint - - `%u`: current user - -* added arangosh option `--javascript.gc-interval` to control amount of - garbage collection performed by arangosh - -* fixed issue #651: Allow addEdge() to take vertex ids in the JS library - -* removed command-line option `--log.format` - - In previous versions, this option did not have an effect for most log messages, so - it got removed. - -* removed C++ logger implementation - - Logging inside ArangoDB is now done using the LOG_XXX() macros. The LOGGER_XXX() - macros are gone. - -* added collection status "loading" - -* added the option to return the number of elements indexed to the - result of .getIndexes() for each index. This is - currently only implemented for hash indices and skiplist indices. - - -v1.4.6 (XXXX-XX-XX) +v1.4.6 (2014-01-20) ------------------- * issue #736: AQL function to parse collection and key from document handle diff --git a/Makefile.in b/Makefile.in index a307725070..8fddb08a7f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. @@ -2122,8 +2122,8 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): config/config.h: config/stamp-h1 - @if test ! -f $@; then rm -f config/stamp-h1; else :; fi - @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) config/stamp-h1; else :; fi + @test -f $@ || rm -f config/stamp-h1 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) config/stamp-h1 config/stamp-h1: $(top_srcdir)/config/config.h.in $(top_builddir)/config.status @rm -f config/stamp-h1 @@ -2134,8 +2134,8 @@ $(top_srcdir)/config/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) touch $@ lib/BasicsC/local-configuration.h: lib/BasicsC/stamp-h2 - @if test ! -f $@; then rm -f lib/BasicsC/stamp-h2; else :; fi - @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) lib/BasicsC/stamp-h2; else :; fi + @test -f $@ || rm -f lib/BasicsC/stamp-h2 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) lib/BasicsC/stamp-h2 lib/BasicsC/stamp-h2: $(top_srcdir)/lib/BasicsC/local-configuration.h.in $(top_builddir)/config.status @rm -f lib/BasicsC/stamp-h2 @@ -7087,10 +7087,16 @@ dist-xz: distdir $(am__post_remove_distdir) dist-tarZ: distdir + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) @@ -7132,9 +7138,10 @@ distcheck: dist && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + && ../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ + --srcdir=.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ diff --git a/VERSION b/VERSION index e516bb9d96..c514bd85c2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.4.5 +1.4.6 diff --git a/aclocal.m4 b/aclocal.m4 index ff0cf18e03..15ce39c029 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,4 +1,4 @@ -# generated automatically by aclocal 1.13.4 -*- Autoconf -*- +# generated automatically by aclocal 1.14.1 -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. @@ -32,10 +32,10 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.]) # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.13' +[am__api_version='1.14' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.13.4], [], +m4_if([$1], [1.14.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -51,7 +51,7 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.13.4])dnl +[AM_AUTOMAKE_VERSION([1.14.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) @@ -418,6 +418,12 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. +dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. +m4_define([AC_PROG_CC], +m4_defn([AC_PROG_CC]) +[_AM_PROG_CC_C_O +]) + # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- @@ -526,7 +532,48 @@ dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl -]) + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) + fi +fi]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further @@ -534,7 +581,6 @@ dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. @@ -682,38 +728,6 @@ AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) -# Copyright (C) 1999-2013 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_CC_C_O -# -------------- -# Like AC_PROG_CC_C_O, but changed for automake. -AC_DEFUN([AM_PROG_CC_C_O], -[AC_REQUIRE([AC_PROG_CC_C_O])dnl -AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([compile])dnl -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -dnl Make sure AC_PROG_CC is never called again, or it will override our -dnl setting of CC. -m4_define([AC_PROG_CC], - [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) -]) - # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2013 Free Software Foundation, Inc. @@ -784,6 +798,70 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) +# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_PROG_CC_C_O +# --------------- +# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC +# to automatically call this. +AC_DEFUN([_AM_PROG_CC_C_O], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl +AC_LANG_PUSH([C])dnl +AC_CACHE_CHECK( + [whether $CC understands -c and -o together], + [am_cv_prog_cc_c_o], + [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i]) +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +AC_LANG_POP([C])]) + +# For backward compatibility. +AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_RUN_LOG(COMMAND) +# ------------------- +# Run COMMAND, save the exit status in ac_status, and log it. +# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) +AC_DEFUN([AM_RUN_LOG], +[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + (exit $ac_status); }]) + # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. diff --git a/build.h b/build.h index acf6e6d1b4..d648255456 100644 --- a/build.h +++ b/build.h @@ -1 +1 @@ -#define TRI_VERSION "1.4.5" +#define TRI_VERSION "1.4.6" diff --git a/config/config.guess b/config/config.guess index b79252d6b1..9afd676206 100755 --- a/config/config.guess +++ b/config/config.guess @@ -2,7 +2,7 @@ # Attempt to guess a canonical system name. # Copyright 1992-2013 Free Software Foundation, Inc. -timestamp='2013-06-10' +timestamp='2013-11-29' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -1260,16 +1260,26 @@ EOF if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - case $UNAME_PROCESSOR in - i386) UNAME_PROCESSOR=x86_64 ;; - powerpc) UNAME_PROCESSOR=powerpc64 ;; - esac + if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; diff --git a/config/config.sub b/config/config.sub index 8b612ab89d..61cb4bc22d 100755 --- a/config/config.sub +++ b/config/config.sub @@ -2,7 +2,7 @@ # Configuration validation subroutine script. # Copyright 1992-2013 Free Software Foundation, Inc. -timestamp='2013-04-24' +timestamp='2013-10-01' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -257,7 +257,7 @@ case $basic_machine in | avr | avr32 \ | be32 | be64 \ | bfin \ - | c4x | clipper \ + | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv \ @@ -265,6 +265,7 @@ case $basic_machine in | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ + | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ @@ -324,7 +325,7 @@ case $basic_machine in c6x) basic_machine=tic6x-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; @@ -372,7 +373,7 @@ case $basic_machine in | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | clipper-* | craynv-* | cydra-* \ + | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ @@ -381,6 +382,7 @@ case $basic_machine in | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ + | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ @@ -794,7 +796,7 @@ case $basic_machine in os=-mingw64 ;; mingw32) - basic_machine=i386-pc + basic_machine=i686-pc os=-mingw32 ;; mingw32ce) @@ -830,7 +832,7 @@ case $basic_machine in basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) - basic_machine=i386-pc + basic_machine=i686-pc os=-msys ;; mvs) @@ -1546,6 +1548,9 @@ case $basic_machine in c4x-* | tic4x-*) os=-coff ;; + c8051-*) + os=-elf + ;; hexagon-*) os=-elf ;; diff --git a/config/missing b/config/missing index cdea514931..db98974ff5 100755 --- a/config/missing +++ b/config/missing @@ -1,7 +1,7 @@ #! /bin/sh # Common wrapper for a few potentially missing GNU programs. -scriptversion=2012-06-26.16; # UTC +scriptversion=2013-10-28.13; # UTC # Copyright (C) 1996-2013 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. @@ -160,7 +160,7 @@ give_advice () ;; autom4te*) echo "You might have modified some maintainer files that require" - echo "the 'automa4te' program to be rebuilt." + echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) diff --git a/configure b/configure index 9f5c2bc680..6798466688 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for triAGENS ArangoDB 1.4.5. +# Generated by GNU Autoconf 2.69 for triAGENS ArangoDB 1.4.6. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='triAGENS ArangoDB' PACKAGE_TARNAME='arangodb' -PACKAGE_VERSION='1.4.5' -PACKAGE_STRING='triAGENS ArangoDB 1.4.5' +PACKAGE_VERSION='1.4.6' +PACKAGE_STRING='triAGENS ArangoDB 1.4.6' PACKAGE_BUGREPORT='info@triagens.de' PACKAGE_URL='http://www.arangodb.org' @@ -1403,7 +1403,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures triAGENS ArangoDB 1.4.5 to adapt to many kinds of systems. +\`configure' configures triAGENS ArangoDB 1.4.6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1474,7 +1474,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of triAGENS ArangoDB 1.4.5:";; + short | recursive ) echo "Configuration of triAGENS ArangoDB 1.4.6:";; esac cat <<\_ACEOF @@ -1605,7 +1605,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -triAGENS ArangoDB configure 1.4.5 +triAGENS ArangoDB configure 1.4.6 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2070,7 +2070,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by triAGENS ArangoDB $as_me 1.4.5, which was +It was created by triAGENS ArangoDB $as_me 1.4.6, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2790,7 +2790,7 @@ if test x$tr_ARM == xyes; then fi -am__api_version='1.13' +am__api_version='1.14' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -3276,7 +3276,7 @@ fi # Define the identity of the package. PACKAGE='arangodb' - VERSION='1.4.5' + VERSION='1.4.6' cat >>confdefs.h <<_ACEOF @@ -3327,6 +3327,47 @@ am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 + fi +fi # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; @@ -4577,6 +4618,65 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 @@ -5227,131 +5327,6 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test "x$CC" != xcc; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 -$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 -$as_echo_n "checking whether cc understands -c and -o together... " >&6; } -fi -set dummy $CC; ac_cc=`$as_echo "$2" | - sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -# Make sure it works both with $CC and with simple cc. -# We do the test twice because some compilers refuse to overwrite an -# existing .o file with -o, though they will create one. -ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' -rm -f conftest2.* -if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; -then - eval ac_cv_prog_cc_${ac_cc}_c_o=yes - if test "x$CC" != xcc; then - # Test first that cc exists at all. - if { ac_try='cc -c conftest.$ac_ext >&5' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' - rm -f conftest2.* - if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; - then - # cc works too. - : - else - # cc exists but doesn't like -o. - eval ac_cv_prog_cc_${ac_cc}_c_o=no - fi - fi - fi -else - eval ac_cv_prog_cc_${ac_cc}_c_o=no -fi -rm -f core conftest* - -fi -if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h - -fi - -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 @@ -9200,7 +9175,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by triAGENS ArangoDB $as_me 1.4.5, which was +This file was extended by triAGENS ArangoDB $as_me 1.4.6, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -9267,7 +9242,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -triAGENS ArangoDB config.status 1.4.5 +triAGENS ArangoDB config.status 1.4.6 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 5ff9da3df8..dc30304fef 100644 --- a/configure.ac +++ b/configure.ac @@ -6,7 +6,7 @@ dnl ============================================================================ dnl --SECTION-- triAGENS GmbH Build Environment dnl ============================================================================ -AC_INIT([triAGENS ArangoDB], [1.4.5], [info@triagens.de], [arangodb], [http://www.arangodb.org]) +AC_INIT([triAGENS ArangoDB], [1.4.6], [info@triagens.de], [arangodb], [http://www.arangodb.org]) dnl ---------------------------------------------------------------------------- dnl auxillary directory for install-sh and missing diff --git a/js/apps/system/aardvark/api-docs.json b/js/apps/system/aardvark/api-docs.json index 226b5396bd..a44c25e962 100644 --- a/js/apps/system/aardvark/api-docs.json +++ b/js/apps/system/aardvark/api-docs.json @@ -1,6 +1,6 @@ { "swaggerVersion": "1.1", - "apiVersion": "1.4.5", + "apiVersion": "1.4.6", "apis": [ { "path": "api-docs/aqlfunction.{format}", diff --git a/js/apps/system/aardvark/api-docs/batch.json b/js/apps/system/aardvark/api-docs/batch.json index 5397747841..20ac0357b6 100644 --- a/js/apps/system/aardvark/api-docs/batch.json +++ b/js/apps/system/aardvark/api-docs/batch.json @@ -32,7 +32,7 @@ "notes": "Executes a batch request. A batch request can contain any number of other requests that can be sent to ArangoDB in isolation. The benefit of using batch requests is that batching requests requires less client/server roundtrips than when sending isolated requests.

All parts of a batch request are executed serially on the server. The server will return the results of all parts in a single response when all parts are finished.

Technically, a batch request is a multipart HTTP request, with content-type multipart/form-data. A batch request consists of an envelope and the individual batch part actions. Batch part actions are \"regular\" HTTP requests, including full header and an optional body. Multiple batch parts are separated by a boundary identifier. The boundary identifier is declared in the batch envelope. The MIME content-type for each individual batch part must be application/x-arango-batchpart.

The response sent by the server will be an HTTP 200 response, with an error summary header x-arango-errors. This header contains the number of batch parts that failed with an HTTP error code of at least 400.

The response sent by the server is a multipart response, too. It contains the individual HTTP responses for all batch parts, including the full HTTP result header (with status code and other potential headers) and an optional result body. The individual batch parts in the result are seperated using the same boundary value as specified in the request.

The order of batch parts in the response will be the same as in the original client request. Client can additionally use the Content-Id MIME header in a batch part to define an individual id for each batch part. The server will return this id is the batch part responses, too.

", "summary": "executes a batch request", "httpMethod": "POST", - "examples": "

unix> curl -X POST --header 'Content-Type: multipart/form-data; boundary=SomeBoundaryValue' --data @- --dump - http://localhost:8529/_api/batch\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: myId1\r\n\r\nGET /_api/version HTTP/1.1\r\n\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: myId2\r\n\r\nDELETE /_api/collection/products HTTP/1.1\r\n\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: someId\r\n\r\nPOST /_api/collection/products HTTP/1.1\r\n\r\n{ \"name\": \"products\" }\r\n\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: nextId\r\n\r\nGET /_api/collection/products/figures HTTP/1.1\r\n\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: otherId\r\n\r\nDELETE /_api/collection/products HTTP/1.1\r\n--SomeBoundaryValue--\r\n\n\nHTTP/1.1 200 OK\ncontent-type: multipart/form-data; boundary=SomeBoundaryValue\nx-arango-errors: 1\n\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: myId1\r\n\r\nHTTP/1.1 200 OK\r\ncontent-type: application/json; charset=utf-8\r\ncontent-length: 37\r\n\r\n{\"server\":\"arango\",\"version\":\"1.4.5\"}\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: myId2\r\n\r\nHTTP/1.1 404 Not Found\r\ncontent-type: application/json; charset=utf-8\r\ncontent-length: 88\r\n\r\n{\"error\":true,\"code\":404,\"errorNum\":1203,\"errorMessage\":\"unknown collection 'products'\"}\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: someId\r\n\r\nHTTP/1.1 200 OK\r\nlocation: /_db/_system/_api/collection/products\r\ncontent-type: application/json; charset=utf-8\r\ncontent-length: 137\r\n\r\n{\"id\":\"346505639\",\"name\":\"products\",\"waitForSync\":false,\"isVolatile\":false,\"isSystem\":false,\"status\":3,\"type\":2,\"error\":false,\"code\":200}\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: nextId\r\n\r\nHTTP/1.1 200 OK\r\nlocation: /_db/_system/_api/collection/products/figures\r\ncontent-type: application/json; charset=utf-8\r\ncontent-length: 526\r\n\r\n{\"id\":\"346505639\",\"name\":\"products\",\"doCompact\":true,\"isVolatile\":false,\"isSystem\":false,\"journalSize\":1048576,\"keyOptions\":{\"type\":\"traditional\",\"allowUserKeys\":true},\"waitForSync\":false,\"count\":0,\"figures\":{\"alive\":{\"count\":0,\"size\":0},\"dead\":{\"count\":0,\"size\":0,\"deletion\":0},\"datafiles\":{\"count\":0,\"fileSize\":0},\"journals\":{\"count\":0,\"fileSize\":0},\"compactors\":{\"count\":0,\"fileSize\":0},\"shapefiles\":{\"count\":1,\"fileSize\":2097152},\"shapes\":{\"count\":6},\"attributes\":{\"count\":0}},\"status\":3,\"type\":2,\"error\":false,\"code\":200}\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: otherId\r\n\r\nHTTP/1.1 200 OK\r\ncontent-type: application/json; charset=utf-8\r\ncontent-length: 43\r\n\r\n{\"id\":\"346505639\",\"error\":false,\"code\":200}\r\n--SomeBoundaryValue--\n\n

", + "examples": "

unix> curl -X POST --header 'Content-Type: multipart/form-data; boundary=SomeBoundaryValue' --data @- --dump - http://localhost:8529/_api/batch\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: myId1\r\n\r\nGET /_api/version HTTP/1.1\r\n\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: myId2\r\n\r\nDELETE /_api/collection/products HTTP/1.1\r\n\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: someId\r\n\r\nPOST /_api/collection/products HTTP/1.1\r\n\r\n{ \"name\": \"products\" }\r\n\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: nextId\r\n\r\nGET /_api/collection/products/figures HTTP/1.1\r\n\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: otherId\r\n\r\nDELETE /_api/collection/products HTTP/1.1\r\n--SomeBoundaryValue--\r\n\n\nHTTP/1.1 200 OK\ncontent-type: multipart/form-data; boundary=SomeBoundaryValue\nx-arango-errors: 1\n\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: myId1\r\n\r\nHTTP/1.1 200 OK\r\ncontent-type: application/json; charset=utf-8\r\ncontent-length: 37\r\n\r\n{\"server\":\"arango\",\"version\":\"1.4.6\"}\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: myId2\r\n\r\nHTTP/1.1 404 Not Found\r\ncontent-type: application/json; charset=utf-8\r\ncontent-length: 88\r\n\r\n{\"error\":true,\"code\":404,\"errorNum\":1203,\"errorMessage\":\"unknown collection 'products'\"}\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: someId\r\n\r\nHTTP/1.1 200 OK\r\nlocation: /_db/_system/_api/collection/products\r\ncontent-type: application/json; charset=utf-8\r\ncontent-length: 137\r\n\r\n{\"id\":\"346505639\",\"name\":\"products\",\"waitForSync\":false,\"isVolatile\":false,\"isSystem\":false,\"status\":3,\"type\":2,\"error\":false,\"code\":200}\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: nextId\r\n\r\nHTTP/1.1 200 OK\r\nlocation: /_db/_system/_api/collection/products/figures\r\ncontent-type: application/json; charset=utf-8\r\ncontent-length: 526\r\n\r\n{\"id\":\"346505639\",\"name\":\"products\",\"doCompact\":true,\"isVolatile\":false,\"isSystem\":false,\"journalSize\":1048576,\"keyOptions\":{\"type\":\"traditional\",\"allowUserKeys\":true},\"waitForSync\":false,\"count\":0,\"figures\":{\"alive\":{\"count\":0,\"size\":0},\"dead\":{\"count\":0,\"size\":0,\"deletion\":0},\"datafiles\":{\"count\":0,\"fileSize\":0},\"journals\":{\"count\":0,\"fileSize\":0},\"compactors\":{\"count\":0,\"fileSize\":0},\"shapefiles\":{\"count\":1,\"fileSize\":2097152},\"shapes\":{\"count\":6},\"attributes\":{\"count\":0}},\"status\":3,\"type\":2,\"error\":false,\"code\":200}\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: otherId\r\n\r\nHTTP/1.1 200 OK\r\ncontent-type: application/json; charset=utf-8\r\ncontent-length: 43\r\n\r\n{\"id\":\"346505639\",\"error\":false,\"code\":200}\r\n--SomeBoundaryValue--\n\n

", "nickname": "executesABatchRequest" } ], diff --git a/js/apps/system/aardvark/api-docs/database.json b/js/apps/system/aardvark/api-docs/database.json index 1770f9b7f1..71bf7a8ccc 100644 --- a/js/apps/system/aardvark/api-docs/database.json +++ b/js/apps/system/aardvark/api-docs/database.json @@ -74,7 +74,7 @@ "notes": "Retrieves information about the current database

The response is a JSON object with the following attributes:

- name: the name of the current database

- id: the id of the current database

- path: the filesystem path of the current database

- isSystem: whether or not the current database is the _system database

", "summary": "retrieves information about the current database", "httpMethod": "GET", - "examples": "

unix> curl --dump - http://localhost:8529/_api/database/current\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : { \n    \"name\" : \"_system\", \n    \"id\" : \"82343\", \n    \"path\" : \"/tmp/vocdir.81124/databases/database-82343\", \n    \"isSystem\" : true \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", + "examples": "

unix> curl --dump - http://localhost:8529/_api/database/current\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : { \n    \"name\" : \"_system\", \n    \"id\" : \"82343\", \n    \"path\" : \"/tmp/vocdir.60594/databases/database-82343\", \n    \"isSystem\" : true \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", "nickname": "retrievesInformationAboutTheCurrentDatabase" } ], diff --git a/js/apps/system/aardvark/api-docs/endpoint.json b/js/apps/system/aardvark/api-docs/endpoint.json index 53d651754a..f1585e9882 100644 --- a/js/apps/system/aardvark/api-docs/endpoint.json +++ b/js/apps/system/aardvark/api-docs/endpoint.json @@ -24,7 +24,7 @@ "notes": "Returns a list of all configured endpoints the server is listening on. For each endpoint, the list of allowed databases is returned too if set.

The result is a JSON hash which has the endpoints as keys, and the list of mapped database names as values for each endpoint.

If a list of mapped databases is empty, it means that all databases can be accessed via the endpoint. If a list of mapped databases contains more than one database name, this means that any of the databases might be accessed via the endpoint, and the first database in the list will be treated as the default database for the endpoint. The default database will be used when an incoming request does not specify a database name in the request explicitly.

Note: retrieving the list of all endpoints is allowed in the system database only. Calling this action in any other database will make the server return an error.

", "summary": "returns a list of all endpoints", "httpMethod": "GET", - "examples": "

unix> curl --dump - http://localhost:8529/_api/endpoint\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n[ \n  { \n    \"endpoint\" : \"tcp://127.0.0.1:31124\", \n    \"databases\" : [ ] \n  }, \n  { \n    \"endpoint\" : \"tcp://127.0.0.1:8532\", \n    \"databases\" : [ \n      \"mydb1\", \n      \"mydb2\" \n    ] \n  } \n]\n\n

", + "examples": "

unix> curl --dump - http://localhost:8529/_api/endpoint\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n[ \n  { \n    \"endpoint\" : \"tcp://127.0.0.1:30594\", \n    \"databases\" : [ ] \n  }, \n  { \n    \"endpoint\" : \"tcp://127.0.0.1:8532\", \n    \"databases\" : [ \n      \"mydb1\", \n      \"mydb2\" \n    ] \n  } \n]\n\n

", "nickname": "returnsAListOfAllEndpoints" } ], diff --git a/js/apps/system/aardvark/api-docs/job.json b/js/apps/system/aardvark/api-docs/job.json index fa87a1080d..593dcb3adf 100644 --- a/js/apps/system/aardvark/api-docs/job.json +++ b/js/apps/system/aardvark/api-docs/job.json @@ -28,7 +28,7 @@ "notes": "Returns the result of an async job identified by job-id. If the async job result is present on the server, the result will be removed from the list of result. That means this method can be called for each job-id once.

The method will return the original job result's headers and body, plus the additional HTTP header x-arango-async-job-id. If this header is present, then the job was found and the response contains the original job's result. If the header is not present, the job was not found and the response contains status information from the job amanger.

", "summary": "Returns the result of an async job", "httpMethod": "PUT", - "examples": "Not providing a job-id:

unix> curl -X PUT --dump - http://localhost:8529/_api/job/\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{\"error\":true,\"errorMessage\":\"bad parameter\",\"code\":400,\"errorNum\":400}\n\n

Providing a job-id for a non-existing job:

unix> curl -X PUT --dump - http://localhost:8529/_api/job/foobar\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{\"error\":true,\"errorMessage\":\"not found\",\"code\":404,\"errorNum\":404}\n\n

Fetching the result of an HTTP GET job:

unix> curl --header 'x-arango-async: store' --dump - http://localhost:8529/_api/version\n\nHTTP/1.1 202 Accepted\ncontent-type: text/plain; charset=utf-8\nx-arango-async-id: 409813415\n\nunix> curl -X PUT --dump - http://localhost:8529/_api/job/409813415\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nx-arango-async-id: 409813415\n\n{\"server\":\"arango\",\"version\":\"1.4.5\"}\n\n

Fetching the result of an HTTP POST job that failed:

unix> curl -X POST --header 'x-arango-async: store' --data @- --dump - http://localhost:8529/_api/collection\n{\"name\":\" this name is invalid \"}\n\nHTTP/1.1 202 Accepted\ncontent-type: text/plain; charset=utf-8\nx-arango-async-id: 409878951\n\nunix> curl -X PUT --dump - http://localhost:8529/_api/job/409878951\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\nx-arango-async-id: 409878951\n\n{\"error\":true,\"code\":400,\"errorNum\":1208,\"errorMessage\":\"cannot create collection: illegal name\"}\n\n

", + "examples": "Not providing a job-id:

unix> curl -X PUT --dump - http://localhost:8529/_api/job/\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{\"error\":true,\"errorMessage\":\"bad parameter\",\"code\":400,\"errorNum\":400}\n\n

Providing a job-id for a non-existing job:

unix> curl -X PUT --dump - http://localhost:8529/_api/job/foobar\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{\"error\":true,\"errorMessage\":\"not found\",\"code\":404,\"errorNum\":404}\n\n

Fetching the result of an HTTP GET job:

unix> curl --header 'x-arango-async: store' --dump - http://localhost:8529/_api/version\n\nHTTP/1.1 202 Accepted\ncontent-type: text/plain; charset=utf-8\nx-arango-async-id: 409813415\n\nunix> curl -X PUT --dump - http://localhost:8529/_api/job/409813415\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nx-arango-async-id: 409813415\n\n{\"server\":\"arango\",\"version\":\"1.4.6\"}\n\n

Fetching the result of an HTTP POST job that failed:

unix> curl -X POST --header 'x-arango-async: store' --data @- --dump - http://localhost:8529/_api/collection\n{\"name\":\" this name is invalid \"}\n\nHTTP/1.1 202 Accepted\ncontent-type: text/plain; charset=utf-8\nx-arango-async-id: 409878951\n\nunix> curl -X PUT --dump - http://localhost:8529/_api/job/409878951\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\nx-arango-async-id: 409878951\n\n{\"error\":true,\"code\":400,\"errorNum\":1208,\"errorMessage\":\"cannot create collection: illegal name\"}\n\n

", "nickname": "ReturnsTheResultOfAnAsyncJob" } ], @@ -94,7 +94,7 @@ "paramType": "path", "required": "true", "name": "type", - "description": "The type of jobs to delete. type can be: " + "description": "The type of jobs to delete. type can be: - all: deletes all jobs results. Currently executing or queued async jobs will not be stopped by this call. - expired: deletes expired results. To determine the expiration status of a result, pass the stamp URL parameter. stamp needs to be a UNIX timestamp, and all async job results created at a lower timestamp will be deleted. - an actual job-id: in this case, the call will remove the result of the specified async job. If the job is currently executing or queued, it will not be aborted. " }, { "dataType": "Number", @@ -106,7 +106,7 @@ "notes": "Deletes either all job results, expired job results, or the result of a specific job. Clients can use this method to perform an eventual garbage collection of job results.

", "summary": "Deletes the result of async jobs", "httpMethod": "DELETE", - "examples": "Deleting all jobs:

unix> curl --header 'x-arango-async: store' --dump - http://localhost:8529/_api/version\n\nHTTP/1.1 202 Accepted\ncontent-type: text/plain; charset=utf-8\nx-arango-async-id: 410075559\n\nunix> curl -X DELETE --dump - http://localhost:8529/_api/job/all\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : true \n}\n\n

Deleting expired jobs:

unix> curl --header 'x-arango-async: store' --dump - http://localhost:8529/_api/version\n\nHTTP/1.1 202 Accepted\ncontent-type: text/plain; charset=utf-8\nx-arango-async-id: 410141095\n\nunix> curl -X DELETE --dump - http://localhost:8529/_api/job/expired?stamp=1389793241\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : true \n}\n\n

Deleting the result of a specific job:

unix> curl --header 'x-arango-async: store' --dump - http://localhost:8529/_api/version\n\nHTTP/1.1 202 Accepted\ncontent-type: text/plain; charset=utf-8\nx-arango-async-id: 410206631\n\nunix> curl -X DELETE --dump - http://localhost:8529/_api/job/410206631\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : true \n}\n\n

Deleting the result of a non-existing job:

unix> curl -X DELETE --dump - http://localhost:8529/_api/job/foobar\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"errorMessage\" : \"not found\", \n  \"code\" : 404, \n  \"errorNum\" : 404 \n}\n\n

", + "examples": "Deleting all jobs:

unix> curl --header 'x-arango-async: store' --dump - http://localhost:8529/_api/version\n\nHTTP/1.1 202 Accepted\ncontent-type: text/plain; charset=utf-8\nx-arango-async-id: 410075559\n\nunix> curl -X DELETE --dump - http://localhost:8529/_api/job/all\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : true \n}\n\n

Deleting expired jobs:

unix> curl --header 'x-arango-async: store' --dump - http://localhost:8529/_api/version\n\nHTTP/1.1 202 Accepted\ncontent-type: text/plain; charset=utf-8\nx-arango-async-id: 410141095\n\nunix> curl -X DELETE --dump - http://localhost:8529/_api/job/expired?stamp=1390252233\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : true \n}\n\n

Deleting the result of a specific job:

unix> curl --header 'x-arango-async: store' --dump - http://localhost:8529/_api/version\n\nHTTP/1.1 202 Accepted\ncontent-type: text/plain; charset=utf-8\nx-arango-async-id: 410206631\n\nunix> curl -X DELETE --dump - http://localhost:8529/_api/job/410206631\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : true \n}\n\n

Deleting the result of a non-existing job:

unix> curl -X DELETE --dump - http://localhost:8529/_api/job/foobar\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"errorMessage\" : \"not found\", \n  \"code\" : 404, \n  \"errorNum\" : 404 \n}\n\n

", "nickname": "DeletesTheResultOfAsyncJobs" } ], diff --git a/js/apps/system/aardvark/api-docs/replication.json b/js/apps/system/aardvark/api-docs/replication.json index 6b962b58c9..2fe00daa40 100644 --- a/js/apps/system/aardvark/api-docs/replication.json +++ b/js/apps/system/aardvark/api-docs/replication.json @@ -78,7 +78,7 @@ "notes": "Returns the current state of the server's replication logger. The state will include information about whether the logger is running and about the last logged tick value. This tick value is important for incremental fetching of data.

The state API can be called regardless of whether the logger is currently running or not.

The body of the response contains a JSON object with the following attributes:

- state: the current logger state as a JSON hash array with the following sub-attributes:

- running: whether or not the logger is running

- lastLogTick: the tick value of the latest tick the logger has logged. This value can be used for incremental fetching of log data.

- totalEvents: total number of events logged since the server was started. The value is not reset between multiple stops and re-starts of the logger.

- time: the current date and time on the logger server

- server: a JSON hash with the following sub-attributes:

- version: the logger server's version

- serverId: the logger server's id

- clients: a list of all replication clients that ever connected to the logger since it was started. This list can be used to determine approximately how much data the individual clients have already fetched from the logger server. Each entry in the list contains a time value indicating the server time the client last fetched data from the replication logger. The lastServedTick value of each client indicates the latest tick value sent to the client upon a client request to the replication logger.

", "summary": "returns the replication logger state", "httpMethod": "GET", - "examples": "Returns the state of an inactive replication logger.

unix> curl --dump - http://localhost:8529/_api/replication/logger-state\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"state\" : { \n    \"running\" : false, \n    \"lastLogTick\" : \"397558183\", \n    \"totalEvents\" : 2, \n    \"time\" : \"2014-01-15T13:34:34Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"1.4.5\", \n    \"serverId\" : \"190048212006786\" \n  }, \n  \"clients\" : [ ] \n}\n\n

Returns the state of an active replication logger.

unix> curl --dump - http://localhost:8529/_api/replication/logger-state\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"state\" : { \n    \"running\" : true, \n    \"lastLogTick\" : \"397885863\", \n    \"totalEvents\" : 3, \n    \"time\" : \"2014-01-15T13:34:34Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"1.4.5\", \n    \"serverId\" : \"190048212006786\" \n  }, \n  \"clients\" : [ ] \n}\n\n

", + "examples": "Returns the state of an inactive replication logger.

unix> curl --dump - http://localhost:8529/_api/replication/logger-state\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"state\" : { \n    \"running\" : false, \n    \"lastLogTick\" : \"397558183\", \n    \"totalEvents\" : 2, \n    \"time\" : \"2014-01-20T21:04:23Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"1.4.6\", \n    \"serverId\" : \"190048212006786\" \n  }, \n  \"clients\" : [ ] \n}\n\n

Returns the state of an active replication logger.

unix> curl --dump - http://localhost:8529/_api/replication/logger-state\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"state\" : { \n    \"running\" : true, \n    \"lastLogTick\" : \"397885863\", \n    \"totalEvents\" : 3, \n    \"time\" : \"2014-01-20T21:04:24Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"1.4.6\", \n    \"serverId\" : \"190048212006786\" \n  }, \n  \"clients\" : [ ] \n}\n\n

", "nickname": "returnsTheReplicationLoggerState" } ], @@ -332,7 +332,7 @@ "notes": "Returns the list of collections and indexes available on the server. This list can be used by replication clients to initiate an initial sync with the server.

The response will contain a JSON hash array with the collection and state attributes.

collections is a list of collections with the following sub-attributes:

- parameters: the collection properties

- indexes: a list of the indexes of a the collection. Primary indexes and edges indexes are not included in this list.

tick: the system-wide tick value at the start of the dump

The state attribute contains the current state of the replication logger. It contains the following sub-attributes:

- running: whether or not the replication logger is currently active

- lastLogTick: the value of the last tick the replication logger has written

- time: the current time on the server

Replication clients should note the lastLogTick value returned. They can then fetch collections' data using the dump method up to the value of lastLogTick, and query the continuous replication log for log events after this tick value.

To create a full copy of the collections on the logger server, a replication client can execute these steps:

- call the /inventory API method. This returns the lastLogTick value and the list of collections and indexes from the logger server.

- for each collection returned by /inventory, create the collection locally and call /dump to stream the collection data to the client, up to the value of lastLogTick. After that, the client can create the indexes on the collections as they were reported by /inventory.

If the clients wants to continuously stream replication log events from the logger server, the following additional steps need to be carried out:

- the client should call /logger-follow initially to fetch the first batch of replication events that were logged after the client's call to /inventory.

The call to /logger-follow should use a from parameter with the value of the lastLogTick as reported by /inventory. The call to /logger-follow will return the x-arango-replication-lastincluded which will contain the last tick value included in the response.

- the client can then continuously call /logger-follow to incrementally fetch new replication events that occurred after the last transfer.

Calls should use a from parameter with the value of the x-arango-replication-lastincluded header of the previous response. If there are no more replication events, the response will be empty and clients can go to sleep for a while and try again later.

", "summary": "returns an inventory of collections and indexes", "httpMethod": "GET", - "examples": "

unix> curl --dump - http://localhost:8529/_api/replication/inventory\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"collections\" : [ \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"16269735\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"animals\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"14827943\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"demo\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"132465063\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"vertices1\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 3, \n        \"cid\" : \"135217575\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"edges2\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    } \n  ], \n  \"state\" : { \n    \"running\" : false, \n    \"lastLogTick\" : \"404242855\", \n    \"totalEvents\" : 22, \n    \"time\" : \"2014-01-15T13:34:34Z\" \n  }, \n  \"tick\" : \"404308391\" \n}\n\n

With some additional indexes:

unix> curl --dump - http://localhost:8529/_api/replication/inventory\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"collections\" : [ \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"16269735\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"animals\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"14827943\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"demo\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"404373927\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"IndexedCollection1\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ \n        { \n          \"id\" : \"405160359\", \n          \"type\" : \"hash\", \n          \"unique\" : false, \n          \"fields\" : [ \n            \"name\" \n          ] \n        }, \n        { \n          \"id\" : \"405422503\", \n          \"type\" : \"skiplist\", \n          \"unique\" : true, \n          \"fields\" : [ \n            \"a\", \n            \"b\" \n          ] \n        }, \n        { \n          \"id\" : \"405488039\", \n          \"type\" : \"cap\", \n          \"unique\" : false, \n          \"size\" : 500, \n          \"byteSize\" : 0 \n        } \n      ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"405553575\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"IndexedCollection2\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ \n        { \n          \"id\" : \"406340007\", \n          \"type\" : \"fulltext\", \n          \"unique\" : false, \n          \"minLength\" : 10, \n          \"fields\" : [ \n            \"text\" \n          ] \n        }, \n        { \n          \"id\" : \"406536615\", \n          \"type\" : \"skiplist\", \n          \"unique\" : false, \n          \"fields\" : [ \n            \"a\" \n          ] \n        }, \n        { \n          \"id\" : \"406602151\", \n          \"type\" : \"cap\", \n          \"unique\" : false, \n          \"size\" : 0, \n          \"byteSize\" : 1048576 \n        } \n      ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"132465063\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"vertices1\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 3, \n        \"cid\" : \"135217575\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"edges2\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    } \n  ], \n  \"state\" : { \n    \"running\" : false, \n    \"lastLogTick\" : \"404242855\", \n    \"totalEvents\" : 22, \n    \"time\" : \"2014-01-15T13:34:34Z\" \n  }, \n  \"tick\" : \"406602151\" \n}\n\n

", + "examples": "

unix> curl --dump - http://localhost:8529/_api/replication/inventory\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"collections\" : [ \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"16269735\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"animals\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"14827943\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"demo\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"132465063\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"vertices1\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 3, \n        \"cid\" : \"135217575\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"edges2\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    } \n  ], \n  \"state\" : { \n    \"running\" : false, \n    \"lastLogTick\" : \"404242855\", \n    \"totalEvents\" : 22, \n    \"time\" : \"2014-01-20T21:04:25Z\" \n  }, \n  \"tick\" : \"404308391\" \n}\n\n

With some additional indexes:

unix> curl --dump - http://localhost:8529/_api/replication/inventory\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"collections\" : [ \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"16269735\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"animals\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"14827943\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"demo\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"404373927\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"IndexedCollection1\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ \n        { \n          \"id\" : \"405160359\", \n          \"type\" : \"hash\", \n          \"unique\" : false, \n          \"fields\" : [ \n            \"name\" \n          ] \n        }, \n        { \n          \"id\" : \"405422503\", \n          \"type\" : \"skiplist\", \n          \"unique\" : true, \n          \"fields\" : [ \n            \"a\", \n            \"b\" \n          ] \n        }, \n        { \n          \"id\" : \"405488039\", \n          \"type\" : \"cap\", \n          \"unique\" : false, \n          \"size\" : 500, \n          \"byteSize\" : 0 \n        } \n      ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"405553575\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"IndexedCollection2\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ \n        { \n          \"id\" : \"406340007\", \n          \"type\" : \"fulltext\", \n          \"unique\" : false, \n          \"minLength\" : 10, \n          \"fields\" : [ \n            \"text\" \n          ] \n        }, \n        { \n          \"id\" : \"406536615\", \n          \"type\" : \"skiplist\", \n          \"unique\" : false, \n          \"fields\" : [ \n            \"a\" \n          ] \n        }, \n        { \n          \"id\" : \"406602151\", \n          \"type\" : \"cap\", \n          \"unique\" : false, \n          \"size\" : 0, \n          \"byteSize\" : 1048576 \n        } \n      ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"132465063\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"vertices1\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 3, \n        \"cid\" : \"135217575\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"edges2\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    } \n  ], \n  \"state\" : { \n    \"running\" : false, \n    \"lastLogTick\" : \"404242855\", \n    \"totalEvents\" : 22, \n    \"time\" : \"2014-01-20T21:04:25Z\" \n  }, \n  \"tick\" : \"406602151\" \n}\n\n

", "nickname": "returnsAnInventoryOfCollectionsAndIndexes" } ], @@ -565,7 +565,7 @@ "notes": "Starts the replication applier. This will return immediately if the replication applier is already running.

If the replication applier is not already running, the applier configuration will be checked, and if it is complete, the applier will be started in a background thread. This means that even if the applier will encounter any errors while running, they will not be reported in the response to this method.

To detect replication applier errors after the applier was started, use the /_api/replication/applier-state API instead.

", "summary": "starts the replication applier", "httpMethod": "PUT", - "examples": "

unix> curl -X PUT --dump - http://localhost:8529/_api/replication/applier-start\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"state\" : { \n    \"running\" : true, \n    \"lastAppliedContinuousTick\" : null, \n    \"lastProcessedContinuousTick\" : null, \n    \"lastAvailableContinuousTick\" : null, \n    \"progress\" : { \n      \"time\" : \"2014-01-15T13:33:58Z\", \n      \"message\" : \"applier created\", \n      \"failedConnects\" : 0 \n    }, \n    \"totalRequests\" : 0, \n    \"totalFailedConnects\" : 0, \n    \"totalEvents\" : 0, \n    \"lastError\" : { \n      \"errorNum\" : 0 \n    }, \n    \"time\" : \"2014-01-15T13:34:35Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"1.4.5\", \n    \"serverId\" : \"190048212006786\" \n  }, \n  \"endpoint\" : \"tcp://127.0.0.1:8529\", \n  \"database\" : \"_system\" \n}\n\n

", + "examples": "

unix> curl -X PUT --dump - http://localhost:8529/_api/replication/applier-start\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"state\" : { \n    \"running\" : true, \n    \"lastAppliedContinuousTick\" : null, \n    \"lastProcessedContinuousTick\" : null, \n    \"lastAvailableContinuousTick\" : null, \n    \"progress\" : { \n      \"time\" : \"2014-01-20T21:03:04Z\", \n      \"message\" : \"applier created\", \n      \"failedConnects\" : 0 \n    }, \n    \"totalRequests\" : 0, \n    \"totalFailedConnects\" : 0, \n    \"totalEvents\" : 0, \n    \"lastError\" : { \n      \"errorNum\" : 0 \n    }, \n    \"time\" : \"2014-01-20T21:04:27Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"1.4.6\", \n    \"serverId\" : \"190048212006786\" \n  }, \n  \"endpoint\" : \"tcp://127.0.0.1:8529\", \n  \"database\" : \"_system\" \n}\n\n

", "nickname": "startsTheReplicationApplier" } ], @@ -592,7 +592,7 @@ "notes": "Stops the replication applier. This will return immediately if the replication applier is not running.

", "summary": "stops the replication applier", "httpMethod": "PUT", - "examples": "

unix> curl -X PUT --dump - http://localhost:8529/_api/replication/applier-stop\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"state\" : { \n    \"running\" : false, \n    \"lastAppliedContinuousTick\" : null, \n    \"lastProcessedContinuousTick\" : null, \n    \"lastAvailableContinuousTick\" : null, \n    \"progress\" : { \n      \"time\" : \"2014-01-15T13:34:35Z\", \n      \"message\" : \"applier stopped\", \n      \"failedConnects\" : 1 \n    }, \n    \"totalRequests\" : 2, \n    \"totalFailedConnects\" : 2, \n    \"totalEvents\" : 0, \n    \"lastError\" : { \n      \"time\" : \"2014-01-15T13:34:35Z\", \n      \"errorMessage\" : \"could not connect to master at tcp://127.0.0.1:8529: Could not connect to 'tcp:/...\", \n      \"errorNum\" : 1412 \n    }, \n    \"time\" : \"2014-01-15T13:34:35Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"1.4.5\", \n    \"serverId\" : \"190048212006786\" \n  }, \n  \"endpoint\" : \"tcp://127.0.0.1:8529\", \n  \"database\" : \"_system\" \n}\n\n

", + "examples": "

unix> curl -X PUT --dump - http://localhost:8529/_api/replication/applier-stop\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"state\" : { \n    \"running\" : false, \n    \"lastAppliedContinuousTick\" : null, \n    \"lastProcessedContinuousTick\" : null, \n    \"lastAvailableContinuousTick\" : null, \n    \"progress\" : { \n      \"time\" : \"2014-01-20T21:04:27Z\", \n      \"message\" : \"applier stopped\", \n      \"failedConnects\" : 0 \n    }, \n    \"totalRequests\" : 0, \n    \"totalFailedConnects\" : 0, \n    \"totalEvents\" : 0, \n    \"lastError\" : { \n      \"time\" : \"2014-01-20T21:04:27Z\", \n      \"errorMessage\" : \"got same server id (190048212006786) from endpoint 'tcp://127.0.0.1:8529' as the...\", \n      \"errorNum\" : 1405 \n    }, \n    \"time\" : \"2014-01-20T21:04:27Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"1.4.6\", \n    \"serverId\" : \"190048212006786\" \n  }, \n  \"endpoint\" : \"tcp://127.0.0.1:8529\", \n  \"database\" : \"_system\" \n}\n\n

", "nickname": "stopsTheReplicationApplier" } ], @@ -619,7 +619,7 @@ "notes": "Returns the state of the replication applier, regardless of whether the applier is currently running or not.

The response is a JSON hash with the following attributes:

- state: a JSON hash with the following sub-attributes:

- running: whether or not the applier is active and running

- lastAppliedContinuousTick: the last tick value from the continuous replication log the applier has applied.

- lastProcessedContinuousTick: the last tick value from the continuous replication log the applier has processed.

Regularly, the last applied and last processed tick values should be identical. For transactional operations, the replication applier will first process incoming log events before applying them, so the processed tick value might be higher than the applied tick value. This will be the case until the applier encounters the transaction commit log event for the transaction.

- lastAvailableContinuousTick: the last tick value the logger server can provide.

- time: the time on the applier server.

- totalRequests: the total number of requests the applier has made to the endpoint.

- totalFailedConnects: the total number of failed connection attempts the applier has made.

- totalEvents: the total number of log events the applier has processed.

- progress: a JSON hash with details about the replication applier progress. It contains the following sub-attributes if there is progress to report:

- message: a textual description of the progress

- time: the date and time the progress was logged

- failedConnects: the current number of failed connection attempts

- lastError: a JSON hash with details about the last error that happened on the applier. It contains the following sub-attributes if there was an error:

- errorNum: a numerical error code

- errorMessage: a textual error description

- time: the date and time the error occurred

In case no error has occurred, lastError will be empty.

- server: a JSON hash with the following sub-attributes:

- version: the applier server's version

- serverId: the applier server's id

- endpoint: the endpoint the applier is connected to (if applier is active) or will connect to (if applier is currently inactive)

- database: the name of the database the applier is connected to (if applier is active) or will connect to (if applier is currently inactive)

", "summary": "returns the state of the replication applier", "httpMethod": "GET", - "examples": "Fetching the state of an inactive applier:

unix> curl --dump - http://localhost:8529/_api/replication/applier-state\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"state\" : { \n    \"running\" : false, \n    \"lastAppliedContinuousTick\" : null, \n    \"lastProcessedContinuousTick\" : null, \n    \"lastAvailableContinuousTick\" : null, \n    \"progress\" : { \n      \"time\" : \"2014-01-15T13:34:35Z\", \n      \"message\" : \"applier stopped\", \n      \"failedConnects\" : 1 \n    }, \n    \"totalRequests\" : 2, \n    \"totalFailedConnects\" : 2, \n    \"totalEvents\" : 0, \n    \"lastError\" : { \n      \"time\" : \"2014-01-15T13:34:35Z\", \n      \"errorMessage\" : \"could not connect to master at tcp://127.0.0.1:8529: Could not connect to 'tcp:/...\", \n      \"errorNum\" : 1412 \n    }, \n    \"time\" : \"2014-01-15T13:34:35Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"1.4.5\", \n    \"serverId\" : \"190048212006786\" \n  }, \n  \"endpoint\" : \"tcp://127.0.0.1:8529\", \n  \"database\" : \"_system\" \n}\n\n

Fetching the state of an active applier:

unix> curl --dump - http://localhost:8529/_api/replication/applier-state\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"state\" : { \n    \"running\" : true, \n    \"lastAppliedContinuousTick\" : null, \n    \"lastProcessedContinuousTick\" : null, \n    \"lastAvailableContinuousTick\" : null, \n    \"progress\" : { \n      \"time\" : \"2014-01-15T13:34:35Z\", \n      \"message\" : \"fetching master state information\", \n      \"failedConnects\" : 1 \n    }, \n    \"totalRequests\" : 3, \n    \"totalFailedConnects\" : 3, \n    \"totalEvents\" : 0, \n    \"lastError\" : { \n      \"errorNum\" : 0 \n    }, \n    \"time\" : \"2014-01-15T13:34:35Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"1.4.5\", \n    \"serverId\" : \"190048212006786\" \n  }, \n  \"endpoint\" : \"tcp://127.0.0.1:8529\", \n  \"database\" : \"_system\" \n}\n\n

", + "examples": "Fetching the state of an inactive applier:

unix> curl --dump - http://localhost:8529/_api/replication/applier-state\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"state\" : { \n    \"running\" : false, \n    \"lastAppliedContinuousTick\" : null, \n    \"lastProcessedContinuousTick\" : null, \n    \"lastAvailableContinuousTick\" : null, \n    \"progress\" : { \n      \"time\" : \"2014-01-20T21:04:27Z\", \n      \"message\" : \"applier stopped\", \n      \"failedConnects\" : 0 \n    }, \n    \"totalRequests\" : 0, \n    \"totalFailedConnects\" : 0, \n    \"totalEvents\" : 0, \n    \"lastError\" : { \n      \"time\" : \"2014-01-20T21:04:27Z\", \n      \"errorMessage\" : \"got same server id (190048212006786) from endpoint 'tcp://127.0.0.1:8529' as the...\", \n      \"errorNum\" : 1405 \n    }, \n    \"time\" : \"2014-01-20T21:04:27Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"1.4.6\", \n    \"serverId\" : \"190048212006786\" \n  }, \n  \"endpoint\" : \"tcp://127.0.0.1:8529\", \n  \"database\" : \"_system\" \n}\n\n

Fetching the state of an active applier:

unix> curl --dump - http://localhost:8529/_api/replication/applier-state\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"state\" : { \n    \"running\" : false, \n    \"lastAppliedContinuousTick\" : null, \n    \"lastProcessedContinuousTick\" : null, \n    \"lastAvailableContinuousTick\" : null, \n    \"progress\" : { \n      \"time\" : \"2014-01-20T21:04:27Z\", \n      \"message\" : \"applier stopped\", \n      \"failedConnects\" : 0 \n    }, \n    \"totalRequests\" : 0, \n    \"totalFailedConnects\" : 0, \n    \"totalEvents\" : 0, \n    \"lastError\" : { \n      \"time\" : \"2014-01-20T21:04:27Z\", \n      \"errorMessage\" : \"got same server id (190048212006786) from endpoint 'tcp://127.0.0.1:8529' as the...\", \n      \"errorNum\" : 1405 \n    }, \n    \"time\" : \"2014-01-20T21:04:27Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"1.4.6\", \n    \"serverId\" : \"190048212006786\" \n  }, \n  \"endpoint\" : \"tcp://127.0.0.1:8529\", \n  \"database\" : \"_system\" \n}\n\n

", "nickname": "returnsTheStateOfTheReplicationApplier" } ], diff --git a/js/apps/system/aardvark/api-docs/system.json b/js/apps/system/aardvark/api-docs/system.json index 9dd3fc504d..5c280b91d9 100644 --- a/js/apps/system/aardvark/api-docs/system.json +++ b/js/apps/system/aardvark/api-docs/system.json @@ -92,7 +92,7 @@ "notes": "

Returns the statistics information. The returned object contains the statistics figures grouped together according to the description returned by _admin/statistics-description. For instance, to access a figure userTime from the group system, you first select the sub-object describing the group stored in system and in that sub-object the value for userTime is stored in the attribute of the same name.

In case of a distribution, the returned object contains the total count in count and the distribution list in counts. The sum (or total) of the individual values is returned in sum.

", "summary": "reads the statistics", "httpMethod": "GET", - "examples": "

unix> curl --dump - http://localhost:8529/_admin/statistics\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"system\" : { \n    \"minorPageFaults\" : 106242, \n    \"majorPageFaults\" : 1916, \n    \"userTime\" : 12.592, \n    \"systemTime\" : 1.726252, \n    \"numberOfThreads\" : 16, \n    \"residentSize\" : 57217024, \n    \"virtualSize\" : 4994158592 \n  }, \n  \"client\" : { \n    \"httpConnections\" : 1, \n    \"connectionTime\" : { \n      \"sum\" : 0.00037384033203125, \n      \"count\" : 1, \n      \"counts\" : [ \n        1, \n        0, \n        0, \n        0 \n      ] \n    }, \n    \"totalTime\" : { \n      \"sum\" : 22.933324813842773, \n      \"count\" : 850, \n      \"counts\" : [ \n        539, \n        201, \n        44, \n        49, \n        14, \n        0, \n        3 \n      ] \n    }, \n    \"requestTime\" : { \n      \"sum\" : 22.767783641815186, \n      \"count\" : 850, \n      \"counts\" : [ \n        539, \n        203, \n        42, \n        49, \n        14, \n        0, \n        3 \n      ] \n    }, \n    \"queueTime\" : { \n      \"sum\" : 0.018385887145996094, \n      \"count\" : 848, \n      \"counts\" : [ \n        848, \n        0, \n        0, \n        0, \n        0, \n        0, \n        0 \n      ] \n    }, \n    \"bytesSent\" : { \n      \"sum\" : 381722, \n      \"count\" : 850, \n      \"counts\" : [ \n        234, \n        501, \n        115, \n        0, \n        0, \n        0 \n      ] \n    }, \n    \"bytesReceived\" : { \n      \"sum\" : 197140, \n      \"count\" : 850, \n      \"counts\" : [ \n        625, \n        225, \n        0, \n        0, \n        0, \n        0 \n      ] \n    } \n  }, \n  \"http\" : { \n    \"requestsTotal\" : 850, \n    \"requestsAsync\" : 0, \n    \"requestsGet\" : 225, \n    \"requestsHead\" : 0, \n    \"requestsPost\" : 446, \n    \"requestsPut\" : 34, \n    \"requestsPatch\" : 3, \n    \"requestsDelete\" : 142, \n    \"requestsOptions\" : 0, \n    \"requestsOther\" : 0 \n  }, \n  \"server\" : { \n    \"uptime\" : 27.57566213607788 \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", + "examples": "

unix> curl --dump - http://localhost:8529/_admin/statistics\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"system\" : { \n    \"minorPageFaults\" : 113349, \n    \"majorPageFaults\" : 1916, \n    \"userTime\" : 28.970069, \n    \"systemTime\" : 3.00499, \n    \"numberOfThreads\" : 16, \n    \"residentSize\" : 58105856, \n    \"virtualSize\" : 5001773056 \n  }, \n  \"client\" : { \n    \"httpConnections\" : 1, \n    \"connectionTime\" : { \n      \"sum\" : 0.003744840621948242, \n      \"count\" : 1, \n      \"counts\" : [ \n        1, \n        0, \n        0, \n        0 \n      ] \n    }, \n    \"totalTime\" : { \n      \"sum\" : 51.210867404937744, \n      \"count\" : 850, \n      \"counts\" : [ \n        216, \n        248, \n        250, \n        114, \n        18, \n        1, \n        3 \n      ] \n    }, \n    \"requestTime\" : { \n      \"sum\" : 50.808953285217285, \n      \"count\" : 850, \n      \"counts\" : [ \n        226, \n        242, \n        251, \n        109, \n        18, \n        1, \n        3 \n      ] \n    }, \n    \"queueTime\" : { \n      \"sum\" : 0.03761625289916992, \n      \"count\" : 848, \n      \"counts\" : [ \n        848, \n        0, \n        0, \n        0, \n        0, \n        0, \n        0 \n      ] \n    }, \n    \"bytesSent\" : { \n      \"sum\" : 381722, \n      \"count\" : 850, \n      \"counts\" : [ \n        234, \n        501, \n        115, \n        0, \n        0, \n        0 \n      ] \n    }, \n    \"bytesReceived\" : { \n      \"sum\" : 197140, \n      \"count\" : 850, \n      \"counts\" : [ \n        625, \n        225, \n        0, \n        0, \n        0, \n        0 \n      ] \n    } \n  }, \n  \"http\" : { \n    \"requestsTotal\" : 850, \n    \"requestsAsync\" : 0, \n    \"requestsGet\" : 225, \n    \"requestsHead\" : 0, \n    \"requestsPost\" : 446, \n    \"requestsPut\" : 34, \n    \"requestsPatch\" : 3, \n    \"requestsDelete\" : 142, \n    \"requestsOptions\" : 0, \n    \"requestsOther\" : 0 \n  }, \n  \"server\" : { \n    \"uptime\" : 58.96970891952515 \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", "nickname": "readsTheStatistics" } ], From 50017099269547fe4b582a72a1b305966640180d Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Tue, 21 Jan 2014 09:15:45 +0100 Subject: [PATCH 13/45] updated import manual --- Documentation/Examples/api-import-documents | 2 +- Documentation/Examples/api-import-headers | 2 +- Documentation/ImplementorManual/HttpImport.md | 17 +++++++++++++++-- Documentation/ToolsManual/ImpManual.md | 12 ++++++++++++ arangod/RestHandler/RestImportHandler.cpp | 8 +++----- 5 files changed, 32 insertions(+), 9 deletions(-) diff --git a/Documentation/Examples/api-import-documents b/Documentation/Examples/api-import-documents index 6917a8c974..ff4789c2ea 100644 --- a/Documentation/Examples/api-import-documents +++ b/Documentation/Examples/api-import-documents @@ -7,4 +7,4 @@ server: triagens GmbH High-Performance HTTP Server connection: Keep-Alive content-type: application/json; charset=utf-8 -{"error":false,"created":2,"errors":0} +{"error":false,"created":2,"empty":0,"errors":0} diff --git a/Documentation/Examples/api-import-headers b/Documentation/Examples/api-import-headers index 6bd4ab6b2a..3c4b46b0d8 100644 --- a/Documentation/Examples/api-import-headers +++ b/Documentation/Examples/api-import-headers @@ -8,4 +8,4 @@ server: triagens GmbH High-Performance HTTP Server connection: Keep-Alive content-type: application/json; charset=utf-8 -{"error":false,"created":2,"errors":0} +{"error":false,"created":2,"empty":0,"errors":0} diff --git a/Documentation/ImplementorManual/HttpImport.md b/Documentation/ImplementorManual/HttpImport.md index faa94a37b7..b40f773513 100644 --- a/Documentation/ImplementorManual/HttpImport.md +++ b/Documentation/ImplementorManual/HttpImport.md @@ -93,7 +93,14 @@ the data are line-wise JSON documents (type = documents) or a JSON list (type = The server will respond with an HTTP 201 if everything went well. The number of documents imported will be returned in the `created` attribute of the response. If any documents were skipped or incorrectly formatted, this will be -returned in the `errors` attribute. +returned in the `errors` attribute. There will also be an attribute `empty` in +the response, which will contain a value of `0`. + +If the `details` parameter was set to `true` in the request, the response will +also contain an attribute `details` which is a list of details about errors that +occurred on the server side during the import. This list might be empty if no +errors occurred. + Importing Headers and Values {#HttpImportHeaderData} ==================================================== @@ -112,7 +119,13 @@ are needed or allowed in this data section. The server will again respond with an HTTP 201 if everything went well. The number of documents imported will be returned in the `created` attribute of the response. If any documents were skipped or incorrectly formatted, this will be -returned in the `errors` attribute. +returned in the `errors` attribute. The number of empty lines in the input file +will be returned in the `empty` attribute. + +If the `details` parameter was set to `true` in the request, the response will +also contain an attribute `details` which is a list of details about errors that +occurred on the server side during the import. This list might be empty if no +errors occurred. Importing into Edge Collections {#HttpImportEdges} ================================================== diff --git a/Documentation/ToolsManual/ImpManual.md b/Documentation/ToolsManual/ImpManual.md index 083ca54a5a..9eb7777aeb 100644 --- a/Documentation/ToolsManual/ImpManual.md +++ b/Documentation/ToolsManual/ImpManual.md @@ -66,6 +66,18 @@ Please note that by default, _arangoimp_ will import data into the specified collection in the default database (`_system`). To specify a different database, use the `--server.database` option when invoking _arangoimp_. +An _arangoimp_ import will print out the final results on the command line. +By default, it shows the number of documents created, the number of errors that +occurred on the server side, and the total number of input file lines/documents +that it processed. Additionally, _arangoimp_ will print out details about errors +that happended on the server-side (if any). + +Example: + + created: 2 + errors: 0 + total: 2 + Importing CSV Data {#ImpManualCsv} ================================== diff --git a/arangod/RestHandler/RestImportHandler.cpp b/arangod/RestHandler/RestImportHandler.cpp index 85672b71f8..16b33694eb 100644 --- a/arangod/RestHandler/RestImportHandler.cpp +++ b/arangod/RestHandler/RestImportHandler.cpp @@ -244,14 +244,11 @@ int RestImportHandler::handleSingleDocument (ImportTransactionType& trx, /// @RESTQUERYPARAM{type,string,required} /// Determines how the body of the request will be interpreted. `type` can have /// the following values: -/// /// - `documents`: when this type is used, each line in the request body is /// expected to be an individual JSON-encoded document. Multiple JSON documents /// in the request body need to be separated by newlines. -/// /// - `list`: when this type is used, the request body must contain a single /// JSON-encoded list of individual documents to import. -/// /// - `auto`: if set, this will automatically determine the body type (either /// `documents` or `list`). /// @@ -736,8 +733,9 @@ bool RestImportHandler::createFromJson (const string& type) { /// /// @RESTBODYPARAM{documents,string,required} /// The body must consist of JSON-encoded lists of attribute values, with one -/// line per per document. The first line of the request must be a JSON-encoded -/// list of attribute names. +/// line per per document. The first row of the request must be a JSON-encoded +/// list of attribute names. These attribute names are used for the data in the +/// subsequent rows. /// /// @RESTQUERYPARAMETERS /// From 0c039e0264d14245c79ace0283893aa84d4303a4 Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Tue, 21 Jan 2014 13:27:40 +0100 Subject: [PATCH 14/45] mount all system apps by name --- js/server/bootstrap/module-internal.js | 28 ++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/js/server/bootstrap/module-internal.js b/js/server/bootstrap/module-internal.js index 4ecc709400..fa6d1c6aa4 100644 --- a/js/server/bootstrap/module-internal.js +++ b/js/server/bootstrap/module-internal.js @@ -1,5 +1,5 @@ /*jslint indent: 2, nomen: true, maxlen: 120, sloppy: true, vars: true, white: true, plusplus: true, nonpropdel: true */ -/*global require, db, ArangoCollection, ArangoDatabase, ArangoCursor, +/*global require, db, ArangoCollection, ArangoDatabase, ArangoCursor, module, ShapedJson, RELOAD_AUTH, SYS_DEFINE_ACTION, SYS_EXECUTE_GLOBAL_CONTEXT_FUNCTION, AHUACATL_RUN, AHUACATL_PARSE, AHUACATL_EXPLAIN */ @@ -162,15 +162,31 @@ catch (err) { console.error("cannot initialize Foxx application: %s", String(err)); } - + var aal = internal.db._collection("_aal"); if (aal !== null) { - var found = aal.firstExample({ type: "mount", mount: "/_admin/aardvark" }); + var systemAppPath = module.systemAppPath(); - if (found === null) { - fm.mount("aardvark", "/_admin/aardvark", {reload: false}); - } + var fs = require("fs"); + var apps = fs.list(systemAppPath); + + apps.forEach(function (appName) { + if (! fs.isDirectory(fs.join(systemAppPath, appName))) { + return; + } + + try { + var found = aal.firstExample({ type: "mount", mount: "/_admin/" + appName }); + + if (found === null) { + fm.mount(appName, "/_admin/" + appName, {reload: false}); + } + } + catch (err) { + console.error("unable to mount system application '%s': %s", appName, String(err)); + } + }); } }; From 3e653e303d3d0fc16e36ddcd89585d7d77ad85b3 Mon Sep 17 00:00:00 2001 From: Alan Plum Date: Fri, 17 Jan 2014 21:31:16 +0100 Subject: [PATCH 15/45] Added __dirname, __filename pseudo-globals. Fixes #733. --- js/common/bootstrap/modules.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/common/bootstrap/modules.js b/js/common/bootstrap/modules.js index ffa05bb742..63a3737563 100644 --- a/js/common/bootstrap/modules.js +++ b/js/common/bootstrap/modules.js @@ -735,6 +735,8 @@ function require (path) { } } + sandbox.__filename = origin; + sandbox.__dirname = typeof origin === 'string' ? origin.split('/').slice(0, -1).join('/') : origin; sandbox.module = module; sandbox.exports = module.exports; sandbox.require = function(path) { return module.require(path); }; @@ -1326,6 +1328,8 @@ function require (path) { } } + sandbox.__filename = full; + sandbox.__dirname = full.split('/').slice(0, -1).join('/'); sandbox.module = appModule; sandbox.applicationContext = appContext; From f99f362f07f0a0231fa2c1aea2d5c488355202f2 Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Fri, 17 Jan 2014 22:01:24 +0100 Subject: [PATCH 16/45] small improvement for issue #738 --- js/common/bootstrap/modules.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/js/common/bootstrap/modules.js b/js/common/bootstrap/modules.js index 63a3737563..336064e262 100644 --- a/js/common/bootstrap/modules.js +++ b/js/common/bootstrap/modules.js @@ -735,6 +735,13 @@ function require (path) { } } + // actually the file name can be set via the path attribute + if (origin === undefined) { + origin = description.path; + } + // strip protocol (e.g. file://) + origin = origin.replace(/^[a-z]+:\/\//, ''); + sandbox.__filename = origin; sandbox.__dirname = typeof origin === 'string' ? origin.split('/').slice(0, -1).join('/') : origin; sandbox.module = module; From d10748155f56294e028c12c5f6964c57a54bb46b Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Fri, 17 Jan 2014 22:58:43 +0100 Subject: [PATCH 17/45] follow up for issue #738 --- js/common/bootstrap/modules.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/common/bootstrap/modules.js b/js/common/bootstrap/modules.js index 336064e262..553c93c13a 100644 --- a/js/common/bootstrap/modules.js +++ b/js/common/bootstrap/modules.js @@ -740,7 +740,9 @@ function require (path) { origin = description.path; } // strip protocol (e.g. file://) - origin = origin.replace(/^[a-z]+:\/\//, ''); + if (typeof origin === 'string') { + origin = origin.replace(/^[a-z]+:\/\//, ''); + } sandbox.__filename = origin; sandbox.__dirname = typeof origin === 'string' ? origin.split('/').slice(0, -1).join('/') : origin; From f6b872e01c5c51960b41a9645f81992fed338335 Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Tue, 21 Jan 2014 13:38:32 +0100 Subject: [PATCH 18/45] updated CHANGELOG --- CHANGELOG | 8 ++++++++ js/server/bootstrap/module-internal.js | 9 ++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index a41c2378fe..5c5c4f5cb2 100755 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,11 @@ +v1.4.7 (XXXX-XX-XX) +------------------- + +* issue #738: added __dirname, __filename pseudo-globals. Fixes #733. (@by pluma) + +* mount all Foxx applications in system apps directory on startup + + v1.4.6 (2014-01-20) ------------------- diff --git a/js/server/bootstrap/module-internal.js b/js/server/bootstrap/module-internal.js index fa6d1c6aa4..98e6f6bd3a 100644 --- a/js/server/bootstrap/module-internal.js +++ b/js/server/bootstrap/module-internal.js @@ -171,8 +171,15 @@ var fs = require("fs"); var apps = fs.list(systemAppPath); + // make sure the aardvark app is always there + if (apps.indexOf("aardvark") === -1) { + apps.push("aardvark"); + } + apps.forEach(function (appName) { - if (! fs.isDirectory(fs.join(systemAppPath, appName))) { + // for all unknown system apps: check that the directory actually exists + if (appName !== "aardvark" && + ! fs.isDirectory(fs.join(systemAppPath, appName))) { return; } From 2d4db0ea405c624906c1113a43058dcfaa17007f Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Tue, 21 Jan 2014 13:27:40 +0100 Subject: [PATCH 19/45] mount all system apps by name --- js/server/bootstrap/module-internal.js | 28 ++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/js/server/bootstrap/module-internal.js b/js/server/bootstrap/module-internal.js index bb4a9ec41e..a4c0b2173b 100644 --- a/js/server/bootstrap/module-internal.js +++ b/js/server/bootstrap/module-internal.js @@ -1,5 +1,5 @@ /*jslint indent: 2, nomen: true, maxlen: 120, sloppy: true, vars: true, white: true, plusplus: true, nonpropdel: true */ -/*global require, db, ArangoCollection, ArangoDatabase, ArangoCursor, +/*global require, db, ArangoCollection, ArangoDatabase, ArangoCursor, module, ShapedJson, RELOAD_AUTH, SYS_DEFINE_ACTION, SYS_EXECUTE_GLOBAL_CONTEXT_FUNCTION, AHUACATL_RUN, AHUACATL_PARSE, AHUACATL_EXPLAIN */ @@ -159,15 +159,31 @@ catch (err) { console.error("cannot initialize Foxx application: %s", String(err)); } - + var aal = internal.db._collection("_aal"); if (aal !== null) { - var found = aal.firstExample({ type: "mount", mount: "/_admin/aardvark" }); + var systemAppPath = module.systemAppPath(); - if (found === null) { - fm.mount("aardvark", "/_admin/aardvark", {reload: false}); - } + var fs = require("fs"); + var apps = fs.list(systemAppPath); + + apps.forEach(function (appName) { + if (! fs.isDirectory(fs.join(systemAppPath, appName))) { + return; + } + + try { + var found = aal.firstExample({ type: "mount", mount: "/_admin/" + appName }); + + if (found === null) { + fm.mount(appName, "/_admin/" + appName, {reload: false}); + } + } + catch (err) { + console.error("unable to mount system application '%s': %s", appName, String(err)); + } + }); } }; From b5ba025c388ae3cc6e5edb7d63999e2883c0ca6b Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Tue, 21 Jan 2014 13:40:38 +0100 Subject: [PATCH 20/45] updated CHANGELOG --- CHANGELOG | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index c7855843c4..ee9d6242ba 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -9,8 +9,6 @@ v1.5.0 (XXXX-XX-XX) to access such collections from these places was via the `db._collection()` workaround. -* issue #738: added __dirname, __filename pseudo-globals. Fixes #733. (@by pluma) - * allow `\n` (as well as `\r\n`) as line terminator in batch requests sent to `/_api/batch` HTTP API. @@ -115,7 +113,15 @@ v1.5.0 (XXXX-XX-XX) currently only implemented for hash indices and skiplist indices. -v1.4.6 (XXXX-XX-XX) +v1.4.7 (XXXX-XX-XX) +------------------- + +* issue #738: added __dirname, __filename pseudo-globals. Fixes #733. (@by pluma) + +* mount all Foxx applications in system apps directory on startup + + +v1.4.6 (2014-01-20) ------------------- * issue #736: AQL function to parse collection and key from document handle From 17c8de6560934a461a28b40c71a6c6a33188f288 Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Tue, 21 Jan 2014 13:38:32 +0100 Subject: [PATCH 21/45] updated CHANGELOG Conflicts: CHANGELOG --- js/server/bootstrap/module-internal.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/js/server/bootstrap/module-internal.js b/js/server/bootstrap/module-internal.js index a4c0b2173b..976093d56f 100644 --- a/js/server/bootstrap/module-internal.js +++ b/js/server/bootstrap/module-internal.js @@ -168,8 +168,15 @@ var fs = require("fs"); var apps = fs.list(systemAppPath); + // make sure the aardvark app is always there + if (apps.indexOf("aardvark") === -1) { + apps.push("aardvark"); + } + apps.forEach(function (appName) { - if (! fs.isDirectory(fs.join(systemAppPath, appName))) { + // for all unknown system apps: check that the directory actually exists + if (appName !== "aardvark" && + ! fs.isDirectory(fs.join(systemAppPath, appName))) { return; } From b63a8bdbceb5f7705f09786044be563e4e23537e Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Tue, 21 Jan 2014 15:23:26 +0100 Subject: [PATCH 22/45] issue #737: adjusted error message --- arangosh/V8Client/arangoimp.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/arangosh/V8Client/arangoimp.cpp b/arangosh/V8Client/arangoimp.cpp index 96bafe932b..6f859b5123 100644 --- a/arangosh/V8Client/arangoimp.cpp +++ b/arangosh/V8Client/arangoimp.cpp @@ -371,7 +371,16 @@ int main (int argc, char* argv[]) { } if (FileName != "-" && ! FileUtils::isRegularFile(FileName)) { - cerr << "Cannot open file '" << FileName << "'" << endl; + if (! FileUtils::exists(FileName)) { + cerr << "Cannot open file '" << FileName << "'. File not found." << endl; + } + else if (FileUtils::isDirectory(FileName)) { + cerr << "Specified file '" << FileName << "' is a directory. Please use a regular file." << endl; + } + else { + cerr << "Cannot open '" << FileName << "'. Invalid file type." << endl; + } + TRI_EXIT_FUNCTION(EXIT_FAILURE, NULL); } From 724c5baa7010928dcc3163669f193738a8706472 Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Tue, 21 Jan 2014 15:23:26 +0100 Subject: [PATCH 23/45] issue #737: adjusted error message --- arangosh/V8Client/arangoimp.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/arangosh/V8Client/arangoimp.cpp b/arangosh/V8Client/arangoimp.cpp index c38d5fd751..928ec23f8f 100644 --- a/arangosh/V8Client/arangoimp.cpp +++ b/arangosh/V8Client/arangoimp.cpp @@ -370,7 +370,16 @@ int main (int argc, char* argv[]) { } if (FileName != "-" && ! FileUtils::isRegularFile(FileName)) { - cerr << "Cannot open file '" << FileName << "'" << endl; + if (! FileUtils::exists(FileName)) { + cerr << "Cannot open file '" << FileName << "'. File not found." << endl; + } + else if (FileUtils::isDirectory(FileName)) { + cerr << "Specified file '" << FileName << "' is a directory. Please use a regular file." << endl; + } + else { + cerr << "Cannot open '" << FileName << "'. Invalid file type." << endl; + } + TRI_EXIT_FUNCTION(EXIT_FAILURE, NULL); } From f5039a4f54e88e7cee7c6fa457fbdc45916c9f23 Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Tue, 21 Jan 2014 17:56:49 +0100 Subject: [PATCH 24/45] make usage of batch API easier --- arangod/RestHandler/RestBatchHandler.cpp | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/arangod/RestHandler/RestBatchHandler.cpp b/arangod/RestHandler/RestBatchHandler.cpp index dd59483958..7f61096558 100644 --- a/arangod/RestHandler/RestBatchHandler.cpp +++ b/arangod/RestHandler/RestBatchHandler.cpp @@ -560,15 +560,15 @@ bool RestBatchHandler::extractPart (SearchHelper* helper) { int breakLength = 1; while (found < searchEnd) { + while (*found == ' ' && found < searchEnd) { + ++found; + } + // try Windows linebreak first breakLength = 2; char* eol = strstr(found, "\r\n"); - if (eol == found) { - break; - } - if (eol == 0) { breakLength = 1; eol = strchr(found, '\n'); @@ -577,8 +577,16 @@ bool RestBatchHandler::extractPart (SearchHelper* helper) { break; } } + else { + char* eol2 = strchr(found, '\n'); - if (eol == 0) { + if (eol2 != 0 && eol2 < eol) { + breakLength = 1; + eol = eol2; + } + } + + if (eol == 0 || eol == found) { break; } @@ -609,6 +617,11 @@ bool RestBatchHandler::extractPart (SearchHelper* helper) { if (_partContentType == value) { hasTypeHeader = true; } + else { + LOG_WARNING("unexpected content-type '%s' for multipart-message. expected: '%s'", + value.c_str(), + _partContentType.c_str()); + } } else if ("content-id" == key) { helper->contentId = colon; From a9b579f1b1454b7c8a5e28872e461ff899dcd293 Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Thu, 23 Jan 2014 09:47:22 +0100 Subject: [PATCH 25/45] issue #744 --- CHANGELOG | 2 ++ Documentation/man1/arangoimp | 6 ++++++ arangoirb/MRClient/arangoirb.cpp | 2 +- arangosh/ArangoShell/ArangoClient.cpp | 4 ++++ arangosh/ArangoShell/ArangoClient.h | 1 + arangosh/Benchmark/arangob.cpp | 2 +- arangosh/V8Client/arangodump.cpp | 2 +- arangosh/V8Client/arangoimp.cpp | 2 +- arangosh/V8Client/arangorestore.cpp | 2 +- arangosh/V8Client/arangosh.cpp | 2 +- lib/ApplicationServer/ApplicationServer.cpp | 2 +- 11 files changed, 20 insertions(+), 7 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 5c5c4f5cb2..73739cf64e 100755 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,8 @@ 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 diff --git a/Documentation/man1/arangoimp b/Documentation/man1/arangoimp index c7b438d702..afdef13b80 100644 --- a/Documentation/man1/arangoimp +++ b/Documentation/man1/arangoimp @@ -38,4 +38,10 @@ username to use when connecting (default "root") ENDOPTION OPTION "--server.password " password to use when connecting. Leave empty for a password prompt 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 +EXAMPLE COMMAND --file export.csv --type csv --collection mydata +imports CSV data from export.csv into existing collection mydata. +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 AUTHOR diff --git a/arangoirb/MRClient/arangoirb.cpp b/arangoirb/MRClient/arangoirb.cpp index e35cc21c25..ca59b316a6 100644 --- a/arangoirb/MRClient/arangoirb.cpp +++ b/arangoirb/MRClient/arangoirb.cpp @@ -203,7 +203,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, "", argc, argv, "arangoirb.conf"); // check module path if (StartupModules.empty()) { diff --git a/arangosh/ArangoShell/ArangoClient.cpp b/arangosh/ArangoShell/ArangoClient.cpp index 4ff1d1e1e8..b53e36908b 100644 --- a/arangosh/ArangoShell/ArangoClient.cpp +++ b/arangosh/ArangoShell/ArangoClient.cpp @@ -257,6 +257,7 @@ void ArangoClient::setupServer (ProgramOptionsDescription& description) { void ArangoClient::parse (ProgramOptions& options, ProgramOptionsDescription& description, + string const& example, int argc, char* argv[], string const& initFilename) { @@ -268,6 +269,9 @@ void ArangoClient::parse (ProgramOptions& options, set 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); } diff --git a/arangosh/ArangoShell/ArangoClient.h b/arangosh/ArangoShell/ArangoClient.h index 823c662baf..eb30669cf6 100644 --- a/arangosh/ArangoShell/ArangoClient.h +++ b/arangosh/ArangoShell/ArangoClient.h @@ -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); diff --git a/arangosh/Benchmark/arangob.cpp b/arangosh/Benchmark/arangob.cpp index fbcb686c18..507216a677 100644 --- a/arangosh/Benchmark/arangob.cpp +++ b/arangosh/Benchmark/arangob.cpp @@ -221,7 +221,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 --requests --test-case ...", argc, argv, "arangob.conf"); } //////////////////////////////////////////////////////////////////////////////// diff --git a/arangosh/V8Client/arangodump.cpp b/arangosh/V8Client/arangodump.cpp index cf0af17e7e..53d8a3a8f3 100644 --- a/arangosh/V8Client/arangodump.cpp +++ b/arangosh/V8Client/arangodump.cpp @@ -193,7 +193,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]; diff --git a/arangosh/V8Client/arangoimp.cpp b/arangosh/V8Client/arangoimp.cpp index 6f859b5123..9cd7428f40 100644 --- a/arangosh/V8Client/arangoimp.cpp +++ b/arangosh/V8Client/arangoimp.cpp @@ -171,7 +171,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 --type --collection ", argc, argv, "arangoimp.conf"); if (FileName == "" && arguments.size() > 0) { FileName = arguments[0]; diff --git a/arangosh/V8Client/arangorestore.cpp b/arangosh/V8Client/arangorestore.cpp index d640bb2e4b..b1bd23763f 100644 --- a/arangosh/V8Client/arangorestore.cpp +++ b/arangosh/V8Client/arangorestore.cpp @@ -194,7 +194,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]; diff --git a/arangosh/V8Client/arangosh.cpp b/arangosh/V8Client/arangosh.cpp index b1e4c37bd1..34b3edfedc 100644 --- a/arangosh/V8Client/arangosh.cpp +++ b/arangosh/V8Client/arangosh.cpp @@ -462,7 +462,7 @@ static vector 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, "", argc, argv, conf); // set V8 options v8::V8::SetFlagsFromCommandLine(&argc, argv, true); diff --git a/lib/ApplicationServer/ApplicationServer.cpp b/lib/ApplicationServer/ApplicationServer.cpp index 40b806c786..1aa8528c44 100644 --- a/lib/ApplicationServer/ApplicationServer.cpp +++ b/lib/ApplicationServer/ApplicationServer.cpp @@ -420,7 +420,7 @@ bool ApplicationServer::parse (int argc, set help = _options.needHelp("help"); if (! help.empty()) { - cout << argv[0] << " " << _title << "\n\n" << _description.usage(help) << endl; + cout << argv[0] << " " << _title << endl << endl << _description.usage(help) << endl; TRI_EXIT_FUNCTION(EXIT_SUCCESS, NULL); } From 587c2aef647a0f3da23c8ecd1ea9dcbf90afada1 Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Thu, 23 Jan 2014 09:47:22 +0100 Subject: [PATCH 26/45] issue #744 Conflicts: lib/ApplicationServer/ApplicationServer.cpp --- CHANGELOG | 2 ++ Documentation/Makefile.files | 2 +- Documentation/man/man1/arangob.1 | 36 ++++++++++++--------- Documentation/man/man1/arangodump.1 | 6 ++-- Documentation/man/man1/arangoimp.1 | 23 +++++++++++-- Documentation/man/man1/arangorestore.1 | 6 ++-- Documentation/man/man1/arangosh.1 | 16 ++++++--- Documentation/man/man8/arango-dfdb.8 | 2 +- Documentation/man/man8/arangod.8 | 4 ++- Documentation/man/man8/foxx-manager.8 | 10 ++++-- Documentation/man/man8/rcarangod.8 | 2 +- Documentation/man1/arangob | 16 ++++----- Documentation/man1/arangoimp | 6 ++++ arangoirb/MRClient/arangoirb.cpp | 2 +- arangosh/ArangoShell/ArangoClient.cpp | 4 +++ arangosh/ArangoShell/ArangoClient.h | 1 + arangosh/Benchmark/arangob.cpp | 2 +- arangosh/V8Client/arangodump.cpp | 2 +- arangosh/V8Client/arangoimp.cpp | 2 +- arangosh/V8Client/arangorestore.cpp | 2 +- arangosh/V8Client/arangosh.cpp | 2 +- lib/ApplicationServer/ApplicationServer.cpp | 2 +- 22 files changed, 103 insertions(+), 47 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index ee9d6242ba..c2e13624c3 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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 diff --git a/Documentation/Makefile.files b/Documentation/Makefile.files index f84ef4a8fc..19ea20ce76 100644 --- a/Documentation/Makefile.files +++ b/Documentation/Makefile.files @@ -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/" -e "s/\/$$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/" -e "s/\/$$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 diff --git a/Documentation/man/man1/arangob.1 b/Documentation/man/man1/arangob.1 index b74cd86163..81560eaffd 100644 --- a/Documentation/man/man1/arangob.1 +++ b/Documentation/man/man1/arangob.1 @@ -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 " server endpoint to connect to, consisting of protocol, ip address and port .IP "--server.database " -database name to use when connection (default: "_system") +database name to use when connection (default: "_system") .IP "--server.username " username to use when connecting (default "root") .IP "--server.password " -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 " +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 diff --git a/Documentation/man/man1/arangodump.1 b/Documentation/man/man1/arangodump.1 index 61c72b99f7..b7efa4d5a3 100644 --- a/Documentation/man/man1/arangodump.1 +++ b/Documentation/man/man1/arangodump.1 @@ -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 " username to use when connecting (default "root") .IP "--server.password " -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 " +disable the password prompt and authentication when connecting to the server .SH EXAMPLES .SH AUTHOR diff --git a/Documentation/man/man1/arangoimp.1 b/Documentation/man/man1/arangoimp.1 index 789deda357..9ac8baf2ed 100644 --- a/Documentation/man/man1/arangoimp.1 +++ b/Documentation/man/man1/arangoimp.1 @@ -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 " server endpoint to connect to, consisting of protocol, ip address and port .IP "--server.database " -database name to use when connection (default: "_system") +database name to use when connection (default: "_system") .IP "--server.username " username to use when connecting (default "root") .IP "--server.password " -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 " +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 diff --git a/Documentation/man/man1/arangorestore.1 b/Documentation/man/man1/arangorestore.1 index 3ea4cab2d6..a215c06af9 100644 --- a/Documentation/man/man1/arangorestore.1 +++ b/Documentation/man/man1/arangorestore.1 @@ -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 " username to use when connecting (default "root") .IP "--server.password " -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 " +disable the password prompt and authentication when connecting to the server .SH EXAMPLES .SH AUTHOR diff --git a/Documentation/man/man1/arangosh.1 b/Documentation/man/man1/arangosh.1 index 4916c04237..fea8cee45a 100644 --- a/Documentation/man/man1/arangosh.1 +++ b/Documentation/man/man1/arangosh.1 @@ -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 " +log input and output to audit log file .IP "--configuration " read configuration from file .IP "--log.level " @@ -20,32 +22,38 @@ set the log level (possible values: "fatal", "error", "warning", "info", "debug" .IP "--server.endpoint " server endpoint to connect to, consisting of protocol, ip address and port .IP "--server.database " -database name to use when connection (default: "_system") +database name to use when connection (default: "_system") .IP "--server.username " username to use when connecting (default "root") .IP "--server.password " -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 " +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 diff --git a/Documentation/man/man8/arango-dfdb.8 b/Documentation/man/man8/arango-dfdb.8 index 765ee45d04..7bdd8b7426 100644 --- a/Documentation/man/man8/arango-dfdb.8 +++ b/Documentation/man/man8/arango-dfdb.8 @@ -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 diff --git a/Documentation/man/man8/arangod.8 b/Documentation/man/man8/arangod.8 index 0da3ea07ae..28f1192ad5 100644 --- a/Documentation/man/man8/arangod.8 +++ b/Documentation/man/man8/arangod.8 @@ -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 set the log level (possible values: "fatal", "error", "warning", "info", "debug", "trace") .IP "--server.endpoint " listen endpoint for client requests, consisting of protocol, ip address and port +.IP "--server.disable-authentication " +disable authentication for all clients .IP "--database.directory " path to the database directory .SH EXAMPLES diff --git a/Documentation/man/man8/foxx-manager.8 b/Documentation/man/man8/foxx-manager.8 index 389f991f3b..a9514c9d46 100644 --- a/Documentation/man/man8/foxx-manager.8 +++ b/Documentation/man/man8/foxx-manager.8 @@ -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 " +database name to use when connection (default: "_system") +.IP "--server.username " +username to use when connecting (default "root") +.IP "--server.password " +password to use when connecting. Don't specify this option to get a password prompt .IP "--server.disable-authentication " -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" diff --git a/Documentation/man/man8/rcarangod.8 b/Documentation/man/man8/rcarangod.8 index cba9a6f09f..f885f0058c 100644 --- a/Documentation/man/man8/rcarangod.8 +++ b/Documentation/man/man8/rcarangod.8 @@ -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 diff --git a/Documentation/man1/arangob b/Documentation/man1/arangob index 0adb54f14b..8d3332f44f 100644 --- a/Documentation/man1/arangob +++ b/Documentation/man1/arangob @@ -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 diff --git a/Documentation/man1/arangoimp b/Documentation/man1/arangoimp index 3dac9c72ed..527e357ff4 100644 --- a/Documentation/man1/arangoimp +++ b/Documentation/man1/arangoimp @@ -40,4 +40,10 @@ password to use when connecting. Don't specify this option to get a password pro OPTION "--server.disable-authentication " 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 diff --git a/arangoirb/MRClient/arangoirb.cpp b/arangoirb/MRClient/arangoirb.cpp index 700ce35894..3d6f5eca4e 100644 --- a/arangoirb/MRClient/arangoirb.cpp +++ b/arangoirb/MRClient/arangoirb.cpp @@ -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, "", argc, argv, "arangoirb.conf"); // check module path if (StartupModules.empty()) { diff --git a/arangosh/ArangoShell/ArangoClient.cpp b/arangosh/ArangoShell/ArangoClient.cpp index e807e0a5e9..d09ddb3d57 100644 --- a/arangosh/ArangoShell/ArangoClient.cpp +++ b/arangosh/ArangoShell/ArangoClient.cpp @@ -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 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); } diff --git a/arangosh/ArangoShell/ArangoClient.h b/arangosh/ArangoShell/ArangoClient.h index 823c662baf..eb30669cf6 100644 --- a/arangosh/ArangoShell/ArangoClient.h +++ b/arangosh/ArangoShell/ArangoClient.h @@ -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); diff --git a/arangosh/Benchmark/arangob.cpp b/arangosh/Benchmark/arangob.cpp index f305d61cf0..5ef1ed4141 100644 --- a/arangosh/Benchmark/arangob.cpp +++ b/arangosh/Benchmark/arangob.cpp @@ -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 --requests --test-case ...", argc, argv, "arangob.conf"); } //////////////////////////////////////////////////////////////////////////////// diff --git a/arangosh/V8Client/arangodump.cpp b/arangosh/V8Client/arangodump.cpp index 2546de91c8..8f58f3cece 100644 --- a/arangosh/V8Client/arangodump.cpp +++ b/arangosh/V8Client/arangodump.cpp @@ -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]; diff --git a/arangosh/V8Client/arangoimp.cpp b/arangosh/V8Client/arangoimp.cpp index 928ec23f8f..e346a1e943 100644 --- a/arangosh/V8Client/arangoimp.cpp +++ b/arangosh/V8Client/arangoimp.cpp @@ -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 --type --collection ", argc, argv, "arangoimp.conf"); if (FileName == "" && arguments.size() > 0) { FileName = arguments[0]; diff --git a/arangosh/V8Client/arangorestore.cpp b/arangosh/V8Client/arangorestore.cpp index 5c39094083..0047943be9 100644 --- a/arangosh/V8Client/arangorestore.cpp +++ b/arangosh/V8Client/arangorestore.cpp @@ -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]; diff --git a/arangosh/V8Client/arangosh.cpp b/arangosh/V8Client/arangosh.cpp index 15b921eb0b..88bacab9e2 100644 --- a/arangosh/V8Client/arangosh.cpp +++ b/arangosh/V8Client/arangosh.cpp @@ -482,7 +482,7 @@ static vector 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, "", argc, argv, conf); // set V8 options v8::V8::SetFlagsFromCommandLine(&argc, argv, true); diff --git a/lib/ApplicationServer/ApplicationServer.cpp b/lib/ApplicationServer/ApplicationServer.cpp index d1aba9c376..ea0da79a37 100644 --- a/lib/ApplicationServer/ApplicationServer.cpp +++ b/lib/ApplicationServer/ApplicationServer.cpp @@ -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 From c4c6500b9a2ba1b24fe39d49fd6b4395bde33971 Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Thu, 23 Jan 2014 10:09:32 +0100 Subject: [PATCH 27/45] updated man pages --- Documentation/Makefile.files | 2 +- Documentation/man/man1/arangob.1 | 24 +++++++++++++----------- Documentation/man/man1/arangodump.1 | 6 ++++-- Documentation/man/man1/arangoimp.1 | 23 ++++++++++++++++++++--- Documentation/man/man1/arangorestore.1 | 6 ++++-- Documentation/man/man1/arangosh.1 | 12 ++++++++---- Documentation/man/man8/arango-dfdb.8 | 2 +- Documentation/man/man8/arangod.8 | 4 +++- Documentation/man/man8/foxx-manager.8 | 4 +++- Documentation/man/man8/rcarangod.8 | 2 +- Documentation/man1/arangob | 20 +++++++++++--------- Documentation/man1/arangodump | 4 +++- Documentation/man1/arangoimp | 10 ++++++---- Documentation/man1/arangorestore | 4 +++- Documentation/man1/arangosh | 6 +++--- 15 files changed, 84 insertions(+), 45 deletions(-) diff --git a/Documentation/Makefile.files b/Documentation/Makefile.files index 6c004ff710..637ff7f198 100644 --- a/Documentation/Makefile.files +++ b/Documentation/Makefile.files @@ -304,7 +304,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/" -e "s/\/$$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/" -e "s/\/$$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 diff --git a/Documentation/man/man1/arangob.1 b/Documentation/man/man1/arangob.1 index b74cd86163..5baa97d135 100644 --- a/Documentation/man/man1/arangob.1 +++ b/Documentation/man/man1/arangob.1 @@ -1,4 +1,4 @@ -.TH arangob 1 "So 30. Sep 01:36:14 CEST 2012" "" "ArangoDB" +.TH arangob 1 "Do 23. Jan 09:59:38 CET 2014" "" "ArangoDB" .SH NAME arangob - the ArangoDB benchmark and test tool .SH SYNOPSIS @@ -32,11 +32,13 @@ complexity value for test case (meaning depends on test case) .IP "--server.endpoint " server endpoint to connect to, consisting of protocol, ip address and port .IP "--server.database " -database name to use when connection (default: "_system") +database name to use when connection (default: "_system") .IP "--server.username " username to use when connecting (default "root") .IP "--server.password " -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 " +disable the password prompt and authentication when connecting to the server .SH EXAMPLES .EX shell> arangob @@ -44,23 +46,23 @@ 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 +shell> arangob --test-case version --requests 1000 --concurrency 1 +runs the 'version' test case with 1000 requests, without concurrency .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 document --requests 1000 --concurrency 2 +runs the 'document' test case with 2000 requests, with concurrency 2 .EE .EX -shell> arangob --server.endpoint tcp://192.168.173.13:8529 -starts arangob connecting to a specific server +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 --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 --batch-size 10 +runs the 'document' test case with 2000 requests, with concurrency 2, using batch requests .EE diff --git a/Documentation/man/man1/arangodump.1 b/Documentation/man/man1/arangodump.1 index 61c72b99f7..fa39ff2669 100644 --- a/Documentation/man/man1/arangodump.1 +++ b/Documentation/man/man1/arangodump.1 @@ -1,4 +1,4 @@ -.TH arangodump 1 "Fr 6. Sep 02:19:07 CEST 2013" "" "ArangoDB" +.TH arangodump 1 "Do 23. Jan 09:59:38 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 " username to use when connecting (default "root") .IP "--server.password " -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 " +disable the password prompt and authentication when connecting to the server .SH EXAMPLES .SH AUTHOR diff --git a/Documentation/man/man1/arangoimp.1 b/Documentation/man/man1/arangoimp.1 index 789deda357..2f02d6791c 100644 --- a/Documentation/man/man1/arangoimp.1 +++ b/Documentation/man/man1/arangoimp.1 @@ -1,4 +1,4 @@ -.TH arangoimp 1 "So 30. Sep 01:36:14 CEST 2012" "" "ArangoDB" +.TH arangoimp 1 "Do 23. Jan 09:59:38 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 " server endpoint to connect to, consisting of protocol, ip address and port .IP "--server.database " -database name to use when connection (default: "_system") +database name to use when connection (default: "_system") .IP "--server.username " username to use when connecting (default "root") .IP "--server.password " -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 " +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 diff --git a/Documentation/man/man1/arangorestore.1 b/Documentation/man/man1/arangorestore.1 index 3ea4cab2d6..f529a12700 100644 --- a/Documentation/man/man1/arangorestore.1 +++ b/Documentation/man/man1/arangorestore.1 @@ -1,4 +1,4 @@ -.TH arangorestore 1 "Fr 6. Sep 02:19:07 CEST 2013" "" "ArangoDB" +.TH arangorestore 1 "Do 23. Jan 09:59:38 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 " username to use when connecting (default "root") .IP "--server.password " -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 " +disable the password prompt and authentication when connecting to the server .SH EXAMPLES .SH AUTHOR diff --git a/Documentation/man/man1/arangosh.1 b/Documentation/man/man1/arangosh.1 index 4916c04237..e5890a2cdc 100644 --- a/Documentation/man/man1/arangosh.1 +++ b/Documentation/man/man1/arangosh.1 @@ -1,4 +1,4 @@ -.TH arangosh 1 "So 30. Sep 01:36:14 CEST 2012" "" "ArangoDB" +.TH arangosh 1 "Do 23. Jan 09:59:38 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 " +log input and output to audit log file .IP "--configuration " read configuration from file .IP "--log.level " @@ -20,11 +22,13 @@ set the log level (possible values: "fatal", "error", "warning", "info", "debug" .IP "--server.endpoint " server endpoint to connect to, consisting of protocol, ip address and port .IP "--server.database " -database name to use when connection (default: "_system") +database name to use when connection (default: "_system") .IP "--server.username " username to use when connecting (default "root") .IP "--server.password " -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 " +disable the password prompt and authentication when connecting to the server .SH EXAMPLES .EX shell> arangosh @@ -33,7 +37,7 @@ starts arangosh with the default user and server endpoint .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 diff --git a/Documentation/man/man8/arango-dfdb.8 b/Documentation/man/man8/arango-dfdb.8 index 765ee45d04..f33c51607f 100644 --- a/Documentation/man/man8/arango-dfdb.8 +++ b/Documentation/man/man8/arango-dfdb.8 @@ -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:59:38 CET 2014" "" "ArangoDB" .SH NAME arango-dfdb - a datafile debugger for ArangoDB .SH SYNOPSIS diff --git a/Documentation/man/man8/arangod.8 b/Documentation/man/man8/arangod.8 index 0da3ea07ae..fa3f195be9 100644 --- a/Documentation/man/man8/arangod.8 +++ b/Documentation/man/man8/arangod.8 @@ -1,4 +1,4 @@ -.TH arangod 8 "So 30. Sep 01:36:14 CEST 2012" "" "ArangoDB" +.TH arangod 8 "Do 23. Jan 09:59:38 CET 2014" "" "ArangoDB" .SH NAME arangod - the ArangoDB database server .SH SYNOPSIS @@ -30,6 +30,8 @@ log to file set the log level (possible values: "fatal", "error", "warning", "info", "debug", "trace") .IP "--server.endpoint " listen endpoint for client requests, consisting of protocol, ip address and port +.IP "--server.disable-authentication " +disable the password prompt when connecting to the server .IP "--database.directory " path to the database directory .SH EXAMPLES diff --git a/Documentation/man/man8/foxx-manager.8 b/Documentation/man/man8/foxx-manager.8 index 389f991f3b..d33d6e54b3 100644 --- a/Documentation/man/man8/foxx-manager.8 +++ b/Documentation/man/man8/foxx-manager.8 @@ -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:59:38 CET 2014" "" "ArangoDB" .SH NAME foxx-manager - a Foxx application manager for ArangoDB .SH SYNOPSIS @@ -9,6 +9,8 @@ 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 " +database name to use when connection (default: "_system") .IP "--server.disable-authentication " disable the password prompt when connecting to the server .SH EXAMPLES diff --git a/Documentation/man/man8/rcarangod.8 b/Documentation/man/man8/rcarangod.8 index cba9a6f09f..fed4cb8f32 100644 --- a/Documentation/man/man8/rcarangod.8 +++ b/Documentation/man/man8/rcarangod.8 @@ -1,4 +1,4 @@ -.TH rcarangod 8 "So 30. Sep 01:36:14 CEST 2012" "" "ArangoDB" +.TH rcarangod 8 "Do 23. Jan 09:59:38 CET 2014" "" "ArangoDB" .SH NAME rcarangod - control script for the ArangoDB database server .SH SYNOPSIS diff --git a/Documentation/man1/arangob b/Documentation/man1/arangob index bfd78fe491..8d3332f44f 100644 --- a/Documentation/man1/arangob +++ b/Documentation/man1/arangob @@ -36,16 +36,18 @@ database name to use when connection (default: "_system") ENDOPTION OPTION "--server.username " username to use when connecting (default "root") ENDOPTION OPTION "--server.password " -password to use when connecting. Leave empty for a password prompt ENDOPTION +password to use when connecting. Don't specify this option to get a password prompt ENDOPTION +OPTION "--server.disable-authentication " +disable the password prompt and authentication when connecting to the server ENDOPTION 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 diff --git a/Documentation/man1/arangodump b/Documentation/man1/arangodump index bfa6df96c2..21c78ad99a 100644 --- a/Documentation/man1/arangodump +++ b/Documentation/man1/arangodump @@ -51,6 +51,8 @@ database name to use when connection (default: "_system") ENDOPTION OPTION "--server.username " username to use when connecting (default "root") ENDOPTION OPTION "--server.password " -password to use when connecting. Leave empty for a password prompt ENDOPTION +password to use when connecting. Don't specify this option to get a password prompt ENDOPTION +OPTION "--server.disable-authentication " +disable the password prompt and authentication when connecting to the server ENDOPTION EXAMPLES AUTHOR diff --git a/Documentation/man1/arangoimp b/Documentation/man1/arangoimp index afdef13b80..527e357ff4 100644 --- a/Documentation/man1/arangoimp +++ b/Documentation/man1/arangoimp @@ -36,12 +36,14 @@ database name to use when connection (default: "_system") ENDOPTION OPTION "--server.username " username to use when connecting (default "root") ENDOPTION OPTION "--server.password " -password to use when connecting. Leave empty for a password prompt ENDOPTION +password to use when connecting. Don't specify this option to get a password prompt ENDOPTION +OPTION "--server.disable-authentication " +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 +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. +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 +imports JSON data from file values.json into collection mydata, using a different server endpoint and database ENDEXAMPLE AUTHOR diff --git a/Documentation/man1/arangorestore b/Documentation/man1/arangorestore index 963216aff1..cae89c2a53 100644 --- a/Documentation/man1/arangorestore +++ b/Documentation/man1/arangorestore @@ -42,6 +42,8 @@ database name to use when connection (default: "_system") ENDOPTION OPTION "--server.username " username to use when connecting (default "root") ENDOPTION OPTION "--server.password " -password to use when connecting. Leave empty for a password prompt ENDOPTION +password to use when connecting. Don't specify this option to get a password prompt ENDOPTION +OPTION "--server.disable-authentication " +disable the password prompt and authentication when connecting to the server ENDOPTION EXAMPLES AUTHOR diff --git a/Documentation/man1/arangosh b/Documentation/man1/arangosh index dd2c7f6c5c..7b766253a1 100644 --- a/Documentation/man1/arangosh +++ b/Documentation/man1/arangosh @@ -26,14 +26,14 @@ database name to use when connection (default: "_system") ENDOPTION OPTION "--server.username " username to use when connecting (default "root") ENDOPTION OPTION "--server.password " -password to use when connecting. Leave empty for a password prompt ENDOPTION +password to use when connecting. Don't specify this option to get a password prompt ENDOPTION OPTION "--server.disable-authentication " -turn off autpassword to use when connecting. Leave empty for a password prompt ENDOPTION +disable the password prompt and authentication when connecting to the server ENDOPTION 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 +starts COMMAND with a specific user. Password prompt will follow if --server.disable-authentication is true. 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 From 27806d90a8052fa5ecec0c5980ae2d58adf4a179 Mon Sep 17 00:00:00 2001 From: dajester2013 Date: Thu, 23 Jan 2014 05:45:28 -0600 Subject: [PATCH 28/45] traversal(_tree) vertex filtering added params "filterVertices" and "vertexFilterType" to traversal(_tree). "filterVertices" accepts an array of examples similar to "followEdges", while "vertexFilterType" defines how to filter out vertices that do not match the examples. "vertexFilterType" can be set to "prune", "exclude", or (default) ["prune","exclude"]. --- js/server/modules/org/arangodb/ahuacatl.js | 56 +++++++++++++++++----- 1 file changed, 44 insertions(+), 12 deletions(-) diff --git a/js/server/modules/org/arangodb/ahuacatl.js b/js/server/modules/org/arangodb/ahuacatl.js index c601ed9526..fff0fb4e45 100644 --- a/js/server/modules/org/arangodb/ahuacatl.js +++ b/js/server/modules/org/arangodb/ahuacatl.js @@ -3757,6 +3757,38 @@ function TRAVERSAL_FILTER (config, vertex, edge, path) { return MATCHES(edge, config.expandEdgeExamples); } +//////////////////////////////////////////////////////////////////////////////// +/// @brief vertex filter callback function for traversal +//////////////////////////////////////////////////////////////////////////////// + +function TRAVERSAL_VERTEX_FILTER (config, vertex, path) { + "use strict"; + + if (!MATCHES(vertex, config.filterVertexExamples)) { + return config.vertexFilterType; + } +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief check typeweights of params.followEdges/params.followVertices +//////////////////////////////////////////////////////////////////////////////// + +function TRAVERSAL_CHECK_EXAMPLES_TYPEWEIGHTS (examples) { + "use strict"; + + if (TYPEWEIGHT(examples) !== TYPEWEIGHT_LIST) { + THROW(INTERNAL.errors.ERROR_QUERY_FUNCTION_ARGUMENT_TYPE_MISMATCH, func); + } + if (examples.length === 0) { + THROW(INTERNAL.errors.ERROR_QUERY_FUNCTION_ARGUMENT_TYPE_MISMATCH, func); + } + examples.forEach(function (example) { + if (TYPEWEIGHT(example) !== TYPEWEIGHT_DOCUMENT) { + THROW(INTERNAL.errors.ERROR_QUERY_FUNCTION_ARGUMENT_TYPE_MISMATCH, func); + } + }); +} + //////////////////////////////////////////////////////////////////////////////// /// @brief traverse a graph //////////////////////////////////////////////////////////////////////////////// @@ -3770,20 +3802,14 @@ function TRAVERSAL_FUNC (func, vertexCollection, edgeCollection, startVertex, di vertexCollection = COLLECTION(vertexCollection); edgeCollection = COLLECTION(edgeCollection); - + // check followEdges property if (params.followEdges) { - if (TYPEWEIGHT(params.followEdges) !== TYPEWEIGHT_LIST) { - THROW(INTERNAL.errors.ERROR_QUERY_FUNCTION_ARGUMENT_TYPE_MISMATCH, func); - } - if (params.followEdges.length === 0) { - THROW(INTERNAL.errors.ERROR_QUERY_FUNCTION_ARGUMENT_TYPE_MISMATCH, func); - } - params.followEdges.forEach(function (example) { - if (TYPEWEIGHT(example) !== TYPEWEIGHT_DOCUMENT) { - THROW(INTERNAL.errors.ERROR_QUERY_FUNCTION_ARGUMENT_TYPE_MISMATCH, func); - } - }); + TRAVERSAL_CHECK_EXAMPLES_TYPEWEIGHTS(params.followEdges); + } + // check followVertices property + if (params.followVertices) { + TRAVERSAL_CHECK_EXAMPLES_TYPEWEIGHTS(params.followVertices); } if (typeof params.visitor !== "function") { @@ -3812,6 +3838,12 @@ function TRAVERSAL_FUNC (func, vertexCollection, edgeCollection, startVertex, di config.expandEdgeExamples = params.followEdges; } + if (params.filterVertices) { + config.filter = TRAVERSAL_VERTEX_FILTER; + config.filterVertexExamples = params.filterVertices; + config.vertexFilterType = params.vertexFilterType || ["prune","exclude"]; + } + if (params._sort) { config.sort = function (l, r) { return l._key < r._key ? -1 : 1; }; } From 1cad6761703d1667aa6268e5a22436e593addd93 Mon Sep 17 00:00:00 2001 From: dajester2013 Date: Thu, 23 Jan 2014 05:46:34 -0600 Subject: [PATCH 29/45] Update ahuacatl.js fix indentation --- js/server/modules/org/arangodb/ahuacatl.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/server/modules/org/arangodb/ahuacatl.js b/js/server/modules/org/arangodb/ahuacatl.js index fff0fb4e45..b2d0c9995d 100644 --- a/js/server/modules/org/arangodb/ahuacatl.js +++ b/js/server/modules/org/arangodb/ahuacatl.js @@ -3841,7 +3841,7 @@ function TRAVERSAL_FUNC (func, vertexCollection, edgeCollection, startVertex, di if (params.filterVertices) { config.filter = TRAVERSAL_VERTEX_FILTER; config.filterVertexExamples = params.filterVertices; - config.vertexFilterType = params.vertexFilterType || ["prune","exclude"]; + config.vertexFilterType = params.vertexFilterType || ["prune","exclude"]; } if (params._sort) { From f99df3b6b0c4a4f799e5fc60f354fd77b5fd96a5 Mon Sep 17 00:00:00 2001 From: dajester2013 Date: Thu, 23 Jan 2014 05:48:23 -0600 Subject: [PATCH 30/45] Update ahuacatl.js followVertices changed to filterVertices --- js/server/modules/org/arangodb/ahuacatl.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/server/modules/org/arangodb/ahuacatl.js b/js/server/modules/org/arangodb/ahuacatl.js index b2d0c9995d..e9485f75ce 100644 --- a/js/server/modules/org/arangodb/ahuacatl.js +++ b/js/server/modules/org/arangodb/ahuacatl.js @@ -3770,7 +3770,7 @@ function TRAVERSAL_VERTEX_FILTER (config, vertex, path) { } //////////////////////////////////////////////////////////////////////////////// -/// @brief check typeweights of params.followEdges/params.followVertices +/// @brief check typeweights of params.followEdges/params.filterVertices //////////////////////////////////////////////////////////////////////////////// function TRAVERSAL_CHECK_EXAMPLES_TYPEWEIGHTS (examples) { @@ -3807,9 +3807,9 @@ function TRAVERSAL_FUNC (func, vertexCollection, edgeCollection, startVertex, di if (params.followEdges) { TRAVERSAL_CHECK_EXAMPLES_TYPEWEIGHTS(params.followEdges); } - // check followVertices property - if (params.followVertices) { - TRAVERSAL_CHECK_EXAMPLES_TYPEWEIGHTS(params.followVertices); + // check filterVertices property + if (params.filterVertices) { + TRAVERSAL_CHECK_EXAMPLES_TYPEWEIGHTS(params.filterVertices); } if (typeof params.visitor !== "function") { From bc092653356f7c85520931d658b8d326cea256eb Mon Sep 17 00:00:00 2001 From: dajester2013 Date: Thu, 23 Jan 2014 06:02:30 -0600 Subject: [PATCH 31/45] Update ahuacatl.js vertexFilterType -> vertexFilterMethod --- js/server/modules/org/arangodb/ahuacatl.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/server/modules/org/arangodb/ahuacatl.js b/js/server/modules/org/arangodb/ahuacatl.js index e9485f75ce..07270b37b0 100644 --- a/js/server/modules/org/arangodb/ahuacatl.js +++ b/js/server/modules/org/arangodb/ahuacatl.js @@ -3765,7 +3765,7 @@ function TRAVERSAL_VERTEX_FILTER (config, vertex, path) { "use strict"; if (!MATCHES(vertex, config.filterVertexExamples)) { - return config.vertexFilterType; + return config.vertexFilterMethod; } } @@ -3841,7 +3841,7 @@ function TRAVERSAL_FUNC (func, vertexCollection, edgeCollection, startVertex, di if (params.filterVertices) { config.filter = TRAVERSAL_VERTEX_FILTER; config.filterVertexExamples = params.filterVertices; - config.vertexFilterType = params.vertexFilterType || ["prune","exclude"]; + config.vertexFilterMethod = params.vertexFilterMethod || ["prune","exclude"]; } if (params._sort) { From d4227b32ef21f298fd36a16ef2f653490ca4cc8f Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Thu, 23 Jan 2014 14:57:54 +0100 Subject: [PATCH 32/45] jshund --- js/common/tests/shell-document.js | 1 - js/common/tests/shell-download.js | 1 - js/common/tests/shell-graph-traversal.js | 1 - js/common/tests/shell-hash-index.js | 1 - js/common/tests/shell-index.js | 1 - js/common/tests/shell-transactions.js | 8 -------- js/common/tests/shell-unique-constraint.js | 1 - js/common/tests/shell-unload.js | 1 - 8 files changed, 15 deletions(-) diff --git a/js/common/tests/shell-document.js b/js/common/tests/shell-document.js index 35ac6ef0c0..737fba4b2a 100644 --- a/js/common/tests/shell-document.js +++ b/js/common/tests/shell-document.js @@ -26,7 +26,6 @@ //////////////////////////////////////////////////////////////////////////////// var jsunity = require("jsunity"); -var console = require("console"); var arangodb = require("org/arangodb"); diff --git a/js/common/tests/shell-download.js b/js/common/tests/shell-download.js index 98b5468eee..f4f68bcc39 100644 --- a/js/common/tests/shell-download.js +++ b/js/common/tests/shell-download.js @@ -39,7 +39,6 @@ var fs = require("fs"); //////////////////////////////////////////////////////////////////////////////// function DownloadSuite () { - var ERRORS = internal.errors; var tempDir; var tempName; diff --git a/js/common/tests/shell-graph-traversal.js b/js/common/tests/shell-graph-traversal.js index 0364a282bf..53ebc7df88 100644 --- a/js/common/tests/shell-graph-traversal.js +++ b/js/common/tests/shell-graph-traversal.js @@ -30,7 +30,6 @@ var jsunity = require("jsunity"); -var console = require("console"); var arangodb = require("org/arangodb"); var traversal = require("org/arangodb/graph/traversal"); var graph = require("org/arangodb/graph"); diff --git a/js/common/tests/shell-hash-index.js b/js/common/tests/shell-hash-index.js index e2f3525ae5..987e69fb6e 100644 --- a/js/common/tests/shell-hash-index.js +++ b/js/common/tests/shell-hash-index.js @@ -42,7 +42,6 @@ var errors = internal.errors; //////////////////////////////////////////////////////////////////////////////// function HashIndexSuite() { - var ERRORS = internal.errors; var cn = "UnitTestsCollectionHash"; var collection = null; diff --git a/js/common/tests/shell-index.js b/js/common/tests/shell-index.js index c05c45e1ec..83f321a903 100644 --- a/js/common/tests/shell-index.js +++ b/js/common/tests/shell-index.js @@ -35,7 +35,6 @@ var jsunity = require("jsunity"); var internal = require("internal"); -var console = require("console"); var errors = internal.errors; // ----------------------------------------------------------------------------- diff --git a/js/common/tests/shell-transactions.js b/js/common/tests/shell-transactions.js index 5036f0e1c6..0e2b61afce 100644 --- a/js/common/tests/shell-transactions.js +++ b/js/common/tests/shell-transactions.js @@ -43,14 +43,6 @@ var db = arangodb.db; function TransactionsInvocationsSuite () { - var unregister = function (name) { - try { - aqlfunctions.unregister(name); - } - catch (err) { - } - }; - return { //////////////////////////////////////////////////////////////////////////////// diff --git a/js/common/tests/shell-unique-constraint.js b/js/common/tests/shell-unique-constraint.js index 3a39bd63ee..6067348552 100644 --- a/js/common/tests/shell-unique-constraint.js +++ b/js/common/tests/shell-unique-constraint.js @@ -35,7 +35,6 @@ var jsunity = require("jsunity"); var internal = require("internal"); -var console = require("console"); // ----------------------------------------------------------------------------- // --SECTION-- basic methods diff --git a/js/common/tests/shell-unload.js b/js/common/tests/shell-unload.js index a5ec373d6e..3a35176118 100644 --- a/js/common/tests/shell-unload.js +++ b/js/common/tests/shell-unload.js @@ -31,7 +31,6 @@ var jsunity = require("jsunity"); var arangodb = require("org/arangodb"); var internal = require("internal"); -var db = arangodb.db; // ----------------------------------------------------------------------------- // --SECTION-- AQL user functions tests From ed8a60226c2f15bfedf16f0bf9dddc0379350500 Mon Sep 17 00:00:00 2001 From: Michael Hackstein Date: Thu, 23 Jan 2014 16:41:12 +0100 Subject: [PATCH 33/45] Removed overspecified css entry --- js/apps/system/aardvark/frontend/css/dashboardView.css | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/apps/system/aardvark/frontend/css/dashboardView.css b/js/apps/system/aardvark/frontend/css/dashboardView.css index 4e58dde26b..aecd545809 100644 --- a/js/apps/system/aardvark/frontend/css/dashboardView.css +++ b/js/apps/system/aardvark/frontend/css/dashboardView.css @@ -254,17 +254,17 @@ li:hover h6, li.hover h6 { /*Dashboard Checkbox*/ .dropdownOut input[type=checkbox].css-checkbox, +.headerDropdown input[type=checkbox].css-checkbox, #dashboardDropdownOut input[type=checkbox].css-checkbox, #transparentHeader input[type=checkbox].css-checkbox, -#collectionsDropdown input[type=checkbox].css-checkbox, -#foxxDropdown input[type=checkbox].css-checkbox { +#collectionsDropdown input[type=checkbox].css-checkbox { display:none; } .dropdownOut input[type=checkbox].css-checkbox + label.css-label, +.headerDropdown input[type=checkbox].css-checkbox + label.css-label, #dashboardDropdownOut input[type=checkbox].css-checkbox + label.css-label, #transparentHeader input[type=checkbox].css-checkbox + label.css-label, -#foxxDropdownOut input[type=checkbox].css-checkbox + label.css-label, #collectionsDropdown input[type=checkbox].css-checkbox + label.css-label { padding-left:20px; margin-top: 0px; @@ -278,9 +278,9 @@ li:hover h6, li.hover h6 { } .dropdownOut input[type=checkbox].css-checkbox:checked + label.css-label, +.headerDropdown input[type=checkbox].css-checkbox + label.css-label, #dashboardDropdownOut input[type=checkbox].css-checkbox:checked + label.css-label, #transparentHeader input[type=checkbox].css-checkbox:checked + label.css-label, -#foxxDropdownOut input[type=checkbox].css-checkbox:checked + label.css-label, #collectionsDropdown input[type=checkbox].css-checkbox:checked + label.css-label { background-position: 0 -15px; } From ca6383b5ff0125f75b74347587706123d4f52a42 Mon Sep 17 00:00:00 2001 From: Michael Hackstein Date: Thu, 23 Jan 2014 16:42:55 +0100 Subject: [PATCH 34/45] Fixed minor css error --- js/apps/system/aardvark/frontend/css/dashboardView.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/apps/system/aardvark/frontend/css/dashboardView.css b/js/apps/system/aardvark/frontend/css/dashboardView.css index aecd545809..7039b83cb0 100644 --- a/js/apps/system/aardvark/frontend/css/dashboardView.css +++ b/js/apps/system/aardvark/frontend/css/dashboardView.css @@ -278,7 +278,7 @@ li:hover h6, li.hover h6 { } .dropdownOut input[type=checkbox].css-checkbox:checked + label.css-label, -.headerDropdown input[type=checkbox].css-checkbox + label.css-label, +.headerDropdown input[type=checkbox].css-checkbox:checked + label.css-label, #dashboardDropdownOut input[type=checkbox].css-checkbox:checked + label.css-label, #transparentHeader input[type=checkbox].css-checkbox:checked + label.css-label, #collectionsDropdown input[type=checkbox].css-checkbox:checked + label.css-label { From 6ec73a5589423b69d53063e1cacdd15647a70449 Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Thu, 23 Jan 2014 16:48:24 +0100 Subject: [PATCH 35/45] fixed reference to unused variable --- js/server/modules/org/arangodb/ahuacatl.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/server/modules/org/arangodb/ahuacatl.js b/js/server/modules/org/arangodb/ahuacatl.js index 07270b37b0..fa205e110f 100644 --- a/js/server/modules/org/arangodb/ahuacatl.js +++ b/js/server/modules/org/arangodb/ahuacatl.js @@ -3773,7 +3773,7 @@ function TRAVERSAL_VERTEX_FILTER (config, vertex, path) { /// @brief check typeweights of params.followEdges/params.filterVertices //////////////////////////////////////////////////////////////////////////////// -function TRAVERSAL_CHECK_EXAMPLES_TYPEWEIGHTS (examples) { +function TRAVERSAL_CHECK_EXAMPLES_TYPEWEIGHTS (examples, func) { "use strict"; if (TYPEWEIGHT(examples) !== TYPEWEIGHT_LIST) { @@ -3805,11 +3805,11 @@ function TRAVERSAL_FUNC (func, vertexCollection, edgeCollection, startVertex, di // check followEdges property if (params.followEdges) { - TRAVERSAL_CHECK_EXAMPLES_TYPEWEIGHTS(params.followEdges); + TRAVERSAL_CHECK_EXAMPLES_TYPEWEIGHTS(params.followEdges, func); } // check filterVertices property if (params.filterVertices) { - TRAVERSAL_CHECK_EXAMPLES_TYPEWEIGHTS(params.filterVertices); + TRAVERSAL_CHECK_EXAMPLES_TYPEWEIGHTS(params.filterVertices, func); } if (typeof params.visitor !== "function") { From 0e061e873581122824630a7687b2b980b2083f0a Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Thu, 23 Jan 2014 16:50:01 +0100 Subject: [PATCH 36/45] updated CHANGELOG --- CHANGELOG | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index c2e13624c3..860989d852 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,8 @@ v1.5.0 (XXXX-XX-XX) ------------------- +* issue #748: add vertex filtering to AQL's TRAVERSAL[_TREE]() function + * allow direct access from the `db` object to collections whose names start with an underscore (e.g. db._users). From fdee8360236bb8c2d9ca0247570c9b3f0d0fcfac Mon Sep 17 00:00:00 2001 From: Frank Celler Date: Thu, 23 Jan 2014 17:13:52 +0100 Subject: [PATCH 37/45] release version 1.4.7 --- CHANGELOG | 2 +- Makefile.in | 2 +- VERSION | 2 +- build.h | 2 +- configure | 20 +++++++++---------- configure.ac | 2 +- js/apps/system/aardvark/api-docs.json | 2 +- js/apps/system/aardvark/api-docs/batch.json | 2 +- .../system/aardvark/api-docs/collection.json | 2 +- .../system/aardvark/api-docs/database.json | 2 +- .../system/aardvark/api-docs/endpoint.json | 2 +- js/apps/system/aardvark/api-docs/import.json | 4 ++-- js/apps/system/aardvark/api-docs/job.json | 4 ++-- .../system/aardvark/api-docs/replication.json | 10 +++++----- js/apps/system/aardvark/api-docs/system.json | 2 +- 15 files changed, 30 insertions(+), 30 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 73739cf64e..dddf3ab562 100755 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,4 @@ -v1.4.7 (XXXX-XX-XX) +v1.4.7 (2014-01-23) ------------------- * issue #744: Add usage example arangoimp from Command line diff --git a/Makefile.in b/Makefile.in index 8fddb08a7f..6ebe9377b3 100644 --- a/Makefile.in +++ b/Makefile.in @@ -8301,7 +8301,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/" -e "s/\/$$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/" -e "s/\/$$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 ################################################################################ ### @brief generate json for swagger REST-API diff --git a/VERSION b/VERSION index c514bd85c2..be05bba982 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.4.6 +1.4.7 diff --git a/build.h b/build.h index d648255456..739b35ccee 100644 --- a/build.h +++ b/build.h @@ -1 +1 @@ -#define TRI_VERSION "1.4.6" +#define TRI_VERSION "1.4.7" diff --git a/configure b/configure index 6798466688..81912e4e94 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for triAGENS ArangoDB 1.4.6. +# Generated by GNU Autoconf 2.69 for triAGENS ArangoDB 1.4.7. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='triAGENS ArangoDB' PACKAGE_TARNAME='arangodb' -PACKAGE_VERSION='1.4.6' -PACKAGE_STRING='triAGENS ArangoDB 1.4.6' +PACKAGE_VERSION='1.4.7' +PACKAGE_STRING='triAGENS ArangoDB 1.4.7' PACKAGE_BUGREPORT='info@triagens.de' PACKAGE_URL='http://www.arangodb.org' @@ -1403,7 +1403,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures triAGENS ArangoDB 1.4.6 to adapt to many kinds of systems. +\`configure' configures triAGENS ArangoDB 1.4.7 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1474,7 +1474,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of triAGENS ArangoDB 1.4.6:";; + short | recursive ) echo "Configuration of triAGENS ArangoDB 1.4.7:";; esac cat <<\_ACEOF @@ -1605,7 +1605,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -triAGENS ArangoDB configure 1.4.6 +triAGENS ArangoDB configure 1.4.7 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2070,7 +2070,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by triAGENS ArangoDB $as_me 1.4.6, which was +It was created by triAGENS ArangoDB $as_me 1.4.7, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3276,7 +3276,7 @@ fi # Define the identity of the package. PACKAGE='arangodb' - VERSION='1.4.6' + VERSION='1.4.7' cat >>confdefs.h <<_ACEOF @@ -9175,7 +9175,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by triAGENS ArangoDB $as_me 1.4.6, which was +This file was extended by triAGENS ArangoDB $as_me 1.4.7, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -9242,7 +9242,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -triAGENS ArangoDB config.status 1.4.6 +triAGENS ArangoDB config.status 1.4.7 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index dc30304fef..71b4865d72 100644 --- a/configure.ac +++ b/configure.ac @@ -6,7 +6,7 @@ dnl ============================================================================ dnl --SECTION-- triAGENS GmbH Build Environment dnl ============================================================================ -AC_INIT([triAGENS ArangoDB], [1.4.6], [info@triagens.de], [arangodb], [http://www.arangodb.org]) +AC_INIT([triAGENS ArangoDB], [1.4.7], [info@triagens.de], [arangodb], [http://www.arangodb.org]) dnl ---------------------------------------------------------------------------- dnl auxillary directory for install-sh and missing diff --git a/js/apps/system/aardvark/api-docs.json b/js/apps/system/aardvark/api-docs.json index a44c25e962..10c7e39dad 100644 --- a/js/apps/system/aardvark/api-docs.json +++ b/js/apps/system/aardvark/api-docs.json @@ -1,6 +1,6 @@ { "swaggerVersion": "1.1", - "apiVersion": "1.4.6", + "apiVersion": "1.4.7", "apis": [ { "path": "api-docs/aqlfunction.{format}", diff --git a/js/apps/system/aardvark/api-docs/batch.json b/js/apps/system/aardvark/api-docs/batch.json index 20ac0357b6..77abcaf9b0 100644 --- a/js/apps/system/aardvark/api-docs/batch.json +++ b/js/apps/system/aardvark/api-docs/batch.json @@ -32,7 +32,7 @@ "notes": "Executes a batch request. A batch request can contain any number of other requests that can be sent to ArangoDB in isolation. The benefit of using batch requests is that batching requests requires less client/server roundtrips than when sending isolated requests.

All parts of a batch request are executed serially on the server. The server will return the results of all parts in a single response when all parts are finished.

Technically, a batch request is a multipart HTTP request, with content-type multipart/form-data. A batch request consists of an envelope and the individual batch part actions. Batch part actions are \"regular\" HTTP requests, including full header and an optional body. Multiple batch parts are separated by a boundary identifier. The boundary identifier is declared in the batch envelope. The MIME content-type for each individual batch part must be application/x-arango-batchpart.

The response sent by the server will be an HTTP 200 response, with an error summary header x-arango-errors. This header contains the number of batch parts that failed with an HTTP error code of at least 400.

The response sent by the server is a multipart response, too. It contains the individual HTTP responses for all batch parts, including the full HTTP result header (with status code and other potential headers) and an optional result body. The individual batch parts in the result are seperated using the same boundary value as specified in the request.

The order of batch parts in the response will be the same as in the original client request. Client can additionally use the Content-Id MIME header in a batch part to define an individual id for each batch part. The server will return this id is the batch part responses, too.

", "summary": "executes a batch request", "httpMethod": "POST", - "examples": "

unix> curl -X POST --header 'Content-Type: multipart/form-data; boundary=SomeBoundaryValue' --data @- --dump - http://localhost:8529/_api/batch\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: myId1\r\n\r\nGET /_api/version HTTP/1.1\r\n\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: myId2\r\n\r\nDELETE /_api/collection/products HTTP/1.1\r\n\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: someId\r\n\r\nPOST /_api/collection/products HTTP/1.1\r\n\r\n{ \"name\": \"products\" }\r\n\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: nextId\r\n\r\nGET /_api/collection/products/figures HTTP/1.1\r\n\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: otherId\r\n\r\nDELETE /_api/collection/products HTTP/1.1\r\n--SomeBoundaryValue--\r\n\n\nHTTP/1.1 200 OK\ncontent-type: multipart/form-data; boundary=SomeBoundaryValue\nx-arango-errors: 1\n\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: myId1\r\n\r\nHTTP/1.1 200 OK\r\ncontent-type: application/json; charset=utf-8\r\ncontent-length: 37\r\n\r\n{\"server\":\"arango\",\"version\":\"1.4.6\"}\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: myId2\r\n\r\nHTTP/1.1 404 Not Found\r\ncontent-type: application/json; charset=utf-8\r\ncontent-length: 88\r\n\r\n{\"error\":true,\"code\":404,\"errorNum\":1203,\"errorMessage\":\"unknown collection 'products'\"}\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: someId\r\n\r\nHTTP/1.1 200 OK\r\nlocation: /_db/_system/_api/collection/products\r\ncontent-type: application/json; charset=utf-8\r\ncontent-length: 137\r\n\r\n{\"id\":\"346505639\",\"name\":\"products\",\"waitForSync\":false,\"isVolatile\":false,\"isSystem\":false,\"status\":3,\"type\":2,\"error\":false,\"code\":200}\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: nextId\r\n\r\nHTTP/1.1 200 OK\r\nlocation: /_db/_system/_api/collection/products/figures\r\ncontent-type: application/json; charset=utf-8\r\ncontent-length: 526\r\n\r\n{\"id\":\"346505639\",\"name\":\"products\",\"doCompact\":true,\"isVolatile\":false,\"isSystem\":false,\"journalSize\":1048576,\"keyOptions\":{\"type\":\"traditional\",\"allowUserKeys\":true},\"waitForSync\":false,\"count\":0,\"figures\":{\"alive\":{\"count\":0,\"size\":0},\"dead\":{\"count\":0,\"size\":0,\"deletion\":0},\"datafiles\":{\"count\":0,\"fileSize\":0},\"journals\":{\"count\":0,\"fileSize\":0},\"compactors\":{\"count\":0,\"fileSize\":0},\"shapefiles\":{\"count\":1,\"fileSize\":2097152},\"shapes\":{\"count\":6},\"attributes\":{\"count\":0}},\"status\":3,\"type\":2,\"error\":false,\"code\":200}\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: otherId\r\n\r\nHTTP/1.1 200 OK\r\ncontent-type: application/json; charset=utf-8\r\ncontent-length: 43\r\n\r\n{\"id\":\"346505639\",\"error\":false,\"code\":200}\r\n--SomeBoundaryValue--\n\n

", + "examples": "

unix> curl -X POST --header 'Content-Type: multipart/form-data; boundary=SomeBoundaryValue' --data @- --dump - http://localhost:8529/_api/batch\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: myId1\r\n\r\nGET /_api/version HTTP/1.1\r\n\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: myId2\r\n\r\nDELETE /_api/collection/products HTTP/1.1\r\n\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: someId\r\n\r\nPOST /_api/collection/products HTTP/1.1\r\n\r\n{ \"name\": \"products\" }\r\n\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: nextId\r\n\r\nGET /_api/collection/products/figures HTTP/1.1\r\n\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: otherId\r\n\r\nDELETE /_api/collection/products HTTP/1.1\r\n--SomeBoundaryValue--\r\n\n\nHTTP/1.1 200 OK\ncontent-type: multipart/form-data; boundary=SomeBoundaryValue\nx-arango-errors: 1\n\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: myId1\r\n\r\nHTTP/1.1 200 OK\r\ncontent-type: application/json; charset=utf-8\r\ncontent-length: 37\r\n\r\n{\"server\":\"arango\",\"version\":\"1.4.7\"}\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: myId2\r\n\r\nHTTP/1.1 404 Not Found\r\ncontent-type: application/json; charset=utf-8\r\ncontent-length: 88\r\n\r\n{\"error\":true,\"code\":404,\"errorNum\":1203,\"errorMessage\":\"unknown collection 'products'\"}\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: someId\r\n\r\nHTTP/1.1 200 OK\r\nlocation: /_db/_system/_api/collection/products\r\ncontent-type: application/json; charset=utf-8\r\ncontent-length: 137\r\n\r\n{\"id\":\"346505639\",\"name\":\"products\",\"waitForSync\":false,\"isVolatile\":false,\"isSystem\":false,\"status\":3,\"type\":2,\"error\":false,\"code\":200}\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: nextId\r\n\r\nHTTP/1.1 200 OK\r\nlocation: /_db/_system/_api/collection/products/figures\r\ncontent-type: application/json; charset=utf-8\r\ncontent-length: 526\r\n\r\n{\"id\":\"346505639\",\"name\":\"products\",\"doCompact\":true,\"isVolatile\":false,\"isSystem\":false,\"journalSize\":1048576,\"keyOptions\":{\"type\":\"traditional\",\"allowUserKeys\":true},\"waitForSync\":false,\"count\":0,\"figures\":{\"alive\":{\"count\":0,\"size\":0},\"dead\":{\"count\":0,\"size\":0,\"deletion\":0},\"datafiles\":{\"count\":0,\"fileSize\":0},\"journals\":{\"count\":0,\"fileSize\":0},\"compactors\":{\"count\":0,\"fileSize\":0},\"shapefiles\":{\"count\":1,\"fileSize\":2097152},\"shapes\":{\"count\":6},\"attributes\":{\"count\":0}},\"status\":3,\"type\":2,\"error\":false,\"code\":200}\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: otherId\r\n\r\nHTTP/1.1 200 OK\r\ncontent-type: application/json; charset=utf-8\r\ncontent-length: 43\r\n\r\n{\"id\":\"346505639\",\"error\":false,\"code\":200}\r\n--SomeBoundaryValue--\n\n

", "nickname": "executesABatchRequest" } ], diff --git a/js/apps/system/aardvark/api-docs/collection.json b/js/apps/system/aardvark/api-docs/collection.json index 6a29add436..9b971c1046 100644 --- a/js/apps/system/aardvark/api-docs/collection.json +++ b/js/apps/system/aardvark/api-docs/collection.json @@ -19,7 +19,7 @@ "notes": "Creates an new collection with a given name. The request must contain an object with the following attributes.

- name: The name of the collection.

- waitForSync (optional, default: false): If true then the data is synchronised to disk before returning from a create or update of a document.

- doCompact (optional, default is true): whether or not the collection will be compacted.

- journalSize (optional, default is a @ref CommandLineArangod \"configuration parameter\"): The maximal size of a journal or datafile. Note that this also limits the maximal size of a single object. Must be at least 1MB.

- isSystem (optional, default is false): If true, create a system collection. In this case collection-name should start with an underscore. End users should normally create non-system collections only. API implementors may be required to create system collections in very special occasions, but normally a regular collection will do.

- isVolatile (optional, default is false): If true then the collection data is kept in-memory only and not made persistent. Unloading the collection will cause the collection data to be discarded. Stopping or re-starting the server will also cause full loss of data in the collection. Setting this option will make the resulting collection be slightly faster than regular collections because ArangoDB does not enforce any synchronisation to disk and does not calculate any CRC checksums for datafiles (as there are no datafiles).

This option should threrefore be used for cache-type collections only, and not for data that cannot be re-created otherwise.

- keyOptions (optional) additional options for key generation. If specified, then keyOptions should be a JSON array containing the following attributes (note: some of them are optional): - type: specifies the type of the key generator. The currently available generators are traditional and autoincrement. - allowUserKeys: if set to true, then it is allowed to supply own key values in the _key attribute of a document. If set to false, then the key generator will solely be responsible for generating keys and supplying own key values in the _key attribute of documents is considered an error. - increment: increment value for autoincrement key generator. Not used for other key generator types. - offset: initial offset value for autoincrement key generator. Not used for other key generator types.

- type (optional, default is 2): the type of the collection to create. The following values for type are valid: - 2: document collection - 3: edges collection

", "summary": "creates a collection", "httpMethod": "POST", - "examples": "

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/collection\n{\"name\":\"testCollectionBasics\"}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nlocation: /_db/_system/_api/collection/testCollectionBasics\n\n{ \n  \"id\" : \"19480999\", \n  \"name\" : \"testCollectionBasics\", \n  \"waitForSync\" : false, \n  \"isVolatile\" : false, \n  \"isSystem\" : false, \n  \"status\" : 3, \n  \"type\" : 2, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\nunix> curl -X POST --data @- --dump - http://localhost:8529/_api/collection\n{\"name\":\"testCollectionEdges\",\"type\":3}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nlocation: /_db/_system/_api/collection/testCollectionEdges\n\n{ \n  \"id\" : \"20136359\", \n  \"name\" : \"testCollectionEdges\", \n  \"waitForSync\" : false, \n  \"isVolatile\" : false, \n  \"isSystem\" : false, \n  \"status\" : 3, \n  \"type\" : 3, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n



unix> curl -X POST --data @- --dump - http://localhost:8529/_api/collection\n{\"name\":\"testCollectionUsers\",\"keyOptions\":{\"type\":\"autoincrement\",\"increment\":5,\"allowUserKeys\":true}}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nlocation: /_db/_system/_api/collection/testCollectionUsers\n\n{ \n  \"id\" : \"20922791\", \n  \"name\" : \"testCollectionUsers\", \n  \"waitForSync\" : false, \n  \"isVolatile\" : false, \n  \"isSystem\" : false, \n  \"status\" : 3, \n  \"type\" : 2, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", + "examples": "

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/collection\n{\"name\":\"testCollectionBasics\"}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nlocation: /_db/_system/_api/collection/testCollectionBasics\n\n{ \n  \"id\" : \"19546535\", \n  \"name\" : \"testCollectionBasics\", \n  \"waitForSync\" : false, \n  \"isVolatile\" : false, \n  \"isSystem\" : false, \n  \"status\" : 3, \n  \"type\" : 2, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\nunix> curl -X POST --data @- --dump - http://localhost:8529/_api/collection\n{\"name\":\"testCollectionEdges\",\"type\":3}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nlocation: /_db/_system/_api/collection/testCollectionEdges\n\n{ \n  \"id\" : \"20201895\", \n  \"name\" : \"testCollectionEdges\", \n  \"waitForSync\" : false, \n  \"isVolatile\" : false, \n  \"isSystem\" : false, \n  \"status\" : 3, \n  \"type\" : 3, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n



unix> curl -X POST --data @- --dump - http://localhost:8529/_api/collection\n{\"name\":\"testCollectionUsers\",\"keyOptions\":{\"type\":\"autoincrement\",\"increment\":5,\"allowUserKeys\":true}}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nlocation: /_db/_system/_api/collection/testCollectionUsers\n\n{ \n  \"id\" : \"20922791\", \n  \"name\" : \"testCollectionUsers\", \n  \"waitForSync\" : false, \n  \"isVolatile\" : false, \n  \"isSystem\" : false, \n  \"status\" : 3, \n  \"type\" : 2, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", "nickname": "createsACollection" } ], diff --git a/js/apps/system/aardvark/api-docs/database.json b/js/apps/system/aardvark/api-docs/database.json index 71bf7a8ccc..7b6e386add 100644 --- a/js/apps/system/aardvark/api-docs/database.json +++ b/js/apps/system/aardvark/api-docs/database.json @@ -74,7 +74,7 @@ "notes": "Retrieves information about the current database

The response is a JSON object with the following attributes:

- name: the name of the current database

- id: the id of the current database

- path: the filesystem path of the current database

- isSystem: whether or not the current database is the _system database

", "summary": "retrieves information about the current database", "httpMethod": "GET", - "examples": "

unix> curl --dump - http://localhost:8529/_api/database/current\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : { \n    \"name\" : \"_system\", \n    \"id\" : \"82343\", \n    \"path\" : \"/tmp/vocdir.60594/databases/database-82343\", \n    \"isSystem\" : true \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", + "examples": "

unix> curl --dump - http://localhost:8529/_api/database/current\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : { \n    \"name\" : \"_system\", \n    \"id\" : \"82343\", \n    \"path\" : \"/tmp/vocdir.30582/databases/database-82343\", \n    \"isSystem\" : true \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", "nickname": "retrievesInformationAboutTheCurrentDatabase" } ], diff --git a/js/apps/system/aardvark/api-docs/endpoint.json b/js/apps/system/aardvark/api-docs/endpoint.json index f1585e9882..d9ac3c3ce1 100644 --- a/js/apps/system/aardvark/api-docs/endpoint.json +++ b/js/apps/system/aardvark/api-docs/endpoint.json @@ -24,7 +24,7 @@ "notes": "Returns a list of all configured endpoints the server is listening on. For each endpoint, the list of allowed databases is returned too if set.

The result is a JSON hash which has the endpoints as keys, and the list of mapped database names as values for each endpoint.

If a list of mapped databases is empty, it means that all databases can be accessed via the endpoint. If a list of mapped databases contains more than one database name, this means that any of the databases might be accessed via the endpoint, and the first database in the list will be treated as the default database for the endpoint. The default database will be used when an incoming request does not specify a database name in the request explicitly.

Note: retrieving the list of all endpoints is allowed in the system database only. Calling this action in any other database will make the server return an error.

", "summary": "returns a list of all endpoints", "httpMethod": "GET", - "examples": "

unix> curl --dump - http://localhost:8529/_api/endpoint\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n[ \n  { \n    \"endpoint\" : \"tcp://127.0.0.1:30594\", \n    \"databases\" : [ ] \n  }, \n  { \n    \"endpoint\" : \"tcp://127.0.0.1:8532\", \n    \"databases\" : [ \n      \"mydb1\", \n      \"mydb2\" \n    ] \n  } \n]\n\n

", + "examples": "

unix> curl --dump - http://localhost:8529/_api/endpoint\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n[ \n  { \n    \"endpoint\" : \"tcp://127.0.0.1:30582\", \n    \"databases\" : [ ] \n  }, \n  { \n    \"endpoint\" : \"tcp://127.0.0.1:8532\", \n    \"databases\" : [ \n      \"mydb1\", \n      \"mydb2\" \n    ] \n  } \n]\n\n

", "nickname": "returnsAListOfAllEndpoints" } ], diff --git a/js/apps/system/aardvark/api-docs/import.json b/js/apps/system/aardvark/api-docs/import.json index b3f33282da..2d0bddf626 100644 --- a/js/apps/system/aardvark/api-docs/import.json +++ b/js/apps/system/aardvark/api-docs/import.json @@ -41,7 +41,7 @@ "paramType": "query", "required": "True", "name": "type", - "description": "Determines how the body of the request will be interpreted. type can have the following values: " + "description": "Determines how the body of the request will be interpreted. type can have the following values: - documents: when this type is used, each line in the request body is expected to be an individual JSON-encoded document. Multiple JSON documents in the request body need to be separated by newlines. - list: when this type is used, the request body must contain a single JSON-encoded list of individual documents to import. - auto: if set, this will automatically determine the body type (either documents or list). " }, { "dataType": "String", @@ -115,7 +115,7 @@ "paramType": "body", "required": "true", "name": "documents", - "description": "The body must consist of JSON-encoded lists of attribute values, with one line per per document. The first line of the request must be a JSON-encoded list of attribute names. " + "description": "The body must consist of JSON-encoded lists of attribute values, with one line per per document. The first row of the request must be a JSON-encoded list of attribute names. These attribute names are used for the data in the subsequent rows. " }, { "dataType": "String", diff --git a/js/apps/system/aardvark/api-docs/job.json b/js/apps/system/aardvark/api-docs/job.json index 593dcb3adf..ca4fda5796 100644 --- a/js/apps/system/aardvark/api-docs/job.json +++ b/js/apps/system/aardvark/api-docs/job.json @@ -28,7 +28,7 @@ "notes": "Returns the result of an async job identified by job-id. If the async job result is present on the server, the result will be removed from the list of result. That means this method can be called for each job-id once.

The method will return the original job result's headers and body, plus the additional HTTP header x-arango-async-job-id. If this header is present, then the job was found and the response contains the original job's result. If the header is not present, the job was not found and the response contains status information from the job amanger.

", "summary": "Returns the result of an async job", "httpMethod": "PUT", - "examples": "Not providing a job-id:

unix> curl -X PUT --dump - http://localhost:8529/_api/job/\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{\"error\":true,\"errorMessage\":\"bad parameter\",\"code\":400,\"errorNum\":400}\n\n

Providing a job-id for a non-existing job:

unix> curl -X PUT --dump - http://localhost:8529/_api/job/foobar\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{\"error\":true,\"errorMessage\":\"not found\",\"code\":404,\"errorNum\":404}\n\n

Fetching the result of an HTTP GET job:

unix> curl --header 'x-arango-async: store' --dump - http://localhost:8529/_api/version\n\nHTTP/1.1 202 Accepted\ncontent-type: text/plain; charset=utf-8\nx-arango-async-id: 409813415\n\nunix> curl -X PUT --dump - http://localhost:8529/_api/job/409813415\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nx-arango-async-id: 409813415\n\n{\"server\":\"arango\",\"version\":\"1.4.6\"}\n\n

Fetching the result of an HTTP POST job that failed:

unix> curl -X POST --header 'x-arango-async: store' --data @- --dump - http://localhost:8529/_api/collection\n{\"name\":\" this name is invalid \"}\n\nHTTP/1.1 202 Accepted\ncontent-type: text/plain; charset=utf-8\nx-arango-async-id: 409878951\n\nunix> curl -X PUT --dump - http://localhost:8529/_api/job/409878951\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\nx-arango-async-id: 409878951\n\n{\"error\":true,\"code\":400,\"errorNum\":1208,\"errorMessage\":\"cannot create collection: illegal name\"}\n\n

", + "examples": "Not providing a job-id:

unix> curl -X PUT --dump - http://localhost:8529/_api/job/\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{\"error\":true,\"errorMessage\":\"bad parameter\",\"code\":400,\"errorNum\":400}\n\n

Providing a job-id for a non-existing job:

unix> curl -X PUT --dump - http://localhost:8529/_api/job/foobar\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{\"error\":true,\"errorMessage\":\"not found\",\"code\":404,\"errorNum\":404}\n\n

Fetching the result of an HTTP GET job:

unix> curl --header 'x-arango-async: store' --dump - http://localhost:8529/_api/version\n\nHTTP/1.1 202 Accepted\ncontent-type: text/plain; charset=utf-8\nx-arango-async-id: 409813415\n\nunix> curl -X PUT --dump - http://localhost:8529/_api/job/409813415\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nx-arango-async-id: 409813415\n\n{\"server\":\"arango\",\"version\":\"1.4.7\"}\n\n

Fetching the result of an HTTP POST job that failed:

unix> curl -X POST --header 'x-arango-async: store' --data @- --dump - http://localhost:8529/_api/collection\n{\"name\":\" this name is invalid \"}\n\nHTTP/1.1 202 Accepted\ncontent-type: text/plain; charset=utf-8\nx-arango-async-id: 409878951\n\nunix> curl -X PUT --dump - http://localhost:8529/_api/job/409878951\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\nx-arango-async-id: 409878951\n\n{\"error\":true,\"code\":400,\"errorNum\":1208,\"errorMessage\":\"cannot create collection: illegal name\"}\n\n

", "nickname": "ReturnsTheResultOfAnAsyncJob" } ], @@ -106,7 +106,7 @@ "notes": "Deletes either all job results, expired job results, or the result of a specific job. Clients can use this method to perform an eventual garbage collection of job results.

", "summary": "Deletes the result of async jobs", "httpMethod": "DELETE", - "examples": "Deleting all jobs:

unix> curl --header 'x-arango-async: store' --dump - http://localhost:8529/_api/version\n\nHTTP/1.1 202 Accepted\ncontent-type: text/plain; charset=utf-8\nx-arango-async-id: 410075559\n\nunix> curl -X DELETE --dump - http://localhost:8529/_api/job/all\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : true \n}\n\n

Deleting expired jobs:

unix> curl --header 'x-arango-async: store' --dump - http://localhost:8529/_api/version\n\nHTTP/1.1 202 Accepted\ncontent-type: text/plain; charset=utf-8\nx-arango-async-id: 410141095\n\nunix> curl -X DELETE --dump - http://localhost:8529/_api/job/expired?stamp=1390252233\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : true \n}\n\n

Deleting the result of a specific job:

unix> curl --header 'x-arango-async: store' --dump - http://localhost:8529/_api/version\n\nHTTP/1.1 202 Accepted\ncontent-type: text/plain; charset=utf-8\nx-arango-async-id: 410206631\n\nunix> curl -X DELETE --dump - http://localhost:8529/_api/job/410206631\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : true \n}\n\n

Deleting the result of a non-existing job:

unix> curl -X DELETE --dump - http://localhost:8529/_api/job/foobar\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"errorMessage\" : \"not found\", \n  \"code\" : 404, \n  \"errorNum\" : 404 \n}\n\n

", + "examples": "Deleting all jobs:

unix> curl --header 'x-arango-async: store' --dump - http://localhost:8529/_api/version\n\nHTTP/1.1 202 Accepted\ncontent-type: text/plain; charset=utf-8\nx-arango-async-id: 410075559\n\nunix> curl -X DELETE --dump - http://localhost:8529/_api/job/all\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : true \n}\n\n

Deleting expired jobs:

unix> curl --header 'x-arango-async: store' --dump - http://localhost:8529/_api/version\n\nHTTP/1.1 202 Accepted\ncontent-type: text/plain; charset=utf-8\nx-arango-async-id: 410141095\n\nunix> curl -X DELETE --dump - http://localhost:8529/_api/job/expired?stamp=1390493937\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : true \n}\n\n

Deleting the result of a specific job:

unix> curl --header 'x-arango-async: store' --dump - http://localhost:8529/_api/version\n\nHTTP/1.1 202 Accepted\ncontent-type: text/plain; charset=utf-8\nx-arango-async-id: 410206631\n\nunix> curl -X DELETE --dump - http://localhost:8529/_api/job/410206631\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : true \n}\n\n

Deleting the result of a non-existing job:

unix> curl -X DELETE --dump - http://localhost:8529/_api/job/foobar\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"errorMessage\" : \"not found\", \n  \"code\" : 404, \n  \"errorNum\" : 404 \n}\n\n

", "nickname": "DeletesTheResultOfAsyncJobs" } ], diff --git a/js/apps/system/aardvark/api-docs/replication.json b/js/apps/system/aardvark/api-docs/replication.json index 2fe00daa40..28290191e9 100644 --- a/js/apps/system/aardvark/api-docs/replication.json +++ b/js/apps/system/aardvark/api-docs/replication.json @@ -78,7 +78,7 @@ "notes": "Returns the current state of the server's replication logger. The state will include information about whether the logger is running and about the last logged tick value. This tick value is important for incremental fetching of data.

The state API can be called regardless of whether the logger is currently running or not.

The body of the response contains a JSON object with the following attributes:

- state: the current logger state as a JSON hash array with the following sub-attributes:

- running: whether or not the logger is running

- lastLogTick: the tick value of the latest tick the logger has logged. This value can be used for incremental fetching of log data.

- totalEvents: total number of events logged since the server was started. The value is not reset between multiple stops and re-starts of the logger.

- time: the current date and time on the logger server

- server: a JSON hash with the following sub-attributes:

- version: the logger server's version

- serverId: the logger server's id

- clients: a list of all replication clients that ever connected to the logger since it was started. This list can be used to determine approximately how much data the individual clients have already fetched from the logger server. Each entry in the list contains a time value indicating the server time the client last fetched data from the replication logger. The lastServedTick value of each client indicates the latest tick value sent to the client upon a client request to the replication logger.

", "summary": "returns the replication logger state", "httpMethod": "GET", - "examples": "Returns the state of an inactive replication logger.

unix> curl --dump - http://localhost:8529/_api/replication/logger-state\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"state\" : { \n    \"running\" : false, \n    \"lastLogTick\" : \"397558183\", \n    \"totalEvents\" : 2, \n    \"time\" : \"2014-01-20T21:04:23Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"1.4.6\", \n    \"serverId\" : \"190048212006786\" \n  }, \n  \"clients\" : [ ] \n}\n\n

Returns the state of an active replication logger.

unix> curl --dump - http://localhost:8529/_api/replication/logger-state\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"state\" : { \n    \"running\" : true, \n    \"lastLogTick\" : \"397885863\", \n    \"totalEvents\" : 3, \n    \"time\" : \"2014-01-20T21:04:24Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"1.4.6\", \n    \"serverId\" : \"190048212006786\" \n  }, \n  \"clients\" : [ ] \n}\n\n

", + "examples": "Returns the state of an inactive replication logger.

unix> curl --dump - http://localhost:8529/_api/replication/logger-state\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"state\" : { \n    \"running\" : false, \n    \"lastLogTick\" : \"397558183\", \n    \"totalEvents\" : 2, \n    \"time\" : \"2014-01-23T16:12:50Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"1.4.7\", \n    \"serverId\" : \"190048212006786\" \n  }, \n  \"clients\" : [ ] \n}\n\n

Returns the state of an active replication logger.

unix> curl --dump - http://localhost:8529/_api/replication/logger-state\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"state\" : { \n    \"running\" : true, \n    \"lastLogTick\" : \"397885863\", \n    \"totalEvents\" : 3, \n    \"time\" : \"2014-01-23T16:12:50Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"1.4.7\", \n    \"serverId\" : \"190048212006786\" \n  }, \n  \"clients\" : [ ] \n}\n\n

", "nickname": "returnsTheReplicationLoggerState" } ], @@ -332,7 +332,7 @@ "notes": "Returns the list of collections and indexes available on the server. This list can be used by replication clients to initiate an initial sync with the server.

The response will contain a JSON hash array with the collection and state attributes.

collections is a list of collections with the following sub-attributes:

- parameters: the collection properties

- indexes: a list of the indexes of a the collection. Primary indexes and edges indexes are not included in this list.

tick: the system-wide tick value at the start of the dump

The state attribute contains the current state of the replication logger. It contains the following sub-attributes:

- running: whether or not the replication logger is currently active

- lastLogTick: the value of the last tick the replication logger has written

- time: the current time on the server

Replication clients should note the lastLogTick value returned. They can then fetch collections' data using the dump method up to the value of lastLogTick, and query the continuous replication log for log events after this tick value.

To create a full copy of the collections on the logger server, a replication client can execute these steps:

- call the /inventory API method. This returns the lastLogTick value and the list of collections and indexes from the logger server.

- for each collection returned by /inventory, create the collection locally and call /dump to stream the collection data to the client, up to the value of lastLogTick. After that, the client can create the indexes on the collections as they were reported by /inventory.

If the clients wants to continuously stream replication log events from the logger server, the following additional steps need to be carried out:

- the client should call /logger-follow initially to fetch the first batch of replication events that were logged after the client's call to /inventory.

The call to /logger-follow should use a from parameter with the value of the lastLogTick as reported by /inventory. The call to /logger-follow will return the x-arango-replication-lastincluded which will contain the last tick value included in the response.

- the client can then continuously call /logger-follow to incrementally fetch new replication events that occurred after the last transfer.

Calls should use a from parameter with the value of the x-arango-replication-lastincluded header of the previous response. If there are no more replication events, the response will be empty and clients can go to sleep for a while and try again later.

", "summary": "returns an inventory of collections and indexes", "httpMethod": "GET", - "examples": "

unix> curl --dump - http://localhost:8529/_api/replication/inventory\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"collections\" : [ \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"16269735\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"animals\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"14827943\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"demo\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"132465063\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"vertices1\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 3, \n        \"cid\" : \"135217575\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"edges2\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    } \n  ], \n  \"state\" : { \n    \"running\" : false, \n    \"lastLogTick\" : \"404242855\", \n    \"totalEvents\" : 22, \n    \"time\" : \"2014-01-20T21:04:25Z\" \n  }, \n  \"tick\" : \"404308391\" \n}\n\n

With some additional indexes:

unix> curl --dump - http://localhost:8529/_api/replication/inventory\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"collections\" : [ \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"16269735\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"animals\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"14827943\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"demo\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"404373927\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"IndexedCollection1\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ \n        { \n          \"id\" : \"405160359\", \n          \"type\" : \"hash\", \n          \"unique\" : false, \n          \"fields\" : [ \n            \"name\" \n          ] \n        }, \n        { \n          \"id\" : \"405422503\", \n          \"type\" : \"skiplist\", \n          \"unique\" : true, \n          \"fields\" : [ \n            \"a\", \n            \"b\" \n          ] \n        }, \n        { \n          \"id\" : \"405488039\", \n          \"type\" : \"cap\", \n          \"unique\" : false, \n          \"size\" : 500, \n          \"byteSize\" : 0 \n        } \n      ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"405553575\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"IndexedCollection2\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ \n        { \n          \"id\" : \"406340007\", \n          \"type\" : \"fulltext\", \n          \"unique\" : false, \n          \"minLength\" : 10, \n          \"fields\" : [ \n            \"text\" \n          ] \n        }, \n        { \n          \"id\" : \"406536615\", \n          \"type\" : \"skiplist\", \n          \"unique\" : false, \n          \"fields\" : [ \n            \"a\" \n          ] \n        }, \n        { \n          \"id\" : \"406602151\", \n          \"type\" : \"cap\", \n          \"unique\" : false, \n          \"size\" : 0, \n          \"byteSize\" : 1048576 \n        } \n      ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"132465063\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"vertices1\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 3, \n        \"cid\" : \"135217575\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"edges2\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    } \n  ], \n  \"state\" : { \n    \"running\" : false, \n    \"lastLogTick\" : \"404242855\", \n    \"totalEvents\" : 22, \n    \"time\" : \"2014-01-20T21:04:25Z\" \n  }, \n  \"tick\" : \"406602151\" \n}\n\n

", + "examples": "

unix> curl --dump - http://localhost:8529/_api/replication/inventory\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"collections\" : [ \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"16269735\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"animals\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"14827943\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"demo\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"132465063\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"vertices1\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 3, \n        \"cid\" : \"135217575\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"edges2\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    } \n  ], \n  \"state\" : { \n    \"running\" : false, \n    \"lastLogTick\" : \"404242855\", \n    \"totalEvents\" : 22, \n    \"time\" : \"2014-01-23T16:12:50Z\" \n  }, \n  \"tick\" : \"404308391\" \n}\n\n

With some additional indexes:

unix> curl --dump - http://localhost:8529/_api/replication/inventory\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"collections\" : [ \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"16269735\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"animals\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"14827943\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"demo\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"404373927\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"IndexedCollection1\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ \n        { \n          \"id\" : \"405160359\", \n          \"type\" : \"hash\", \n          \"unique\" : false, \n          \"fields\" : [ \n            \"name\" \n          ] \n        }, \n        { \n          \"id\" : \"405422503\", \n          \"type\" : \"skiplist\", \n          \"unique\" : true, \n          \"fields\" : [ \n            \"a\", \n            \"b\" \n          ] \n        }, \n        { \n          \"id\" : \"405488039\", \n          \"type\" : \"cap\", \n          \"unique\" : false, \n          \"size\" : 500, \n          \"byteSize\" : 0 \n        } \n      ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"405553575\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"IndexedCollection2\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ \n        { \n          \"id\" : \"406340007\", \n          \"type\" : \"fulltext\", \n          \"unique\" : false, \n          \"minLength\" : 10, \n          \"fields\" : [ \n            \"text\" \n          ] \n        }, \n        { \n          \"id\" : \"406536615\", \n          \"type\" : \"skiplist\", \n          \"unique\" : false, \n          \"fields\" : [ \n            \"a\" \n          ] \n        }, \n        { \n          \"id\" : \"406602151\", \n          \"type\" : \"cap\", \n          \"unique\" : false, \n          \"size\" : 0, \n          \"byteSize\" : 1048576 \n        } \n      ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"132465063\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"vertices1\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 3, \n        \"cid\" : \"135217575\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"edges2\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    } \n  ], \n  \"state\" : { \n    \"running\" : false, \n    \"lastLogTick\" : \"404242855\", \n    \"totalEvents\" : 22, \n    \"time\" : \"2014-01-23T16:12:50Z\" \n  }, \n  \"tick\" : \"406602151\" \n}\n\n

", "nickname": "returnsAnInventoryOfCollectionsAndIndexes" } ], @@ -565,7 +565,7 @@ "notes": "Starts the replication applier. This will return immediately if the replication applier is already running.

If the replication applier is not already running, the applier configuration will be checked, and if it is complete, the applier will be started in a background thread. This means that even if the applier will encounter any errors while running, they will not be reported in the response to this method.

To detect replication applier errors after the applier was started, use the /_api/replication/applier-state API instead.

", "summary": "starts the replication applier", "httpMethod": "PUT", - "examples": "

unix> curl -X PUT --dump - http://localhost:8529/_api/replication/applier-start\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"state\" : { \n    \"running\" : true, \n    \"lastAppliedContinuousTick\" : null, \n    \"lastProcessedContinuousTick\" : null, \n    \"lastAvailableContinuousTick\" : null, \n    \"progress\" : { \n      \"time\" : \"2014-01-20T21:03:04Z\", \n      \"message\" : \"applier created\", \n      \"failedConnects\" : 0 \n    }, \n    \"totalRequests\" : 0, \n    \"totalFailedConnects\" : 0, \n    \"totalEvents\" : 0, \n    \"lastError\" : { \n      \"errorNum\" : 0 \n    }, \n    \"time\" : \"2014-01-20T21:04:27Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"1.4.6\", \n    \"serverId\" : \"190048212006786\" \n  }, \n  \"endpoint\" : \"tcp://127.0.0.1:8529\", \n  \"database\" : \"_system\" \n}\n\n

", + "examples": "

unix> curl -X PUT --dump - http://localhost:8529/_api/replication/applier-start\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"state\" : { \n    \"running\" : true, \n    \"lastAppliedContinuousTick\" : null, \n    \"lastProcessedContinuousTick\" : null, \n    \"lastAvailableContinuousTick\" : null, \n    \"progress\" : { \n      \"time\" : \"2014-01-23T16:12:11Z\", \n      \"message\" : \"applier created\", \n      \"failedConnects\" : 0 \n    }, \n    \"totalRequests\" : 0, \n    \"totalFailedConnects\" : 0, \n    \"totalEvents\" : 0, \n    \"lastError\" : { \n      \"errorNum\" : 0 \n    }, \n    \"time\" : \"2014-01-23T16:12:51Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"1.4.7\", \n    \"serverId\" : \"190048212006786\" \n  }, \n  \"endpoint\" : \"tcp://127.0.0.1:8529\", \n  \"database\" : \"_system\" \n}\n\n

", "nickname": "startsTheReplicationApplier" } ], @@ -592,7 +592,7 @@ "notes": "Stops the replication applier. This will return immediately if the replication applier is not running.

", "summary": "stops the replication applier", "httpMethod": "PUT", - "examples": "

unix> curl -X PUT --dump - http://localhost:8529/_api/replication/applier-stop\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"state\" : { \n    \"running\" : false, \n    \"lastAppliedContinuousTick\" : null, \n    \"lastProcessedContinuousTick\" : null, \n    \"lastAvailableContinuousTick\" : null, \n    \"progress\" : { \n      \"time\" : \"2014-01-20T21:04:27Z\", \n      \"message\" : \"applier stopped\", \n      \"failedConnects\" : 0 \n    }, \n    \"totalRequests\" : 0, \n    \"totalFailedConnects\" : 0, \n    \"totalEvents\" : 0, \n    \"lastError\" : { \n      \"time\" : \"2014-01-20T21:04:27Z\", \n      \"errorMessage\" : \"got same server id (190048212006786) from endpoint 'tcp://127.0.0.1:8529' as the...\", \n      \"errorNum\" : 1405 \n    }, \n    \"time\" : \"2014-01-20T21:04:27Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"1.4.6\", \n    \"serverId\" : \"190048212006786\" \n  }, \n  \"endpoint\" : \"tcp://127.0.0.1:8529\", \n  \"database\" : \"_system\" \n}\n\n

", + "examples": "

unix> curl -X PUT --dump - http://localhost:8529/_api/replication/applier-stop\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"state\" : { \n    \"running\" : false, \n    \"lastAppliedContinuousTick\" : null, \n    \"lastProcessedContinuousTick\" : null, \n    \"lastAvailableContinuousTick\" : null, \n    \"progress\" : { \n      \"time\" : \"2014-01-23T16:12:51Z\", \n      \"message\" : \"applier stopped\", \n      \"failedConnects\" : 1 \n    }, \n    \"totalRequests\" : 2, \n    \"totalFailedConnects\" : 2, \n    \"totalEvents\" : 0, \n    \"lastError\" : { \n      \"time\" : \"2014-01-23T16:12:51Z\", \n      \"errorMessage\" : \"could not connect to master at tcp://127.0.0.1:8529: Could not connect to 'tcp:/...\", \n      \"errorNum\" : 1412 \n    }, \n    \"time\" : \"2014-01-23T16:12:51Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"1.4.7\", \n    \"serverId\" : \"190048212006786\" \n  }, \n  \"endpoint\" : \"tcp://127.0.0.1:8529\", \n  \"database\" : \"_system\" \n}\n\n

", "nickname": "stopsTheReplicationApplier" } ], @@ -619,7 +619,7 @@ "notes": "Returns the state of the replication applier, regardless of whether the applier is currently running or not.

The response is a JSON hash with the following attributes:

- state: a JSON hash with the following sub-attributes:

- running: whether or not the applier is active and running

- lastAppliedContinuousTick: the last tick value from the continuous replication log the applier has applied.

- lastProcessedContinuousTick: the last tick value from the continuous replication log the applier has processed.

Regularly, the last applied and last processed tick values should be identical. For transactional operations, the replication applier will first process incoming log events before applying them, so the processed tick value might be higher than the applied tick value. This will be the case until the applier encounters the transaction commit log event for the transaction.

- lastAvailableContinuousTick: the last tick value the logger server can provide.

- time: the time on the applier server.

- totalRequests: the total number of requests the applier has made to the endpoint.

- totalFailedConnects: the total number of failed connection attempts the applier has made.

- totalEvents: the total number of log events the applier has processed.

- progress: a JSON hash with details about the replication applier progress. It contains the following sub-attributes if there is progress to report:

- message: a textual description of the progress

- time: the date and time the progress was logged

- failedConnects: the current number of failed connection attempts

- lastError: a JSON hash with details about the last error that happened on the applier. It contains the following sub-attributes if there was an error:

- errorNum: a numerical error code

- errorMessage: a textual error description

- time: the date and time the error occurred

In case no error has occurred, lastError will be empty.

- server: a JSON hash with the following sub-attributes:

- version: the applier server's version

- serverId: the applier server's id

- endpoint: the endpoint the applier is connected to (if applier is active) or will connect to (if applier is currently inactive)

- database: the name of the database the applier is connected to (if applier is active) or will connect to (if applier is currently inactive)

", "summary": "returns the state of the replication applier", "httpMethod": "GET", - "examples": "Fetching the state of an inactive applier:

unix> curl --dump - http://localhost:8529/_api/replication/applier-state\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"state\" : { \n    \"running\" : false, \n    \"lastAppliedContinuousTick\" : null, \n    \"lastProcessedContinuousTick\" : null, \n    \"lastAvailableContinuousTick\" : null, \n    \"progress\" : { \n      \"time\" : \"2014-01-20T21:04:27Z\", \n      \"message\" : \"applier stopped\", \n      \"failedConnects\" : 0 \n    }, \n    \"totalRequests\" : 0, \n    \"totalFailedConnects\" : 0, \n    \"totalEvents\" : 0, \n    \"lastError\" : { \n      \"time\" : \"2014-01-20T21:04:27Z\", \n      \"errorMessage\" : \"got same server id (190048212006786) from endpoint 'tcp://127.0.0.1:8529' as the...\", \n      \"errorNum\" : 1405 \n    }, \n    \"time\" : \"2014-01-20T21:04:27Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"1.4.6\", \n    \"serverId\" : \"190048212006786\" \n  }, \n  \"endpoint\" : \"tcp://127.0.0.1:8529\", \n  \"database\" : \"_system\" \n}\n\n

Fetching the state of an active applier:

unix> curl --dump - http://localhost:8529/_api/replication/applier-state\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"state\" : { \n    \"running\" : false, \n    \"lastAppliedContinuousTick\" : null, \n    \"lastProcessedContinuousTick\" : null, \n    \"lastAvailableContinuousTick\" : null, \n    \"progress\" : { \n      \"time\" : \"2014-01-20T21:04:27Z\", \n      \"message\" : \"applier stopped\", \n      \"failedConnects\" : 0 \n    }, \n    \"totalRequests\" : 0, \n    \"totalFailedConnects\" : 0, \n    \"totalEvents\" : 0, \n    \"lastError\" : { \n      \"time\" : \"2014-01-20T21:04:27Z\", \n      \"errorMessage\" : \"got same server id (190048212006786) from endpoint 'tcp://127.0.0.1:8529' as the...\", \n      \"errorNum\" : 1405 \n    }, \n    \"time\" : \"2014-01-20T21:04:27Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"1.4.6\", \n    \"serverId\" : \"190048212006786\" \n  }, \n  \"endpoint\" : \"tcp://127.0.0.1:8529\", \n  \"database\" : \"_system\" \n}\n\n

", + "examples": "Fetching the state of an inactive applier:

unix> curl --dump - http://localhost:8529/_api/replication/applier-state\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"state\" : { \n    \"running\" : false, \n    \"lastAppliedContinuousTick\" : null, \n    \"lastProcessedContinuousTick\" : null, \n    \"lastAvailableContinuousTick\" : null, \n    \"progress\" : { \n      \"time\" : \"2014-01-23T16:12:51Z\", \n      \"message\" : \"applier stopped\", \n      \"failedConnects\" : 1 \n    }, \n    \"totalRequests\" : 2, \n    \"totalFailedConnects\" : 2, \n    \"totalEvents\" : 0, \n    \"lastError\" : { \n      \"time\" : \"2014-01-23T16:12:51Z\", \n      \"errorMessage\" : \"could not connect to master at tcp://127.0.0.1:8529: Could not connect to 'tcp:/...\", \n      \"errorNum\" : 1412 \n    }, \n    \"time\" : \"2014-01-23T16:12:51Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"1.4.7\", \n    \"serverId\" : \"190048212006786\" \n  }, \n  \"endpoint\" : \"tcp://127.0.0.1:8529\", \n  \"database\" : \"_system\" \n}\n\n

Fetching the state of an active applier:

unix> curl --dump - http://localhost:8529/_api/replication/applier-state\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"state\" : { \n    \"running\" : true, \n    \"lastAppliedContinuousTick\" : null, \n    \"lastProcessedContinuousTick\" : null, \n    \"lastAvailableContinuousTick\" : null, \n    \"progress\" : { \n      \"time\" : \"2014-01-23T16:12:51Z\", \n      \"message\" : \"fetching master state information\", \n      \"failedConnects\" : 1 \n    }, \n    \"totalRequests\" : 3, \n    \"totalFailedConnects\" : 3, \n    \"totalEvents\" : 0, \n    \"lastError\" : { \n      \"errorNum\" : 0 \n    }, \n    \"time\" : \"2014-01-23T16:12:51Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"1.4.7\", \n    \"serverId\" : \"190048212006786\" \n  }, \n  \"endpoint\" : \"tcp://127.0.0.1:8529\", \n  \"database\" : \"_system\" \n}\n\n

", "nickname": "returnsTheStateOfTheReplicationApplier" } ], diff --git a/js/apps/system/aardvark/api-docs/system.json b/js/apps/system/aardvark/api-docs/system.json index 5c280b91d9..24d4ca2f24 100644 --- a/js/apps/system/aardvark/api-docs/system.json +++ b/js/apps/system/aardvark/api-docs/system.json @@ -92,7 +92,7 @@ "notes": "

Returns the statistics information. The returned object contains the statistics figures grouped together according to the description returned by _admin/statistics-description. For instance, to access a figure userTime from the group system, you first select the sub-object describing the group stored in system and in that sub-object the value for userTime is stored in the attribute of the same name.

In case of a distribution, the returned object contains the total count in count and the distribution list in counts. The sum (or total) of the individual values is returned in sum.

", "summary": "reads the statistics", "httpMethod": "GET", - "examples": "

unix> curl --dump - http://localhost:8529/_admin/statistics\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"system\" : { \n    \"minorPageFaults\" : 113349, \n    \"majorPageFaults\" : 1916, \n    \"userTime\" : 28.970069, \n    \"systemTime\" : 3.00499, \n    \"numberOfThreads\" : 16, \n    \"residentSize\" : 58105856, \n    \"virtualSize\" : 5001773056 \n  }, \n  \"client\" : { \n    \"httpConnections\" : 1, \n    \"connectionTime\" : { \n      \"sum\" : 0.003744840621948242, \n      \"count\" : 1, \n      \"counts\" : [ \n        1, \n        0, \n        0, \n        0 \n      ] \n    }, \n    \"totalTime\" : { \n      \"sum\" : 51.210867404937744, \n      \"count\" : 850, \n      \"counts\" : [ \n        216, \n        248, \n        250, \n        114, \n        18, \n        1, \n        3 \n      ] \n    }, \n    \"requestTime\" : { \n      \"sum\" : 50.808953285217285, \n      \"count\" : 850, \n      \"counts\" : [ \n        226, \n        242, \n        251, \n        109, \n        18, \n        1, \n        3 \n      ] \n    }, \n    \"queueTime\" : { \n      \"sum\" : 0.03761625289916992, \n      \"count\" : 848, \n      \"counts\" : [ \n        848, \n        0, \n        0, \n        0, \n        0, \n        0, \n        0 \n      ] \n    }, \n    \"bytesSent\" : { \n      \"sum\" : 381722, \n      \"count\" : 850, \n      \"counts\" : [ \n        234, \n        501, \n        115, \n        0, \n        0, \n        0 \n      ] \n    }, \n    \"bytesReceived\" : { \n      \"sum\" : 197140, \n      \"count\" : 850, \n      \"counts\" : [ \n        625, \n        225, \n        0, \n        0, \n        0, \n        0 \n      ] \n    } \n  }, \n  \"http\" : { \n    \"requestsTotal\" : 850, \n    \"requestsAsync\" : 0, \n    \"requestsGet\" : 225, \n    \"requestsHead\" : 0, \n    \"requestsPost\" : 446, \n    \"requestsPut\" : 34, \n    \"requestsPatch\" : 3, \n    \"requestsDelete\" : 142, \n    \"requestsOptions\" : 0, \n    \"requestsOther\" : 0 \n  }, \n  \"server\" : { \n    \"uptime\" : 58.96970891952515 \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", + "examples": "

unix> curl --dump - http://localhost:8529/_admin/statistics\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"system\" : { \n    \"minorPageFaults\" : 72203, \n    \"majorPageFaults\" : 1914, \n    \"userTime\" : 12.08358, \n    \"systemTime\" : 1.664977, \n    \"numberOfThreads\" : 16, \n    \"residentSize\" : 57380864, \n    \"virtualSize\" : 4994146304 \n  }, \n  \"client\" : { \n    \"httpConnections\" : 1, \n    \"connectionTime\" : { \n      \"sum\" : 0.0004661083221435547, \n      \"count\" : 1, \n      \"counts\" : [ \n        1, \n        0, \n        0, \n        0 \n      ] \n    }, \n    \"totalTime\" : { \n      \"sum\" : 23.29973530769348, \n      \"count\" : 850, \n      \"counts\" : [ \n        512, \n        234, \n        40, \n        51, \n        10, \n        0, \n        3 \n      ] \n    }, \n    \"requestTime\" : { \n      \"sum\" : 23.136818885803223, \n      \"count\" : 850, \n      \"counts\" : [ \n        516, \n        230, \n        41, \n        50, \n        10, \n        0, \n        3 \n      ] \n    }, \n    \"queueTime\" : { \n      \"sum\" : 0.01817011833190918, \n      \"count\" : 848, \n      \"counts\" : [ \n        848, \n        0, \n        0, \n        0, \n        0, \n        0, \n        0 \n      ] \n    }, \n    \"bytesSent\" : { \n      \"sum\" : 381722, \n      \"count\" : 850, \n      \"counts\" : [ \n        234, \n        501, \n        115, \n        0, \n        0, \n        0 \n      ] \n    }, \n    \"bytesReceived\" : { \n      \"sum\" : 197140, \n      \"count\" : 850, \n      \"counts\" : [ \n        625, \n        225, \n        0, \n        0, \n        0, \n        0 \n      ] \n    } \n  }, \n  \"http\" : { \n    \"requestsTotal\" : 850, \n    \"requestsAsync\" : 0, \n    \"requestsGet\" : 225, \n    \"requestsHead\" : 0, \n    \"requestsPost\" : 446, \n    \"requestsPut\" : 34, \n    \"requestsPatch\" : 3, \n    \"requestsDelete\" : 142, \n    \"requestsOptions\" : 0, \n    \"requestsOther\" : 0 \n  }, \n  \"server\" : { \n    \"uptime\" : 27.90538001060486 \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", "nickname": "readsTheStatistics" } ], From d55a5b156c95737085bba867383120a958a6be25 Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Thu, 23 Jan 2014 17:22:19 +0100 Subject: [PATCH 38/45] added tests and documentation for issue #748 --- Documentation/UserManual/Aql.md | 20 +++- js/server/tests/ahuacatl-graph.js | 177 ++++++++++++++++++++++++++++++ 2 files changed, 196 insertions(+), 1 deletion(-) diff --git a/Documentation/UserManual/Aql.md b/Documentation/UserManual/Aql.md index 61dc1c2ab2..4413cc7e3d 100644 --- a/Documentation/UserManual/Aql.md +++ b/Documentation/UserManual/Aql.md @@ -1433,8 +1433,17 @@ Example calls: traversal path - `followEdges`: an optional list of example edge documents that the traversal will expand into. If no examples are given, the traversal will follow all edges. If one - or many edge examples are given. The traversal will only follow an edge if it matches + or many edge examples are given, the traversal will only follow an edge if it matches at least one of the specified examples. + - `filterVertices`: an optional list of example vertex documents that the traversal will + treat specially. If no examples are given, the traversal will handle all encountered + vertices equally. If one or many vertex examples are given, the traversal will exclude + the vertex from the result and/or descend into it. + - `vertexFilterMethod`: only useful in conjunction with `filterVertices`. If specified, + it will influence how vertices are handled that don't match the examples in `filterVertices`: + - `[ "prune" ]`: will include non-matching vertices in the result but not descend into them + - `[ "exclude" ]`: will not include non-matching vertices in the result but descend into them + - `[ "prune", "exclude" ]`: will neither include non-matching vertices in the result nor descend into them The result of the TRAVERSAL function is a list of traversed points. Each point is a document consisting of the following properties: @@ -1459,6 +1468,15 @@ Example calls: followEdges: [ { type: "knows" }, { state: "FL" } ] }) + TRAVERSAL(friends, friendrelations, "friends/john", "outbound", { + strategy: "breadthfirst", + order: "preorder", + itemOrder: "forward", + followEdges: [ { type: "knows" }, { state: "FL" } ], + filterVertices: [ { isActive: true } ], + vertexFilterMethod: [ "prune", "exclude" ] + }) + - @FN{TRAVERSAL_TREE(@FA{vertexcollection}, @FA{edgecollection}, @FA{startVertex}, @FA{direction}, @FA{connectName}, @FA{options})}: traverses the graph described by @FA{vertexcollection} and @FA{edgecollection}, starting at the vertex identified by id @FA{startVertex} and creates a hierchical result. diff --git a/js/server/tests/ahuacatl-graph.js b/js/server/tests/ahuacatl-graph.js index 9f894644ba..e420b53042 100644 --- a/js/server/tests/ahuacatl-graph.js +++ b/js/server/tests/ahuacatl-graph.js @@ -473,6 +473,182 @@ function ahuacatlQueryPathsTestSuite () { }; } +//////////////////////////////////////////////////////////////////////////////// +/// @brief test suite for TRAVERSAL() filter function +//////////////////////////////////////////////////////////////////////////////// + +function ahuacatlQueryTraversalFilterTestSuite () { + var vn = "UnitTestsTraverseVertices"; + var en = "UnitTestsTraverseEdges"; + + return { + +//////////////////////////////////////////////////////////////////////////////// +/// @brief set up +//////////////////////////////////////////////////////////////////////////////// + + setUp : function () { + db._drop(vn); + db._drop(en); + + vertexCollection = db._create(vn); + edgeCollection = db._createEdgeCollection(en); + + [ + { name: "1", isDeleted: false }, + { name: "1-1", isDeleted: false }, + { name: "1-1-1", isDeleted: true }, + { name: "1-1-2", isDeleted: false }, + { name: "1-2", isDeleted: true }, + { name: "1-2-1", isDeleted: false }, + { name: "1-3", isDeleted: false }, + { name: "1-3-1", isDeleted: true }, + { name: "1-3-2", isDeleted: false }, + { name: "1-3-3", isDeleted: true } + ].forEach(function (item) { + vertexCollection.save({ _key: item.name, name: item.name, isDeleted: item.isDeleted }); + }); + + [ [ "1", "1-1" ], [ "1", "1-2" ], [ "1", "1-3" ], [ "1-1", "1-1-1" ], [ "1-1", "1-1-2" ], [ "1-2", "1-2-1" ], [ "1-3", "1-3-1" ], [ "1-3", "1-3-2" ], [ "1-3", "1-3-3" ] ].forEach(function (item) { + var l = item[0]; + var r = item[1]; + edgeCollection.save(vn + "/" + l, vn + "/" + r, { _key: l + r, what : l + "->" + r }); + }); + }, + +//////////////////////////////////////////////////////////////////////////////// +/// @brief tear down +//////////////////////////////////////////////////////////////////////////////// + + tearDown : function () { + db._drop(vn); + db._drop(en); + }, + +//////////////////////////////////////////////////////////////////////////////// +/// @brief test vertex filter +//////////////////////////////////////////////////////////////////////////////// + + testTraversalVertexFilterExcludeMult : function () { + var config = { + strategy: "depthfirst", + order: "preorder", + itemOrder: "forward", + uniqueness: { + vertices: "global", + edges: "none" + }, + _sort: true, + filterVertices: [ { name: "1-1" }, { name: "1-2" }, { name: "1-3" } ], + vertexFilterMethod : [ "exclude" ] + }; + + var actual = getQueryResults("FOR p IN TRAVERSAL(@@v, @@e, '" + vn + "/1', 'outbound', " + JSON.stringify(config) + ") RETURN p.vertex._key", { "@v" : vn, "@e" : en }); + + assertEqual([ "1-1", "1-2", "1-3" ], actual); + }, + +//////////////////////////////////////////////////////////////////////////////// +/// @brief test vertex filter +//////////////////////////////////////////////////////////////////////////////// + + testTraversalVertexFilterPruneExclude : function () { + var config = { + strategy: "depthfirst", + order: "preorder", + itemOrder: "forward", + uniqueness: { + vertices: "global", + edges: "none" + }, + _sort: true, + filterVertices: [ { isDeleted: false } ], + vertexFilterMethod : [ "prune", "exclude" ] + }; + + var actual = getQueryResults("FOR p IN TRAVERSAL(@@v, @@e, '" + vn + "/1', 'outbound', " + JSON.stringify(config) + ") RETURN p.vertex._key", { "@v" : vn, "@e" : en }); + + assertEqual([ "1", "1-1", "1-1-2", "1-3", "1-3-2" ], actual); + + // no use the default value for filterVertices + config.vertexFilterMethod = undefined; + + actual = getQueryResults("FOR p IN TRAVERSAL(@@v, @@e, '" + vn + "/1', 'outbound', " + JSON.stringify(config) + ") RETURN p.vertex._key", { "@v" : vn, "@e" : en }); + + assertEqual([ "1", "1-1", "1-1-2", "1-3", "1-3-2" ], actual); + }, + +//////////////////////////////////////////////////////////////////////////////// +/// @brief test vertex filter +//////////////////////////////////////////////////////////////////////////////// + + testTraversalVertexFilterPrune : function () { + var config = { + strategy: "depthfirst", + order: "preorder", + itemOrder: "forward", + uniqueness: { + vertices: "global", + edges: "none" + }, + _sort: true, + filterVertices: [ { isDeleted: false } ], + vertexFilterMethod : [ "prune" ] + }; + + var actual = getQueryResults("FOR p IN TRAVERSAL(@@v, @@e, '" + vn + "/1', 'outbound', " + JSON.stringify(config) + ") RETURN p.vertex._key", { "@v" : vn, "@e" : en }); + + assertEqual([ "1", "1-1", "1-1-1", "1-1-2", "1-2", "1-3", "1-3-1", "1-3-2", "1-3-3" ], actual); + }, + +//////////////////////////////////////////////////////////////////////////////// +/// @brief test vertex filter +//////////////////////////////////////////////////////////////////////////////// + + testTraversalVertexFilterPruneMult : function () { + var config = { + strategy: "depthfirst", + order: "preorder", + itemOrder: "forward", + uniqueness: { + vertices: "global", + edges: "none" + }, + _sort: true, + filterVertices: [ { name: "1" }, { name: "1-1" }, { name: "1-2" }, { name: "1-2-1" } ], + vertexFilterMethod : [ "prune", "exclude" ] + }; + + var actual = getQueryResults("FOR p IN TRAVERSAL(@@v, @@e, '" + vn + "/1', 'outbound', " + JSON.stringify(config) + ") RETURN p.vertex._key", { "@v" : vn, "@e" : en }); + + assertEqual([ "1", "1-1", "1-2", "1-2-1" ], actual); + }, + +//////////////////////////////////////////////////////////////////////////////// +/// @brief test vertex filter +//////////////////////////////////////////////////////////////////////////////// + + testTraversalVertexFilterExclude : function () { + var config = { + strategy: "depthfirst", + order: "preorder", + itemOrder: "forward", + uniqueness: { + vertices: "global", + edges: "none" + }, + _sort: true, + filterVertices: [ { isDeleted: false } ], + vertexFilterMethod : [ "exclude" ] + }; + + var actual = getQueryResults("FOR p IN TRAVERSAL(@@v, @@e, '" + vn + "/1', 'outbound', " + JSON.stringify(config) + ") RETURN p.vertex._key", { "@v" : vn, "@e" : en }); + assertEqual([ "1", "1-1", "1-1-2", "1-2-1", "1-3", "1-3-2" ], actual); + } + + }; +} + //////////////////////////////////////////////////////////////////////////////// /// @brief test suite for TRAVERSAL() function //////////////////////////////////////////////////////////////////////////////// @@ -818,6 +994,7 @@ function ahuacatlQueryTraversalTreeTestSuite () { jsunity.run(ahuacatlQueryEdgesTestSuite); jsunity.run(ahuacatlQueryPathsTestSuite); +jsunity.run(ahuacatlQueryTraversalFilterTestSuite); jsunity.run(ahuacatlQueryTraversalTestSuite); jsunity.run(ahuacatlQueryTraversalTreeTestSuite); From 796a19397ee4a6abdf26c06b2297c47cc5ff0a2c Mon Sep 17 00:00:00 2001 From: Frank Celler Date: Thu, 23 Jan 2014 18:10:40 +0100 Subject: [PATCH 39/45] removed skip lists --- GNUmakefile | 54 ++++++++++++++++++++++++++++++++++++++++ UnitTests/CMakeLists.txt | 2 +- arangod/CMakeLists.txt | 4 --- 3 files changed, 55 insertions(+), 5 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 7b0bfa5cdb..a520f108fe 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -252,6 +252,60 @@ pack-winXX-cmake: cd Build$(BITS) && cpack -G NSIS +################################################################################ +### @brief cmake build +################################################################################ + +.PHONY: cmake-setpup + +cmake-setup: + test -d Build || mkdir Build + + cd Build && cmake \ + -D "CMAKE_INSTALL_PREFIX=${prefix}" \ + -D "ETCDIR=${sysconfdir}" \ + -D "VARDIR=${localstatedir}" \ + \ + -D ARANGODB_VERSION=${VERSION} \ + -D USE_MRUBY=${tr_MRUBY} \ + \ + -D ICU_INCLUDE= \ + -D ICU_LIB_PATH= \ + -D ICU_LIBS= \ + -D ICU_VERSION= \ + \ + -D LIBEV_INCLUDE= \ + -D LIBEV_LIB_PATH= \ + -D LIBEV_LIBS= \ + -D LIBEV_VERSION= \ + \ + -D MRUBY_INCLUDE= \ + -D MRUBY_LIB_PATH= \ + -D MRUBY_LIBS= \ + -D MRUBY_VERSION= \ + \ + -D OPENSSL_INCLUDE= \ + -D OPENSSL_LIB_PATH= \ + -D OPENSSL_LIBS= \ + -D OPENSSL_VERSION= \ + \ + -D READLINE_INCLUDE= \ + -D READLINE_LIB_PATH= \ + -D READLINE_LIBS= \ + -D READLINE_VERSION= \ + \ + -D V8_INCLUDE= \ + -D V8_LIB_PATH= \ + -D V8_LIBS= \ + -D V8_VERSION= \ + \ + -D ZLIB_INCLUDE= \ + -D ZLIB_LIB_PATH= \ + -D ZLIB_LIBS= \ + -D ZLIB_VERSION= \ + \ + .. + ## ----------------------------------------------------------------------------- ## --SECTION-- END-OF-FILE ## ----------------------------------------------------------------------------- diff --git a/UnitTests/CMakeLists.txt b/UnitTests/CMakeLists.txt index 7d863ef7e1..8caadb5c47 100644 --- a/UnitTests/CMakeLists.txt +++ b/UnitTests/CMakeLists.txt @@ -97,7 +97,7 @@ endif () ## --SECTION-- TESTS ## ----------------------------------------------------------------------------- -include(${PROJECT_SOURCE_DIR}/UnitTests/CTestLists.txt) +# include(${PROJECT_SOURCE_DIR}/UnitTests/CTestLists.txt) ## ----------------------------------------------------------------------------- ## --SECTION-- END-OF-FILE diff --git a/arangod/CMakeLists.txt b/arangod/CMakeLists.txt index a32b134183..4924436dd7 100644 --- a/arangod/CMakeLists.txt +++ b/arangod/CMakeLists.txt @@ -98,10 +98,7 @@ add_executable( RestServer/ArangoServer.cpp RestServer/VocbaseContext.cpp RestServer/arango.cpp - SkipLists/skiplist.c SkipLists/skiplistIndex.c - SkipListsEx/skiplistEx.c - SkipListsEx/skiplistExIndex.c Utils/DocumentHelper.cpp V8Server/ApplicationV8.cpp V8Server/v8-actions.cpp @@ -118,7 +115,6 @@ add_executable( VocBase/general-cursor.c VocBase/headers.c VocBase/index.c - VocBase/index-garbage-collector.c VocBase/key-generator.c VocBase/marker.c VocBase/primary-collection.c From bec2a0e9efead47f06af43f2566302457f4ef384 Mon Sep 17 00:00:00 2001 From: Frank Celler Date: Thu, 23 Jan 2014 23:11:33 +0100 Subject: [PATCH 40/45] fixed issue #741: documentation improvement Conflicts: Documentation/RefManual/Actions.md Documentation/UserManual/Foxx.md Documentation/UserManual/UserManual.md --- Documentation/DbaManual/Authentication.md | 2 ++ Documentation/DbaManual/Basics.md | 2 ++ Documentation/DbaManual/DatafileDebugger.md | 2 ++ Documentation/DbaManual/DbaManual.md | 2 ++ Documentation/DbaManual/EmergencyConsole.md | 2 ++ Documentation/DbaManual/HandlingIndexes.md | 2 ++ Documentation/DbaManual/IndexBitArray.md | 2 ++ Documentation/DbaManual/IndexCap.md | 2 ++ Documentation/DbaManual/IndexFulltext.md | 2 ++ Documentation/DbaManual/IndexGeo.md | 2 ++ Documentation/DbaManual/IndexHash.md | 2 ++ Documentation/DbaManual/IndexSkiplist.md | 2 ++ Documentation/ImplementorManual/ArangoErrors.md | 2 ++ Documentation/ImplementorManual/Communication.md | 1 + Documentation/ImplementorManual/HttpAqlFunctions.md | 1 + Documentation/ImplementorManual/HttpBatch.md | 2 ++ Documentation/ImplementorManual/HttpCollection.md | 2 ++ Documentation/ImplementorManual/HttpCursor.md | 1 + Documentation/ImplementorManual/HttpDatabase.md | 2 ++ Documentation/ImplementorManual/HttpEndpoint.md | 1 + Documentation/ImplementorManual/HttpGraph.md | 2 ++ Documentation/ImplementorManual/HttpImport.md | 2 ++ Documentation/ImplementorManual/HttpIndex.md | 1 + Documentation/ImplementorManual/HttpJob.md | 1 + Documentation/ImplementorManual/HttpMisc.md | 1 + Documentation/ImplementorManual/HttpQuery.md | 2 ++ Documentation/ImplementorManual/HttpReplication.md | 2 ++ Documentation/ImplementorManual/HttpSimple.md | 2 ++ Documentation/ImplementorManual/HttpSystem.md | 2 ++ Documentation/ImplementorManual/HttpTransactions.md | 1 + Documentation/ImplementorManual/HttpTraversals.md | 1 + Documentation/ImplementorManual/HttpUser.md | 2 ++ Documentation/ImplementorManual/ImplementorManual.md | 2 ++ Documentation/ImplementorManual/NamingConventions.md | 1 + Documentation/ImplementorManual/RestDocument.md | 2 ++ Documentation/ImplementorManual/RestEdge.md | 2 ++ Documentation/InstallationManual/Compiling.md | 2 ++ Documentation/InstallationManual/InstallationManual.md | 2 ++ Documentation/InstallationManual/Installing.md | 2 ++ Documentation/Manual/Glossary.md | 2 ++ Documentation/Manual/NewFeatures11.md | 1 + Documentation/Manual/NewFeatures12.md | 2 ++ Documentation/Manual/NewFeatures13.md | 2 ++ Documentation/Manual/NewFeatures14.md | 1 + Documentation/Manual/Upgrading11.md | 2 ++ Documentation/Manual/Upgrading12.md | 1 + Documentation/Manual/Upgrading13.md | 1 + Documentation/Manual/Upgrading14.md | 2 ++ Documentation/Manual/UpgradingGeneral.md | 2 ++ Documentation/RefManual/Actions.md | 1 + Documentation/RefManual/ArangoErrors.md | 2 ++ Documentation/RefManual/JSModuleActions.md | 2 ++ Documentation/RefManual/JSModuleConsole.md | 2 ++ Documentation/RefManual/JSModuleFs.md | 2 ++ Documentation/RefManual/JSModuleGraph.md | 2 ++ Documentation/RefManual/JSModuleJSUnity.md | 2 ++ Documentation/RefManual/JSModuleModules.md | 2 ++ Documentation/RefManual/RefManual.md | 2 ++ Documentation/RefManual/Replication.md | 1 + Documentation/Scripts/generateTOC.py | 3 +++ Documentation/ToolsManual/DumpManual.md | 3 ++- Documentation/ToolsManual/ImpManual.md | 2 ++ Documentation/ToolsManual/RestoreManual.md | 1 + Documentation/ToolsManual/ToolsManual.md | 1 + Documentation/UserManual/Aql.md | 2 ++ Documentation/UserManual/AqlExamples.md | 1 + Documentation/UserManual/Arangosh.md | 1 + Documentation/UserManual/CommandLine.md | 2 ++ Documentation/UserManual/ExtendingAql.md | 1 + Documentation/UserManual/FirstStepsArangoDB.md | 2 ++ Documentation/UserManual/Foxx.md | 2 ++ Documentation/UserManual/FoxxManager.md | 2 ++ Documentation/UserManual/Graphs.md | 1 + Documentation/UserManual/HandlingCollections.md | 2 ++ Documentation/UserManual/HandlingDatabases.md | 1 + Documentation/UserManual/HandlingDocuments.md | 2 ++ Documentation/UserManual/HandlingEdges.md | 2 ++ Documentation/UserManual/HandlingEndpoints.md | 1 + Documentation/UserManual/SimpleQueries.md | 2 ++ Documentation/UserManual/Transactions.md | 2 ++ Documentation/UserManual/Traversals.md | 1 + Documentation/UserManual/UserManual.md | 2 ++ Documentation/UserManual/UserManualReplication.md | 2 ++ Documentation/UserManual/WebInterface.md | 1 + Documentation/arangodb.css | 8 +++++++- 85 files changed, 150 insertions(+), 2 deletions(-) diff --git a/Documentation/DbaManual/Authentication.md b/Documentation/DbaManual/Authentication.md index 4c96297b46..dddff73f37 100644 --- a/Documentation/DbaManual/Authentication.md +++ b/Documentation/DbaManual/Authentication.md @@ -59,3 +59,5 @@ web interface. @CLEARPAGE @anchor UserManagementReload @copydetails JSF_reloadUsers + +@BNAVIGATE_DbaManualAuthentication diff --git a/Documentation/DbaManual/Basics.md b/Documentation/DbaManual/Basics.md index aa2a3e7fb1..8589c983fb 100644 --- a/Documentation/DbaManual/Basics.md +++ b/Documentation/DbaManual/Basics.md @@ -46,3 +46,5 @@ You can configure the durability behavior on a per collection basis. Use the ArangoDB shell to change these properties. @copydetails JS_PropertiesVocbaseCol + +@BNAVIGATE_DbaManualBasics diff --git a/Documentation/DbaManual/DatafileDebugger.md b/Documentation/DbaManual/DatafileDebugger.md index 15bfaab9b6..02cb77c934 100644 --- a/Documentation/DbaManual/DatafileDebugger.md +++ b/Documentation/DbaManual/DatafileDebugger.md @@ -79,3 +79,5 @@ If you answer `Y`, the corrupted entry will be removed. If you see a corruption in a datafile (and not a journal), then something is terrible wrong. These files are immutable and never changed by ArangoDB. A corruption in such a file is an indication of a hard-disk failure. + +@BNAVIGATE_DbaManualDatafileDebugger diff --git a/Documentation/DbaManual/DbaManual.md b/Documentation/DbaManual/DbaManual.md index 0d42399d98..f43e15e9ea 100644 --- a/Documentation/DbaManual/DbaManual.md +++ b/Documentation/DbaManual/DbaManual.md @@ -14,3 +14,5 @@ ArangoDB's DBA Manual (@VERSION){#DbaManual} @CHAPTER_REF{DbaManualAuthentication} @CHAPTER_REF{DbaManualDatafileDebugger} @CHAPTER_REF{DbaManualEmergencyConsole} + +@BNAVIGATE_DbaManual diff --git a/Documentation/DbaManual/EmergencyConsole.md b/Documentation/DbaManual/EmergencyConsole.md index 1ee5ce2deb..19cd0f27a1 100644 --- a/Documentation/DbaManual/EmergencyConsole.md +++ b/Documentation/DbaManual/EmergencyConsole.md @@ -23,3 +23,5 @@ client/server communication. However, it is very likely that you never need the emergency console unless you are an ArangoDB developer. + +@BNAVIGATE_DbaManualEmergencyConsole diff --git a/Documentation/DbaManual/HandlingIndexes.md b/Documentation/DbaManual/HandlingIndexes.md index a8b4606c23..39e5646640 100644 --- a/Documentation/DbaManual/HandlingIndexes.md +++ b/Documentation/DbaManual/HandlingIndexes.md @@ -140,3 +140,5 @@ Database Methods {#HandlingIndexesDatabaseMethods} @CLEARPAGE @anchor HandlingIndexesDbDelete @copydetails JSF_ArangoDatabase_prototype__dropIndex + +@BNAVIGATE_HandlingIndexes diff --git a/Documentation/DbaManual/IndexBitArray.md b/Documentation/DbaManual/IndexBitArray.md index 8ba467669b..8f9e112df9 100644 --- a/Documentation/DbaManual/IndexBitArray.md +++ b/Documentation/DbaManual/IndexBitArray.md @@ -15,3 +15,5 @@ Accessing BitArray Indexes from the Shell{#IndexBitArrayShell} @anchor IndexBitArrayShellEnsureBitarray @copydetails JS_EnsureBitarrayVocbaseCol + +@BNAVIGATE_IndexBitArray diff --git a/Documentation/DbaManual/IndexCap.md b/Documentation/DbaManual/IndexCap.md index f7fa4f7c23..bebe16bcfe 100644 --- a/Documentation/DbaManual/IndexCap.md +++ b/Documentation/DbaManual/IndexCap.md @@ -36,3 +36,5 @@ Accessing Cap Constraints from the Shell{#IndexCapShell} @anchor IndexCapShellEnsureCapConstraint @copydetails JS_EnsureCapConstraintVocbaseCol + +@BNAVIGATE_IndexCap diff --git a/Documentation/DbaManual/IndexFulltext.md b/Documentation/DbaManual/IndexFulltext.md index 506d302f2a..75b2120156 100644 --- a/Documentation/DbaManual/IndexFulltext.md +++ b/Documentation/DbaManual/IndexFulltext.md @@ -18,3 +18,5 @@ Accessing Fulltext Indexes from the Shell{#IndexFulltextShell} @anchor IndexFulltextShellEnsureFulltextIndex @copydetails JS_EnsureFulltextIndexVocbaseCol + +@BNAVIGATE_IndexFulltext diff --git a/Documentation/DbaManual/IndexGeo.md b/Documentation/DbaManual/IndexGeo.md index 77be6f1c94..ba46a94f82 100644 --- a/Documentation/DbaManual/IndexGeo.md +++ b/Documentation/DbaManual/IndexGeo.md @@ -41,3 +41,5 @@ Accessing Geo Indexes from the Shell{#IndexGeoShell} @CLEARPAGE @anchor IndexGeoShellWithin @copydetails JSF_ArangoCollection_prototype_within + +@BNAVIGATE_IndexGeo diff --git a/Documentation/DbaManual/IndexHash.md b/Documentation/DbaManual/IndexHash.md index 43c299ca0c..ded842e054 100644 --- a/Documentation/DbaManual/IndexHash.md +++ b/Documentation/DbaManual/IndexHash.md @@ -23,3 +23,5 @@ Accessing Hash Indexes from the Shell{#IndexHashShell} @CLEARPAGE @anchor IndexHashShellEnsureHashIndex @copydetails JS_EnsureHashIndexVocbaseCol + +@BNAVIGATE_IndexHash diff --git a/Documentation/DbaManual/IndexSkiplist.md b/Documentation/DbaManual/IndexSkiplist.md index d74289fd3e..60513f67da 100644 --- a/Documentation/DbaManual/IndexSkiplist.md +++ b/Documentation/DbaManual/IndexSkiplist.md @@ -23,3 +23,5 @@ Accessing Skip-List Indexes from the Shell{#IndexSkiplistShell} @CLEARPAGE @anchor IndexSkiplistShellEnsureSkiplist @copydetails JS_EnsureSkiplistVocbaseCol + +@BNAVIGATE_IndexSkiplist diff --git a/Documentation/ImplementorManual/ArangoErrors.md b/Documentation/ImplementorManual/ArangoErrors.md index 2ae5fcb4a9..b13013d5bd 100644 --- a/Documentation/ImplementorManual/ArangoErrors.md +++ b/Documentation/ImplementorManual/ArangoErrors.md @@ -5,3 +5,5 @@ Error codes and meanings{#ImplementorManualArangoErrors} @EMBEDTOC{ImplementorManualArangoErrorsTOC} @copydetails ArangoErrors + +@BNAVIGATE_ImplementorManualArangoErrors diff --git a/Documentation/ImplementorManual/Communication.md b/Documentation/ImplementorManual/Communication.md index 32e48f2e4f..c01c1cd5be 100644 --- a/Documentation/ImplementorManual/Communication.md +++ b/Documentation/ImplementorManual/Communication.md @@ -245,3 +245,4 @@ controlled environments. Thus the default value for this option is `false` (no m overriding allowed). You need to enable it explicitly if you want to use this feature. +@BNAVIGATE_Communication diff --git a/Documentation/ImplementorManual/HttpAqlFunctions.md b/Documentation/ImplementorManual/HttpAqlFunctions.md index 3797176b4d..b84027b549 100644 --- a/Documentation/ImplementorManual/HttpAqlFunctions.md +++ b/Documentation/ImplementorManual/HttpAqlFunctions.md @@ -32,3 +32,4 @@ be accessed directly, but only via the dedicated interfaces. @anchor HttpAqlFunctionsList @copydetails JSF_get_api_aqlfunction +@BNAVIGATE_HttpAqlFunctions diff --git a/Documentation/ImplementorManual/HttpBatch.md b/Documentation/ImplementorManual/HttpBatch.md index c9a366ebcf..5781bdfcda 100644 --- a/Documentation/ImplementorManual/HttpBatch.md +++ b/Documentation/ImplementorManual/HttpBatch.md @@ -95,3 +95,5 @@ part request failed (with status code 404), the `x-arango-errors` header of the overall response is `1`: @verbinclude api-batch-fail-response + +@BNAVIGATE_HttpBatch diff --git a/Documentation/ImplementorManual/HttpCollection.md b/Documentation/ImplementorManual/HttpCollection.md index 07017fb2a5..e1bd8f391e 100644 --- a/Documentation/ImplementorManual/HttpCollection.md +++ b/Documentation/ImplementorManual/HttpCollection.md @@ -108,3 +108,5 @@ Modifying a Collection {#HttpCollectionChanging} @CLEARPAGE @anchor HttpCollectionRotate @copydetails JSF_put_api_collection_rotate + +@BNAVIGATE_HttpCollection diff --git a/Documentation/ImplementorManual/HttpCursor.md b/Documentation/ImplementorManual/HttpCursor.md index 672a6dc80c..009ef15e2d 100644 --- a/Documentation/ImplementorManual/HttpCursor.md +++ b/Documentation/ImplementorManual/HttpCursor.md @@ -93,3 +93,4 @@ Accessing Cursors via HTTP {#HttpCursorHttp} @anchor HttpCursorDelete @copydetails JSF_delete_api_cursor +@BNAVIGATE_HttpCursor diff --git a/Documentation/ImplementorManual/HttpDatabase.md b/Documentation/ImplementorManual/HttpDatabase.md index 99919bd8dc..f9ebc44ce3 100644 --- a/Documentation/ImplementorManual/HttpDatabase.md +++ b/Documentation/ImplementorManual/HttpDatabase.md @@ -117,3 +117,5 @@ applications until they are explicitly installed for the particular database. @copydoc GlossaryDatabaseName @copydoc GlossaryDatabaseOrganisation + +@BNAVIGATE_HttpDatabase diff --git a/Documentation/ImplementorManual/HttpEndpoint.md b/Documentation/ImplementorManual/HttpEndpoint.md index 3f7d412ccf..2fb24593c8 100644 --- a/Documentation/ImplementorManual/HttpEndpoint.md +++ b/Documentation/ImplementorManual/HttpEndpoint.md @@ -42,3 +42,4 @@ Managing Endpoints via HTTP {#HttpEndpointHttp} @anchor HttpEndpointGet @copydetails JSF_get_api_endpoint +@BNAVIGATE_HttpEndpoint diff --git a/Documentation/ImplementorManual/HttpGraph.md b/Documentation/ImplementorManual/HttpGraph.md index 11fb5f9c0a..500fd8185a 100644 --- a/Documentation/ImplementorManual/HttpGraph.md +++ b/Documentation/ImplementorManual/HttpGraph.md @@ -70,3 +70,5 @@ HTTP Interface for Graphs {#HttpGraph} @CLEARPAGE @anchor A_JSF_POST_graph_vertex_edges @copydetails JSF_post_graph_vertex_edges + +@BNAVIGATE_HttpGraph diff --git a/Documentation/ImplementorManual/HttpImport.md b/Documentation/ImplementorManual/HttpImport.md index b40f773513..a95aa599d0 100644 --- a/Documentation/ImplementorManual/HttpImport.md +++ b/Documentation/ImplementorManual/HttpImport.md @@ -136,3 +136,5 @@ and that these contain references to existing collections. Please also note that it is not possible to create a new edge collection on the fly using the `createCollection` parameter. + +@BNAVIGATE_HttpImport diff --git a/Documentation/ImplementorManual/HttpIndex.md b/Documentation/ImplementorManual/HttpIndex.md index ab53224c40..ab8daa5ba7 100644 --- a/Documentation/ImplementorManual/HttpIndex.md +++ b/Documentation/ImplementorManual/HttpIndex.md @@ -125,3 +125,4 @@ fulltext query. @anchor IndexFulltextHttpFulltext @copydetails JSA_put_api_simple_fulltext +@BNAVIGATE_HttpIndex diff --git a/Documentation/ImplementorManual/HttpJob.md b/Documentation/ImplementorManual/HttpJob.md index ef095ca05f..425b393184 100644 --- a/Documentation/ImplementorManual/HttpJob.md +++ b/Documentation/ImplementorManual/HttpJob.md @@ -103,3 +103,4 @@ Managing Async Results via HTTP {#HttpJobHttp} @anchor HttpJobGet @copydetails triagens::admin::RestJobHandler::getJob +@BNAVIGATE_HttpJob diff --git a/Documentation/ImplementorManual/HttpMisc.md b/Documentation/ImplementorManual/HttpMisc.md index d7d32f9705..f27b20ae3d 100644 --- a/Documentation/ImplementorManual/HttpMisc.md +++ b/Documentation/ImplementorManual/HttpMisc.md @@ -18,3 +18,4 @@ This is an overview of ArangoDB's HTTP interface for miscellaneous functions. @anchor HttpMiscEcho @copydetails JSF_get_admin_echo +@BNAVIGATE_HttpMisc diff --git a/Documentation/ImplementorManual/HttpQuery.md b/Documentation/ImplementorManual/HttpQuery.md index 1e5cec04d4..22533d87f5 100644 --- a/Documentation/ImplementorManual/HttpQuery.md +++ b/Documentation/ImplementorManual/HttpQuery.md @@ -17,3 +17,5 @@ inspect it and return meta information about it. @CLEARPAGE @anchor HttpQueryPost @copydetails JSF_post_api_query + +@BNAVIGATE_HttpQuery diff --git a/Documentation/ImplementorManual/HttpReplication.md b/Documentation/ImplementorManual/HttpReplication.md index 80c7a1be30..d4d7388383 100644 --- a/Documentation/ImplementorManual/HttpReplication.md +++ b/Documentation/ImplementorManual/HttpReplication.md @@ -130,3 +130,5 @@ Other Replication Commands {#HttpReplicationOtherCommands} @anchor HttpReplicationServerId @copydetails triagens::arango::RestReplicationHandler::handleCommandServerId + +@BNAVIGATE_HttpReplication diff --git a/Documentation/ImplementorManual/HttpSimple.md b/Documentation/ImplementorManual/HttpSimple.md index d3e366a17b..0a47c61ddc 100644 --- a/Documentation/ImplementorManual/HttpSimple.md +++ b/Documentation/ImplementorManual/HttpSimple.md @@ -81,3 +81,5 @@ dispose the server-side cursor afterwards. @CLEARPAGE @anchor HttpSimpleLast @copydetails JSA_put_api_simple_last + +@BNAVIGATE_HttpSimple diff --git a/Documentation/ImplementorManual/HttpSystem.md b/Documentation/ImplementorManual/HttpSystem.md index eb3f64776e..85bd50ce34 100644 --- a/Documentation/ImplementorManual/HttpSystem.md +++ b/Documentation/ImplementorManual/HttpSystem.md @@ -25,3 +25,5 @@ monitoring of the server. @CLEARPAGE @anchor HttpSystemAdminStatisticsDescription @copydetails JSF_get_admin_statistics_description + +@BNAVIGATE_HttpSystem diff --git a/Documentation/ImplementorManual/HttpTransactions.md b/Documentation/ImplementorManual/HttpTransactions.md index fb7c864309..73db692781 100644 --- a/Documentation/ImplementorManual/HttpTransactions.md +++ b/Documentation/ImplementorManual/HttpTransactions.md @@ -29,3 +29,4 @@ Executing Transactions via HTTP {#HttpTransactionsHttp} @anchor HttpTransactionsPost @copydetails JSF_post_api_transaction +@BNAVIGATE_HttpTransactions diff --git a/Documentation/ImplementorManual/HttpTraversals.md b/Documentation/ImplementorManual/HttpTraversals.md index d741ceb05c..830d897319 100644 --- a/Documentation/ImplementorManual/HttpTraversals.md +++ b/Documentation/ImplementorManual/HttpTraversals.md @@ -25,3 +25,4 @@ Executing Traversals via HTTP {#HttpTraversalsHttp} @anchor HttpTraversalsPost @copydetails JSF_post_api_traversal +@BNAVIGATE_HttpTraversals diff --git a/Documentation/ImplementorManual/HttpUser.md b/Documentation/ImplementorManual/HttpUser.md index afedf42228..d0edfda62d 100644 --- a/Documentation/ImplementorManual/HttpUser.md +++ b/Documentation/ImplementorManual/HttpUser.md @@ -40,3 +40,5 @@ Please note that user operations are not included in ArangoDB's replication. @CLEARPAGE @anchor HttpUserDocument @copydetails JSF_get_api_user + +@BNAVIGATE_HttpUser diff --git a/Documentation/ImplementorManual/ImplementorManual.md b/Documentation/ImplementorManual/ImplementorManual.md index 9aa873ceca..ac769bb013 100644 --- a/Documentation/ImplementorManual/ImplementorManual.md +++ b/Documentation/ImplementorManual/ImplementorManual.md @@ -29,3 +29,5 @@ ArangoDB for API Implementors (@VERSION) {#ImplementorManual} @if LATEX @CHAPTER_REF{Glossary} @endif + +@BNAVIGATE_ImplementorManual diff --git a/Documentation/ImplementorManual/NamingConventions.md b/Documentation/ImplementorManual/NamingConventions.md index ed5e13ee4b..9a1fe7bc27 100644 --- a/Documentation/ImplementorManual/NamingConventions.md +++ b/Documentation/ImplementorManual/NamingConventions.md @@ -119,3 +119,4 @@ following attribute naming constraints are not violated: { "a" : 1, "b": 4 } +@BNAVIGATE_NamingConventions diff --git a/Documentation/ImplementorManual/RestDocument.md b/Documentation/ImplementorManual/RestDocument.md index ceb9b0b5cd..b99f98a1de 100644 --- a/Documentation/ImplementorManual/RestDocument.md +++ b/Documentation/ImplementorManual/RestDocument.md @@ -119,3 +119,5 @@ Working with Documents using REST {#RestDocumentHttp} @CLEARPAGE @anchor RestDocumentReadAll @copydetails triagens::arango::RestDocumentHandler::readAllDocuments + +@BNAVIGATE_RestDocument diff --git a/Documentation/ImplementorManual/RestEdge.md b/Documentation/ImplementorManual/RestEdge.md index b06b20cdae..0dbc620fc0 100644 --- a/Documentation/ImplementorManual/RestEdge.md +++ b/Documentation/ImplementorManual/RestEdge.md @@ -101,3 +101,5 @@ See @ref RestDocument for details. @anchor RestEdgeEdges @copydetails JSF_get_edges + +@BNAVIGATE_RestEdge diff --git a/Documentation/InstallationManual/Compiling.md b/Documentation/InstallationManual/Compiling.md index 3d76083171..2f60f1d430 100644 --- a/Documentation/InstallationManual/Compiling.md +++ b/Documentation/InstallationManual/Compiling.md @@ -293,3 +293,5 @@ to the error messages file, which is converted to js and C header files using Python. You will need Python 2 or 3 for this. Furthermore, this option enables additional test cases to be executed in a `make unittests` run. You also need to install the Boost test framework for this. + +@BNAVIGATE_Compiling diff --git a/Documentation/InstallationManual/InstallationManual.md b/Documentation/InstallationManual/InstallationManual.md index be3de15ece..9e47ee98a5 100644 --- a/Documentation/InstallationManual/InstallationManual.md +++ b/Documentation/InstallationManual/InstallationManual.md @@ -10,3 +10,5 @@ ArangoDB's Installation Manual (@VERSION) {#InstallManual} @CHAPTER_REF{Installing} @CHAPTER_REF{Compiling} @endif + +@BNAVIGATE_InstallManual diff --git a/Documentation/InstallationManual/Installing.md b/Documentation/InstallationManual/Installing.md index 83588b5a43..12a7d67f1b 100644 --- a/Documentation/InstallationManual/Installing.md +++ b/Documentation/InstallationManual/Installing.md @@ -309,3 +309,5 @@ method. Please note that ArangoDB uses UTF-8 as its internal encoding and that the system console must support a UTF-8 codepage (65001) and font. It may be necessary to manually switch the console font to a font that supports UTF-8. + +@BNAVIGATE_Installing diff --git a/Documentation/Manual/Glossary.md b/Documentation/Manual/Glossary.md index b9b20866a9..8018fdb1b5 100644 --- a/Documentation/Manual/Glossary.md +++ b/Documentation/Manual/Glossary.md @@ -46,3 +46,5 @@ Glossary {#GlossaryIntro} @copydoc GlossaryIndexSkiplist @copydoc GlossaryKeyGenerator + +@BNAVIGATE_Glossary diff --git a/Documentation/Manual/NewFeatures11.md b/Documentation/Manual/NewFeatures11.md index 89643a3b31..65f5bd1762 100644 --- a/Documentation/Manual/NewFeatures11.md +++ b/Documentation/Manual/NewFeatures11.md @@ -412,3 +412,4 @@ ArangoDB 1.1 adds the option `--default-language` to select a locale for sorting and comparing strings. The default locale is set to be the system locale on that platform. +@BNAVIGATE_NewFeatures11 diff --git a/Documentation/Manual/NewFeatures12.md b/Documentation/Manual/NewFeatures12.md index 917d3efd06..1e0156ac0e 100644 --- a/Documentation/Manual/NewFeatures12.md +++ b/Documentation/Manual/NewFeatures12.md @@ -462,3 +462,5 @@ already compiled binary. Usage is: > arangod --server.disable-statistics true ... + +@BNAVIGATE_NewFeatures12 diff --git a/Documentation/Manual/NewFeatures13.md b/Documentation/Manual/NewFeatures13.md index 6e324c5c32..87b3f67a02 100644 --- a/Documentation/Manual/NewFeatures13.md +++ b/Documentation/Manual/NewFeatures13.md @@ -284,3 +284,5 @@ Miscelleanous changes{#NewFeatures13Misc} The result will now contain an attribute `attributes` with a sub-attribute `count`. This value provides the number of different attributes that are or have been used in the collection. + +@BNAVIGATE_NewFeatures13 diff --git a/Documentation/Manual/NewFeatures14.md b/Documentation/Manual/NewFeatures14.md index 195e7e0b43..ad4ce13cbc 100644 --- a/Documentation/Manual/NewFeatures14.md +++ b/Documentation/Manual/NewFeatures14.md @@ -507,3 +507,4 @@ The following command-line options have been added for _arangoimp_ in 1.4: * `--server.database`: allows specifying the database name for the connection +@BNAVIGATE_NewFeatures14 diff --git a/Documentation/Manual/Upgrading11.md b/Documentation/Manual/Upgrading11.md index 38436efd26..7f8f9d363f 100644 --- a/Documentation/Manual/Upgrading11.md +++ b/Documentation/Manual/Upgrading11.md @@ -341,3 +341,5 @@ In 1.0, there was an API to manage user and session for the GUI administraion interface. In 1.1 the user management is part of the database (not just the front-end). There the calls to `_admin/user-manager` where removed. + +@BNAVIGATE_Upgrading11 diff --git a/Documentation/Manual/Upgrading12.md b/Documentation/Manual/Upgrading12.md index 7ec751619a..10d2bb364c 100644 --- a/Documentation/Manual/Upgrading12.md +++ b/Documentation/Manual/Upgrading12.md @@ -457,3 +457,4 @@ ArangoDB 1.2 in favor of managing users via `arangosh` or `arangod` directly. Please refer to @ref Upgrading12Troubleshooting for more information on how to manage users in ArangoDB 1.2. +@BNAVIGATE_Upgrading12 diff --git a/Documentation/Manual/Upgrading13.md b/Documentation/Manual/Upgrading13.md index dd40482652..3d313431f1 100644 --- a/Documentation/Manual/Upgrading13.md +++ b/Documentation/Manual/Upgrading13.md @@ -184,3 +184,4 @@ startup option Please also check the logfile written by ArangoDB for further errors messages. +@BNAVIGATE_Upgrading13 diff --git a/Documentation/Manual/Upgrading14.md b/Documentation/Manual/Upgrading14.md index 17e95a9333..4a841faaf1 100644 --- a/Documentation/Manual/Upgrading14.md +++ b/Documentation/Manual/Upgrading14.md @@ -525,3 +525,5 @@ properly with ArangoDB 1.4: in development mode using the `--javascript.dev-app-path` option. This will either print or log (depending on configuration) errors occurring in Foxx applications. + +@BNAVIGATE_Upgrading14 diff --git a/Documentation/Manual/UpgradingGeneral.md b/Documentation/Manual/UpgradingGeneral.md index 845bd4b2ae..d781609efe 100644 --- a/Documentation/Manual/UpgradingGeneral.md +++ b/Documentation/Manual/UpgradingGeneral.md @@ -20,3 +20,5 @@ If anything goes wrong during or shortly after the upgrade: - Start the "old" version again It is not supported to use datafiles created or modified by a newer version of ArangoDB with an older ArangoDB version. For example, it is unsupported and is likely to cause problems when using 1.4 datafiles with an ArangoDB 1.3 instance. + +@BNAVIGATE_UpgradingGeneral diff --git a/Documentation/RefManual/Actions.md b/Documentation/RefManual/Actions.md index f7fe49b907..2f335e4433 100644 --- a/Documentation/RefManual/Actions.md +++ b/Documentation/RefManual/Actions.md @@ -900,3 +900,4 @@ will result in the URL being accessible via all supported HTTP methods (e.g. HTTP `HEAD` only, with all other HTTP methods being disabled. Calling a URL with an unsupported or disabled HTTP method will result in an HTTP 501 error. +@BNAVIGATE_UserManualActions diff --git a/Documentation/RefManual/ArangoErrors.md b/Documentation/RefManual/ArangoErrors.md index 93a929aa76..cd53bd0bc5 100644 --- a/Documentation/RefManual/ArangoErrors.md +++ b/Documentation/RefManual/ArangoErrors.md @@ -5,3 +5,5 @@ Error codes and meanings{#RefManualArangoErrors} @EMBEDTOC{RefManualArangoErrorsTOC} @copydetails ArangoErrors + +@BNAVIGATE_RefManualArangoErrors diff --git a/Documentation/RefManual/JSModuleActions.md b/Documentation/RefManual/JSModuleActions.md index e2450d86ae..8b347896ed 100644 --- a/Documentation/RefManual/JSModuleActions.md +++ b/Documentation/RefManual/JSModuleActions.md @@ -50,3 +50,5 @@ ArangoDB Result Generators {#JSModuleActionsArangoDB} @CLEARPAGE @anchor JSModuleActionsResultException @copydetails JSF_resultException + +@BNAVIGATE_JSModuleActions diff --git a/Documentation/RefManual/JSModuleConsole.md b/Documentation/RefManual/JSModuleConsole.md index 25a99d1df1..f0f256cf1c 100644 --- a/Documentation/RefManual/JSModuleConsole.md +++ b/Documentation/RefManual/JSModuleConsole.md @@ -195,3 +195,5 @@ String substitution patterns, which can be used in @FA{format}. - `%%d`, `%%i` integer - `%%f` floating point number - `%%o` object hyperlink + +@BNAVIGATE_JSModuleConsole diff --git a/Documentation/RefManual/JSModuleFs.md b/Documentation/RefManual/JSModuleFs.md index d3133801c5..a9030caff7 100644 --- a/Documentation/RefManual/JSModuleFs.md +++ b/Documentation/RefManual/JSModuleFs.md @@ -44,3 +44,5 @@ The implementation follows the CommonJS specification @CLEARPAGE @anchor JSModuleFsRemove @copydetails JS_Remove + +@BNAVIGATE_JSModuleFs diff --git a/Documentation/RefManual/JSModuleGraph.md b/Documentation/RefManual/JSModuleGraph.md index 4f56d2f67e..a5e38398ec 100644 --- a/Documentation/RefManual/JSModuleGraph.md +++ b/Documentation/RefManual/JSModuleGraph.md @@ -200,3 +200,5 @@ Edge Methods{#JSModuleGraphEdge} @CLEARPAGE @anchor JSModuleGraphEdgeSetProperty @copydetails JSF_Edge_prototype_setProperty + +@BNAVIGATE_JSModuleGraph diff --git a/Documentation/RefManual/JSModuleJSUnity.md b/Documentation/RefManual/JSModuleJSUnity.md index 86a04bf797..f90504ab1b 100644 --- a/Documentation/RefManual/JSModuleJSUnity.md +++ b/Documentation/RefManual/JSModuleJSUnity.md @@ -49,3 +49,5 @@ Assume that your file live in a directory called `lib`. Use to create a copy of the JavaScript files with coverage information. Start the ArangoDB with these files and use @FN{jsunity.runCoverage} instead of @FN{jsunity.runTest}. + +@BNAVIGATE_jsUnity diff --git a/Documentation/RefManual/JSModuleModules.md b/Documentation/RefManual/JSModuleModules.md index 51544301b9..70ac3bd035 100644 --- a/Documentation/RefManual/JSModuleModules.md +++ b/Documentation/RefManual/JSModuleModules.md @@ -211,3 +211,5 @@ versa. In order to flush the modules cache of the JavaScript shell, you should use arangosh> require("internal").flushModuleCache() + +@BNAVIGATE_JSModules diff --git a/Documentation/RefManual/RefManual.md b/Documentation/RefManual/RefManual.md index a8f49b550b..db6c6ac063 100644 --- a/Documentation/RefManual/RefManual.md +++ b/Documentation/RefManual/RefManual.md @@ -12,3 +12,5 @@ ArangoDB's Reference Manual (@VERSION) {#RefManual} @CHAPTER_REF{UserManualActions} @CHAPTER_REF{RefManualReplication} @CHAPTER_REF{RefManualArangoErrors} + +@BNAVIGATE_RefManual diff --git a/Documentation/RefManual/Replication.md b/Documentation/RefManual/Replication.md index d7031b59ab..a434d1f914 100644 --- a/Documentation/RefManual/Replication.md +++ b/Documentation/RefManual/Replication.md @@ -436,3 +436,4 @@ event that is neither a ocument/edge operation nor a `transaction commit` event) should abort the ongoing transaction and discard all buffered operations. It can then consider the current transaction as failed. +@BNAVIGATE_RefManualReplication diff --git a/Documentation/Scripts/generateTOC.py b/Documentation/Scripts/generateTOC.py index 01d16f0032..a160ee01aa 100755 --- a/Documentation/Scripts/generateTOC.py +++ b/Documentation/Scripts/generateTOC.py @@ -115,10 +115,13 @@ def generate(l, h): if prev == "": print 'ALIASES += "NAVIGATE_%s=@NAVIGATE_FIRST{%s,%s}"' % (entry,home,next) + print 'ALIASES += "BNAVIGATE_%s=@BNAVIGATE_FIRST{%s,%s}"' % (entry,home,next) elif next == "": print 'ALIASES += "NAVIGATE_%s=@NAVIGATE_LAST{%s,%s}"' % (entry,prev,home) + print 'ALIASES += "BNAVIGATE_%s=@BNAVIGATE_LAST{%s,%s}"' % (entry,prev,home) else: print 'ALIASES += "NAVIGATE_%s=@NAVIGATE{%s,%s,%s}"' % (entry,prev,home,next) + print 'ALIASES += "BNAVIGATE_%s=@BNAVIGATE{%s,%s,%s}"' % (entry,prev,home,next) generate(books, None) generate(chapters, homes) diff --git a/Documentation/ToolsManual/DumpManual.md b/Documentation/ToolsManual/DumpManual.md index 33abffb4db..e4589c6a9d 100644 --- a/Documentation/ToolsManual/DumpManual.md +++ b/Documentation/ToolsManual/DumpManual.md @@ -67,4 +67,5 @@ with these attributes: Document data for a collection will be saved in files with name pattern `.data.json`. Each line in a data file is a document insertion/update or deletion marker, alongside with some meta data. - + +@BNAVIGATE_DumpManual diff --git a/Documentation/ToolsManual/ImpManual.md b/Documentation/ToolsManual/ImpManual.md index 9eb7777aeb..d044a85963 100644 --- a/Documentation/ToolsManual/ImpManual.md +++ b/Documentation/ToolsManual/ImpManual.md @@ -174,3 +174,5 @@ documents can `_from` and `_to` and that their values point to existing document Finally you should make sure that all other attributes in the import file do not start with an underscore - otherwise they might be discarded. + +@BNAVIGATE_ImpManual diff --git a/Documentation/ToolsManual/RestoreManual.md b/Documentation/ToolsManual/RestoreManual.md index 36ae650cff..ccf19f3391 100644 --- a/Documentation/ToolsManual/RestoreManual.md +++ b/Documentation/ToolsManual/RestoreManual.md @@ -128,3 +128,4 @@ After that, run the following command: unix> arangorestore --collection mycopyvalues --server.database mycopy --input-directory "dump" +@BNAVIGATE_RestoreManual diff --git a/Documentation/ToolsManual/ToolsManual.md b/Documentation/ToolsManual/ToolsManual.md index 09e8c93e84..4a399afe8b 100644 --- a/Documentation/ToolsManual/ToolsManual.md +++ b/Documentation/ToolsManual/ToolsManual.md @@ -33,3 +33,4 @@ running ArangoDB server instance. _arangodump_ will write all its output into a directory that needs to be specified when invoking it. _arangorestore_ will read files from a directory that was formerly created by invoking _arangodump_. +@BNAVIGATE_ToolsManual diff --git a/Documentation/UserManual/Aql.md b/Documentation/UserManual/Aql.md index 4413cc7e3d..c800091a5a 100644 --- a/Documentation/UserManual/Aql.md +++ b/Documentation/UserManual/Aql.md @@ -1862,3 +1862,5 @@ operator is again a list. In the above example, the attribute `name` is accessed for each element in the list `u.friends`. The result is a flat list of friend names, made available as the attribute `friendNames`. + +@BNAVIGATE_Aql diff --git a/Documentation/UserManual/AqlExamples.md b/Documentation/UserManual/AqlExamples.md index 48c3f9b320..94dfa23b69 100644 --- a/Documentation/UserManual/AqlExamples.md +++ b/Documentation/UserManual/AqlExamples.md @@ -686,3 +686,4 @@ For example, to get the 3 `ageGroup`s with the most users in them: To increase readability, the repeated expression `LENGTH(group)` was put into a variable `numUsers`. The `FILTER` on `numUsers` is the SQL HAVING equivalent. +@BNAVIGATE_AqlExamples diff --git a/Documentation/UserManual/Arangosh.md b/Documentation/UserManual/Arangosh.md index 594d127c9e..3a36e2869e 100644 --- a/Documentation/UserManual/Arangosh.md +++ b/Documentation/UserManual/Arangosh.md @@ -147,3 +147,4 @@ JavaScript code. If you want any variables in the global scope to survive, you n omit the `var` keyword for them. Otherwise the variables will only be visible inside the script itself, but not outside. +@BNAVIGATE_UserManualArangosh diff --git a/Documentation/UserManual/CommandLine.md b/Documentation/UserManual/CommandLine.md index d8529a9aa8..5ea12fe068 100644 --- a/Documentation/UserManual/CommandLine.md +++ b/Documentation/UserManual/CommandLine.md @@ -314,3 +314,5 @@ Command-Line Options for Random Numbers {#CommandLineRandom} @anchor CommandLineRandomGenerator @copydetails triagens::rest::ApplicationServer::_randomGenerator + +@BNAVIGATE_CommandLine diff --git a/Documentation/UserManual/ExtendingAql.md b/Documentation/UserManual/ExtendingAql.md index d03b7fad16..be86007348 100644 --- a/Documentation/UserManual/ExtendingAql.md +++ b/Documentation/UserManual/ExtendingAql.md @@ -82,3 +82,4 @@ To get an overview of which functions are currently registered, the @copydetails JSF_aqlfunctions_toArray +@BNAVIGATE_ExtendingAql diff --git a/Documentation/UserManual/FirstStepsArangoDB.md b/Documentation/UserManual/FirstStepsArangoDB.md index 23de78e866..1ac8cd8407 100644 --- a/Documentation/UserManual/FirstStepsArangoDB.md +++ b/Documentation/UserManual/FirstStepsArangoDB.md @@ -582,3 +582,5 @@ Use `--help` to get a list of command-line options: --server.password password to use when connecting (leave empty for prompt) --server.request-timeout request timeout in seconds (default: 300) --server.username username to use when connecting (default: "root") + +@BNAVIGATE_FirstStepsArangoDB diff --git a/Documentation/UserManual/Foxx.md b/Documentation/UserManual/Foxx.md index 0e9ba726d6..289a477cd4 100644 --- a/Documentation/UserManual/Foxx.md +++ b/Documentation/UserManual/Foxx.md @@ -1008,3 +1008,5 @@ Here are the individual steps to carry out: More information on how to deploy applications from different sources can be found in the @ref UserManualFoxxManager "Foxx Manager manual". + +@BNAVIGATE_UserManualFoxx diff --git a/Documentation/UserManual/FoxxManager.md b/Documentation/UserManual/FoxxManager.md index fcc03c6053..439cd56e66 100644 --- a/Documentation/UserManual/FoxxManager.md +++ b/Documentation/UserManual/FoxxManager.md @@ -378,3 +378,5 @@ To most relevant `arangosh` options to pass to the `foxx-manager` will be: These options allow you to use the foxx-manager with a different database or with another than the default user. + +@BNAVIGATE_UserManualFoxxManager diff --git a/Documentation/UserManual/Graphs.md b/Documentation/UserManual/Graphs.md index 52c1f3ed4e..4881e5a5f5 100644 --- a/Documentation/UserManual/Graphs.md +++ b/Documentation/UserManual/Graphs.md @@ -4,3 +4,4 @@ Graphs {#Graphs} @NAVIGATE_Graphs @EMBEDTOC{JSModuleGraphTOC} +@BNAVIGATE_Graphs diff --git a/Documentation/UserManual/HandlingCollections.md b/Documentation/UserManual/HandlingCollections.md index 049c546b08..d21d1de83c 100644 --- a/Documentation/UserManual/HandlingCollections.md +++ b/Documentation/UserManual/HandlingCollections.md @@ -126,3 +126,5 @@ Database Methods {#HandlingCollectionsDatabaseMethods} @CLEARPAGE @anchor HandlingCollectionsTruncateDb @copydetails JSF_ArangoDatabase_prototype__truncate + +@BNAVIGATE_HandlingCollections diff --git a/Documentation/UserManual/HandlingDatabases.md b/Documentation/UserManual/HandlingDatabases.md index 2c954c0d4e..8c513d9d94 100644 --- a/Documentation/UserManual/HandlingDatabases.md +++ b/Documentation/UserManual/HandlingDatabases.md @@ -98,3 +98,4 @@ applications until they are explicitly installed for the particular database. @copydoc GlossaryDatabaseOrganisation +@BNAVIGATE_HandlingDatabases diff --git a/Documentation/UserManual/HandlingDocuments.md b/Documentation/UserManual/HandlingDocuments.md index ade4f67740..9ebaafef93 100644 --- a/Documentation/UserManual/HandlingDocuments.md +++ b/Documentation/UserManual/HandlingDocuments.md @@ -131,3 +131,5 @@ Database Methods {#HandlingDocumentsDatabaseMethods} @CLEARPAGE @anchor HandlingDocumentsDbRemove @copydetails JS_RemoveVocbase + +@BNAVIGATE_HandlingDocuments diff --git a/Documentation/UserManual/HandlingEdges.md b/Documentation/UserManual/HandlingEdges.md index ec8cac6c90..64ff048c15 100644 --- a/Documentation/UserManual/HandlingEdges.md +++ b/Documentation/UserManual/HandlingEdges.md @@ -33,3 +33,5 @@ Working with Edges{#HandlingEdgesShell} @CLEARPAGE @anchor HandlingEdgesOutEdges @copydetails JS_OutEdgesQuery + +@BNAVIGATE_HandlingEdges diff --git a/Documentation/UserManual/HandlingEndpoints.md b/Documentation/UserManual/HandlingEndpoints.md index 80df5d9ce5..7c53b727c5 100644 --- a/Documentation/UserManual/HandlingEndpoints.md +++ b/Documentation/UserManual/HandlingEndpoints.md @@ -46,3 +46,4 @@ Configuring and Removing Endpoints {#HandlingEndpointsShell} @anchor HandlingEndpointsRemove @copydetails JSF_ArangoDatabase_prototype__removeEndpoint +@BNAVIGATE_HandlingEndpoints diff --git a/Documentation/UserManual/SimpleQueries.md b/Documentation/UserManual/SimpleQueries.md index 3fc3b127e0..3fa5ec2600 100644 --- a/Documentation/UserManual/SimpleQueries.md +++ b/Documentation/UserManual/SimpleQueries.md @@ -241,3 +241,5 @@ will be undefined which of the matching documents will get removed/modified. @anchor SimpleQueryUpdateByExample @copydetails JSF_ArangoCollection_prototype_updateByExample + +@BNAVIGATE_SimpleQueries diff --git a/Documentation/UserManual/Transactions.md b/Documentation/UserManual/Transactions.md index ad673f06aa..0885ceb1da 100644 --- a/Documentation/UserManual/Transactions.md +++ b/Documentation/UserManual/Transactions.md @@ -577,3 +577,5 @@ It is legal to not declare read-only collections, but this should be avoided if possible to reduce the probability of deadlocks and non-repeatable reads. Please refer to @ref TransactionsLocking for more details. + +@BNAVIGATE_Transactions diff --git a/Documentation/UserManual/Traversals.md b/Documentation/UserManual/Traversals.md index b49c2bcb5a..13895bc24c 100644 --- a/Documentation/UserManual/Traversals.md +++ b/Documentation/UserManual/Traversals.md @@ -774,3 +774,4 @@ To set up the collections and populate them with initial data, the following scr db.e.save("v/capital-yaounde", "v/country-cameroon", { type: "is-in" }); db.e.save("v/capital-zagreb", "v/country-croatia", { type: "is-in" }); +@BNAVIGATE_Traversals diff --git a/Documentation/UserManual/UserManual.md b/Documentation/UserManual/UserManual.md index 016b17c585..c8a3d18936 100644 --- a/Documentation/UserManual/UserManual.md +++ b/Documentation/UserManual/UserManual.md @@ -44,3 +44,5 @@ ArangoDB's User Manual (@VERSION) {#UserManual} @CHAPTER_REF{CommandLine}: All the command-line options @CHAPTER_REF{Glossary}: The obvious definitions + +@BNAVIGATE_UserManual diff --git a/Documentation/UserManual/UserManualReplication.md b/Documentation/UserManual/UserManualReplication.md index ee2a504342..3002fe93a6 100644 --- a/Documentation/UserManual/UserManualReplication.md +++ b/Documentation/UserManual/UserManualReplication.md @@ -619,3 +619,5 @@ be turned off. Transactions are logged to the event log on the master as an uninterrupted sequence. While a transaction is written to the event log, the event log is blocked for other writes. Transactions should thus be as small as possible. + +@BNAVIGATE_UserManualReplication diff --git a/Documentation/UserManual/WebInterface.md b/Documentation/UserManual/WebInterface.md index 5cdc71bf4c..582e89f814 100644 --- a/Documentation/UserManual/WebInterface.md +++ b/Documentation/UserManual/WebInterface.md @@ -147,3 +147,4 @@ The *API* tab provides an overview of ArangoDB's built-in HTTP REST API, with documentation and examples. It should be consulted when there is doubt about API URLs, parameters etc. +@BNAVIGATE_UserManualWebInterface diff --git a/Documentation/arangodb.css b/Documentation/arangodb.css index de4dc5bff7..464a5fa129 100644 --- a/Documentation/arangodb.css +++ b/Documentation/arangodb.css @@ -72,6 +72,12 @@ top: -69px; } +#content div.arangodb div.bottom-navigate { + position: relative; + text-align: right; + top: 10px; +} + /* ************************************************************************** */ /* table of contents */ /* ************************************************************************** */ @@ -223,4 +229,4 @@ a.anchor { padding-top: 80px; width: 0; font-size: 0; -} \ No newline at end of file +} From cb288e21e61f99c343a8ff5f85fd62490d60dbee Mon Sep 17 00:00:00 2001 From: Michael Hackstein Date: Fri, 24 Jan 2014 10:24:31 +0100 Subject: [PATCH 41/45] Start of Foxx download in WI implementation. Not functional yet --- js/apps/system/aardvark/aardvark.js | 13 ++++ .../system/aardvark/frontend/css/buttons.css | 6 ++ .../aardvark/frontend/css/documentsView.css | 8 +-- .../aardvark/frontend/css/dropdowns.css | 16 +++++ .../js/templates/applicationsView.ejs | 65 ++++++++++++------- .../frontend/js/templates/documentsView.ejs | 12 +++- .../frontend/js/views/applicationsView.js | 64 +++++++++++++++++- js/apps/system/aardvark/lib/foxxes.js | 16 +++++ 8 files changed, 165 insertions(+), 35 deletions(-) create mode 100644 js/apps/system/aardvark/frontend/css/dropdowns.css diff --git a/js/apps/system/aardvark/aardvark.js b/js/apps/system/aardvark/aardvark.js index e6f6998a9a..858caa2caa 100644 --- a/js/apps/system/aardvark/aardvark.js +++ b/js/apps/system/aardvark/aardvark.js @@ -38,6 +38,19 @@ var FoxxController = require("org/arangodb/foxx").Controller, var foxxes = new (require("lib/foxxes").Foxxes)(); var docus = new (require("lib/swagger").Swagger)(); + +/** Fetch a foxx from temp folder + * + * Makes a foxx uploaded to the temp folder + * available for mounting. + */ + +controller.post("/foxxes/fetch", function (req, res) { + var content = JSON.parse(req.requestBody), + path = content.filename; + res.json(foxxes.fetch(path)); +}); + // ............................................................................. // install // ............................................................................. diff --git a/js/apps/system/aardvark/frontend/css/buttons.css b/js/apps/system/aardvark/frontend/css/buttons.css index 6cb1d442a3..d830f91402 100644 --- a/js/apps/system/aardvark/frontend/css/buttons.css +++ b/js/apps/system/aardvark/frontend/css/buttons.css @@ -13,3 +13,9 @@ position: relative; } +a.headerButton { + margin-top: -2px; + margin-left: 5px; + margin-right: 5px; + min-height: 23px; +} diff --git a/js/apps/system/aardvark/frontend/css/documentsView.css b/js/apps/system/aardvark/frontend/css/documentsView.css index 97d6112df1..d8cd1d928c 100644 --- a/js/apps/system/aardvark/frontend/css/documentsView.css +++ b/js/apps/system/aardvark/frontend/css/documentsView.css @@ -45,13 +45,13 @@ margin-bottom: -10px; } -#filterHeader, #importHeader, .arangoDropdownIn, #indexHeaderContent { +#filterHeader, .arangoDropdownIn, #indexHeaderContent { margin-left: 5px; margin-right: 5px; background-color: white; } -#filterHeader, #importHeader, .arangoDropdownIn { +#filterHeader, .arangoDropdownIn { padding-top: 10px; padding-left: 10px; padding-right: 10px; @@ -59,10 +59,6 @@ position:relative; } -#importHeader input { - line-height: 0px !important; - margin-top: 5px;margin-bottom: -5px; -} #confirmDocImport { margin-right: 0px; diff --git a/js/apps/system/aardvark/frontend/css/dropdowns.css b/js/apps/system/aardvark/frontend/css/dropdowns.css new file mode 100644 index 0000000000..28155e3b75 --- /dev/null +++ b/js/apps/system/aardvark/frontend/css/dropdowns.css @@ -0,0 +1,16 @@ +.dropdownImport { + margin-left: 5px; + margin-right: 5px; + background-color: white; + padding-top: 10px; + padding-left: 10px; + padding-right: 10px; + padding-bottom: 5px; + position:relative; +} + +.dropdownImport input { + line-height: 0px !important; + margin-top: 5px; + margin-bottom: -5px; +} diff --git a/js/apps/system/aardvark/frontend/js/templates/applicationsView.ejs b/js/apps/system/aardvark/frontend/js/templates/applicationsView.ejs index f1cde33151..820a52dc71 100644 --- a/js/apps/system/aardvark/frontend/js/templates/applicationsView.ejs +++ b/js/apps/system/aardvark/frontend/js/templates/applicationsView.ejs @@ -7,7 +7,12 @@ -
- -