Return-Path: X-Original-To: apmail-couchdb-commits-archive@www.apache.org Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 52BCADFA3 for ; Wed, 12 Dec 2012 20:35:10 +0000 (UTC) Received: (qmail 47434 invoked by uid 500); 12 Dec 2012 20:35:09 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 47338 invoked by uid 500); 12 Dec 2012 20:35:08 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 46461 invoked by uid 99); 12 Dec 2012 20:35:07 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Dec 2012 20:35:07 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id A3A6181BA09; Wed, 12 Dec 2012 20:35:07 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: dch@apache.org To: commits@couchdb.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [15/34] Transmogrify Couchbase XML to .rst and support Sphinx Message-Id: <20121212203507.A3A6181BA09@tyr.zones.apache.org> Date: Wed, 12 Dec 2012 20:35:07 +0000 (UTC) http://git-wip-us.apache.org/repos/asf/couchdb/blob/84226656/share/docs/couchdb-manual-1.1/couchdb-manual.xml ---------------------------------------------------------------------- diff --git a/share/docs/couchdb-manual-1.1/couchdb-manual.xml b/share/docs/couchdb-manual-1.1/couchdb-manual.xml deleted file mode 100644 index 3404b92..0000000 --- a/share/docs/couchdb-manual-1.1/couchdb-manual.xml +++ /dev/null @@ -1,65 +0,0 @@ - - -%every.entities; -]> - - - CouchDB __meta_version__ Manual - - - - - - - This manual documents the CouchDB - __meta_version__ database system, including the installation, - functionality, and CouchDB API. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - http://git-wip-us.apache.org/repos/asf/couchdb/blob/84226656/share/docs/couchdb-manual-1.1/couchdb-replication.xml ---------------------------------------------------------------------- diff --git a/share/docs/couchdb-manual-1.1/couchdb-replication.xml b/share/docs/couchdb-manual-1.1/couchdb-replication.xml deleted file mode 100644 index a62a884..0000000 --- a/share/docs/couchdb-manual-1.1/couchdb-replication.xml +++ /dev/null @@ -1,554 +0,0 @@ - - -%every.entities; -]> - - - Replication - - -   - - -
- - Replicator Database - - - A database where you - PUT/POST documents to - trigger replications and you DELETE to cancel - ongoing replications. These documents have exactly the same - content as the JSON objects we used to POST to - _replicate (fields source, - target, create_target, - continuous, doc_ids, - filter, query_params. - - - - Replication documents can have a user defined - _id. Design documents (and - _local documents) added to the replicator - database are ignored. - - - - The default name of this database is - _replicator. The name can be changed in the - local.ini configuration, section - [replicator], parameter db. - - -
- - Basics - - - Let's say you PUT the following document into _replicator: - - - -{ - "_id": "my_rep", - "source": "http://myserver.com:5984/foo", - "target": "bar", - "create_target": true -} - - - - In the couch log you'll see 2 entries like these: - - - -[Thu, 17 Feb 2011 19:43:59 GMT] [info] [<0.291.0>] Document `my_rep` triggered replication `c0ebe9256695ff083347cbf95f93e280+create_target` -[Thu, 17 Feb 2011 19:44:37 GMT] [info] [<0.124.0>] Replication `c0ebe9256695ff083347cbf95f93e280+create_target` finished (triggered by document `my_rep`) - - - - As soon as the replication is triggered, the document will be - updated by CouchDB with 3 new fields: - - - -{ - "_id": "my_rep", - "source": "http://myserver.com:5984/foo", - "target": "bar", - "create_target": true, - "_replication_id": "c0ebe9256695ff083347cbf95f93e280", - "_replication_state": "triggered", - "_replication_state_time": 1297974122 -} - - - - Special fields set by the replicator start with the prefix - _replication_. - - - - - - - _replication_id - - - - The ID internally assigned to the replication. This is also - the ID exposed by /_active_tasks. - - - - - - _replication_state - - - - The current state of the replication. - - - - - - _replication_state_time - - - - A Unix timestamp (number of seconds since 1 Jan 1970) that - tells us when the current replication state (marked in - _replication_state) was set. - - - - - - - When the replication finishes, it will update the - _replication_state field (and - _replication_state_time) with the value - completed, so the document will look like: - - - -{ - "_id": "my_rep", - "source": "http://myserver.com:5984/foo", - "target": "bar", - "create_target": true, - "_replication_id": "c0ebe9256695ff083347cbf95f93e280", - "_replication_state": "completed", - "_replication_state_time": 1297974122 -} - - - - When an error happens during replication, the - _replication_state field is set to - error (and - _replication_state gets updated of course). - - - - When you PUT/POST a document to the - _replicator database, CouchDB will attempt to - start the replication up to 10 times (configurable under - [replicator], parameter - max_replication_retry_count). If it fails on - the first attempt, it waits 5 seconds before doing a second - attempt. If the second attempt fails, it waits 10 seconds before - doing a third attempt. If the third attempt fails, it waits 20 - seconds before doing a fourth attempt (each attempt doubles the - previous wait period). When an attempt fails, the Couch log will - show you something like: - - - -[error] [<0.149.0>] Error starting replication `67c1bb92010e7abe35d7d629635f18b6+create_target` (document `my_rep_2`): {db_not_found,<<"could not open http://myserver:5986/foo/">> - - - - - The _replication_state field is only set to - error when all the attempts were - unsuccessful. - - - - - There are only 3 possible values for the - _replication_state field: - triggered, completed and - error. Continuous replications never get - their state set to completed. - - -
- -
- - Documents describing the same replication - - - Lets suppose 2 documents are added to the - _replicator database in the following order: - - - -{ - "_id": "doc_A", - "source": "http://myserver.com:5984/foo", - "target": "bar" -} - - - - and - - - -{ - "_id": "doc_B", - "source": "http://myserver.com:5984/foo", - "target": "bar" -} - - - - Both describe exactly the same replication (only their - _ids differ). In this case document - doc_A triggers the replication, getting - updated by CouchDB with the fields - _replication_state, - _replication_state_time and - _replication_id, just like it was described - before. Document doc_B however, is only - updated with one field, the _replication_id - so it will look like this: - - - -{ - "_id": "doc_B", - "source": "http://myserver.com:5984/foo", - "target": "bar", - "_replication_id": "c0ebe9256695ff083347cbf95f93e280" -} - - - - While document doc_A will look like this: - - - -{ - "_id": "doc_A", - "source": "http://myserver.com:5984/foo", - "target": "bar", - "_replication_id": "c0ebe9256695ff083347cbf95f93e280", - "_replication_state": "triggered", - "_replication_state_time": 1297974122 -} - - - - Note that both document get exactly the same value for the - _replication_id field. This way you can - identify which documents refer to the same replication - you can - for example define a view which maps replication IDs to document - IDs. - - -
- -
- - Canceling replications - - - To cancel a replication simply DELETE the - document which triggered the replication. The Couch log will - show you an entry like the following: - - - -[Thu, 17 Feb 2011 20:16:29 GMT] [info] [<0.125.0>] Stopped replication `c0ebe9256695ff083347cbf95f93e280+continuous+create_target` because replication document `doc_A` was deleted - - - - - You need to DELETE the document that - triggered the replication. DELETEing - another document that describes the same replication but did - not trigger it, will not cancel the replication. - - - -
- -
- - Server restart - - - When CouchDB is restarted, it checks its - _replicator database and restarts any - replication that is described by a document that either has its - _replication_state field set to - triggered or it doesn't have yet the - _replication_state field set. - - - - - Continuous replications always have a - _replication_state field with the value - triggered, therefore they're always - restarted when CouchDB is restarted. - - - -
- -
- - Changing the Replicator Database - - - Imagine your replicator database (default name is _replicator) - has the two following documents that represent pull replications - from servers A and B: - - - -{ - "_id": "rep_from_A", - "source": "http://aserver.com:5984/foo", - "target": "foo_a", - "continuous": true, - "_replication_id": "c0ebe9256695ff083347cbf95f93e280", - "_replication_state": "triggered", - "_replication_state_time": 1297971311 -} -{ - "_id": "rep_from_B", - "source": "http://bserver.com:5984/foo", - "target": "foo_b", - "continuous": true, - "_replication_id": "231bb3cf9d48314eaa8d48a9170570d1", - "_replication_state": "triggered", - "_replication_state_time": 1297974122 -} - - - - Now without stopping and restarting CouchDB, you change the name - of the replicator database to - another_replicator_db: - - - -$ curl -X PUT http://localhost:5984/_config/replicator/db -d '"another_replicator_db"' -"_replicator" - - - - As soon as this is done, both pull replications defined before, - are stopped. This is explicitly mentioned in CouchDB's log: - - -] Stopping all ongoing replications because the replicator database was deleted or changed -[Fri, 11 Mar 2011 07:44:20 GMT] [info] [<0.127.0>] 127.0.0.1 - - PUT /_config/replicator/db 200 -]]> - - - - Imagine now you add a replication document to the new replicator - database named another_replicator_db: - - - -{ - "_id": "rep_from_X", - "source": "http://xserver.com:5984/foo", - "target": "foo_x", - "continuous": true -} - - - - From now own you have a single replication going on in your - system: a pull replication pulling from server X. Now you change - back the replicator database to the original one - _replicator: - - - -$ curl -X PUT http://localhost:5984/_config/replicator/db -d '"_replicator"' -"another_replicator_db" - - - - Immediately after this operation, the replication pulling from - server X will be stopped and the replications defined in the - _replicator database (pulling from servers A and B) will be - resumed. - - - - Changing again the replicator database to - another_replicator_db will stop the pull - replications pulling from servers A and B, and resume the pull - replication pulling from server X. - - -
- -
- - Replicating the replicator database - - - Imagine you have in server C a replicator database with the two - following pull replication documents in it: - - - -{ - "_id": "rep_from_A", - "source": "http://aserver.com:5984/foo", - "target": "foo_a", - "continuous": true, - "_replication_id": "c0ebe9256695ff083347cbf95f93e280", - "_replication_state": "triggered", - "_replication_state_time": 1297971311 -} -{ - "_id": "rep_from_B", - "source": "http://bserver.com:5984/foo", - "target": "foo_b", - "continuous": true, - "_replication_id": "231bb3cf9d48314eaa8d48a9170570d1", - "_replication_state": "triggered", - "_replication_state_time": 1297974122 -} - - - - Now you would like to have the same pull replications going on - in server D, that is, you would like to have server D pull - replicating from servers A and B. You have two options: - - - - - - - Explicitly add two documents to server's D replicator - database - - - - - - Replicate server's C replicator database into server's D - replicator database - - - - - - - Both alternatives accomplish exactly the same goal. - - -
- -
- - Delegations - - - Replication documents can have a custom - user_ctx property. This property defines the - user context under which a replication runs. For the old way of - triggering replications (POSTing to - /_replicate/), this property was not needed - (it didn't exist in fact) - this is because at the moment of - triggering the replication it has information about the - authenticated user. With the replicator database, since it's a - regular database, the information about the authenticated user - is only present at the moment the replication document is - written to the database - the replicator database implementation - is like a _changes feed consumer (with - ?include_docs=true) that reacts to what was - written to the replicator database - in fact this feature could - be implemented with an external script/program. This - implementation detail implies that for non admin users, a - user_ctx property, containing the user's name - and a subset of his/her roles, must be defined in the - replication document. This is ensured by the document update - validation function present in the default design document of - the replicator database. This validation function also ensure - that a non admin user can set a user name property in the - user_ctx property that doesn't match his/her - own name (same principle applies for the roles). - - - - For admins, the user_ctx property is - optional, and if it's missing it defaults to a user context with - name null and an empty list of roles - this mean design - documents will not be written to local targets. If writing - design documents to local targets is desired, the a user context - with the roles _admin must be set explicitly. - - - - Also, for admins the user_ctx property can be - used to trigger a replication on behalf of another user. This is - the user context that will be passed to local target database - document validation functions. - - - - - The user_ctx property only has effect for - local endpoints. - - - - - Example delegated replication document: - - - -{ - "_id": "my_rep", - "source": "http://bserver.com:5984/foo", - "target": "bar", - "continuous": true, - "user_ctx": { - "name": "joe", - "roles": ["erlanger", "researcher"] - } -} - - - - As stated before, for admins the user_ctx property is optional, - while for regular (non admin) users it's mandatory. When the - roles property of user_ctx is missing, it - defaults to the empty list [ ]. - - -
- -
- -
http://git-wip-us.apache.org/repos/asf/couchdb/blob/84226656/share/docs/couchdb-manual-1.1/couchdb-single-troubleshooting.xml ---------------------------------------------------------------------- diff --git a/share/docs/couchdb-manual-1.1/couchdb-single-troubleshooting.xml b/share/docs/couchdb-manual-1.1/couchdb-single-troubleshooting.xml deleted file mode 100644 index 5d72456..0000000 --- a/share/docs/couchdb-manual-1.1/couchdb-single-troubleshooting.xml +++ /dev/null @@ -1,35 +0,0 @@ -
- - Error Messages - - - The errors reported when CouchDB is unable to read a required file - have been updated so that explicit information about the files and - problem can now be identified from the error message. The errors - report file permission access either when reading or writing to - configuration and database files. - - - - The error is raised both through the log file and the error - message returned through the API call as a JSON error message. For - example, when setting configuration values: - - - -shell> curl -H 'X-Couch-Persist: true' -X PUT http://couchdb:5984/_config/couchdb/delayed_commits -d '"false"' -{"error":"file_permission_error","reason":"/etc/couchdb/local.ini"} - - - - Errors will always be reported using the - file_permission_error error type. - - - - During startup permissions errors on key files are also reported - in the log with a descriptive error message and file location so - that permissions can be fixed before restart. - - -
http://git-wip-us.apache.org/repos/asf/couchdb/blob/84226656/share/docs/couchdb-manual-1.1/couchdb-views.xml ---------------------------------------------------------------------- diff --git a/share/docs/couchdb-manual-1.1/couchdb-views.xml b/share/docs/couchdb-manual-1.1/couchdb-views.xml deleted file mode 100644 index 2056d29..0000000 --- a/share/docs/couchdb-manual-1.1/couchdb-views.xml +++ /dev/null @@ -1,15 +0,0 @@ - - -%every.entities; -]> - - - Views - - -   - - - http://git-wip-us.apache.org/repos/asf/couchdb/blob/84226656/share/docs/couchdb-manual-1.1/metadoc-couchdb-api-auth.xml ---------------------------------------------------------------------- diff --git a/share/docs/couchdb-manual-1.1/metadoc-couchdb-api-auth.xml b/share/docs/couchdb-manual-1.1/metadoc-couchdb-api-auth.xml deleted file mode 100644 index 3c4762b..0000000 --- a/share/docs/couchdb-manual-1.1/metadoc-couchdb-api-auth.xml +++ /dev/null @@ -1,40 +0,0 @@ - - -%every.entities; -]> - - - CouchDB API Server Authentication Methods - - - The CouchDB Authentication methods provide an interface for - obtaining session and authorization data. - - - - A list of the available methods and URL paths are provided below: - - - - - - -Authentication API CallsMethodPathDescriptionGET/_oauth/access_token - TBC - GET/_oauth/authorize - TBC - POST/_oauth/authorize - TBC - GET/_oauth/request_token - TBC - GET/_session - Returns cookie based login user information - POST/_session - Do cookie based user login - DELETE/_session - Logout cookie based user -
- -
http://git-wip-us.apache.org/repos/asf/couchdb/blob/84226656/share/docs/couchdb-manual-1.1/metadoc-couchdb-api-config.xml ---------------------------------------------------------------------- diff --git a/share/docs/couchdb-manual-1.1/metadoc-couchdb-api-config.xml b/share/docs/couchdb-manual-1.1/metadoc-couchdb-api-config.xml deleted file mode 100644 index d7af033..0000000 --- a/share/docs/couchdb-manual-1.1/metadoc-couchdb-api-config.xml +++ /dev/null @@ -1,348 +0,0 @@ - - -%every.entities; -]> - - - CouchDB API Server Configuration Methods - - - The CouchDB API Server Configuration Methods provide an interface to - query and update the various configuration values within a running - CouchDB instance. - - - - A list of the available methods and URL paths are provided below: - - - - - - -Configuration API CallsMethodPathDescriptionGET/_config - Obtain a list of the entire server configuration - GET/_config/section - Get all the configuration values for the specified section - GET/_config/section/key - Get a specific section/configuration value - PUT/_config/section/key - Set the specified configuration value - DELETE/_config/section/key - Delete the current setting -
- -
- - <literal>GET /_config</literal> - - - - - -URL API GET /_configMethodGET /_configRequest - None - Response - Returns a structure configuration name and value pairs, - organized by section - Admin Privileges Requiredno - - - Returns the entire CouchDB server configuration as a JSON - structure. The structure is organized by different configuration - sections, with individual values. - - - - For example, to get the configuration for a server: - - - -GET http://couchdb:5984/_config -Accept: application/json - - - - The response is the JSON structure: - - - ->}", - "_config" : "{couch_httpd_misc_handlers, handle_config_req}", - "_utils" : "{couch_httpd_misc_handlers, handle_utils_dir_req, \"/usr/share/couchdb/www\"}", - "_active_tasks" : "{couch_httpd_misc_handlers, handle_task_status_req}", - "_session" : "{couch_httpd_auth, handle_session_req}", - "_log" : "{couch_httpd_misc_handlers, handle_log_req}", - "favicon.ico" : "{couch_httpd_misc_handlers, handle_favicon_req, \"/usr/share/couchdb/www\"}", - "_all_dbs" : "{couch_httpd_misc_handlers, handle_all_dbs_req}", - "_oauth" : "{couch_httpd_oauth, handle_oauth_req}", - "_restart" : "{couch_httpd_misc_handlers, handle_restart_req}", - "_uuids" : "{couch_httpd_misc_handlers, handle_uuids_req}", - "_stats" : "{couch_httpd_stats_handlers, handle_stats_req}" - } -}]]> - - -
- -
- - <literal>GET /_config/section</literal> - - - - - -URL API GET /_config/sectionMethodGET /_config/sectionRequest - None - Response - All the configuration values within a specified section - Admin Privileges Requiredno - - - Gets the configuration structure for a single section. For - example, to retrieve the CouchDB configuration section values: - - - -GET http://couchdb:5984/_config/couchdb -Accept: application/json - - - - The returned JSON contains just the configuration values for this - section: - - - -{ - "os_process_timeout" : "5000", - "max_attachment_chunk_size" : "4294967296", - "max_document_size" : "4294967296", - "uri_file" : "/var/lib/couchdb/couch.uri", - "max_dbs_open" : "100", - "view_index_dir" : "/var/lib/couchdb", - "util_driver_dir" : "/usr/lib64/couchdb/erlang/lib/couch-1.0.1/priv/lib", - "database_dir" : "/var/lib/couchdb", - "delayed_commits" : "true" -} - - -
- -
- - <literal>GET /_config/section/key</literal> - - - - - -URL API GET /_config/section/keyMethodGET /_config/section/keyRequest - None - Response - Value of the specified key/section - Admin Privileges Requiredno - - - Gets a single configuration value from within a specific - configuration section. For example, to obtain the current log - level: - - - -GET http://couchdb:5984/_config/log/level -Accept: application/json - - - - Returns the string of the log level: - - - -"info" - - - - - The returned value will be the JSON of the value, which may be a - string or numeric value, or an array or object. Some client - environments may not parse simple strings or numeric values as - valid JSON. - - - -
- -
- - <literal>PUT /_config/section/key</literal> - - - - - -URL API PUT /_config/section/keyMethodPUT /_config/section/keyRequest - Value structure - Response - Previous value - Admin Privileges RequirednoReturn Codes200 - Configuration option updated successfully - 500 - Error setting configuration - - - - Updates a configuration value. The new value should be supplied in - the request body in the corresponding JSON format. For example, if - you are setting a string value, you must supply a valid JSON - string. - - - - For example, to set the function used to generate UUIDs by the - GET /_uuids API call to use the - utc_random generator: - - - -PUT http://couchdb:5984/_config/uuids/algorithm -Content-Type: application/json - -"utc_random" - - - - The return value will be empty, with the response code indicating - the success or failure of the configuration setting. - - -
- -
- - <literal>DELETE /_config/section/key</literal> - - - - - -URL API DELETE /_config/section/keyMethodDELETE /_config/section/keyRequest - None - Response - Previous value - Admin Privileges RequirednoQuery ArgumentsArgumentrevDescription - Current revision of the document for validation - OptionalyesTypestringHTTP HeadersHeaderIf-MatchDescriptionCurrent revision of the document for validationOptionalyesReturn Codes409 - Supplied revision is incorrect or missing - - - - Deletes a configuration value. The returned JSON will be the value - of the configuration parameter before it was deleted. For example, - to delete the UUID parameter: - - - -DELETE http://couchdb:5984/_config/uuids/algorithm -Content-Type: application/json - - - - The returned value is the last configured UUID function: - - - -"random" - - -
- -