Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I get the node stat info? #92

Open
pupilcp opened this issue Aug 11, 2019 · 2 comments
Open

Can I get the node stat info? #92

pupilcp opened this issue Aug 11, 2019 · 2 comments

Comments

@pupilcp
Copy link

pupilcp commented Aug 11, 2019

version: 0.6.4
method: public Zookeeper::get ( string $path [, callable $watcher_cb = NULL [, array &$stat = NULL [, int $max_size = 0 ]]] ) : string

Hello, I want to ask how the third param $stat is? Can show me an example?

@Timandes
Copy link
Contributor

<?php

$zookeeper = new Zookeeper('localhost:2181');

$stat = [];
$zookeeper->get('/zookeeper', null, $stat);
var_dump($stat);
array(11) {
  ["czxid"]=>
  float(0)
  ["mzxid"]=>
  float(0)
  ["ctime"]=>
  float(0)
  ["mtime"]=>
  float(0)
  ["version"]=>
  int(0)
  ["cversion"]=>
  int(-2)
  ["aversion"]=>
  int(0)
  ["ephemeralOwner"]=>
  float(0)
  ["dataLength"]=>
  int(0)
  ["numChildren"]=>
  int(2)
  ["pzxid"]=>
  float(0)
}

@pupilcp
Copy link
Author

pupilcp commented Aug 13, 2019

<?php

$zookeeper = new Zookeeper('localhost:2181');

$stat = [];
$zookeeper->get('/zookeeper', null, $stat);
var_dump($stat);
array(11) {
  ["czxid"]=>
  float(0)
  ["mzxid"]=>
  float(0)
  ["ctime"]=>
  float(0)
  ["mtime"]=>
  float(0)
  ["version"]=>
  int(0)
  ["cversion"]=>
  int(-2)
  ["aversion"]=>
  int(0)
  ["ephemeralOwner"]=>
  float(0)
  ["dataLength"]=>
  int(0)
  ["numChildren"]=>
  int(2)
  ["pzxid"]=>
  float(0)
}

Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants