Return-Path: Delivered-To: apmail-hadoop-zookeeper-commits-archive@locus.apache.org Received: (qmail 27828 invoked from network); 10 Dec 2008 00:42:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Dec 2008 00:42:31 -0000 Received: (qmail 80138 invoked by uid 500); 10 Dec 2008 00:42:44 -0000 Delivered-To: apmail-hadoop-zookeeper-commits-archive@hadoop.apache.org Received: (qmail 80109 invoked by uid 500); 10 Dec 2008 00:42:44 -0000 Mailing-List: contact zookeeper-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: zookeeper-dev@ Delivered-To: mailing list zookeeper-commits@hadoop.apache.org Received: (qmail 80098 invoked by uid 99); 10 Dec 2008 00:42:44 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Dec 2008 16:42:44 -0800 X-ASF-Spam-Status: No, hits=3.8 required=10.0 tests=FRT_GUARANTEE1,FUZZY_GUARANTEE X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Dec 2008 00:42:28 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 9708723888E6; Tue, 9 Dec 2008 16:42:07 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: svn commit: r724941 - in /hadoop/zookeeper/trunk: CHANGES.txt docs/zookeeperProgrammers.html docs/zookeeperProgrammers.pdf src/docs/src/documentation/content/xdocs/zookeeperProgrammers.xml Date: Wed, 10 Dec 2008 00:42:07 -0000 To: zookeeper-commits@hadoop.apache.org From: mahadev@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20081210004207.9708723888E6@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: mahadev Date: Tue Dec 9 16:42:07 2008 New Revision: 724941 URL: http://svn.apache.org/viewvc?rev=724941&view=rev Log: ZOOKEEPER-247. fix formatting of C API in ACL section of programmer guide. (patrick hunt via mahadev) Modified: hadoop/zookeeper/trunk/CHANGES.txt hadoop/zookeeper/trunk/docs/zookeeperProgrammers.html hadoop/zookeeper/trunk/docs/zookeeperProgrammers.pdf hadoop/zookeeper/trunk/src/docs/src/documentation/content/xdocs/zookeeperProgrammers.xml Modified: hadoop/zookeeper/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=724941&r1=724940&r2=724941&view=diff ============================================================================== --- hadoop/zookeeper/trunk/CHANGES.txt (original) +++ hadoop/zookeeper/trunk/CHANGES.txt Tue Dec 9 16:42:07 2008 @@ -63,6 +63,9 @@ ZOOKEEPER-161. Content needed: "Designing a ZooKeeper Deployment" (breed via phunt) + + ZOOKEEPER-247. fix formatting of C API in ACL section of programmer guide. +(patrick hunt via mahadev) Release 3.0.0 - 2008-10-21 Modified: hadoop/zookeeper/trunk/docs/zookeeperProgrammers.html URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/docs/zookeeperProgrammers.html?rev=724941&r1=724940&r2=724941&view=diff ============================================================================== --- hadoop/zookeeper/trunk/docs/zookeeperProgrammers.html (original) +++ hadoop/zookeeper/trunk/docs/zookeeperProgrammers.html Tue Dec 9 16:42:07 2008 @@ -1143,70 +1143,81 @@ -

The ZOO_OPEN_ACL_UNSAFE is completely open free for all ACL: any application can execute any operation on the node and can create, list and delete its children. The ZOO_READ_ACL_UNSAFE is read-only access for any application. CREATE_ALL_ACL grants all permissions to the creator of the node. The creator must have been authenticated by the server (for example, using “digest” scheme) before it can create nodes with this ACL.

+

The ZOO_OPEN_ACL_UNSAFE is completely open free for all + ACL: any application can execute any operation on the node and + can create, list and delete its children. The + ZOO_READ_ACL_UNSAFE is read-only access for any + application. CREATE_ALL_ACL grants all permissions to the + creator of the node. The creator must have been authenticated by + the server (for example, using “digest” + scheme) before it can create nodes with this ACL.

The following ZooKeeper operations deal with ACLs:

    - -
  • -

    -int zoo_add_auth(zhandle_t *zh,const char* scheme,const char* cert,

    -
  • -
  • +

    -int certLen, void_completion_t completion, const void *data);

    -
  • +int zoo_add_auth + (zhandle_t *zh,const char* + scheme,const char* + cert, int certLen, void_completion_t + completion, const void + *data);

    +
-

The application uses the zoo_add_auth function to authenticate itself to the server. The function can be called multiple times if the application wants to authenticate using different schemes and/or identities.

+

The application uses the zoo_add_auth function to + authenticate itself to the server. The function can be called + multiple times if the application wants to authenticate using + different schemes and/or identities.

    - -
  • -

    -int zoo_create(zhandle_t *zh, const char *path, const char *value,

    -
  • - -
  • -

    -int valuelen, const struct ACL_vector *acl, int flags,

    -
  • -
  • +

    -char *realpath, int max_realpath_len);

    -
  • +int zoo_create + (zhandle_t *zh, const char + *path, const char + *value,int + valuelen, const struct + ACL_vector *acl, int + flags,char + *realpath, int + max_realpath_len);

    +
-

zoo_create(...) operation creates a new node. The acl parameter is a list of ACLs associated with the node. The parent node must have the CREATE permission bit set.

+

zoo_create(...) operation creates a new node. The acl + parameter is a list of ACLs associated with the node. The parent + node must have the CREATE permission bit set.

    - -
  • -

    -int zoo_get_acl(zhandle_t *zh, const char *path,

    -
  • -
  • +

    -struct ACL_vector *acl, struct Stat *stat);

    -
  • +int zoo_get_acl + (zhandle_t *zh, const char + *path,struct ACL_vector + *acl, struct Stat *stat);

    +

This operation returns a node’s ACL info.

    - -
  • -

    -int zoo_set_acl(zhandle_t *zh, const char *path, int version,

    -
  • -
  • +

    -const struct ACL_vector *acl);

    -
  • +int zoo_set_acl + (zhandle_t *zh, const char + *path, int + version,const struct + ACL_vector *acl);

    +
-

This function replaces node’s ACL list with a new one. The node must have the ADMIN permission set.

-

Here is a sample code that makes use of the above APIs to authenticate itself using the “foo” scheme and create an ephemeral node “/xyz” with create-only permissions.

+

This function replaces node’s ACL list with a new one. The + node must have the ADMIN permission set.

+

Here is a sample code that makes use of the above APIs to + authenticate itself using the “foo” scheme + and create an ephemeral node “/xyz” with create-only + permissions.

Note
@@ -1283,7 +1294,7 @@
- +

Consistency Guarantees

ZooKeeper is a high performance, scalable service. Both reads and @@ -1409,12 +1420,12 @@

- +

Bindings

The ZooKeeper client libraries come in two languages: Java and C. The following sections describe these.

- +

Java Binding

There are two packages that make up the ZooKeeper Java binding: org.apache.zookeeper and org.apache.zookeeper.data. The rest of the @@ -1481,7 +1492,7 @@ (SESSION_EXPIRED and AUTH_FAILED), the ZooKeeper object becomes invalid, the two threads shut down, and any further ZooKeeper calls throw errors.

- +

C Binding

The C binding has a single-threaded and multi-threaded library. The multi-threaded library is easiest to use and is most similar to the @@ -1498,7 +1509,7 @@ (i.e. FreeBSD 4.x). In all other cases, application developers should link with zookeeper_mt, as it includes support for both Sync and Async API.

- +

Installation

If you're building the client from a check-out from the Apache repository, follow the steps outlined below. If you're building from a @@ -1629,7 +1640,7 @@ - +

Using the C Client

You can test your client by running a ZooKeeper server (see instructions on the project wiki page on how to run it) and connecting @@ -1687,7 +1698,7 @@

- +

Building Blocks: A Guide to ZooKeeper Operations

This section surveys all the operations a developer can perform @@ -1705,25 +1716,25 @@ - +

Connecting to ZooKeeper

- +

Read Operations

- +

Write Operations

- +

Handling Watches

- +

Miscelleaneous ZooKeeper Operations

- +

Program Structure, with Simple Example

@@ -1732,7 +1743,7 @@

- +

Gotchas: Common Problems and Troubleshooting

So now you know ZooKeeper. It's fast, simple, your application Modified: hadoop/zookeeper/trunk/docs/zookeeperProgrammers.pdf URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/docs/zookeeperProgrammers.pdf?rev=724941&r1=724940&r2=724941&view=diff ============================================================================== Binary files - no diff available. Modified: hadoop/zookeeper/trunk/src/docs/src/documentation/content/xdocs/zookeeperProgrammers.xml URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/docs/src/documentation/content/xdocs/zookeeperProgrammers.xml?rev=724941&r1=724940&r2=724941&view=diff ============================================================================== --- hadoop/zookeeper/trunk/src/docs/src/documentation/content/xdocs/zookeeperProgrammers.xml (original) +++ hadoop/zookeeper/trunk/src/docs/src/documentation/content/xdocs/zookeeperProgrammers.xml Tue Dec 9 16:42:07 2008 @@ -673,40 +673,71 @@ struct ACL_vector ZOO_CREATOR_ALL_ACL; //(ZOO_PERM_ALL,ZOO_AUTH_IDS) - The ZOO_OPEN_ACL_UNSAFE is completely open free for all ACL: any application can execute any operation on the node and can create, list and delete its children. The ZOO_READ_ACL_UNSAFE is read-only access for any application. CREATE_ALL_ACL grants all permissions to the creator of the node. The creator must have been authenticated by the server (for example, using “digest” scheme) before it can create nodes with this ACL. + The ZOO_OPEN_ACL_UNSAFE is completely open free for all + ACL: any application can execute any operation on the node and + can create, list and delete its children. The + ZOO_READ_ACL_UNSAFE is read-only access for any + application. CREATE_ALL_ACL grants all permissions to the + creator of the node. The creator must have been authenticated by + the server (for example, using “digest” + scheme) before it can create nodes with this ACL. The following ZooKeeper operations deal with ACLs: - - int zoo_add_auth(zhandle_t *zh,const char* scheme,const char* cert, - int certLen, void_completion_t completion, const void *data); - - - The application uses the zoo_add_auth function to authenticate itself to the server. The function can be called multiple times if the application wants to authenticate using different schemes and/or identities. - - - int zoo_create(zhandle_t *zh, const char *path, const char *value, - int valuelen, const struct ACL_vector *acl, int flags, - char *realpath, int max_realpath_len); - - - zoo_create(...) operation creates a new node. The acl parameter is a list of ACLs associated with the node. The parent node must have the CREATE permission bit set. - - - int zoo_get_acl(zhandle_t *zh, const char *path, - struct ACL_vector *acl, struct Stat *stat); - + + int zoo_add_auth + (zhandle_t *zh,const char* + scheme,const char* + cert, int certLen, void_completion_t + completion, const void + *data); + + + The application uses the zoo_add_auth function to + authenticate itself to the server. The function can be called + multiple times if the application wants to authenticate using + different schemes and/or identities. + + + int zoo_create + (zhandle_t *zh, const char + *path, const char + *value,int + valuelen, const struct + ACL_vector *acl, int + flags,char + *realpath, int + max_realpath_len); + + + zoo_create(...) operation creates a new node. The acl + parameter is a list of ACLs associated with the node. The parent + node must have the CREATE permission bit set. + + + int zoo_get_acl + (zhandle_t *zh, const char + *path,struct ACL_vector + *acl, struct Stat *stat); + This operation returns a node’s ACL info. - - int zoo_set_acl(zhandle_t *zh, const char *path, int version, - const struct ACL_vector *acl); - - - This function replaces node’s ACL list with a new one. The node must have the ADMIN permission set. - - Here is a sample code that makes use of the above APIs to authenticate itself using the “foo” scheme and create an ephemeral node “/xyz” with create-only permissions. + + int zoo_set_acl + (zhandle_t *zh, const char + *path, int + version,const struct + ACL_vector *acl); + + + This function replaces node’s ACL list with a new one. The + node must have the ADMIN permission set. + + Here is a sample code that makes use of the above APIs to + authenticate itself using the “foo” scheme + and create an ephemeral node “/xyz” with create-only + permissions. This is a very simple example which is intended to show how to interact with ZooKeeper ACLs