Exemplo n.º 1
0
 public function write($output)
 {
     $xfer = 0;
     $xfer += $output->writeStructBegin('TGetExecSummaryResp');
     if ($this->status !== null) {
         if (!is_object($this->status)) {
             throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
         }
         $xfer += $output->writeFieldBegin('status', TType::STRUCT, 1);
         $xfer += $this->status->write($output);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->summary !== null) {
         if (!is_object($this->summary)) {
             throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
         }
         $xfer += $output->writeFieldBegin('summary', TType::STRUCT, 2);
         $xfer += $this->summary->write($output);
         $xfer += $output->writeFieldEnd();
     }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;
 }
Exemplo n.º 2
0
 public function write($output)
 {
     $xfer = 0;
     $xfer += $output->writeStructBegin('ImpalaService_GetExecSummary_result');
     if ($this->success !== null) {
         if (!is_object($this->success)) {
             throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
         }
         $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
         $xfer += $this->success->write($output);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->error !== null) {
         $xfer += $output->writeFieldBegin('error', TType::STRUCT, 1);
         $xfer += $this->error->write($output);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->error2 !== null) {
         $xfer += $output->writeFieldBegin('error2', TType::STRUCT, 2);
         $xfer += $this->error2->write($output);
         $xfer += $output->writeFieldEnd();
     }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;
 }