private function _gen_init_api_ack()
 {
     $ack = new InitApiAckFrame();
     $ack->status = 0;
     $ack->num_pipelet = 10;
     $ack->meta_name = 'meta';
     $ack->store();
     $passed = $ack->buffer();
     $ack->status = 10;
     $ack->error_message = 'failed';
     $ack->store();
     $failed = $ack->buffer();
     $bad_ack = new UninitMetaAckFrame();
     $bad_ack->status = 0;
     $bad_ack->store();
     $bad = $bad_ack->buffer();
     return array('passed' => $passed, 'failed' => $failed, 'bad' => $bad);
 }
 /**
  * Uninitialize the meta on meta agent
  * @param $meta_name : string of meta name
  * @return void type
  */
 private function _uninit_meta($meta_name)
 {
     if (null == $this->meta_name) {
         return;
         // 不需要释放meta
     }
     // create uninit_meta_command
     $cmd = new UninitMetaFrame();
     $cmd->meta_name = $this->meta_name;
     // send
     $res_body = $this->_request($cmd);
     if (null === $res_body) {
         $this->meta_name = null;
         BigpipeLog::warning('[uninit_meta error][%s][%s]', $this->last_error_message, $cmd->last_error_message());
         $this->last_error_message = "_uninit_meta no ack";
         return;
     }
     // parse ack
     $ack = new UninitMetaAckFrame();
     if (!$ack->load($res_body)) {
         $this->last_error_message = '_uninit_meta error ack';
         $this->meta_name = null;
         BigpipeLog::warning('[%s:%u][%s][ack error][%s][%s]', __FILE__, __LINE__, __FUNCTION__, $this->last_error_message, $cmd->last_error_message());
         return;
     }
     $this->meta_name = null;
 }