You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ha...@apache.org on 2012/11/08 10:44:29 UTC
svn commit: r1406984 [29/29] - in /hive/trunk:
contrib/src/java/org/apache/hadoop/hive/contrib/genericudf/example/
contrib/src/java/org/apache/hadoop/hive/contrib/serde2/
contrib/src/java/org/apache/hadoop/hive/contrib/util/typedbytes/
contrib/src/test...
Added: hive/trunk/service/src/gen/thrift/gen-php/ThriftHive.php
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/gen/thrift/gen-php/ThriftHive.php?rev=1406984&view=auto
==============================================================================
--- hive/trunk/service/src/gen/thrift/gen-php/ThriftHive.php (added)
+++ hive/trunk/service/src/gen/thrift/gen-php/ThriftHive.php Thu Nov 8 09:44:19 2012
@@ -0,0 +1,1857 @@
+<?php
+namespace ;
+/**
+ * Autogenerated by Thrift Compiler (0.9.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+use Thrift\Base\TBase;
+use Thrift\Type\TType;
+use Thrift\Type\TMessageType;
+use Thrift\Exception\TException;
+use Thrift\Exception\TProtocolException;
+use Thrift\Protocol\TProtocol;
+use Thrift\Exception\TApplicationException;
+
+
+interface ThriftHiveIf extends \metastore\ThriftHiveMetastoreIf {
+ public function execute($query);
+ public function fetchOne();
+ public function fetchN($numRows);
+ public function fetchAll();
+ public function getSchema();
+ public function getThriftSchema();
+ public function getClusterStatus();
+ public function getQueryPlan();
+ public function clean();
+}
+
+class ThriftHiveClient extends \metastore\ThriftHiveMetastoreClient implements \ThriftHiveIf {
+ public function __construct($input, $output=null) {
+ parent::__construct($input, $output);
+ }
+
+ public function execute($query)
+ {
+ $this->send_execute($query);
+ $this->recv_execute();
+ }
+
+ public function send_execute($query)
+ {
+ $args = new \ThriftHive_execute_args();
+ $args->query = $query;
+ $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'execute', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('execute', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_execute()
+ {
+ $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\ThriftHive_execute_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new \ThriftHive_execute_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->ex !== null) {
+ throw $result->ex;
+ }
+ return;
+ }
+
+ public function fetchOne()
+ {
+ $this->send_fetchOne();
+ return $this->recv_fetchOne();
+ }
+
+ public function send_fetchOne()
+ {
+ $args = new \ThriftHive_fetchOne_args();
+ $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'fetchOne', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('fetchOne', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_fetchOne()
+ {
+ $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\ThriftHive_fetchOne_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new \ThriftHive_fetchOne_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->ex !== null) {
+ throw $result->ex;
+ }
+ throw new \Exception("fetchOne failed: unknown result");
+ }
+
+ public function fetchN($numRows)
+ {
+ $this->send_fetchN($numRows);
+ return $this->recv_fetchN();
+ }
+
+ public function send_fetchN($numRows)
+ {
+ $args = new \ThriftHive_fetchN_args();
+ $args->numRows = $numRows;
+ $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'fetchN', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('fetchN', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_fetchN()
+ {
+ $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\ThriftHive_fetchN_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new \ThriftHive_fetchN_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->ex !== null) {
+ throw $result->ex;
+ }
+ throw new \Exception("fetchN failed: unknown result");
+ }
+
+ public function fetchAll()
+ {
+ $this->send_fetchAll();
+ return $this->recv_fetchAll();
+ }
+
+ public function send_fetchAll()
+ {
+ $args = new \ThriftHive_fetchAll_args();
+ $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'fetchAll', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('fetchAll', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_fetchAll()
+ {
+ $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\ThriftHive_fetchAll_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new \ThriftHive_fetchAll_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->ex !== null) {
+ throw $result->ex;
+ }
+ throw new \Exception("fetchAll failed: unknown result");
+ }
+
+ public function getSchema()
+ {
+ $this->send_getSchema();
+ return $this->recv_getSchema();
+ }
+
+ public function send_getSchema()
+ {
+ $args = new \ThriftHive_getSchema_args();
+ $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'getSchema', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('getSchema', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_getSchema()
+ {
+ $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\ThriftHive_getSchema_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new \ThriftHive_getSchema_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->ex !== null) {
+ throw $result->ex;
+ }
+ throw new \Exception("getSchema failed: unknown result");
+ }
+
+ public function getThriftSchema()
+ {
+ $this->send_getThriftSchema();
+ return $this->recv_getThriftSchema();
+ }
+
+ public function send_getThriftSchema()
+ {
+ $args = new \ThriftHive_getThriftSchema_args();
+ $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'getThriftSchema', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('getThriftSchema', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_getThriftSchema()
+ {
+ $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\ThriftHive_getThriftSchema_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new \ThriftHive_getThriftSchema_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->ex !== null) {
+ throw $result->ex;
+ }
+ throw new \Exception("getThriftSchema failed: unknown result");
+ }
+
+ public function getClusterStatus()
+ {
+ $this->send_getClusterStatus();
+ return $this->recv_getClusterStatus();
+ }
+
+ public function send_getClusterStatus()
+ {
+ $args = new \ThriftHive_getClusterStatus_args();
+ $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'getClusterStatus', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('getClusterStatus', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_getClusterStatus()
+ {
+ $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\ThriftHive_getClusterStatus_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new \ThriftHive_getClusterStatus_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->ex !== null) {
+ throw $result->ex;
+ }
+ throw new \Exception("getClusterStatus failed: unknown result");
+ }
+
+ public function getQueryPlan()
+ {
+ $this->send_getQueryPlan();
+ return $this->recv_getQueryPlan();
+ }
+
+ public function send_getQueryPlan()
+ {
+ $args = new \ThriftHive_getQueryPlan_args();
+ $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'getQueryPlan', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('getQueryPlan', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_getQueryPlan()
+ {
+ $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\ThriftHive_getQueryPlan_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new \ThriftHive_getQueryPlan_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->ex !== null) {
+ throw $result->ex;
+ }
+ throw new \Exception("getQueryPlan failed: unknown result");
+ }
+
+ public function clean()
+ {
+ $this->send_clean();
+ $this->recv_clean();
+ }
+
+ public function send_clean()
+ {
+ $args = new \ThriftHive_clean_args();
+ $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'clean', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('clean', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_clean()
+ {
+ $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\ThriftHive_clean_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new \ThriftHive_clean_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ return;
+ }
+
+}
+
+// HELPER FUNCTIONS AND STRUCTURES
+
+class ThriftHive_execute_args {
+ static $_TSPEC;
+
+ public $query = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'query',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['query'])) {
+ $this->query = $vals['query'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHive_execute_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->query);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHive_execute_args');
+ if ($this->query !== null) {
+ $xfer += $output->writeFieldBegin('query', TType::STRING, 1);
+ $xfer += $output->writeString($this->query);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class ThriftHive_execute_result {
+ static $_TSPEC;
+
+ public $ex = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'ex',
+ 'type' => TType::STRUCT,
+ 'class' => '\HiveServerException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['ex'])) {
+ $this->ex = $vals['ex'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHive_execute_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->ex = new \HiveServerException();
+ $xfer += $this->ex->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHive_execute_result');
+ if ($this->ex !== null) {
+ $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
+ $xfer += $this->ex->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class ThriftHive_fetchOne_args {
+ static $_TSPEC;
+
+
+ public function __construct() {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ );
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHive_fetchOne_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHive_fetchOne_args');
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class ThriftHive_fetchOne_result {
+ static $_TSPEC;
+
+ public $success = null;
+ public $ex = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 0 => array(
+ 'var' => 'success',
+ 'type' => TType::STRING,
+ ),
+ 1 => array(
+ 'var' => 'ex',
+ 'type' => TType::STRUCT,
+ 'class' => '\HiveServerException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['success'])) {
+ $this->success = $vals['success'];
+ }
+ if (isset($vals['ex'])) {
+ $this->ex = $vals['ex'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHive_fetchOne_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 0:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->success);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->ex = new \HiveServerException();
+ $xfer += $this->ex->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHive_fetchOne_result');
+ if ($this->success !== null) {
+ $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
+ $xfer += $output->writeString($this->success);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->ex !== null) {
+ $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
+ $xfer += $this->ex->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class ThriftHive_fetchN_args {
+ static $_TSPEC;
+
+ public $numRows = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'numRows',
+ 'type' => TType::I32,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['numRows'])) {
+ $this->numRows = $vals['numRows'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHive_fetchN_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->numRows);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHive_fetchN_args');
+ if ($this->numRows !== null) {
+ $xfer += $output->writeFieldBegin('numRows', TType::I32, 1);
+ $xfer += $output->writeI32($this->numRows);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class ThriftHive_fetchN_result {
+ static $_TSPEC;
+
+ public $success = null;
+ public $ex = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 0 => array(
+ 'var' => 'success',
+ 'type' => TType::LST,
+ 'etype' => TType::STRING,
+ 'elem' => array(
+ 'type' => TType::STRING,
+ ),
+ ),
+ 1 => array(
+ 'var' => 'ex',
+ 'type' => TType::STRUCT,
+ 'class' => '\HiveServerException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['success'])) {
+ $this->success = $vals['success'];
+ }
+ if (isset($vals['ex'])) {
+ $this->ex = $vals['ex'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHive_fetchN_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 0:
+ if ($ftype == TType::LST) {
+ $this->success = array();
+ $_size0 = 0;
+ $_etype3 = 0;
+ $xfer += $input->readListBegin($_etype3, $_size0);
+ for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
+ {
+ $elem5 = null;
+ $xfer += $input->readString($elem5);
+ $this->success []= $elem5;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->ex = new \HiveServerException();
+ $xfer += $this->ex->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHive_fetchN_result');
+ if ($this->success !== null) {
+ if (!is_array($this->success)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('success', TType::LST, 0);
+ {
+ $output->writeListBegin(TType::STRING, count($this->success));
+ {
+ foreach ($this->success as $iter6)
+ {
+ $xfer += $output->writeString($iter6);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->ex !== null) {
+ $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
+ $xfer += $this->ex->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class ThriftHive_fetchAll_args {
+ static $_TSPEC;
+
+
+ public function __construct() {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ );
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHive_fetchAll_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHive_fetchAll_args');
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class ThriftHive_fetchAll_result {
+ static $_TSPEC;
+
+ public $success = null;
+ public $ex = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 0 => array(
+ 'var' => 'success',
+ 'type' => TType::LST,
+ 'etype' => TType::STRING,
+ 'elem' => array(
+ 'type' => TType::STRING,
+ ),
+ ),
+ 1 => array(
+ 'var' => 'ex',
+ 'type' => TType::STRUCT,
+ 'class' => '\HiveServerException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['success'])) {
+ $this->success = $vals['success'];
+ }
+ if (isset($vals['ex'])) {
+ $this->ex = $vals['ex'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHive_fetchAll_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 0:
+ if ($ftype == TType::LST) {
+ $this->success = array();
+ $_size7 = 0;
+ $_etype10 = 0;
+ $xfer += $input->readListBegin($_etype10, $_size7);
+ for ($_i11 = 0; $_i11 < $_size7; ++$_i11)
+ {
+ $elem12 = null;
+ $xfer += $input->readString($elem12);
+ $this->success []= $elem12;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->ex = new \HiveServerException();
+ $xfer += $this->ex->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHive_fetchAll_result');
+ if ($this->success !== null) {
+ if (!is_array($this->success)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('success', TType::LST, 0);
+ {
+ $output->writeListBegin(TType::STRING, count($this->success));
+ {
+ foreach ($this->success as $iter13)
+ {
+ $xfer += $output->writeString($iter13);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->ex !== null) {
+ $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
+ $xfer += $this->ex->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class ThriftHive_getSchema_args {
+ static $_TSPEC;
+
+
+ public function __construct() {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ );
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHive_getSchema_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHive_getSchema_args');
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class ThriftHive_getSchema_result {
+ static $_TSPEC;
+
+ public $success = null;
+ public $ex = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 0 => array(
+ 'var' => 'success',
+ 'type' => TType::STRUCT,
+ 'class' => '\metastore\Schema',
+ ),
+ 1 => array(
+ 'var' => 'ex',
+ 'type' => TType::STRUCT,
+ 'class' => '\HiveServerException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['success'])) {
+ $this->success = $vals['success'];
+ }
+ if (isset($vals['ex'])) {
+ $this->ex = $vals['ex'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHive_getSchema_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 0:
+ if ($ftype == TType::STRUCT) {
+ $this->success = new \metastore\Schema();
+ $xfer += $this->success->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->ex = new \HiveServerException();
+ $xfer += $this->ex->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHive_getSchema_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->ex !== null) {
+ $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
+ $xfer += $this->ex->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class ThriftHive_getThriftSchema_args {
+ static $_TSPEC;
+
+
+ public function __construct() {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ );
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHive_getThriftSchema_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHive_getThriftSchema_args');
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class ThriftHive_getThriftSchema_result {
+ static $_TSPEC;
+
+ public $success = null;
+ public $ex = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 0 => array(
+ 'var' => 'success',
+ 'type' => TType::STRUCT,
+ 'class' => '\metastore\Schema',
+ ),
+ 1 => array(
+ 'var' => 'ex',
+ 'type' => TType::STRUCT,
+ 'class' => '\HiveServerException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['success'])) {
+ $this->success = $vals['success'];
+ }
+ if (isset($vals['ex'])) {
+ $this->ex = $vals['ex'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHive_getThriftSchema_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 0:
+ if ($ftype == TType::STRUCT) {
+ $this->success = new \metastore\Schema();
+ $xfer += $this->success->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->ex = new \HiveServerException();
+ $xfer += $this->ex->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHive_getThriftSchema_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->ex !== null) {
+ $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
+ $xfer += $this->ex->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class ThriftHive_getClusterStatus_args {
+ static $_TSPEC;
+
+
+ public function __construct() {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ );
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHive_getClusterStatus_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHive_getClusterStatus_args');
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class ThriftHive_getClusterStatus_result {
+ static $_TSPEC;
+
+ public $success = null;
+ public $ex = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 0 => array(
+ 'var' => 'success',
+ 'type' => TType::STRUCT,
+ 'class' => '\HiveClusterStatus',
+ ),
+ 1 => array(
+ 'var' => 'ex',
+ 'type' => TType::STRUCT,
+ 'class' => '\HiveServerException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['success'])) {
+ $this->success = $vals['success'];
+ }
+ if (isset($vals['ex'])) {
+ $this->ex = $vals['ex'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHive_getClusterStatus_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 0:
+ if ($ftype == TType::STRUCT) {
+ $this->success = new \HiveClusterStatus();
+ $xfer += $this->success->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->ex = new \HiveServerException();
+ $xfer += $this->ex->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHive_getClusterStatus_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->ex !== null) {
+ $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
+ $xfer += $this->ex->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class ThriftHive_getQueryPlan_args {
+ static $_TSPEC;
+
+
+ public function __construct() {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ );
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHive_getQueryPlan_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHive_getQueryPlan_args');
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class ThriftHive_getQueryPlan_result {
+ static $_TSPEC;
+
+ public $success = null;
+ public $ex = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 0 => array(
+ 'var' => 'success',
+ 'type' => TType::STRUCT,
+ 'class' => '\QueryPlan',
+ ),
+ 1 => array(
+ 'var' => 'ex',
+ 'type' => TType::STRUCT,
+ 'class' => '\HiveServerException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['success'])) {
+ $this->success = $vals['success'];
+ }
+ if (isset($vals['ex'])) {
+ $this->ex = $vals['ex'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHive_getQueryPlan_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 0:
+ if ($ftype == TType::STRUCT) {
+ $this->success = new \QueryPlan();
+ $xfer += $this->success->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->ex = new \HiveServerException();
+ $xfer += $this->ex->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHive_getQueryPlan_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->ex !== null) {
+ $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
+ $xfer += $this->ex->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class ThriftHive_clean_args {
+ static $_TSPEC;
+
+
+ public function __construct() {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ );
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHive_clean_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHive_clean_args');
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class ThriftHive_clean_result {
+ static $_TSPEC;
+
+
+ public function __construct() {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ );
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHive_clean_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHive_clean_result');
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+
Added: hive/trunk/service/src/gen/thrift/gen-php/Types.php
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/gen/thrift/gen-php/Types.php?rev=1406984&view=auto
==============================================================================
--- hive/trunk/service/src/gen/thrift/gen-php/Types.php (added)
+++ hive/trunk/service/src/gen/thrift/gen-php/Types.php Thu Nov 8 09:44:19 2012
@@ -0,0 +1,312 @@
+<?php
+namespace ;
+
+/**
+ * Autogenerated by Thrift Compiler (0.9.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+use Thrift\Base\TBase;
+use Thrift\Type\TType;
+use Thrift\Type\TMessageType;
+use Thrift\Exception\TException;
+use Thrift\Exception\TProtocolException;
+use Thrift\Protocol\TProtocol;
+use Thrift\Exception\TApplicationException;
+
+
+final class JobTrackerState {
+ const INITIALIZING = 1;
+ const RUNNING = 2;
+ static public $__names = array(
+ 1 => 'INITIALIZING',
+ 2 => 'RUNNING',
+ );
+}
+
+class HiveClusterStatus {
+ static $_TSPEC;
+
+ public $taskTrackers = null;
+ public $mapTasks = null;
+ public $reduceTasks = null;
+ public $maxMapTasks = null;
+ public $maxReduceTasks = null;
+ public $state = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'taskTrackers',
+ 'type' => TType::I32,
+ ),
+ 2 => array(
+ 'var' => 'mapTasks',
+ 'type' => TType::I32,
+ ),
+ 3 => array(
+ 'var' => 'reduceTasks',
+ 'type' => TType::I32,
+ ),
+ 4 => array(
+ 'var' => 'maxMapTasks',
+ 'type' => TType::I32,
+ ),
+ 5 => array(
+ 'var' => 'maxReduceTasks',
+ 'type' => TType::I32,
+ ),
+ 6 => array(
+ 'var' => 'state',
+ 'type' => TType::I32,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['taskTrackers'])) {
+ $this->taskTrackers = $vals['taskTrackers'];
+ }
+ if (isset($vals['mapTasks'])) {
+ $this->mapTasks = $vals['mapTasks'];
+ }
+ if (isset($vals['reduceTasks'])) {
+ $this->reduceTasks = $vals['reduceTasks'];
+ }
+ if (isset($vals['maxMapTasks'])) {
+ $this->maxMapTasks = $vals['maxMapTasks'];
+ }
+ if (isset($vals['maxReduceTasks'])) {
+ $this->maxReduceTasks = $vals['maxReduceTasks'];
+ }
+ if (isset($vals['state'])) {
+ $this->state = $vals['state'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'HiveClusterStatus';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->taskTrackers);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->mapTasks);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->reduceTasks);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 4:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->maxMapTasks);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 5:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->maxReduceTasks);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 6:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->state);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('HiveClusterStatus');
+ if ($this->taskTrackers !== null) {
+ $xfer += $output->writeFieldBegin('taskTrackers', TType::I32, 1);
+ $xfer += $output->writeI32($this->taskTrackers);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->mapTasks !== null) {
+ $xfer += $output->writeFieldBegin('mapTasks', TType::I32, 2);
+ $xfer += $output->writeI32($this->mapTasks);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->reduceTasks !== null) {
+ $xfer += $output->writeFieldBegin('reduceTasks', TType::I32, 3);
+ $xfer += $output->writeI32($this->reduceTasks);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->maxMapTasks !== null) {
+ $xfer += $output->writeFieldBegin('maxMapTasks', TType::I32, 4);
+ $xfer += $output->writeI32($this->maxMapTasks);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->maxReduceTasks !== null) {
+ $xfer += $output->writeFieldBegin('maxReduceTasks', TType::I32, 5);
+ $xfer += $output->writeI32($this->maxReduceTasks);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->state !== null) {
+ $xfer += $output->writeFieldBegin('state', TType::I32, 6);
+ $xfer += $output->writeI32($this->state);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class HiveServerException extends TException {
+ static $_TSPEC;
+
+ public $message = null;
+ public $errorCode = null;
+ public $SQLState = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'message',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'errorCode',
+ 'type' => TType::I32,
+ ),
+ 3 => array(
+ 'var' => 'SQLState',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['message'])) {
+ $this->message = $vals['message'];
+ }
+ if (isset($vals['errorCode'])) {
+ $this->errorCode = $vals['errorCode'];
+ }
+ if (isset($vals['SQLState'])) {
+ $this->SQLState = $vals['SQLState'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'HiveServerException';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->message);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->errorCode);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->SQLState);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('HiveServerException');
+ if ($this->message !== null) {
+ $xfer += $output->writeFieldBegin('message', TType::STRING, 1);
+ $xfer += $output->writeString($this->message);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->errorCode !== null) {
+ $xfer += $output->writeFieldBegin('errorCode', TType::I32, 2);
+ $xfer += $output->writeI32($this->errorCode);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->SQLState !== null) {
+ $xfer += $output->writeFieldBegin('SQLState', TType::STRING, 3);
+ $xfer += $output->writeString($this->SQLState);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+
Added: hive/trunk/service/src/gen/thrift/gen-py/__init__.py
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/gen/thrift/gen-py/__init__.py?rev=1406984&view=auto
==============================================================================
(empty)
Modified: hive/trunk/service/src/gen/thrift/gen-py/hive_service/ThriftHive-remote
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/gen/thrift/gen-py/hive_service/ThriftHive-remote?rev=1406984&r1=1406983&r2=1406984&view=diff
==============================================================================
--- hive/trunk/service/src/gen/thrift/gen-py/hive_service/ThriftHive-remote (original)
+++ hive/trunk/service/src/gen/thrift/gen-py/hive_service/ThriftHive-remote Thu Nov 8 09:44:19 2012
@@ -1,9 +1,11 @@
#!/usr/bin/env python
#
-# Autogenerated by Thrift Compiler (0.7.0)
+# Autogenerated by Thrift Compiler (0.9.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
+# options string: py
+#
import sys
import pprint
@@ -18,7 +20,7 @@ from ttypes import *
if len(sys.argv) <= 1 or sys.argv[1] == '--help':
print ''
- print 'Usage: ' + sys.argv[0] + ' [-h host:port] [-u url] [-f[ramed]] function [arg1 [arg2...]]'
+ print 'Usage: ' + sys.argv[0] + ' [-h host[:port]] [-u url] [-f[ramed]] function [arg1 [arg2...]]'
print ''
print 'Functions:'
print ' void execute(string query)'
@@ -44,7 +46,8 @@ argi = 1
if sys.argv[argi] == '-h':
parts = sys.argv[argi+1].split(':')
host = parts[0]
- port = int(parts[1])
+ if len(parts) > 1:
+ port = int(parts[1])
argi += 2
if sys.argv[argi] == '-u':
Modified: hive/trunk/service/src/gen/thrift/gen-py/hive_service/ThriftHive.py
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/gen/thrift/gen-py/hive_service/ThriftHive.py?rev=1406984&r1=1406983&r2=1406984&view=diff
==============================================================================
--- hive/trunk/service/src/gen/thrift/gen-py/hive_service/ThriftHive.py (original)
+++ hive/trunk/service/src/gen/thrift/gen-py/hive_service/ThriftHive.py Thu Nov 8 09:44:19 2012
@@ -1,10 +1,12 @@
#
-# Autogenerated by Thrift Compiler (0.7.0)
+# Autogenerated by Thrift Compiler (0.9.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
+# options string: py
+#
-from thrift.Thrift import *
+from thrift.Thrift import TType, TMessageType, TException, TApplicationException
import hive_metastore.ThriftHiveMetastore
from ttypes import *
from thrift.Thrift import TProcessor
@@ -340,7 +342,7 @@ class Processor(hive_metastore.ThriftHiv
result = execute_result()
try:
self._handler.execute(args.query)
- except HiveServerException, ex:
+ except HiveServerException as ex:
result.ex = ex
oprot.writeMessageBegin("execute", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -354,7 +356,7 @@ class Processor(hive_metastore.ThriftHiv
result = fetchOne_result()
try:
result.success = self._handler.fetchOne()
- except HiveServerException, ex:
+ except HiveServerException as ex:
result.ex = ex
oprot.writeMessageBegin("fetchOne", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -368,7 +370,7 @@ class Processor(hive_metastore.ThriftHiv
result = fetchN_result()
try:
result.success = self._handler.fetchN(args.numRows)
- except HiveServerException, ex:
+ except HiveServerException as ex:
result.ex = ex
oprot.writeMessageBegin("fetchN", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -382,7 +384,7 @@ class Processor(hive_metastore.ThriftHiv
result = fetchAll_result()
try:
result.success = self._handler.fetchAll()
- except HiveServerException, ex:
+ except HiveServerException as ex:
result.ex = ex
oprot.writeMessageBegin("fetchAll", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -396,7 +398,7 @@ class Processor(hive_metastore.ThriftHiv
result = getSchema_result()
try:
result.success = self._handler.getSchema()
- except HiveServerException, ex:
+ except HiveServerException as ex:
result.ex = ex
oprot.writeMessageBegin("getSchema", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -410,7 +412,7 @@ class Processor(hive_metastore.ThriftHiv
result = getThriftSchema_result()
try:
result.success = self._handler.getThriftSchema()
- except HiveServerException, ex:
+ except HiveServerException as ex:
result.ex = ex
oprot.writeMessageBegin("getThriftSchema", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -424,7 +426,7 @@ class Processor(hive_metastore.ThriftHiv
result = getClusterStatus_result()
try:
result.success = self._handler.getClusterStatus()
- except HiveServerException, ex:
+ except HiveServerException as ex:
result.ex = ex
oprot.writeMessageBegin("getClusterStatus", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -438,7 +440,7 @@ class Processor(hive_metastore.ThriftHiv
result = getQueryPlan_result()
try:
result.success = self._handler.getQueryPlan()
- except HiveServerException, ex:
+ except HiveServerException as ex:
result.ex = ex
oprot.writeMessageBegin("getQueryPlan", TMessageType.REPLY, seqid)
result.write(oprot)
Modified: hive/trunk/service/src/gen/thrift/gen-py/hive_service/constants.py
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/gen/thrift/gen-py/hive_service/constants.py?rev=1406984&r1=1406983&r2=1406984&view=diff
==============================================================================
--- hive/trunk/service/src/gen/thrift/gen-py/hive_service/constants.py (original)
+++ hive/trunk/service/src/gen/thrift/gen-py/hive_service/constants.py Thu Nov 8 09:44:19 2012
@@ -1,9 +1,11 @@
#
-# Autogenerated by Thrift Compiler (0.7.0)
+# Autogenerated by Thrift Compiler (0.9.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
+# options string: py
+#
-from thrift.Thrift import *
+from thrift.Thrift import TType, TMessageType, TException, TApplicationException
from ttypes import *
Modified: hive/trunk/service/src/gen/thrift/gen-py/hive_service/ttypes.py
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/gen/thrift/gen-py/hive_service/ttypes.py?rev=1406984&r1=1406983&r2=1406984&view=diff
==============================================================================
--- hive/trunk/service/src/gen/thrift/gen-py/hive_service/ttypes.py (original)
+++ hive/trunk/service/src/gen/thrift/gen-py/hive_service/ttypes.py Thu Nov 8 09:44:19 2012
@@ -1,10 +1,12 @@
#
-# Autogenerated by Thrift Compiler (0.7.0)
+# Autogenerated by Thrift Compiler (0.9.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
+# options string: py
+#
-from thrift.Thrift import *
+from thrift.Thrift import TType, TMessageType, TException, TApplicationException
import fb303.ttypes
import hive_metastore.ttypes
import queryplan.ttypes
@@ -153,7 +155,7 @@ class HiveClusterStatus:
def __ne__(self, other):
return not (self == other)
-class HiveServerException(Exception):
+class HiveServerException(TException):
"""
Attributes:
- message
Modified: hive/trunk/service/src/gen/thrift/gen-rb/hive_service_constants.rb
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/gen/thrift/gen-rb/hive_service_constants.rb?rev=1406984&r1=1406983&r2=1406984&view=diff
==============================================================================
--- hive/trunk/service/src/gen/thrift/gen-rb/hive_service_constants.rb (original)
+++ hive/trunk/service/src/gen/thrift/gen-rb/hive_service_constants.rb Thu Nov 8 09:44:19 2012
@@ -1,8 +1,9 @@
#
-# Autogenerated by Thrift Compiler (0.7.0)
+# Autogenerated by Thrift Compiler (0.9.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
+require 'thrift'
require 'hive_service_types'
Modified: hive/trunk/service/src/gen/thrift/gen-rb/hive_service_types.rb
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/gen/thrift/gen-rb/hive_service_types.rb?rev=1406984&r1=1406983&r2=1406984&view=diff
==============================================================================
--- hive/trunk/service/src/gen/thrift/gen-rb/hive_service_types.rb (original)
+++ hive/trunk/service/src/gen/thrift/gen-rb/hive_service_types.rb Thu Nov 8 09:44:19 2012
@@ -1,9 +1,10 @@
#
-# Autogenerated by Thrift Compiler (0.7.0)
+# Autogenerated by Thrift Compiler (0.9.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
+require 'thrift'
require 'fb303_types'
require 'hive_metastore_types'
require 'queryplan_types'
@@ -31,13 +32,13 @@ class HiveClusterStatus
REDUCETASKS => {:type => ::Thrift::Types::I32, :name => 'reduceTasks'},
MAXMAPTASKS => {:type => ::Thrift::Types::I32, :name => 'maxMapTasks'},
MAXREDUCETASKS => {:type => ::Thrift::Types::I32, :name => 'maxReduceTasks'},
- STATE => {:type => ::Thrift::Types::I32, :name => 'state', :enum_class => JobTrackerState}
+ STATE => {:type => ::Thrift::Types::I32, :name => 'state', :enum_class => ::JobTrackerState}
}
def struct_fields; FIELDS; end
def validate
- unless @state.nil? || JobTrackerState::VALID_VALUES.include?(@state)
+ unless @state.nil? || ::JobTrackerState::VALID_VALUES.include?(@state)
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field state!')
end
end
Modified: hive/trunk/service/src/gen/thrift/gen-rb/thrift_hive.rb
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/gen/thrift/gen-rb/thrift_hive.rb?rev=1406984&r1=1406983&r2=1406984&view=diff
==============================================================================
--- hive/trunk/service/src/gen/thrift/gen-rb/thrift_hive.rb (original)
+++ hive/trunk/service/src/gen/thrift/gen-rb/thrift_hive.rb Thu Nov 8 09:44:19 2012
@@ -1,5 +1,5 @@
#
-# Autogenerated by Thrift Compiler (0.7.0)
+# Autogenerated by Thrift Compiler (0.9.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
@@ -9,7 +9,7 @@ require 'thrift_hive_metastore'
require 'hive_service_types'
module ThriftHive
- class Client < ThriftHiveMetastore::Client
+ class Client < ::ThriftHiveMetastore::Client
include ::Thrift::Client
def execute(query)
@@ -155,7 +155,7 @@ module ThriftHive
end
- class Processor < ThriftHiveMetastore::Processor
+ class Processor < ::ThriftHiveMetastore::Processor
include ::Thrift::Processor
def process_execute(seqid, iprot, oprot)
@@ -163,7 +163,7 @@ module ThriftHive
result = Execute_result.new()
begin
@handler.execute(args.query)
- rescue HiveServerException => ex
+ rescue ::HiveServerException => ex
result.ex = ex
end
write_result(result, oprot, 'execute', seqid)
@@ -174,7 +174,7 @@ module ThriftHive
result = FetchOne_result.new()
begin
result.success = @handler.fetchOne()
- rescue HiveServerException => ex
+ rescue ::HiveServerException => ex
result.ex = ex
end
write_result(result, oprot, 'fetchOne', seqid)
@@ -185,7 +185,7 @@ module ThriftHive
result = FetchN_result.new()
begin
result.success = @handler.fetchN(args.numRows)
- rescue HiveServerException => ex
+ rescue ::HiveServerException => ex
result.ex = ex
end
write_result(result, oprot, 'fetchN', seqid)
@@ -196,7 +196,7 @@ module ThriftHive
result = FetchAll_result.new()
begin
result.success = @handler.fetchAll()
- rescue HiveServerException => ex
+ rescue ::HiveServerException => ex
result.ex = ex
end
write_result(result, oprot, 'fetchAll', seqid)
@@ -207,7 +207,7 @@ module ThriftHive
result = GetSchema_result.new()
begin
result.success = @handler.getSchema()
- rescue HiveServerException => ex
+ rescue ::HiveServerException => ex
result.ex = ex
end
write_result(result, oprot, 'getSchema', seqid)
@@ -218,7 +218,7 @@ module ThriftHive
result = GetThriftSchema_result.new()
begin
result.success = @handler.getThriftSchema()
- rescue HiveServerException => ex
+ rescue ::HiveServerException => ex
result.ex = ex
end
write_result(result, oprot, 'getThriftSchema', seqid)
@@ -229,7 +229,7 @@ module ThriftHive
result = GetClusterStatus_result.new()
begin
result.success = @handler.getClusterStatus()
- rescue HiveServerException => ex
+ rescue ::HiveServerException => ex
result.ex = ex
end
write_result(result, oprot, 'getClusterStatus', seqid)
@@ -240,7 +240,7 @@ module ThriftHive
result = GetQueryPlan_result.new()
begin
result.success = @handler.getQueryPlan()
- rescue HiveServerException => ex
+ rescue ::HiveServerException => ex
result.ex = ex
end
write_result(result, oprot, 'getQueryPlan', seqid)
@@ -278,7 +278,7 @@ module ThriftHive
EX = 1
FIELDS = {
- EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException}
+ EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => ::HiveServerException}
}
def struct_fields; FIELDS; end
@@ -311,7 +311,7 @@ module ThriftHive
FIELDS = {
SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'},
- EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException}
+ EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => ::HiveServerException}
}
def struct_fields; FIELDS; end
@@ -345,7 +345,7 @@ module ThriftHive
FIELDS = {
SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}},
- EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException}
+ EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => ::HiveServerException}
}
def struct_fields; FIELDS; end
@@ -378,7 +378,7 @@ module ThriftHive
FIELDS = {
SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}},
- EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException}
+ EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => ::HiveServerException}
}
def struct_fields; FIELDS; end
@@ -410,8 +410,8 @@ module ThriftHive
EX = 1
FIELDS = {
- SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Schema},
- EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException}
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Schema},
+ EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => ::HiveServerException}
}
def struct_fields; FIELDS; end
@@ -443,8 +443,8 @@ module ThriftHive
EX = 1
FIELDS = {
- SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Schema},
- EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException}
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Schema},
+ EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => ::HiveServerException}
}
def struct_fields; FIELDS; end
@@ -476,8 +476,8 @@ module ThriftHive
EX = 1
FIELDS = {
- SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => HiveClusterStatus},
- EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException}
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::HiveClusterStatus},
+ EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => ::HiveServerException}
}
def struct_fields; FIELDS; end
@@ -509,8 +509,8 @@ module ThriftHive
EX = 1
FIELDS = {
- SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => QueryPlan},
- EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException}
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::QueryPlan},
+ EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => ::HiveServerException}
}
def struct_fields; FIELDS; end
Modified: hive/trunk/service/src/test/org/apache/hadoop/hive/service/TestHiveServer.java
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/test/org/apache/hadoop/hive/service/TestHiveServer.java?rev=1406984&r1=1406983&r2=1406984&view=diff
==============================================================================
--- hive/trunk/service/src/test/org/apache/hadoop/hive/service/TestHiveServer.java (original)
+++ hive/trunk/service/src/test/org/apache/hadoop/hive/service/TestHiveServer.java Thu Nov 8 09:44:19 2012
@@ -29,7 +29,7 @@ import org.apache.hadoop.hive.common.Ser
import org.apache.hadoop.hive.conf.HiveConf;
import org.apache.hadoop.hive.metastore.api.FieldSchema;
import org.apache.hadoop.hive.metastore.api.Schema;
-import org.apache.hadoop.hive.serde.Constants;
+import org.apache.hadoop.hive.serde.serdeConstants;
import org.apache.hadoop.hive.serde2.dynamic_type.DynamicSerDe;
import org.apache.hadoop.io.BytesWritable;
import org.apache.thrift.protocol.TBinaryProtocol;
@@ -302,11 +302,11 @@ public class TestHiveServer extends Test
// Instantiate DynamicSerDe
DynamicSerDe ds = new DynamicSerDe();
Properties dsp = new Properties();
- dsp.setProperty(Constants.SERIALIZATION_FORMAT,
+ dsp.setProperty(serdeConstants.SERIALIZATION_FORMAT,
org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol.class
.getName());
dsp.setProperty(
- org.apache.hadoop.hive.metastore.api.Constants.META_TABLE_NAME,
+ org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_NAME,
"result");
String serDDL = new String("struct result { ");
List<FieldSchema> schema = client.getThriftSchema().getFieldSchemas();
@@ -320,9 +320,9 @@ public class TestHiveServer extends Test
}
serDDL = serDDL.concat("}");
- dsp.setProperty(Constants.SERIALIZATION_DDL, serDDL);
- dsp.setProperty(Constants.SERIALIZATION_LIB, ds.getClass().toString());
- dsp.setProperty(Constants.FIELD_DELIM, "9");
+ dsp.setProperty(serdeConstants.SERIALIZATION_DDL, serDDL);
+ dsp.setProperty(serdeConstants.SERIALIZATION_LIB, ds.getClass().toString());
+ dsp.setProperty(serdeConstants.FIELD_DELIM, "9");
ds.initialize(new Configuration(), dsp);
String row = client.fetchOne();
@@ -349,7 +349,7 @@ public class TestHiveServer extends Test
}
serDDL = serDDL.concat("}");
- dsp.setProperty(Constants.SERIALIZATION_DDL, serDDL);
+ dsp.setProperty(serdeConstants.SERIALIZATION_DDL, serDDL);
// Need a new DynamicSerDe instance - re-initialization is not supported.
ds = new DynamicSerDe();
ds.initialize(new Configuration(), dsp);