コード例 #1
0
ファイル: radosstream.php プロジェクト: MrRagga-/rados
 /**
  * @throws IOException
  */
 public function stream_close()
 {
     $res = \rados_ioctx_destroy($this->ioctx);
     if ($res < 0) {
         throw new IOException('Could not destroy io context after reading ' . $this->stat['oid']);
     }
     $ret = \rados_shutdown($this->rados);
     if ($ret < 0) {
         throw new IOException('Could not shutdown rados resource');
     }
 }
コード例 #2
0
ファイル: IO.php プロジェクト: shen2/rados
 public function destroy()
 {
     return \rados_ioctx_destroy($this->_ioctx);
 }
コード例 #3
0
ファイル: poolstat.php プロジェクト: inwinstack/phprados
<?php

$rados = rados_create();
rados_conf_read_file($rados, "/etc/ceph/ceph.conf");
rados_connect($rados);
$io = rados_ioctx_create($rados, "rbd");
var_dump(rados_ioctx_pool_stat($io));
rados_ioctx_destroy($io);
rados_shutdown($rados);
コード例 #4
0
ファイル: UnitTest.php プロジェクト: krajorama/phprados
 /**
  * @depends testRadosPoolReverseLookup
  */
 public function testRadosCreate2IoCTX($info)
 {
     $ioctx = rados_ioctx_create2($info['cluster'], $info['id']);
     $this->assertNotNull($ioctx);
     $this->assertNull(rados_ioctx_destroy($ioctx));
 }
コード例 #5
0
ファイル: UnitTest.php プロジェクト: jgalvez/phprados
 /**
  * @depends testRadosPoolStat
  */
 public function testRadosDestroyIoCTX($info)
 {
     $this->assertNull(rados_ioctx_destroy($info['ioctx']));
 }