Subversion Repositories php-qbpwcf

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
23 liveuser 1
<?php
2
/**
3
 * Autogenerated by Thrift Compiler (0.9.3)
4
 *
5
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
6
 *  @generated
7
 */
8
use Thrift\Base\TBase;
9
use Thrift\Type\TType;
10
use Thrift\Type\TMessageType;
11
use Thrift\Exception\TException;
12
use Thrift\Exception\TProtocolException;
13
use Thrift\Protocol\TProtocol;
14
use Thrift\Protocol\TBinaryProtocolAccelerated;
15
use Thrift\Exception\TApplicationException;
16
 
17
interface ThriftHiveIf extends \metastore\ThriftHiveMetastoreIf {
18
  /**
19
   * @param string $query
20
   * @throws \HiveServerException
21
   */
22
  public function execute($query);
23
  /**
24
   * @return string
25
   * @throws \HiveServerException
26
   */
27
  public function fetchOne();
28
  /**
29
   * @param int $numRows
30
   * @return string[]
31
   * @throws \HiveServerException
32
   */
33
  public function fetchN($numRows);
34
  /**
35
   * @return string[]
36
   * @throws \HiveServerException
37
   */
38
  public function fetchAll();
39
  /**
40
   * @return \metastore\Schema
41
   * @throws \HiveServerException
42
   */
43
  public function getSchema();
44
  /**
45
   * @return \metastore\Schema
46
   * @throws \HiveServerException
47
   */
48
  public function getThriftSchema();
49
  /**
50
   * @return \HiveClusterStatus
51
   * @throws \HiveServerException
52
   */
53
  public function getClusterStatus();
54
  /**
55
   * @return \QueryPlan
56
   * @throws \HiveServerException
57
   */
58
  public function getQueryPlan();
59
  /**
60
   */
61
  public function clean();
62
}
63
 
64
class ThriftHiveClient extends \metastore\ThriftHiveMetastoreClient implements \ThriftHiveIf {
65
  public function __construct($input, $output=null) {
66
    parent::__construct($input, $output);
67
  }
68
 
69
  public function execute($query)
70
  {
71
    $this->send_execute($query);
72
    $this->recv_execute();
73
  }
74
 
75
  public function send_execute($query)
76
  {
77
    $args = new \ThriftHive_execute_args();
78
    $args->query = $query;
79
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
80
    if ($bin_accel)
81
    {
82
      thrift_protocol_write_binary($this->output_, 'execute', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
83
    }
84
    else
85
    {
86
      $this->output_->writeMessageBegin('execute', TMessageType::CALL, $this->seqid_);
87
      $args->write($this->output_);
88
      $this->output_->writeMessageEnd();
89
      $this->output_->getTransport()->flush();
90
    }
91
  }
92
 
93
  public function recv_execute()
94
  {
95
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
96
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\ThriftHive_execute_result', $this->input_->isStrictRead());
97
    else
98
    {
99
      $rseqid = 0;
100
      $fname = null;
101
      $mtype = 0;
102
 
103
      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
104
      if ($mtype == TMessageType::EXCEPTION) {
105
        $x = new TApplicationException();
106
        $x->read($this->input_);
107
        $this->input_->readMessageEnd();
108
        throw $x;
109
      }
110
      $result = new \ThriftHive_execute_result();
111
      $result->read($this->input_);
112
      $this->input_->readMessageEnd();
113
    }
114
    if ($result->ex !== null) {
115
      throw $result->ex;
116
    }
117
    return;
118
  }
119
 
120
  public function fetchOne()
121
  {
122
    $this->send_fetchOne();
123
    return $this->recv_fetchOne();
124
  }
125
 
126
  public function send_fetchOne()
127
  {
128
    $args = new \ThriftHive_fetchOne_args();
129
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
130
    if ($bin_accel)
131
    {
132
      thrift_protocol_write_binary($this->output_, 'fetchOne', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
133
    }
134
    else
135
    {
136
      $this->output_->writeMessageBegin('fetchOne', TMessageType::CALL, $this->seqid_);
137
      $args->write($this->output_);
138
      $this->output_->writeMessageEnd();
139
      $this->output_->getTransport()->flush();
140
    }
141
  }
142
 
143
  public function recv_fetchOne()
144
  {
145
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
146
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\ThriftHive_fetchOne_result', $this->input_->isStrictRead());
147
    else
148
    {
149
      $rseqid = 0;
150
      $fname = null;
151
      $mtype = 0;
152
 
153
      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
154
      if ($mtype == TMessageType::EXCEPTION) {
155
        $x = new TApplicationException();
156
        $x->read($this->input_);
157
        $this->input_->readMessageEnd();
158
        throw $x;
159
      }
160
      $result = new \ThriftHive_fetchOne_result();
161
      $result->read($this->input_);
162
      $this->input_->readMessageEnd();
163
    }
164
    if ($result->success !== null) {
165
      return $result->success;
166
    }
167
    if ($result->ex !== null) {
168
      throw $result->ex;
169
    }
170
    throw new \Exception("fetchOne failed: unknown result");
171
  }
172
 
173
  public function fetchN($numRows)
174
  {
175
    $this->send_fetchN($numRows);
176
    return $this->recv_fetchN();
177
  }
178
 
179
  public function send_fetchN($numRows)
180
  {
181
    $args = new \ThriftHive_fetchN_args();
182
    $args->numRows = $numRows;
183
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
184
    if ($bin_accel)
185
    {
186
      thrift_protocol_write_binary($this->output_, 'fetchN', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
187
    }
188
    else
189
    {
190
      $this->output_->writeMessageBegin('fetchN', TMessageType::CALL, $this->seqid_);
191
      $args->write($this->output_);
192
      $this->output_->writeMessageEnd();
193
      $this->output_->getTransport()->flush();
194
    }
195
  }
196
 
197
  public function recv_fetchN()
198
  {
199
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
200
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\ThriftHive_fetchN_result', $this->input_->isStrictRead());
201
    else
202
    {
203
      $rseqid = 0;
204
      $fname = null;
205
      $mtype = 0;
206
 
207
      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
208
      if ($mtype == TMessageType::EXCEPTION) {
209
        $x = new TApplicationException();
210
        $x->read($this->input_);
211
        $this->input_->readMessageEnd();
212
        throw $x;
213
      }
214
      $result = new \ThriftHive_fetchN_result();
215
      $result->read($this->input_);
216
      $this->input_->readMessageEnd();
217
    }
218
    if ($result->success !== null) {
219
      return $result->success;
220
    }
221
    if ($result->ex !== null) {
222
      throw $result->ex;
223
    }
224
    throw new \Exception("fetchN failed: unknown result");
225
  }
226
 
227
  public function fetchAll()
228
  {
229
    $this->send_fetchAll();
230
    return $this->recv_fetchAll();
231
  }
232
 
233
  public function send_fetchAll()
234
  {
235
    $args = new \ThriftHive_fetchAll_args();
236
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
237
    if ($bin_accel)
238
    {
239
      thrift_protocol_write_binary($this->output_, 'fetchAll', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
240
    }
241
    else
242
    {
243
      $this->output_->writeMessageBegin('fetchAll', TMessageType::CALL, $this->seqid_);
244
      $args->write($this->output_);
245
      $this->output_->writeMessageEnd();
246
      $this->output_->getTransport()->flush();
247
    }
248
  }
249
 
250
  public function recv_fetchAll()
251
  {
252
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
253
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\ThriftHive_fetchAll_result', $this->input_->isStrictRead());
254
    else
255
    {
256
      $rseqid = 0;
257
      $fname = null;
258
      $mtype = 0;
259
 
260
      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
261
      if ($mtype == TMessageType::EXCEPTION) {
262
        $x = new TApplicationException();
263
        $x->read($this->input_);
264
        $this->input_->readMessageEnd();
265
        throw $x;
266
      }
267
      $result = new \ThriftHive_fetchAll_result();
268
      $result->read($this->input_);
269
      $this->input_->readMessageEnd();
270
    }
271
    if ($result->success !== null) {
272
      return $result->success;
273
    }
274
    if ($result->ex !== null) {
275
      throw $result->ex;
276
    }
277
    throw new \Exception("fetchAll failed: unknown result");
278
  }
279
 
280
  public function getSchema()
281
  {
282
    $this->send_getSchema();
283
    return $this->recv_getSchema();
284
  }
285
 
286
  public function send_getSchema()
287
  {
288
    $args = new \ThriftHive_getSchema_args();
289
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
290
    if ($bin_accel)
291
    {
292
      thrift_protocol_write_binary($this->output_, 'getSchema', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
293
    }
294
    else
295
    {
296
      $this->output_->writeMessageBegin('getSchema', TMessageType::CALL, $this->seqid_);
297
      $args->write($this->output_);
298
      $this->output_->writeMessageEnd();
299
      $this->output_->getTransport()->flush();
300
    }
301
  }
302
 
303
  public function recv_getSchema()
304
  {
305
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
306
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\ThriftHive_getSchema_result', $this->input_->isStrictRead());
307
    else
308
    {
309
      $rseqid = 0;
310
      $fname = null;
311
      $mtype = 0;
312
 
313
      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
314
      if ($mtype == TMessageType::EXCEPTION) {
315
        $x = new TApplicationException();
316
        $x->read($this->input_);
317
        $this->input_->readMessageEnd();
318
        throw $x;
319
      }
320
      $result = new \ThriftHive_getSchema_result();
321
      $result->read($this->input_);
322
      $this->input_->readMessageEnd();
323
    }
324
    if ($result->success !== null) {
325
      return $result->success;
326
    }
327
    if ($result->ex !== null) {
328
      throw $result->ex;
329
    }
330
    throw new \Exception("getSchema failed: unknown result");
331
  }
332
 
333
  public function getThriftSchema()
334
  {
335
    $this->send_getThriftSchema();
336
    return $this->recv_getThriftSchema();
337
  }
338
 
339
  public function send_getThriftSchema()
340
  {
341
    $args = new \ThriftHive_getThriftSchema_args();
342
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
343
    if ($bin_accel)
344
    {
345
      thrift_protocol_write_binary($this->output_, 'getThriftSchema', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
346
    }
347
    else
348
    {
349
      $this->output_->writeMessageBegin('getThriftSchema', TMessageType::CALL, $this->seqid_);
350
      $args->write($this->output_);
351
      $this->output_->writeMessageEnd();
352
      $this->output_->getTransport()->flush();
353
    }
354
  }
355
 
356
  public function recv_getThriftSchema()
357
  {
358
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
359
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\ThriftHive_getThriftSchema_result', $this->input_->isStrictRead());
360
    else
361
    {
362
      $rseqid = 0;
363
      $fname = null;
364
      $mtype = 0;
365
 
366
      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
367
      if ($mtype == TMessageType::EXCEPTION) {
368
        $x = new TApplicationException();
369
        $x->read($this->input_);
370
        $this->input_->readMessageEnd();
371
        throw $x;
372
      }
373
      $result = new \ThriftHive_getThriftSchema_result();
374
      $result->read($this->input_);
375
      $this->input_->readMessageEnd();
376
    }
377
    if ($result->success !== null) {
378
      return $result->success;
379
    }
380
    if ($result->ex !== null) {
381
      throw $result->ex;
382
    }
383
    throw new \Exception("getThriftSchema failed: unknown result");
384
  }
385
 
386
  public function getClusterStatus()
387
  {
388
    $this->send_getClusterStatus();
389
    return $this->recv_getClusterStatus();
390
  }
391
 
392
  public function send_getClusterStatus()
393
  {
394
    $args = new \ThriftHive_getClusterStatus_args();
395
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
396
    if ($bin_accel)
397
    {
398
      thrift_protocol_write_binary($this->output_, 'getClusterStatus', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
399
    }
400
    else
401
    {
402
      $this->output_->writeMessageBegin('getClusterStatus', TMessageType::CALL, $this->seqid_);
403
      $args->write($this->output_);
404
      $this->output_->writeMessageEnd();
405
      $this->output_->getTransport()->flush();
406
    }
407
  }
408
 
409
  public function recv_getClusterStatus()
410
  {
411
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
412
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\ThriftHive_getClusterStatus_result', $this->input_->isStrictRead());
413
    else
414
    {
415
      $rseqid = 0;
416
      $fname = null;
417
      $mtype = 0;
418
 
419
      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
420
      if ($mtype == TMessageType::EXCEPTION) {
421
        $x = new TApplicationException();
422
        $x->read($this->input_);
423
        $this->input_->readMessageEnd();
424
        throw $x;
425
      }
426
      $result = new \ThriftHive_getClusterStatus_result();
427
      $result->read($this->input_);
428
      $this->input_->readMessageEnd();
429
    }
430
    if ($result->success !== null) {
431
      return $result->success;
432
    }
433
    if ($result->ex !== null) {
434
      throw $result->ex;
435
    }
436
    throw new \Exception("getClusterStatus failed: unknown result");
437
  }
438
 
439
  public function getQueryPlan()
440
  {
441
    $this->send_getQueryPlan();
442
    return $this->recv_getQueryPlan();
443
  }
444
 
445
  public function send_getQueryPlan()
446
  {
447
    $args = new \ThriftHive_getQueryPlan_args();
448
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
449
    if ($bin_accel)
450
    {
451
      thrift_protocol_write_binary($this->output_, 'getQueryPlan', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
452
    }
453
    else
454
    {
455
      $this->output_->writeMessageBegin('getQueryPlan', TMessageType::CALL, $this->seqid_);
456
      $args->write($this->output_);
457
      $this->output_->writeMessageEnd();
458
      $this->output_->getTransport()->flush();
459
    }
460
  }
461
 
462
  public function recv_getQueryPlan()
463
  {
464
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
465
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\ThriftHive_getQueryPlan_result', $this->input_->isStrictRead());
466
    else
467
    {
468
      $rseqid = 0;
469
      $fname = null;
470
      $mtype = 0;
471
 
472
      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
473
      if ($mtype == TMessageType::EXCEPTION) {
474
        $x = new TApplicationException();
475
        $x->read($this->input_);
476
        $this->input_->readMessageEnd();
477
        throw $x;
478
      }
479
      $result = new \ThriftHive_getQueryPlan_result();
480
      $result->read($this->input_);
481
      $this->input_->readMessageEnd();
482
    }
483
    if ($result->success !== null) {
484
      return $result->success;
485
    }
486
    if ($result->ex !== null) {
487
      throw $result->ex;
488
    }
489
    throw new \Exception("getQueryPlan failed: unknown result");
490
  }
491
 
492
  public function clean()
493
  {
494
    $this->send_clean();
495
    $this->recv_clean();
496
  }
497
 
498
  public function send_clean()
499
  {
500
    $args = new \ThriftHive_clean_args();
501
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
502
    if ($bin_accel)
503
    {
504
      thrift_protocol_write_binary($this->output_, 'clean', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
505
    }
506
    else
507
    {
508
      $this->output_->writeMessageBegin('clean', TMessageType::CALL, $this->seqid_);
509
      $args->write($this->output_);
510
      $this->output_->writeMessageEnd();
511
      $this->output_->getTransport()->flush();
512
    }
513
  }
514
 
515
  public function recv_clean()
516
  {
517
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
518
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\ThriftHive_clean_result', $this->input_->isStrictRead());
519
    else
520
    {
521
      $rseqid = 0;
522
      $fname = null;
523
      $mtype = 0;
524
 
525
      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
526
      if ($mtype == TMessageType::EXCEPTION) {
527
        $x = new TApplicationException();
528
        $x->read($this->input_);
529
        $this->input_->readMessageEnd();
530
        throw $x;
531
      }
532
      $result = new \ThriftHive_clean_result();
533
      $result->read($this->input_);
534
      $this->input_->readMessageEnd();
535
    }
536
    return;
537
  }
538
 
539
}
540
 
541
// HELPER FUNCTIONS AND STRUCTURES
542
 
543
class ThriftHive_execute_args {
544
  static $_TSPEC;
545
 
546
  /**
547
   * @var string
548
   */
549
  public $query = null;
550
 
551
  public function __construct($vals=null) {
552
    if (!isset(self::$_TSPEC)) {
553
      self::$_TSPEC = array(
554
        1 => array(
555
          'var' => 'query',
556
          'type' => TType::STRING,
557
          ),
558
        );
559
    }
560
    if (is_array($vals)) {
561
      if (isset($vals['query'])) {
562
        $this->query = $vals['query'];
563
      }
564
    }
565
  }
566
 
567
  public function getName() {
568
    return 'ThriftHive_execute_args';
569
  }
570
 
571
  public function read($input)
572
  {
573
    $xfer = 0;
574
    $fname = null;
575
    $ftype = 0;
576
    $fid = 0;
577
    $xfer += $input->readStructBegin($fname);
578
    while (true)
579
    {
580
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
581
      if ($ftype == TType::STOP) {
582
        break;
583
      }
584
      switch ($fid)
585
      {
586
        case 1:
587
          if ($ftype == TType::STRING) {
588
            $xfer += $input->readString($this->query);
589
          } else {
590
            $xfer += $input->skip($ftype);
591
          }
592
          break;
593
        default:
594
          $xfer += $input->skip($ftype);
595
          break;
596
      }
597
      $xfer += $input->readFieldEnd();
598
    }
599
    $xfer += $input->readStructEnd();
600
    return $xfer;
601
  }
602
 
603
  public function write($output) {
604
    $xfer = 0;
605
    $xfer += $output->writeStructBegin('ThriftHive_execute_args');
606
    if ($this->query !== null) {
607
      $xfer += $output->writeFieldBegin('query', TType::STRING, 1);
608
      $xfer += $output->writeString($this->query);
609
      $xfer += $output->writeFieldEnd();
610
    }
611
    $xfer += $output->writeFieldStop();
612
    $xfer += $output->writeStructEnd();
613
    return $xfer;
614
  }
615
 
616
}
617
 
618
class ThriftHive_execute_result {
619
  static $_TSPEC;
620
 
621
  /**
622
   * @var \HiveServerException
623
   */
624
  public $ex = null;
625
 
626
  public function __construct($vals=null) {
627
    if (!isset(self::$_TSPEC)) {
628
      self::$_TSPEC = array(
629
        1 => array(
630
          'var' => 'ex',
631
          'type' => TType::STRUCT,
632
          'class' => '\HiveServerException',
633
          ),
634
        );
635
    }
636
    if (is_array($vals)) {
637
      if (isset($vals['ex'])) {
638
        $this->ex = $vals['ex'];
639
      }
640
    }
641
  }
642
 
643
  public function getName() {
644
    return 'ThriftHive_execute_result';
645
  }
646
 
647
  public function read($input)
648
  {
649
    $xfer = 0;
650
    $fname = null;
651
    $ftype = 0;
652
    $fid = 0;
653
    $xfer += $input->readStructBegin($fname);
654
    while (true)
655
    {
656
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
657
      if ($ftype == TType::STOP) {
658
        break;
659
      }
660
      switch ($fid)
661
      {
662
        case 1:
663
          if ($ftype == TType::STRUCT) {
664
            $this->ex = new \HiveServerException();
665
            $xfer += $this->ex->read($input);
666
          } else {
667
            $xfer += $input->skip($ftype);
668
          }
669
          break;
670
        default:
671
          $xfer += $input->skip($ftype);
672
          break;
673
      }
674
      $xfer += $input->readFieldEnd();
675
    }
676
    $xfer += $input->readStructEnd();
677
    return $xfer;
678
  }
679
 
680
  public function write($output) {
681
    $xfer = 0;
682
    $xfer += $output->writeStructBegin('ThriftHive_execute_result');
683
    if ($this->ex !== null) {
684
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
685
      $xfer += $this->ex->write($output);
686
      $xfer += $output->writeFieldEnd();
687
    }
688
    $xfer += $output->writeFieldStop();
689
    $xfer += $output->writeStructEnd();
690
    return $xfer;
691
  }
692
 
693
}
694
 
695
class ThriftHive_fetchOne_args {
696
  static $_TSPEC;
697
 
698
 
699
  public function __construct() {
700
    if (!isset(self::$_TSPEC)) {
701
      self::$_TSPEC = array(
702
        );
703
    }
704
  }
705
 
706
  public function getName() {
707
    return 'ThriftHive_fetchOne_args';
708
  }
709
 
710
  public function read($input)
711
  {
712
    $xfer = 0;
713
    $fname = null;
714
    $ftype = 0;
715
    $fid = 0;
716
    $xfer += $input->readStructBegin($fname);
717
    while (true)
718
    {
719
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
720
      if ($ftype == TType::STOP) {
721
        break;
722
      }
723
      switch ($fid)
724
      {
725
        default:
726
          $xfer += $input->skip($ftype);
727
          break;
728
      }
729
      $xfer += $input->readFieldEnd();
730
    }
731
    $xfer += $input->readStructEnd();
732
    return $xfer;
733
  }
734
 
735
  public function write($output) {
736
    $xfer = 0;
737
    $xfer += $output->writeStructBegin('ThriftHive_fetchOne_args');
738
    $xfer += $output->writeFieldStop();
739
    $xfer += $output->writeStructEnd();
740
    return $xfer;
741
  }
742
 
743
}
744
 
745
class ThriftHive_fetchOne_result {
746
  static $_TSPEC;
747
 
748
  /**
749
   * @var string
750
   */
751
  public $success = null;
752
  /**
753
   * @var \HiveServerException
754
   */
755
  public $ex = null;
756
 
757
  public function __construct($vals=null) {
758
    if (!isset(self::$_TSPEC)) {
759
      self::$_TSPEC = array(
760
 
761
          'var' => 'success',
762
          'type' => TType::STRING,
763
          ),
764
        1 => array(
765
          'var' => 'ex',
766
          'type' => TType::STRUCT,
767
          'class' => '\HiveServerException',
768
          ),
769
        );
770
    }
771
    if (is_array($vals)) {
772
      if (isset($vals['success'])) {
773
        $this->success = $vals['success'];
774
      }
775
      if (isset($vals['ex'])) {
776
        $this->ex = $vals['ex'];
777
      }
778
    }
779
  }
780
 
781
  public function getName() {
782
    return 'ThriftHive_fetchOne_result';
783
  }
784
 
785
  public function read($input)
786
  {
787
    $xfer = 0;
788
    $fname = null;
789
    $ftype = 0;
790
    $fid = 0;
791
    $xfer += $input->readStructBegin($fname);
792
    while (true)
793
    {
794
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
795
      if ($ftype == TType::STOP) {
796
        break;
797
      }
798
      switch ($fid)
799
      {
800
        case 0:
801
          if ($ftype == TType::STRING) {
802
            $xfer += $input->readString($this->success);
803
          } else {
804
            $xfer += $input->skip($ftype);
805
          }
806
          break;
807
        case 1:
808
          if ($ftype == TType::STRUCT) {
809
            $this->ex = new \HiveServerException();
810
            $xfer += $this->ex->read($input);
811
          } else {
812
            $xfer += $input->skip($ftype);
813
          }
814
          break;
815
        default:
816
          $xfer += $input->skip($ftype);
817
          break;
818
      }
819
      $xfer += $input->readFieldEnd();
820
    }
821
    $xfer += $input->readStructEnd();
822
    return $xfer;
823
  }
824
 
825
  public function write($output) {
826
    $xfer = 0;
827
    $xfer += $output->writeStructBegin('ThriftHive_fetchOne_result');
828
    if ($this->success !== null) {
829
      $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
830
      $xfer += $output->writeString($this->success);
831
      $xfer += $output->writeFieldEnd();
832
    }
833
    if ($this->ex !== null) {
834
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
835
      $xfer += $this->ex->write($output);
836
      $xfer += $output->writeFieldEnd();
837
    }
838
    $xfer += $output->writeFieldStop();
839
    $xfer += $output->writeStructEnd();
840
    return $xfer;
841
  }
842
 
843
}
844
 
845
class ThriftHive_fetchN_args {
846
  static $_TSPEC;
847
 
848
  /**
849
   * @var int
850
   */
851
  public $numRows = null;
852
 
853
  public function __construct($vals=null) {
854
    if (!isset(self::$_TSPEC)) {
855
      self::$_TSPEC = array(
856
        1 => array(
857
          'var' => 'numRows',
858
          'type' => TType::I32,
859
          ),
860
        );
861
    }
862
    if (is_array($vals)) {
863
      if (isset($vals['numRows'])) {
864
        $this->numRows = $vals['numRows'];
865
      }
866
    }
867
  }
868
 
869
  public function getName() {
870
    return 'ThriftHive_fetchN_args';
871
  }
872
 
873
  public function read($input)
874
  {
875
    $xfer = 0;
876
    $fname = null;
877
    $ftype = 0;
878
    $fid = 0;
879
    $xfer += $input->readStructBegin($fname);
880
    while (true)
881
    {
882
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
883
      if ($ftype == TType::STOP) {
884
        break;
885
      }
886
      switch ($fid)
887
      {
888
        case 1:
889
          if ($ftype == TType::I32) {
890
            $xfer += $input->readI32($this->numRows);
891
          } else {
892
            $xfer += $input->skip($ftype);
893
          }
894
          break;
895
        default:
896
          $xfer += $input->skip($ftype);
897
          break;
898
      }
899
      $xfer += $input->readFieldEnd();
900
    }
901
    $xfer += $input->readStructEnd();
902
    return $xfer;
903
  }
904
 
905
  public function write($output) {
906
    $xfer = 0;
907
    $xfer += $output->writeStructBegin('ThriftHive_fetchN_args');
908
    if ($this->numRows !== null) {
909
      $xfer += $output->writeFieldBegin('numRows', TType::I32, 1);
910
      $xfer += $output->writeI32($this->numRows);
911
      $xfer += $output->writeFieldEnd();
912
    }
913
    $xfer += $output->writeFieldStop();
914
    $xfer += $output->writeStructEnd();
915
    return $xfer;
916
  }
917
 
918
}
919
 
920
class ThriftHive_fetchN_result {
921
  static $_TSPEC;
922
 
923
  /**
924
   * @var string[]
925
   */
926
  public $success = null;
927
  /**
928
   * @var \HiveServerException
929
   */
930
  public $ex = null;
931
 
932
  public function __construct($vals=null) {
933
    if (!isset(self::$_TSPEC)) {
934
      self::$_TSPEC = array(
935
 
936
          'var' => 'success',
937
          'type' => TType::LST,
938
          'etype' => TType::STRING,
939
          'elem' => array(
940
            'type' => TType::STRING,
941
            ),
942
          ),
943
        1 => array(
944
          'var' => 'ex',
945
          'type' => TType::STRUCT,
946
          'class' => '\HiveServerException',
947
          ),
948
        );
949
    }
950
    if (is_array($vals)) {
951
      if (isset($vals['success'])) {
952
        $this->success = $vals['success'];
953
      }
954
      if (isset($vals['ex'])) {
955
        $this->ex = $vals['ex'];
956
      }
957
    }
958
  }
959
 
960
  public function getName() {
961
    return 'ThriftHive_fetchN_result';
962
  }
963
 
964
  public function read($input)
965
  {
966
    $xfer = 0;
967
    $fname = null;
968
    $ftype = 0;
969
    $fid = 0;
970
    $xfer += $input->readStructBegin($fname);
971
    while (true)
972
    {
973
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
974
      if ($ftype == TType::STOP) {
975
        break;
976
      }
977
      switch ($fid)
978
      {
979
        case 0:
980
          if ($ftype == TType::LST) {
981
            $this->success = array();
982
            $_size0 = 0;
983
            $_etype3 = 0;
984
            $xfer += $input->readListBegin($_etype3, $_size0);
985
            for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
986
            {
987
              $elem5 = null;
988
              $xfer += $input->readString($elem5);
989
              $this->success []= $elem5;
990
            }
991
            $xfer += $input->readListEnd();
992
          } else {
993
            $xfer += $input->skip($ftype);
994
          }
995
          break;
996
        case 1:
997
          if ($ftype == TType::STRUCT) {
998
            $this->ex = new \HiveServerException();
999
            $xfer += $this->ex->read($input);
1000
          } else {
1001
            $xfer += $input->skip($ftype);
1002
          }
1003
          break;
1004
        default:
1005
          $xfer += $input->skip($ftype);
1006
          break;
1007
      }
1008
      $xfer += $input->readFieldEnd();
1009
    }
1010
    $xfer += $input->readStructEnd();
1011
    return $xfer;
1012
  }
1013
 
1014
  public function write($output) {
1015
    $xfer = 0;
1016
    $xfer += $output->writeStructBegin('ThriftHive_fetchN_result');
1017
    if ($this->success !== null) {
1018
      if (!is_array($this->success)) {
1019
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
1020
      }
1021
      $xfer += $output->writeFieldBegin('success', TType::LST, 0);
1022
      {
1023
        $output->writeListBegin(TType::STRING, count($this->success));
1024
        {
1025
          foreach ($this->success as $iter6)
1026
          {
1027
            $xfer += $output->writeString($iter6);
1028
          }
1029
        }
1030
        $output->writeListEnd();
1031
      }
1032
      $xfer += $output->writeFieldEnd();
1033
    }
1034
    if ($this->ex !== null) {
1035
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
1036
      $xfer += $this->ex->write($output);
1037
      $xfer += $output->writeFieldEnd();
1038
    }
1039
    $xfer += $output->writeFieldStop();
1040
    $xfer += $output->writeStructEnd();
1041
    return $xfer;
1042
  }
1043
 
1044
}
1045
 
1046
class ThriftHive_fetchAll_args {
1047
  static $_TSPEC;
1048
 
1049
 
1050
  public function __construct() {
1051
    if (!isset(self::$_TSPEC)) {
1052
      self::$_TSPEC = array(
1053
        );
1054
    }
1055
  }
1056
 
1057
  public function getName() {
1058
    return 'ThriftHive_fetchAll_args';
1059
  }
1060
 
1061
  public function read($input)
1062
  {
1063
    $xfer = 0;
1064
    $fname = null;
1065
    $ftype = 0;
1066
    $fid = 0;
1067
    $xfer += $input->readStructBegin($fname);
1068
    while (true)
1069
    {
1070
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
1071
      if ($ftype == TType::STOP) {
1072
        break;
1073
      }
1074
      switch ($fid)
1075
      {
1076
        default:
1077
          $xfer += $input->skip($ftype);
1078
          break;
1079
      }
1080
      $xfer += $input->readFieldEnd();
1081
    }
1082
    $xfer += $input->readStructEnd();
1083
    return $xfer;
1084
  }
1085
 
1086
  public function write($output) {
1087
    $xfer = 0;
1088
    $xfer += $output->writeStructBegin('ThriftHive_fetchAll_args');
1089
    $xfer += $output->writeFieldStop();
1090
    $xfer += $output->writeStructEnd();
1091
    return $xfer;
1092
  }
1093
 
1094
}
1095
 
1096
class ThriftHive_fetchAll_result {
1097
  static $_TSPEC;
1098
 
1099
  /**
1100
   * @var string[]
1101
   */
1102
  public $success = null;
1103
  /**
1104
   * @var \HiveServerException
1105
   */
1106
  public $ex = null;
1107
 
1108
  public function __construct($vals=null) {
1109
    if (!isset(self::$_TSPEC)) {
1110
      self::$_TSPEC = array(
1111
 
1112
          'var' => 'success',
1113
          'type' => TType::LST,
1114
          'etype' => TType::STRING,
1115
          'elem' => array(
1116
            'type' => TType::STRING,
1117
            ),
1118
          ),
1119
        1 => array(
1120
          'var' => 'ex',
1121
          'type' => TType::STRUCT,
1122
          'class' => '\HiveServerException',
1123
          ),
1124
        );
1125
    }
1126
    if (is_array($vals)) {
1127
      if (isset($vals['success'])) {
1128
        $this->success = $vals['success'];
1129
      }
1130
      if (isset($vals['ex'])) {
1131
        $this->ex = $vals['ex'];
1132
      }
1133
    }
1134
  }
1135
 
1136
  public function getName() {
1137
    return 'ThriftHive_fetchAll_result';
1138
  }
1139
 
1140
  public function read($input)
1141
  {
1142
    $xfer = 0;
1143
    $fname = null;
1144
    $ftype = 0;
1145
    $fid = 0;
1146
    $xfer += $input->readStructBegin($fname);
1147
    while (true)
1148
    {
1149
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
1150
      if ($ftype == TType::STOP) {
1151
        break;
1152
      }
1153
      switch ($fid)
1154
      {
1155
        case 0:
1156
          if ($ftype == TType::LST) {
1157
            $this->success = array();
1158
            $_size7 = 0;
1159
            $_etype10 = 0;
1160
            $xfer += $input->readListBegin($_etype10, $_size7);
1161
            for ($_i11 = 0; $_i11 < $_size7; ++$_i11)
1162
            {
1163
              $elem12 = null;
1164
              $xfer += $input->readString($elem12);
1165
              $this->success []= $elem12;
1166
            }
1167
            $xfer += $input->readListEnd();
1168
          } else {
1169
            $xfer += $input->skip($ftype);
1170
          }
1171
          break;
1172
        case 1:
1173
          if ($ftype == TType::STRUCT) {
1174
            $this->ex = new \HiveServerException();
1175
            $xfer += $this->ex->read($input);
1176
          } else {
1177
            $xfer += $input->skip($ftype);
1178
          }
1179
          break;
1180
        default:
1181
          $xfer += $input->skip($ftype);
1182
          break;
1183
      }
1184
      $xfer += $input->readFieldEnd();
1185
    }
1186
    $xfer += $input->readStructEnd();
1187
    return $xfer;
1188
  }
1189
 
1190
  public function write($output) {
1191
    $xfer = 0;
1192
    $xfer += $output->writeStructBegin('ThriftHive_fetchAll_result');
1193
    if ($this->success !== null) {
1194
      if (!is_array($this->success)) {
1195
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
1196
      }
1197
      $xfer += $output->writeFieldBegin('success', TType::LST, 0);
1198
      {
1199
        $output->writeListBegin(TType::STRING, count($this->success));
1200
        {
1201
          foreach ($this->success as $iter13)
1202
          {
1203
            $xfer += $output->writeString($iter13);
1204
          }
1205
        }
1206
        $output->writeListEnd();
1207
      }
1208
      $xfer += $output->writeFieldEnd();
1209
    }
1210
    if ($this->ex !== null) {
1211
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
1212
      $xfer += $this->ex->write($output);
1213
      $xfer += $output->writeFieldEnd();
1214
    }
1215
    $xfer += $output->writeFieldStop();
1216
    $xfer += $output->writeStructEnd();
1217
    return $xfer;
1218
  }
1219
 
1220
}
1221
 
1222
class ThriftHive_getSchema_args {
1223
  static $_TSPEC;
1224
 
1225
 
1226
  public function __construct() {
1227
    if (!isset(self::$_TSPEC)) {
1228
      self::$_TSPEC = array(
1229
        );
1230
    }
1231
  }
1232
 
1233
  public function getName() {
1234
    return 'ThriftHive_getSchema_args';
1235
  }
1236
 
1237
  public function read($input)
1238
  {
1239
    $xfer = 0;
1240
    $fname = null;
1241
    $ftype = 0;
1242
    $fid = 0;
1243
    $xfer += $input->readStructBegin($fname);
1244
    while (true)
1245
    {
1246
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
1247
      if ($ftype == TType::STOP) {
1248
        break;
1249
      }
1250
      switch ($fid)
1251
      {
1252
        default:
1253
          $xfer += $input->skip($ftype);
1254
          break;
1255
      }
1256
      $xfer += $input->readFieldEnd();
1257
    }
1258
    $xfer += $input->readStructEnd();
1259
    return $xfer;
1260
  }
1261
 
1262
  public function write($output) {
1263
    $xfer = 0;
1264
    $xfer += $output->writeStructBegin('ThriftHive_getSchema_args');
1265
    $xfer += $output->writeFieldStop();
1266
    $xfer += $output->writeStructEnd();
1267
    return $xfer;
1268
  }
1269
 
1270
}
1271
 
1272
class ThriftHive_getSchema_result {
1273
  static $_TSPEC;
1274
 
1275
  /**
1276
   * @var \metastore\Schema
1277
   */
1278
  public $success = null;
1279
  /**
1280
   * @var \HiveServerException
1281
   */
1282
  public $ex = null;
1283
 
1284
  public function __construct($vals=null) {
1285
    if (!isset(self::$_TSPEC)) {
1286
      self::$_TSPEC = array(
1287
 
1288
          'var' => 'success',
1289
          'type' => TType::STRUCT,
1290
          'class' => '\metastore\Schema',
1291
          ),
1292
        1 => array(
1293
          'var' => 'ex',
1294
          'type' => TType::STRUCT,
1295
          'class' => '\HiveServerException',
1296
          ),
1297
        );
1298
    }
1299
    if (is_array($vals)) {
1300
      if (isset($vals['success'])) {
1301
        $this->success = $vals['success'];
1302
      }
1303
      if (isset($vals['ex'])) {
1304
        $this->ex = $vals['ex'];
1305
      }
1306
    }
1307
  }
1308
 
1309
  public function getName() {
1310
    return 'ThriftHive_getSchema_result';
1311
  }
1312
 
1313
  public function read($input)
1314
  {
1315
    $xfer = 0;
1316
    $fname = null;
1317
    $ftype = 0;
1318
    $fid = 0;
1319
    $xfer += $input->readStructBegin($fname);
1320
    while (true)
1321
    {
1322
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
1323
      if ($ftype == TType::STOP) {
1324
        break;
1325
      }
1326
      switch ($fid)
1327
      {
1328
        case 0:
1329
          if ($ftype == TType::STRUCT) {
1330
            $this->success = new \metastore\Schema();
1331
            $xfer += $this->success->read($input);
1332
          } else {
1333
            $xfer += $input->skip($ftype);
1334
          }
1335
          break;
1336
        case 1:
1337
          if ($ftype == TType::STRUCT) {
1338
            $this->ex = new \HiveServerException();
1339
            $xfer += $this->ex->read($input);
1340
          } else {
1341
            $xfer += $input->skip($ftype);
1342
          }
1343
          break;
1344
        default:
1345
          $xfer += $input->skip($ftype);
1346
          break;
1347
      }
1348
      $xfer += $input->readFieldEnd();
1349
    }
1350
    $xfer += $input->readStructEnd();
1351
    return $xfer;
1352
  }
1353
 
1354
  public function write($output) {
1355
    $xfer = 0;
1356
    $xfer += $output->writeStructBegin('ThriftHive_getSchema_result');
1357
    if ($this->success !== null) {
1358
      if (!is_object($this->success)) {
1359
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
1360
      }
1361
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
1362
      $xfer += $this->success->write($output);
1363
      $xfer += $output->writeFieldEnd();
1364
    }
1365
    if ($this->ex !== null) {
1366
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
1367
      $xfer += $this->ex->write($output);
1368
      $xfer += $output->writeFieldEnd();
1369
    }
1370
    $xfer += $output->writeFieldStop();
1371
    $xfer += $output->writeStructEnd();
1372
    return $xfer;
1373
  }
1374
 
1375
}
1376
 
1377
class ThriftHive_getThriftSchema_args {
1378
  static $_TSPEC;
1379
 
1380
 
1381
  public function __construct() {
1382
    if (!isset(self::$_TSPEC)) {
1383
      self::$_TSPEC = array(
1384
        );
1385
    }
1386
  }
1387
 
1388
  public function getName() {
1389
    return 'ThriftHive_getThriftSchema_args';
1390
  }
1391
 
1392
  public function read($input)
1393
  {
1394
    $xfer = 0;
1395
    $fname = null;
1396
    $ftype = 0;
1397
    $fid = 0;
1398
    $xfer += $input->readStructBegin($fname);
1399
    while (true)
1400
    {
1401
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
1402
      if ($ftype == TType::STOP) {
1403
        break;
1404
      }
1405
      switch ($fid)
1406
      {
1407
        default:
1408
          $xfer += $input->skip($ftype);
1409
          break;
1410
      }
1411
      $xfer += $input->readFieldEnd();
1412
    }
1413
    $xfer += $input->readStructEnd();
1414
    return $xfer;
1415
  }
1416
 
1417
  public function write($output) {
1418
    $xfer = 0;
1419
    $xfer += $output->writeStructBegin('ThriftHive_getThriftSchema_args');
1420
    $xfer += $output->writeFieldStop();
1421
    $xfer += $output->writeStructEnd();
1422
    return $xfer;
1423
  }
1424
 
1425
}
1426
 
1427
class ThriftHive_getThriftSchema_result {
1428
  static $_TSPEC;
1429
 
1430
  /**
1431
   * @var \metastore\Schema
1432
   */
1433
  public $success = null;
1434
  /**
1435
   * @var \HiveServerException
1436
   */
1437
  public $ex = null;
1438
 
1439
  public function __construct($vals=null) {
1440
    if (!isset(self::$_TSPEC)) {
1441
      self::$_TSPEC = array(
1442
 
1443
          'var' => 'success',
1444
          'type' => TType::STRUCT,
1445
          'class' => '\metastore\Schema',
1446
          ),
1447
        1 => array(
1448
          'var' => 'ex',
1449
          'type' => TType::STRUCT,
1450
          'class' => '\HiveServerException',
1451
          ),
1452
        );
1453
    }
1454
    if (is_array($vals)) {
1455
      if (isset($vals['success'])) {
1456
        $this->success = $vals['success'];
1457
      }
1458
      if (isset($vals['ex'])) {
1459
        $this->ex = $vals['ex'];
1460
      }
1461
    }
1462
  }
1463
 
1464
  public function getName() {
1465
    return 'ThriftHive_getThriftSchema_result';
1466
  }
1467
 
1468
  public function read($input)
1469
  {
1470
    $xfer = 0;
1471
    $fname = null;
1472
    $ftype = 0;
1473
    $fid = 0;
1474
    $xfer += $input->readStructBegin($fname);
1475
    while (true)
1476
    {
1477
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
1478
      if ($ftype == TType::STOP) {
1479
        break;
1480
      }
1481
      switch ($fid)
1482
      {
1483
        case 0:
1484
          if ($ftype == TType::STRUCT) {
1485
            $this->success = new \metastore\Schema();
1486
            $xfer += $this->success->read($input);
1487
          } else {
1488
            $xfer += $input->skip($ftype);
1489
          }
1490
          break;
1491
        case 1:
1492
          if ($ftype == TType::STRUCT) {
1493
            $this->ex = new \HiveServerException();
1494
            $xfer += $this->ex->read($input);
1495
          } else {
1496
            $xfer += $input->skip($ftype);
1497
          }
1498
          break;
1499
        default:
1500
          $xfer += $input->skip($ftype);
1501
          break;
1502
      }
1503
      $xfer += $input->readFieldEnd();
1504
    }
1505
    $xfer += $input->readStructEnd();
1506
    return $xfer;
1507
  }
1508
 
1509
  public function write($output) {
1510
    $xfer = 0;
1511
    $xfer += $output->writeStructBegin('ThriftHive_getThriftSchema_result');
1512
    if ($this->success !== null) {
1513
      if (!is_object($this->success)) {
1514
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
1515
      }
1516
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
1517
      $xfer += $this->success->write($output);
1518
      $xfer += $output->writeFieldEnd();
1519
    }
1520
    if ($this->ex !== null) {
1521
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
1522
      $xfer += $this->ex->write($output);
1523
      $xfer += $output->writeFieldEnd();
1524
    }
1525
    $xfer += $output->writeFieldStop();
1526
    $xfer += $output->writeStructEnd();
1527
    return $xfer;
1528
  }
1529
 
1530
}
1531
 
1532
class ThriftHive_getClusterStatus_args {
1533
  static $_TSPEC;
1534
 
1535
 
1536
  public function __construct() {
1537
    if (!isset(self::$_TSPEC)) {
1538
      self::$_TSPEC = array(
1539
        );
1540
    }
1541
  }
1542
 
1543
  public function getName() {
1544
    return 'ThriftHive_getClusterStatus_args';
1545
  }
1546
 
1547
  public function read($input)
1548
  {
1549
    $xfer = 0;
1550
    $fname = null;
1551
    $ftype = 0;
1552
    $fid = 0;
1553
    $xfer += $input->readStructBegin($fname);
1554
    while (true)
1555
    {
1556
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
1557
      if ($ftype == TType::STOP) {
1558
        break;
1559
      }
1560
      switch ($fid)
1561
      {
1562
        default:
1563
          $xfer += $input->skip($ftype);
1564
          break;
1565
      }
1566
      $xfer += $input->readFieldEnd();
1567
    }
1568
    $xfer += $input->readStructEnd();
1569
    return $xfer;
1570
  }
1571
 
1572
  public function write($output) {
1573
    $xfer = 0;
1574
    $xfer += $output->writeStructBegin('ThriftHive_getClusterStatus_args');
1575
    $xfer += $output->writeFieldStop();
1576
    $xfer += $output->writeStructEnd();
1577
    return $xfer;
1578
  }
1579
 
1580
}
1581
 
1582
class ThriftHive_getClusterStatus_result {
1583
  static $_TSPEC;
1584
 
1585
  /**
1586
   * @var \HiveClusterStatus
1587
   */
1588
  public $success = null;
1589
  /**
1590
   * @var \HiveServerException
1591
   */
1592
  public $ex = null;
1593
 
1594
  public function __construct($vals=null) {
1595
    if (!isset(self::$_TSPEC)) {
1596
      self::$_TSPEC = array(
1597
 
1598
          'var' => 'success',
1599
          'type' => TType::STRUCT,
1600
          'class' => '\HiveClusterStatus',
1601
          ),
1602
        1 => array(
1603
          'var' => 'ex',
1604
          'type' => TType::STRUCT,
1605
          'class' => '\HiveServerException',
1606
          ),
1607
        );
1608
    }
1609
    if (is_array($vals)) {
1610
      if (isset($vals['success'])) {
1611
        $this->success = $vals['success'];
1612
      }
1613
      if (isset($vals['ex'])) {
1614
        $this->ex = $vals['ex'];
1615
      }
1616
    }
1617
  }
1618
 
1619
  public function getName() {
1620
    return 'ThriftHive_getClusterStatus_result';
1621
  }
1622
 
1623
  public function read($input)
1624
  {
1625
    $xfer = 0;
1626
    $fname = null;
1627
    $ftype = 0;
1628
    $fid = 0;
1629
    $xfer += $input->readStructBegin($fname);
1630
    while (true)
1631
    {
1632
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
1633
      if ($ftype == TType::STOP) {
1634
        break;
1635
      }
1636
      switch ($fid)
1637
      {
1638
        case 0:
1639
          if ($ftype == TType::STRUCT) {
1640
            $this->success = new \HiveClusterStatus();
1641
            $xfer += $this->success->read($input);
1642
          } else {
1643
            $xfer += $input->skip($ftype);
1644
          }
1645
          break;
1646
        case 1:
1647
          if ($ftype == TType::STRUCT) {
1648
            $this->ex = new \HiveServerException();
1649
            $xfer += $this->ex->read($input);
1650
          } else {
1651
            $xfer += $input->skip($ftype);
1652
          }
1653
          break;
1654
        default:
1655
          $xfer += $input->skip($ftype);
1656
          break;
1657
      }
1658
      $xfer += $input->readFieldEnd();
1659
    }
1660
    $xfer += $input->readStructEnd();
1661
    return $xfer;
1662
  }
1663
 
1664
  public function write($output) {
1665
    $xfer = 0;
1666
    $xfer += $output->writeStructBegin('ThriftHive_getClusterStatus_result');
1667
    if ($this->success !== null) {
1668
      if (!is_object($this->success)) {
1669
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
1670
      }
1671
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
1672
      $xfer += $this->success->write($output);
1673
      $xfer += $output->writeFieldEnd();
1674
    }
1675
    if ($this->ex !== null) {
1676
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
1677
      $xfer += $this->ex->write($output);
1678
      $xfer += $output->writeFieldEnd();
1679
    }
1680
    $xfer += $output->writeFieldStop();
1681
    $xfer += $output->writeStructEnd();
1682
    return $xfer;
1683
  }
1684
 
1685
}
1686
 
1687
class ThriftHive_getQueryPlan_args {
1688
  static $_TSPEC;
1689
 
1690
 
1691
  public function __construct() {
1692
    if (!isset(self::$_TSPEC)) {
1693
      self::$_TSPEC = array(
1694
        );
1695
    }
1696
  }
1697
 
1698
  public function getName() {
1699
    return 'ThriftHive_getQueryPlan_args';
1700
  }
1701
 
1702
  public function read($input)
1703
  {
1704
    $xfer = 0;
1705
    $fname = null;
1706
    $ftype = 0;
1707
    $fid = 0;
1708
    $xfer += $input->readStructBegin($fname);
1709
    while (true)
1710
    {
1711
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
1712
      if ($ftype == TType::STOP) {
1713
        break;
1714
      }
1715
      switch ($fid)
1716
      {
1717
        default:
1718
          $xfer += $input->skip($ftype);
1719
          break;
1720
      }
1721
      $xfer += $input->readFieldEnd();
1722
    }
1723
    $xfer += $input->readStructEnd();
1724
    return $xfer;
1725
  }
1726
 
1727
  public function write($output) {
1728
    $xfer = 0;
1729
    $xfer += $output->writeStructBegin('ThriftHive_getQueryPlan_args');
1730
    $xfer += $output->writeFieldStop();
1731
    $xfer += $output->writeStructEnd();
1732
    return $xfer;
1733
  }
1734
 
1735
}
1736
 
1737
class ThriftHive_getQueryPlan_result {
1738
  static $_TSPEC;
1739
 
1740
  /**
1741
   * @var \QueryPlan
1742
   */
1743
  public $success = null;
1744
  /**
1745
   * @var \HiveServerException
1746
   */
1747
  public $ex = null;
1748
 
1749
  public function __construct($vals=null) {
1750
    if (!isset(self::$_TSPEC)) {
1751
      self::$_TSPEC = array(
1752
 
1753
          'var' => 'success',
1754
          'type' => TType::STRUCT,
1755
          'class' => '\QueryPlan',
1756
          ),
1757
        1 => array(
1758
          'var' => 'ex',
1759
          'type' => TType::STRUCT,
1760
          'class' => '\HiveServerException',
1761
          ),
1762
        );
1763
    }
1764
    if (is_array($vals)) {
1765
      if (isset($vals['success'])) {
1766
        $this->success = $vals['success'];
1767
      }
1768
      if (isset($vals['ex'])) {
1769
        $this->ex = $vals['ex'];
1770
      }
1771
    }
1772
  }
1773
 
1774
  public function getName() {
1775
    return 'ThriftHive_getQueryPlan_result';
1776
  }
1777
 
1778
  public function read($input)
1779
  {
1780
    $xfer = 0;
1781
    $fname = null;
1782
    $ftype = 0;
1783
    $fid = 0;
1784
    $xfer += $input->readStructBegin($fname);
1785
    while (true)
1786
    {
1787
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
1788
      if ($ftype == TType::STOP) {
1789
        break;
1790
      }
1791
      switch ($fid)
1792
      {
1793
        case 0:
1794
          if ($ftype == TType::STRUCT) {
1795
            $this->success = new \QueryPlan();
1796
            $xfer += $this->success->read($input);
1797
          } else {
1798
            $xfer += $input->skip($ftype);
1799
          }
1800
          break;
1801
        case 1:
1802
          if ($ftype == TType::STRUCT) {
1803
            $this->ex = new \HiveServerException();
1804
            $xfer += $this->ex->read($input);
1805
          } else {
1806
            $xfer += $input->skip($ftype);
1807
          }
1808
          break;
1809
        default:
1810
          $xfer += $input->skip($ftype);
1811
          break;
1812
      }
1813
      $xfer += $input->readFieldEnd();
1814
    }
1815
    $xfer += $input->readStructEnd();
1816
    return $xfer;
1817
  }
1818
 
1819
  public function write($output) {
1820
    $xfer = 0;
1821
    $xfer += $output->writeStructBegin('ThriftHive_getQueryPlan_result');
1822
    if ($this->success !== null) {
1823
      if (!is_object($this->success)) {
1824
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
1825
      }
1826
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
1827
      $xfer += $this->success->write($output);
1828
      $xfer += $output->writeFieldEnd();
1829
    }
1830
    if ($this->ex !== null) {
1831
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
1832
      $xfer += $this->ex->write($output);
1833
      $xfer += $output->writeFieldEnd();
1834
    }
1835
    $xfer += $output->writeFieldStop();
1836
    $xfer += $output->writeStructEnd();
1837
    return $xfer;
1838
  }
1839
 
1840
}
1841
 
1842
class ThriftHive_clean_args {
1843
  static $_TSPEC;
1844
 
1845
 
1846
  public function __construct() {
1847
    if (!isset(self::$_TSPEC)) {
1848
      self::$_TSPEC = array(
1849
        );
1850
    }
1851
  }
1852
 
1853
  public function getName() {
1854
    return 'ThriftHive_clean_args';
1855
  }
1856
 
1857
  public function read($input)
1858
  {
1859
    $xfer = 0;
1860
    $fname = null;
1861
    $ftype = 0;
1862
    $fid = 0;
1863
    $xfer += $input->readStructBegin($fname);
1864
    while (true)
1865
    {
1866
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
1867
      if ($ftype == TType::STOP) {
1868
        break;
1869
      }
1870
      switch ($fid)
1871
      {
1872
        default:
1873
          $xfer += $input->skip($ftype);
1874
          break;
1875
      }
1876
      $xfer += $input->readFieldEnd();
1877
    }
1878
    $xfer += $input->readStructEnd();
1879
    return $xfer;
1880
  }
1881
 
1882
  public function write($output) {
1883
    $xfer = 0;
1884
    $xfer += $output->writeStructBegin('ThriftHive_clean_args');
1885
    $xfer += $output->writeFieldStop();
1886
    $xfer += $output->writeStructEnd();
1887
    return $xfer;
1888
  }
1889
 
1890
}
1891
 
1892
class ThriftHive_clean_result {
1893
  static $_TSPEC;
1894
 
1895
 
1896
  public function __construct() {
1897
    if (!isset(self::$_TSPEC)) {
1898
      self::$_TSPEC = array(
1899
        );
1900
    }
1901
  }
1902
 
1903
  public function getName() {
1904
    return 'ThriftHive_clean_result';
1905
  }
1906
 
1907
  public function read($input)
1908
  {
1909
    $xfer = 0;
1910
    $fname = null;
1911
    $ftype = 0;
1912
    $fid = 0;
1913
    $xfer += $input->readStructBegin($fname);
1914
    while (true)
1915
    {
1916
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
1917
      if ($ftype == TType::STOP) {
1918
        break;
1919
      }
1920
      switch ($fid)
1921
      {
1922
        default:
1923
          $xfer += $input->skip($ftype);
1924
          break;
1925
      }
1926
      $xfer += $input->readFieldEnd();
1927
    }
1928
    $xfer += $input->readStructEnd();
1929
    return $xfer;
1930
  }
1931
 
1932
  public function write($output) {
1933
    $xfer = 0;
1934
    $xfer += $output->writeStructBegin('ThriftHive_clean_result');
1935
    $xfer += $output->writeFieldStop();
1936
    $xfer += $output->writeStructEnd();
1937
    return $xfer;
1938
  }
1939
 
1940
}
1941
 
1942