Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A PHP extension for interfacing with Apache ZooKeeper

License

NotificationsYou must be signed in to change notification settings

php-zookeeper/php-zookeeper

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

387 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ext-zookeepertestscodecovReleaseLicenseDeepWiki

This extension uses libzookeeper library to provide API for communicating withZooKeeper service.

ZooKeeper is an Apache project that enables centralized service for maintainingconfiguration information, naming, providing distributed synchronization, andproviding group services.

Requirements

Install

1.Compile ZooKeeper C Binding

$ ./configure --prefix=/path/to/zookeeper-c-binding$ make$ sudo make install

As of ZooKeeper 3.5.0, after unpacking source tarball, the following command should be executed before above-metioned steps:

$ autoreconf -if

As of ZooKeeper 3.5.9, the following command should be executed beforeautoreconf -if:

$ ant compile_jute

As of ZooKeeper 3.6.0,ant will fail because of missingbuild.xml. That file and two other files can be found in source tarball of3.5.9:

$cd apache-zookeeper-3.5.9$ cp build.xml ivy* ../apache-zookeeper-3.6.2

As of ZooKeeper 3.7.0, after unpacking source tarball, first execute the following command with Java 8 to build jute files:

$ mvn compile

Then navigate to the C client directory and generate the configure file:

$cd zookeeper-client/zookeeper-client-c$ autoreconf -if

After that, you can proceed with the standard build steps mentioned above.

2.Compile PHP ZooKeeper Extension

$ phpize$ ./configure --with-libzookeeper-dir=/path/to/zookeeper-c-binding$ make$ sudo make install

Examples

<?php$zc =newZookeeper();$zc->connect('localhost:2181');var_dump($zc->get('/zookeeper'));?>

Working with other extensions

1.Swoole

Swoole\Async::set(['enable_signalfd' =>false,// See: https://github.com/swoole/swoole-src/issues/302]);$zk =newZookeeper('localhost:2181');Swoole\Process::signal(SIGTERM,function() {echo"TERM" .PHP_EOL;Swoole\Event::exit();    });Swoole\Event::wait();

For Developers

Branches

  • master: Main branch.
  • 0.5.x: The last branch which still supports PHP 5.x.

Resources

About

A PHP extension for interfacing with Apache ZooKeeper

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C55.4%
  • PHP33.6%
  • Shell4.2%
  • Dockerfile3.2%
  • M42.8%
  • HTML0.5%
  • Makefile0.3%

[8]ページ先頭

©2009-2026 Movatter.jp