Skip to content
This repository has been archived by the owner on Apr 23, 2020. It is now read-only.

Rest Modify

Randgalt edited this page Jun 6, 2012 · 9 revisions

APIs for mutating ZooKeeper data. NOTE: you must enable node mutations for these APIs to be available. This is done in the Exhibitor constructor and/or a CLI option in the standalone version.

createOrUpdateNode

Create or update a ZNode. If the node doesn’t exist it is created. If it does exist the data is set to the new value. The path in the REST URL corresponds to the ZNode to be updated/created. Any missing parent paths will get auto-created. E.g. “exhibitor/v1/explorer/znode/foo/bar/snafu” corresponds to the ZNode: “/foo/bar/snafu”.

Method PUT
URL exhibitor/v1/explorer/znode/{path:.*}
Argument BinaryString* (i.e. the node data)
Response Result

*BinaryString is a JSON string consisting of hex values. E.g. “AF1023DD”.

Optional headers for tracking/logging:

netflix-user-name User making the change
netflix-ticket-number tracking/ticket number for the change
netflix-reason Descriptive reason for the change

deleteNode

Delete a ZNode. The path in the REST URL corresponds to the ZNode to be deleted. E.g. “exhibitor/v1/explorer/znode/foo/bar/snafu” corresponds to the ZNode: “/foo/bar/snafu”.

Method DELETE
URL exhibitor/v1/explorer/znode/{path:.*}
Argument n/a
Response Result

Optional headers for tracking/logging:

netflix-user-name User making the change
netflix-ticket-number tracking/ticket number for the change
netflix-reason Descriptive reason for the change

analyze

Analyze a set of paths assuming they are Curator Lock paths and return details about lock ownership and possible deadlocks.

Method POST
URL exhibitor/v1/explorer/analyze
Argument PathAnalysisRequest[]
Response PathAnalysisNode[]

usageListing

Produces a detailed listing from a starting path showing all the paths, creation time, immediate children count and deep children count.

Method POST
URL exhibitor/v1/explorer/usage-listing
Argument UsageListingRequest
Response tab delimited text file