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 [21/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/ql/src/gen/thrift/gen-php/Types.php
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/gen/thrift/gen-php/Types.php?rev=1406984&view=auto
==============================================================================
--- hive/trunk/ql/src/gen/thrift/gen-php/Types.php (added)
+++ hive/trunk/ql/src/gen/thrift/gen-php/Types.php Thu Nov 8 09:44:19 2012
@@ -0,0 +1,1716 @@
+<?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 AdjacencyType {
+ const CONJUNCTIVE = 0;
+ const DISJUNCTIVE = 1;
+ static public $__names = array(
+ 0 => 'CONJUNCTIVE',
+ 1 => 'DISJUNCTIVE',
+ );
+}
+
+final class NodeType {
+ const OPERATOR = 0;
+ const STAGE = 1;
+ static public $__names = array(
+ 0 => 'OPERATOR',
+ 1 => 'STAGE',
+ );
+}
+
+final class OperatorType {
+ const JOIN = 0;
+ const MAPJOIN = 1;
+ const EXTRACT = 2;
+ const FILTER = 3;
+ const FORWARD = 4;
+ const GROUPBY = 5;
+ const LIMIT = 6;
+ const SCRIPT = 7;
+ const SELECT = 8;
+ const TABLESCAN = 9;
+ const FILESINK = 10;
+ const REDUCESINK = 11;
+ const UNION = 12;
+ const UDTF = 13;
+ const LATERALVIEWJOIN = 14;
+ const LATERALVIEWFORWARD = 15;
+ const HASHTABLESINK = 16;
+ const HASHTABLEDUMMY = 17;
+ static public $__names = array(
+ 0 => 'JOIN',
+ 1 => 'MAPJOIN',
+ 2 => 'EXTRACT',
+ 3 => 'FILTER',
+ 4 => 'FORWARD',
+ 5 => 'GROUPBY',
+ 6 => 'LIMIT',
+ 7 => 'SCRIPT',
+ 8 => 'SELECT',
+ 9 => 'TABLESCAN',
+ 10 => 'FILESINK',
+ 11 => 'REDUCESINK',
+ 12 => 'UNION',
+ 13 => 'UDTF',
+ 14 => 'LATERALVIEWJOIN',
+ 15 => 'LATERALVIEWFORWARD',
+ 16 => 'HASHTABLESINK',
+ 17 => 'HASHTABLEDUMMY',
+ );
+}
+
+final class TaskType {
+ const MAP = 0;
+ const REDUCE = 1;
+ const OTHER = 2;
+ static public $__names = array(
+ 0 => 'MAP',
+ 1 => 'REDUCE',
+ 2 => 'OTHER',
+ );
+}
+
+final class StageType {
+ const CONDITIONAL = 0;
+ const COPY = 1;
+ const DDL = 2;
+ const MAPRED = 3;
+ const EXPLAIN = 4;
+ const FETCH = 5;
+ const FUNC = 6;
+ const MAPREDLOCAL = 7;
+ const MOVE = 8;
+ const STATS = 9;
+ const DEPENDENCY_COLLECTION = 10;
+ const COLUMNSTATS = 11;
+ static public $__names = array(
+ 0 => 'CONDITIONAL',
+ 1 => 'COPY',
+ 2 => 'DDL',
+ 3 => 'MAPRED',
+ 4 => 'EXPLAIN',
+ 5 => 'FETCH',
+ 6 => 'FUNC',
+ 7 => 'MAPREDLOCAL',
+ 8 => 'MOVE',
+ 9 => 'STATS',
+ 10 => 'DEPENDENCY_COLLECTION',
+ 11 => 'COLUMNSTATS',
+ );
+}
+
+class Adjacency {
+ static $_TSPEC;
+
+ public $node = null;
+ public $children = null;
+ public $adjacencyType = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'node',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'children',
+ 'type' => TType::LST,
+ 'etype' => TType::STRING,
+ 'elem' => array(
+ 'type' => TType::STRING,
+ ),
+ ),
+ 3 => array(
+ 'var' => 'adjacencyType',
+ 'type' => TType::I32,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['node'])) {
+ $this->node = $vals['node'];
+ }
+ if (isset($vals['children'])) {
+ $this->children = $vals['children'];
+ }
+ if (isset($vals['adjacencyType'])) {
+ $this->adjacencyType = $vals['adjacencyType'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'Adjacency';
+ }
+
+ 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->node);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::LST) {
+ $this->children = array();
+ $_size0 = 0;
+ $_etype3 = 0;
+ $xfer += $input->readListBegin($_etype3, $_size0);
+ for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
+ {
+ $elem5 = null;
+ $xfer += $input->readString($elem5);
+ $this->children []= $elem5;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->adjacencyType);
+ } 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('Adjacency');
+ if ($this->node !== null) {
+ $xfer += $output->writeFieldBegin('node', TType::STRING, 1);
+ $xfer += $output->writeString($this->node);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->children !== null) {
+ if (!is_array($this->children)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('children', TType::LST, 2);
+ {
+ $output->writeListBegin(TType::STRING, count($this->children));
+ {
+ foreach ($this->children as $iter6)
+ {
+ $xfer += $output->writeString($iter6);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->adjacencyType !== null) {
+ $xfer += $output->writeFieldBegin('adjacencyType', TType::I32, 3);
+ $xfer += $output->writeI32($this->adjacencyType);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class Graph {
+ static $_TSPEC;
+
+ public $nodeType = null;
+ public $roots = null;
+ public $adjacencyList = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'nodeType',
+ 'type' => TType::I32,
+ ),
+ 2 => array(
+ 'var' => 'roots',
+ 'type' => TType::LST,
+ 'etype' => TType::STRING,
+ 'elem' => array(
+ 'type' => TType::STRING,
+ ),
+ ),
+ 3 => array(
+ 'var' => 'adjacencyList',
+ 'type' => TType::LST,
+ 'etype' => TType::STRUCT,
+ 'elem' => array(
+ 'type' => TType::STRUCT,
+ 'class' => '\Adjacency',
+ ),
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['nodeType'])) {
+ $this->nodeType = $vals['nodeType'];
+ }
+ if (isset($vals['roots'])) {
+ $this->roots = $vals['roots'];
+ }
+ if (isset($vals['adjacencyList'])) {
+ $this->adjacencyList = $vals['adjacencyList'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'Graph';
+ }
+
+ 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->nodeType);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::LST) {
+ $this->roots = array();
+ $_size7 = 0;
+ $_etype10 = 0;
+ $xfer += $input->readListBegin($_etype10, $_size7);
+ for ($_i11 = 0; $_i11 < $_size7; ++$_i11)
+ {
+ $elem12 = null;
+ $xfer += $input->readString($elem12);
+ $this->roots []= $elem12;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::LST) {
+ $this->adjacencyList = array();
+ $_size13 = 0;
+ $_etype16 = 0;
+ $xfer += $input->readListBegin($_etype16, $_size13);
+ for ($_i17 = 0; $_i17 < $_size13; ++$_i17)
+ {
+ $elem18 = null;
+ $elem18 = new \Adjacency();
+ $xfer += $elem18->read($input);
+ $this->adjacencyList []= $elem18;
+ }
+ $xfer += $input->readListEnd();
+ } 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('Graph');
+ if ($this->nodeType !== null) {
+ $xfer += $output->writeFieldBegin('nodeType', TType::I32, 1);
+ $xfer += $output->writeI32($this->nodeType);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->roots !== null) {
+ if (!is_array($this->roots)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('roots', TType::LST, 2);
+ {
+ $output->writeListBegin(TType::STRING, count($this->roots));
+ {
+ foreach ($this->roots as $iter19)
+ {
+ $xfer += $output->writeString($iter19);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->adjacencyList !== null) {
+ if (!is_array($this->adjacencyList)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('adjacencyList', TType::LST, 3);
+ {
+ $output->writeListBegin(TType::STRUCT, count($this->adjacencyList));
+ {
+ foreach ($this->adjacencyList as $iter20)
+ {
+ $xfer += $iter20->write($output);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class Operator {
+ static $_TSPEC;
+
+ public $operatorId = null;
+ public $operatorType = null;
+ public $operatorAttributes = null;
+ public $operatorCounters = null;
+ public $done = null;
+ public $started = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'operatorId',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'operatorType',
+ 'type' => TType::I32,
+ ),
+ 3 => array(
+ 'var' => 'operatorAttributes',
+ 'type' => TType::MAP,
+ 'ktype' => TType::STRING,
+ 'vtype' => TType::STRING,
+ 'key' => array(
+ 'type' => TType::STRING,
+ ),
+ 'val' => array(
+ 'type' => TType::STRING,
+ ),
+ ),
+ 4 => array(
+ 'var' => 'operatorCounters',
+ 'type' => TType::MAP,
+ 'ktype' => TType::STRING,
+ 'vtype' => TType::I64,
+ 'key' => array(
+ 'type' => TType::STRING,
+ ),
+ 'val' => array(
+ 'type' => TType::I64,
+ ),
+ ),
+ 5 => array(
+ 'var' => 'done',
+ 'type' => TType::BOOL,
+ ),
+ 6 => array(
+ 'var' => 'started',
+ 'type' => TType::BOOL,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['operatorId'])) {
+ $this->operatorId = $vals['operatorId'];
+ }
+ if (isset($vals['operatorType'])) {
+ $this->operatorType = $vals['operatorType'];
+ }
+ if (isset($vals['operatorAttributes'])) {
+ $this->operatorAttributes = $vals['operatorAttributes'];
+ }
+ if (isset($vals['operatorCounters'])) {
+ $this->operatorCounters = $vals['operatorCounters'];
+ }
+ if (isset($vals['done'])) {
+ $this->done = $vals['done'];
+ }
+ if (isset($vals['started'])) {
+ $this->started = $vals['started'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'Operator';
+ }
+
+ 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->operatorId);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->operatorType);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::MAP) {
+ $this->operatorAttributes = array();
+ $_size21 = 0;
+ $_ktype22 = 0;
+ $_vtype23 = 0;
+ $xfer += $input->readMapBegin($_ktype22, $_vtype23, $_size21);
+ for ($_i25 = 0; $_i25 < $_size21; ++$_i25)
+ {
+ $key26 = '';
+ $val27 = '';
+ $xfer += $input->readString($key26);
+ $xfer += $input->readString($val27);
+ $this->operatorAttributes[$key26] = $val27;
+ }
+ $xfer += $input->readMapEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 4:
+ if ($ftype == TType::MAP) {
+ $this->operatorCounters = array();
+ $_size28 = 0;
+ $_ktype29 = 0;
+ $_vtype30 = 0;
+ $xfer += $input->readMapBegin($_ktype29, $_vtype30, $_size28);
+ for ($_i32 = 0; $_i32 < $_size28; ++$_i32)
+ {
+ $key33 = '';
+ $val34 = 0;
+ $xfer += $input->readString($key33);
+ $xfer += $input->readI64($val34);
+ $this->operatorCounters[$key33] = $val34;
+ }
+ $xfer += $input->readMapEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 5:
+ if ($ftype == TType::BOOL) {
+ $xfer += $input->readBool($this->done);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 6:
+ if ($ftype == TType::BOOL) {
+ $xfer += $input->readBool($this->started);
+ } 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('Operator');
+ if ($this->operatorId !== null) {
+ $xfer += $output->writeFieldBegin('operatorId', TType::STRING, 1);
+ $xfer += $output->writeString($this->operatorId);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->operatorType !== null) {
+ $xfer += $output->writeFieldBegin('operatorType', TType::I32, 2);
+ $xfer += $output->writeI32($this->operatorType);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->operatorAttributes !== null) {
+ if (!is_array($this->operatorAttributes)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('operatorAttributes', TType::MAP, 3);
+ {
+ $output->writeMapBegin(TType::STRING, TType::STRING, count($this->operatorAttributes));
+ {
+ foreach ($this->operatorAttributes as $kiter35 => $viter36)
+ {
+ $xfer += $output->writeString($kiter35);
+ $xfer += $output->writeString($viter36);
+ }
+ }
+ $output->writeMapEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->operatorCounters !== null) {
+ if (!is_array($this->operatorCounters)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('operatorCounters', TType::MAP, 4);
+ {
+ $output->writeMapBegin(TType::STRING, TType::I64, count($this->operatorCounters));
+ {
+ foreach ($this->operatorCounters as $kiter37 => $viter38)
+ {
+ $xfer += $output->writeString($kiter37);
+ $xfer += $output->writeI64($viter38);
+ }
+ }
+ $output->writeMapEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->done !== null) {
+ $xfer += $output->writeFieldBegin('done', TType::BOOL, 5);
+ $xfer += $output->writeBool($this->done);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->started !== null) {
+ $xfer += $output->writeFieldBegin('started', TType::BOOL, 6);
+ $xfer += $output->writeBool($this->started);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class Task {
+ static $_TSPEC;
+
+ public $taskId = null;
+ public $taskType = null;
+ public $taskAttributes = null;
+ public $taskCounters = null;
+ public $operatorGraph = null;
+ public $operatorList = null;
+ public $done = null;
+ public $started = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'taskId',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'taskType',
+ 'type' => TType::I32,
+ ),
+ 3 => array(
+ 'var' => 'taskAttributes',
+ 'type' => TType::MAP,
+ 'ktype' => TType::STRING,
+ 'vtype' => TType::STRING,
+ 'key' => array(
+ 'type' => TType::STRING,
+ ),
+ 'val' => array(
+ 'type' => TType::STRING,
+ ),
+ ),
+ 4 => array(
+ 'var' => 'taskCounters',
+ 'type' => TType::MAP,
+ 'ktype' => TType::STRING,
+ 'vtype' => TType::I64,
+ 'key' => array(
+ 'type' => TType::STRING,
+ ),
+ 'val' => array(
+ 'type' => TType::I64,
+ ),
+ ),
+ 5 => array(
+ 'var' => 'operatorGraph',
+ 'type' => TType::STRUCT,
+ 'class' => '\Graph',
+ ),
+ 6 => array(
+ 'var' => 'operatorList',
+ 'type' => TType::LST,
+ 'etype' => TType::STRUCT,
+ 'elem' => array(
+ 'type' => TType::STRUCT,
+ 'class' => '\Operator',
+ ),
+ ),
+ 7 => array(
+ 'var' => 'done',
+ 'type' => TType::BOOL,
+ ),
+ 8 => array(
+ 'var' => 'started',
+ 'type' => TType::BOOL,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['taskId'])) {
+ $this->taskId = $vals['taskId'];
+ }
+ if (isset($vals['taskType'])) {
+ $this->taskType = $vals['taskType'];
+ }
+ if (isset($vals['taskAttributes'])) {
+ $this->taskAttributes = $vals['taskAttributes'];
+ }
+ if (isset($vals['taskCounters'])) {
+ $this->taskCounters = $vals['taskCounters'];
+ }
+ if (isset($vals['operatorGraph'])) {
+ $this->operatorGraph = $vals['operatorGraph'];
+ }
+ if (isset($vals['operatorList'])) {
+ $this->operatorList = $vals['operatorList'];
+ }
+ if (isset($vals['done'])) {
+ $this->done = $vals['done'];
+ }
+ if (isset($vals['started'])) {
+ $this->started = $vals['started'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'Task';
+ }
+
+ 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->taskId);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->taskType);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::MAP) {
+ $this->taskAttributes = array();
+ $_size39 = 0;
+ $_ktype40 = 0;
+ $_vtype41 = 0;
+ $xfer += $input->readMapBegin($_ktype40, $_vtype41, $_size39);
+ for ($_i43 = 0; $_i43 < $_size39; ++$_i43)
+ {
+ $key44 = '';
+ $val45 = '';
+ $xfer += $input->readString($key44);
+ $xfer += $input->readString($val45);
+ $this->taskAttributes[$key44] = $val45;
+ }
+ $xfer += $input->readMapEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 4:
+ if ($ftype == TType::MAP) {
+ $this->taskCounters = array();
+ $_size46 = 0;
+ $_ktype47 = 0;
+ $_vtype48 = 0;
+ $xfer += $input->readMapBegin($_ktype47, $_vtype48, $_size46);
+ for ($_i50 = 0; $_i50 < $_size46; ++$_i50)
+ {
+ $key51 = '';
+ $val52 = 0;
+ $xfer += $input->readString($key51);
+ $xfer += $input->readI64($val52);
+ $this->taskCounters[$key51] = $val52;
+ }
+ $xfer += $input->readMapEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 5:
+ if ($ftype == TType::STRUCT) {
+ $this->operatorGraph = new \Graph();
+ $xfer += $this->operatorGraph->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 6:
+ if ($ftype == TType::LST) {
+ $this->operatorList = array();
+ $_size53 = 0;
+ $_etype56 = 0;
+ $xfer += $input->readListBegin($_etype56, $_size53);
+ for ($_i57 = 0; $_i57 < $_size53; ++$_i57)
+ {
+ $elem58 = null;
+ $elem58 = new \Operator();
+ $xfer += $elem58->read($input);
+ $this->operatorList []= $elem58;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 7:
+ if ($ftype == TType::BOOL) {
+ $xfer += $input->readBool($this->done);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 8:
+ if ($ftype == TType::BOOL) {
+ $xfer += $input->readBool($this->started);
+ } 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('Task');
+ if ($this->taskId !== null) {
+ $xfer += $output->writeFieldBegin('taskId', TType::STRING, 1);
+ $xfer += $output->writeString($this->taskId);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->taskType !== null) {
+ $xfer += $output->writeFieldBegin('taskType', TType::I32, 2);
+ $xfer += $output->writeI32($this->taskType);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->taskAttributes !== null) {
+ if (!is_array($this->taskAttributes)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('taskAttributes', TType::MAP, 3);
+ {
+ $output->writeMapBegin(TType::STRING, TType::STRING, count($this->taskAttributes));
+ {
+ foreach ($this->taskAttributes as $kiter59 => $viter60)
+ {
+ $xfer += $output->writeString($kiter59);
+ $xfer += $output->writeString($viter60);
+ }
+ }
+ $output->writeMapEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->taskCounters !== null) {
+ if (!is_array($this->taskCounters)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('taskCounters', TType::MAP, 4);
+ {
+ $output->writeMapBegin(TType::STRING, TType::I64, count($this->taskCounters));
+ {
+ foreach ($this->taskCounters as $kiter61 => $viter62)
+ {
+ $xfer += $output->writeString($kiter61);
+ $xfer += $output->writeI64($viter62);
+ }
+ }
+ $output->writeMapEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->operatorGraph !== null) {
+ if (!is_object($this->operatorGraph)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('operatorGraph', TType::STRUCT, 5);
+ $xfer += $this->operatorGraph->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->operatorList !== null) {
+ if (!is_array($this->operatorList)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('operatorList', TType::LST, 6);
+ {
+ $output->writeListBegin(TType::STRUCT, count($this->operatorList));
+ {
+ foreach ($this->operatorList as $iter63)
+ {
+ $xfer += $iter63->write($output);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->done !== null) {
+ $xfer += $output->writeFieldBegin('done', TType::BOOL, 7);
+ $xfer += $output->writeBool($this->done);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->started !== null) {
+ $xfer += $output->writeFieldBegin('started', TType::BOOL, 8);
+ $xfer += $output->writeBool($this->started);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class Stage {
+ static $_TSPEC;
+
+ public $stageId = null;
+ public $stageType = null;
+ public $stageAttributes = null;
+ public $stageCounters = null;
+ public $taskList = null;
+ public $done = null;
+ public $started = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'stageId',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'stageType',
+ 'type' => TType::I32,
+ ),
+ 3 => array(
+ 'var' => 'stageAttributes',
+ 'type' => TType::MAP,
+ 'ktype' => TType::STRING,
+ 'vtype' => TType::STRING,
+ 'key' => array(
+ 'type' => TType::STRING,
+ ),
+ 'val' => array(
+ 'type' => TType::STRING,
+ ),
+ ),
+ 4 => array(
+ 'var' => 'stageCounters',
+ 'type' => TType::MAP,
+ 'ktype' => TType::STRING,
+ 'vtype' => TType::I64,
+ 'key' => array(
+ 'type' => TType::STRING,
+ ),
+ 'val' => array(
+ 'type' => TType::I64,
+ ),
+ ),
+ 5 => array(
+ 'var' => 'taskList',
+ 'type' => TType::LST,
+ 'etype' => TType::STRUCT,
+ 'elem' => array(
+ 'type' => TType::STRUCT,
+ 'class' => '\Task',
+ ),
+ ),
+ 6 => array(
+ 'var' => 'done',
+ 'type' => TType::BOOL,
+ ),
+ 7 => array(
+ 'var' => 'started',
+ 'type' => TType::BOOL,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['stageId'])) {
+ $this->stageId = $vals['stageId'];
+ }
+ if (isset($vals['stageType'])) {
+ $this->stageType = $vals['stageType'];
+ }
+ if (isset($vals['stageAttributes'])) {
+ $this->stageAttributes = $vals['stageAttributes'];
+ }
+ if (isset($vals['stageCounters'])) {
+ $this->stageCounters = $vals['stageCounters'];
+ }
+ if (isset($vals['taskList'])) {
+ $this->taskList = $vals['taskList'];
+ }
+ if (isset($vals['done'])) {
+ $this->done = $vals['done'];
+ }
+ if (isset($vals['started'])) {
+ $this->started = $vals['started'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'Stage';
+ }
+
+ 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->stageId);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->stageType);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::MAP) {
+ $this->stageAttributes = array();
+ $_size64 = 0;
+ $_ktype65 = 0;
+ $_vtype66 = 0;
+ $xfer += $input->readMapBegin($_ktype65, $_vtype66, $_size64);
+ for ($_i68 = 0; $_i68 < $_size64; ++$_i68)
+ {
+ $key69 = '';
+ $val70 = '';
+ $xfer += $input->readString($key69);
+ $xfer += $input->readString($val70);
+ $this->stageAttributes[$key69] = $val70;
+ }
+ $xfer += $input->readMapEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 4:
+ if ($ftype == TType::MAP) {
+ $this->stageCounters = array();
+ $_size71 = 0;
+ $_ktype72 = 0;
+ $_vtype73 = 0;
+ $xfer += $input->readMapBegin($_ktype72, $_vtype73, $_size71);
+ for ($_i75 = 0; $_i75 < $_size71; ++$_i75)
+ {
+ $key76 = '';
+ $val77 = 0;
+ $xfer += $input->readString($key76);
+ $xfer += $input->readI64($val77);
+ $this->stageCounters[$key76] = $val77;
+ }
+ $xfer += $input->readMapEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 5:
+ if ($ftype == TType::LST) {
+ $this->taskList = array();
+ $_size78 = 0;
+ $_etype81 = 0;
+ $xfer += $input->readListBegin($_etype81, $_size78);
+ for ($_i82 = 0; $_i82 < $_size78; ++$_i82)
+ {
+ $elem83 = null;
+ $elem83 = new \Task();
+ $xfer += $elem83->read($input);
+ $this->taskList []= $elem83;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 6:
+ if ($ftype == TType::BOOL) {
+ $xfer += $input->readBool($this->done);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 7:
+ if ($ftype == TType::BOOL) {
+ $xfer += $input->readBool($this->started);
+ } 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('Stage');
+ if ($this->stageId !== null) {
+ $xfer += $output->writeFieldBegin('stageId', TType::STRING, 1);
+ $xfer += $output->writeString($this->stageId);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->stageType !== null) {
+ $xfer += $output->writeFieldBegin('stageType', TType::I32, 2);
+ $xfer += $output->writeI32($this->stageType);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->stageAttributes !== null) {
+ if (!is_array($this->stageAttributes)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('stageAttributes', TType::MAP, 3);
+ {
+ $output->writeMapBegin(TType::STRING, TType::STRING, count($this->stageAttributes));
+ {
+ foreach ($this->stageAttributes as $kiter84 => $viter85)
+ {
+ $xfer += $output->writeString($kiter84);
+ $xfer += $output->writeString($viter85);
+ }
+ }
+ $output->writeMapEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->stageCounters !== null) {
+ if (!is_array($this->stageCounters)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('stageCounters', TType::MAP, 4);
+ {
+ $output->writeMapBegin(TType::STRING, TType::I64, count($this->stageCounters));
+ {
+ foreach ($this->stageCounters as $kiter86 => $viter87)
+ {
+ $xfer += $output->writeString($kiter86);
+ $xfer += $output->writeI64($viter87);
+ }
+ }
+ $output->writeMapEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->taskList !== null) {
+ if (!is_array($this->taskList)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('taskList', TType::LST, 5);
+ {
+ $output->writeListBegin(TType::STRUCT, count($this->taskList));
+ {
+ foreach ($this->taskList as $iter88)
+ {
+ $xfer += $iter88->write($output);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->done !== null) {
+ $xfer += $output->writeFieldBegin('done', TType::BOOL, 6);
+ $xfer += $output->writeBool($this->done);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->started !== null) {
+ $xfer += $output->writeFieldBegin('started', TType::BOOL, 7);
+ $xfer += $output->writeBool($this->started);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class Query {
+ static $_TSPEC;
+
+ public $queryId = null;
+ public $queryType = null;
+ public $queryAttributes = null;
+ public $queryCounters = null;
+ public $stageGraph = null;
+ public $stageList = null;
+ public $done = null;
+ public $started = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'queryId',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'queryType',
+ 'type' => TType::STRING,
+ ),
+ 3 => array(
+ 'var' => 'queryAttributes',
+ 'type' => TType::MAP,
+ 'ktype' => TType::STRING,
+ 'vtype' => TType::STRING,
+ 'key' => array(
+ 'type' => TType::STRING,
+ ),
+ 'val' => array(
+ 'type' => TType::STRING,
+ ),
+ ),
+ 4 => array(
+ 'var' => 'queryCounters',
+ 'type' => TType::MAP,
+ 'ktype' => TType::STRING,
+ 'vtype' => TType::I64,
+ 'key' => array(
+ 'type' => TType::STRING,
+ ),
+ 'val' => array(
+ 'type' => TType::I64,
+ ),
+ ),
+ 5 => array(
+ 'var' => 'stageGraph',
+ 'type' => TType::STRUCT,
+ 'class' => '\Graph',
+ ),
+ 6 => array(
+ 'var' => 'stageList',
+ 'type' => TType::LST,
+ 'etype' => TType::STRUCT,
+ 'elem' => array(
+ 'type' => TType::STRUCT,
+ 'class' => '\Stage',
+ ),
+ ),
+ 7 => array(
+ 'var' => 'done',
+ 'type' => TType::BOOL,
+ ),
+ 8 => array(
+ 'var' => 'started',
+ 'type' => TType::BOOL,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['queryId'])) {
+ $this->queryId = $vals['queryId'];
+ }
+ if (isset($vals['queryType'])) {
+ $this->queryType = $vals['queryType'];
+ }
+ if (isset($vals['queryAttributes'])) {
+ $this->queryAttributes = $vals['queryAttributes'];
+ }
+ if (isset($vals['queryCounters'])) {
+ $this->queryCounters = $vals['queryCounters'];
+ }
+ if (isset($vals['stageGraph'])) {
+ $this->stageGraph = $vals['stageGraph'];
+ }
+ if (isset($vals['stageList'])) {
+ $this->stageList = $vals['stageList'];
+ }
+ if (isset($vals['done'])) {
+ $this->done = $vals['done'];
+ }
+ if (isset($vals['started'])) {
+ $this->started = $vals['started'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'Query';
+ }
+
+ 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->queryId);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->queryType);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::MAP) {
+ $this->queryAttributes = array();
+ $_size89 = 0;
+ $_ktype90 = 0;
+ $_vtype91 = 0;
+ $xfer += $input->readMapBegin($_ktype90, $_vtype91, $_size89);
+ for ($_i93 = 0; $_i93 < $_size89; ++$_i93)
+ {
+ $key94 = '';
+ $val95 = '';
+ $xfer += $input->readString($key94);
+ $xfer += $input->readString($val95);
+ $this->queryAttributes[$key94] = $val95;
+ }
+ $xfer += $input->readMapEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 4:
+ if ($ftype == TType::MAP) {
+ $this->queryCounters = array();
+ $_size96 = 0;
+ $_ktype97 = 0;
+ $_vtype98 = 0;
+ $xfer += $input->readMapBegin($_ktype97, $_vtype98, $_size96);
+ for ($_i100 = 0; $_i100 < $_size96; ++$_i100)
+ {
+ $key101 = '';
+ $val102 = 0;
+ $xfer += $input->readString($key101);
+ $xfer += $input->readI64($val102);
+ $this->queryCounters[$key101] = $val102;
+ }
+ $xfer += $input->readMapEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 5:
+ if ($ftype == TType::STRUCT) {
+ $this->stageGraph = new \Graph();
+ $xfer += $this->stageGraph->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 6:
+ if ($ftype == TType::LST) {
+ $this->stageList = array();
+ $_size103 = 0;
+ $_etype106 = 0;
+ $xfer += $input->readListBegin($_etype106, $_size103);
+ for ($_i107 = 0; $_i107 < $_size103; ++$_i107)
+ {
+ $elem108 = null;
+ $elem108 = new \Stage();
+ $xfer += $elem108->read($input);
+ $this->stageList []= $elem108;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 7:
+ if ($ftype == TType::BOOL) {
+ $xfer += $input->readBool($this->done);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 8:
+ if ($ftype == TType::BOOL) {
+ $xfer += $input->readBool($this->started);
+ } 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('Query');
+ if ($this->queryId !== null) {
+ $xfer += $output->writeFieldBegin('queryId', TType::STRING, 1);
+ $xfer += $output->writeString($this->queryId);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->queryType !== null) {
+ $xfer += $output->writeFieldBegin('queryType', TType::STRING, 2);
+ $xfer += $output->writeString($this->queryType);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->queryAttributes !== null) {
+ if (!is_array($this->queryAttributes)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('queryAttributes', TType::MAP, 3);
+ {
+ $output->writeMapBegin(TType::STRING, TType::STRING, count($this->queryAttributes));
+ {
+ foreach ($this->queryAttributes as $kiter109 => $viter110)
+ {
+ $xfer += $output->writeString($kiter109);
+ $xfer += $output->writeString($viter110);
+ }
+ }
+ $output->writeMapEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->queryCounters !== null) {
+ if (!is_array($this->queryCounters)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('queryCounters', TType::MAP, 4);
+ {
+ $output->writeMapBegin(TType::STRING, TType::I64, count($this->queryCounters));
+ {
+ foreach ($this->queryCounters as $kiter111 => $viter112)
+ {
+ $xfer += $output->writeString($kiter111);
+ $xfer += $output->writeI64($viter112);
+ }
+ }
+ $output->writeMapEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->stageGraph !== null) {
+ if (!is_object($this->stageGraph)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('stageGraph', TType::STRUCT, 5);
+ $xfer += $this->stageGraph->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->stageList !== null) {
+ if (!is_array($this->stageList)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('stageList', TType::LST, 6);
+ {
+ $output->writeListBegin(TType::STRUCT, count($this->stageList));
+ {
+ foreach ($this->stageList as $iter113)
+ {
+ $xfer += $iter113->write($output);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->done !== null) {
+ $xfer += $output->writeFieldBegin('done', TType::BOOL, 7);
+ $xfer += $output->writeBool($this->done);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->started !== null) {
+ $xfer += $output->writeFieldBegin('started', TType::BOOL, 8);
+ $xfer += $output->writeBool($this->started);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class QueryPlan {
+ static $_TSPEC;
+
+ public $queries = null;
+ public $done = null;
+ public $started = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'queries',
+ 'type' => TType::LST,
+ 'etype' => TType::STRUCT,
+ 'elem' => array(
+ 'type' => TType::STRUCT,
+ 'class' => '\Query',
+ ),
+ ),
+ 2 => array(
+ 'var' => 'done',
+ 'type' => TType::BOOL,
+ ),
+ 3 => array(
+ 'var' => 'started',
+ 'type' => TType::BOOL,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['queries'])) {
+ $this->queries = $vals['queries'];
+ }
+ if (isset($vals['done'])) {
+ $this->done = $vals['done'];
+ }
+ if (isset($vals['started'])) {
+ $this->started = $vals['started'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'QueryPlan';
+ }
+
+ 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::LST) {
+ $this->queries = array();
+ $_size114 = 0;
+ $_etype117 = 0;
+ $xfer += $input->readListBegin($_etype117, $_size114);
+ for ($_i118 = 0; $_i118 < $_size114; ++$_i118)
+ {
+ $elem119 = null;
+ $elem119 = new \Query();
+ $xfer += $elem119->read($input);
+ $this->queries []= $elem119;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::BOOL) {
+ $xfer += $input->readBool($this->done);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::BOOL) {
+ $xfer += $input->readBool($this->started);
+ } 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('QueryPlan');
+ if ($this->queries !== null) {
+ if (!is_array($this->queries)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('queries', TType::LST, 1);
+ {
+ $output->writeListBegin(TType::STRUCT, count($this->queries));
+ {
+ foreach ($this->queries as $iter120)
+ {
+ $xfer += $iter120->write($output);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->done !== null) {
+ $xfer += $output->writeFieldBegin('done', TType::BOOL, 2);
+ $xfer += $output->writeBool($this->done);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->started !== null) {
+ $xfer += $output->writeFieldBegin('started', TType::BOOL, 3);
+ $xfer += $output->writeBool($this->started);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+
Added: hive/trunk/ql/src/gen/thrift/gen-py/__init__.py
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/gen/thrift/gen-py/__init__.py?rev=1406984&view=auto
==============================================================================
(empty)
Modified: hive/trunk/ql/src/gen/thrift/gen-py/queryplan/constants.py
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/gen/thrift/gen-py/queryplan/constants.py?rev=1406984&r1=1406983&r2=1406984&view=diff
==============================================================================
--- hive/trunk/ql/src/gen/thrift/gen-py/queryplan/constants.py (original)
+++ hive/trunk/ql/src/gen/thrift/gen-py/queryplan/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/ql/src/gen/thrift/gen-py/queryplan/ttypes.py
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/gen/thrift/gen-py/queryplan/ttypes.py?rev=1406984&r1=1406983&r2=1406984&view=diff
==============================================================================
--- hive/trunk/ql/src/gen/thrift/gen-py/queryplan/ttypes.py (original)
+++ hive/trunk/ql/src/gen/thrift/gen-py/queryplan/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
from thrift.transport import TTransport
from thrift.protocol import TBinaryProtocol, TProtocol
Modified: hive/trunk/ql/src/gen/thrift/gen-rb/queryplan_constants.rb
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/gen/thrift/gen-rb/queryplan_constants.rb?rev=1406984&r1=1406983&r2=1406984&view=diff
==============================================================================
--- hive/trunk/ql/src/gen/thrift/gen-rb/queryplan_constants.rb (original)
+++ hive/trunk/ql/src/gen/thrift/gen-rb/queryplan_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 'queryplan_types'
Modified: hive/trunk/ql/src/gen/thrift/gen-rb/queryplan_types.rb
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/gen/thrift/gen-rb/queryplan_types.rb?rev=1406984&r1=1406983&r2=1406984&view=diff
==============================================================================
--- hive/trunk/ql/src/gen/thrift/gen-rb/queryplan_types.rb (original)
+++ hive/trunk/ql/src/gen/thrift/gen-rb/queryplan_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'
module AdjacencyType
CONJUNCTIVE = 0
@@ -76,13 +77,13 @@ class Adjacency
FIELDS = {
NODE => {:type => ::Thrift::Types::STRING, :name => 'node'},
CHILDREN => {:type => ::Thrift::Types::LIST, :name => 'children', :element => {:type => ::Thrift::Types::STRING}},
- ADJACENCYTYPE => {:type => ::Thrift::Types::I32, :name => 'adjacencyType', :enum_class => AdjacencyType}
+ ADJACENCYTYPE => {:type => ::Thrift::Types::I32, :name => 'adjacencyType', :enum_class => ::AdjacencyType}
}
def struct_fields; FIELDS; end
def validate
- unless @adjacencyType.nil? || AdjacencyType::VALID_VALUES.include?(@adjacencyType)
+ unless @adjacencyType.nil? || ::AdjacencyType::VALID_VALUES.include?(@adjacencyType)
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field adjacencyType!')
end
end
@@ -97,15 +98,15 @@ class Graph
ADJACENCYLIST = 3
FIELDS = {
- NODETYPE => {:type => ::Thrift::Types::I32, :name => 'nodeType', :enum_class => NodeType},
+ NODETYPE => {:type => ::Thrift::Types::I32, :name => 'nodeType', :enum_class => ::NodeType},
ROOTS => {:type => ::Thrift::Types::LIST, :name => 'roots', :element => {:type => ::Thrift::Types::STRING}},
- ADJACENCYLIST => {:type => ::Thrift::Types::LIST, :name => 'adjacencyList', :element => {:type => ::Thrift::Types::STRUCT, :class => Adjacency}}
+ ADJACENCYLIST => {:type => ::Thrift::Types::LIST, :name => 'adjacencyList', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Adjacency}}
}
def struct_fields; FIELDS; end
def validate
- unless @nodeType.nil? || NodeType::VALID_VALUES.include?(@nodeType)
+ unless @nodeType.nil? || ::NodeType::VALID_VALUES.include?(@nodeType)
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field nodeType!')
end
end
@@ -124,7 +125,7 @@ class Operator
FIELDS = {
OPERATORID => {:type => ::Thrift::Types::STRING, :name => 'operatorId'},
- OPERATORTYPE => {:type => ::Thrift::Types::I32, :name => 'operatorType', :enum_class => OperatorType},
+ OPERATORTYPE => {:type => ::Thrift::Types::I32, :name => 'operatorType', :enum_class => ::OperatorType},
OPERATORATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'operatorAttributes', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}},
OPERATORCOUNTERS => {:type => ::Thrift::Types::MAP, :name => 'operatorCounters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::I64}},
DONE => {:type => ::Thrift::Types::BOOL, :name => 'done'},
@@ -134,7 +135,7 @@ class Operator
def struct_fields; FIELDS; end
def validate
- unless @operatorType.nil? || OperatorType::VALID_VALUES.include?(@operatorType)
+ unless @operatorType.nil? || ::OperatorType::VALID_VALUES.include?(@operatorType)
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field operatorType!')
end
end
@@ -155,11 +156,11 @@ class Task
FIELDS = {
TASKID => {:type => ::Thrift::Types::STRING, :name => 'taskId'},
- TASKTYPE => {:type => ::Thrift::Types::I32, :name => 'taskType', :enum_class => TaskType},
+ TASKTYPE => {:type => ::Thrift::Types::I32, :name => 'taskType', :enum_class => ::TaskType},
TASKATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'taskAttributes', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}},
TASKCOUNTERS => {:type => ::Thrift::Types::MAP, :name => 'taskCounters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::I64}},
- OPERATORGRAPH => {:type => ::Thrift::Types::STRUCT, :name => 'operatorGraph', :class => Graph, :optional => true},
- OPERATORLIST => {:type => ::Thrift::Types::LIST, :name => 'operatorList', :element => {:type => ::Thrift::Types::STRUCT, :class => Operator}, :optional => true},
+ OPERATORGRAPH => {:type => ::Thrift::Types::STRUCT, :name => 'operatorGraph', :class => ::Graph, :optional => true},
+ OPERATORLIST => {:type => ::Thrift::Types::LIST, :name => 'operatorList', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Operator}, :optional => true},
DONE => {:type => ::Thrift::Types::BOOL, :name => 'done'},
STARTED => {:type => ::Thrift::Types::BOOL, :name => 'started'}
}
@@ -167,7 +168,7 @@ class Task
def struct_fields; FIELDS; end
def validate
- unless @taskType.nil? || TaskType::VALID_VALUES.include?(@taskType)
+ unless @taskType.nil? || ::TaskType::VALID_VALUES.include?(@taskType)
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field taskType!')
end
end
@@ -187,10 +188,10 @@ class Stage
FIELDS = {
STAGEID => {:type => ::Thrift::Types::STRING, :name => 'stageId'},
- STAGETYPE => {:type => ::Thrift::Types::I32, :name => 'stageType', :enum_class => StageType},
+ STAGETYPE => {:type => ::Thrift::Types::I32, :name => 'stageType', :enum_class => ::StageType},
STAGEATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'stageAttributes', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}},
STAGECOUNTERS => {:type => ::Thrift::Types::MAP, :name => 'stageCounters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::I64}},
- TASKLIST => {:type => ::Thrift::Types::LIST, :name => 'taskList', :element => {:type => ::Thrift::Types::STRUCT, :class => Task}},
+ TASKLIST => {:type => ::Thrift::Types::LIST, :name => 'taskList', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Task}},
DONE => {:type => ::Thrift::Types::BOOL, :name => 'done'},
STARTED => {:type => ::Thrift::Types::BOOL, :name => 'started'}
}
@@ -198,7 +199,7 @@ class Stage
def struct_fields; FIELDS; end
def validate
- unless @stageType.nil? || StageType::VALID_VALUES.include?(@stageType)
+ unless @stageType.nil? || ::StageType::VALID_VALUES.include?(@stageType)
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field stageType!')
end
end
@@ -222,8 +223,8 @@ class Query
QUERYTYPE => {:type => ::Thrift::Types::STRING, :name => 'queryType'},
QUERYATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'queryAttributes', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}},
QUERYCOUNTERS => {:type => ::Thrift::Types::MAP, :name => 'queryCounters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::I64}},
- STAGEGRAPH => {:type => ::Thrift::Types::STRUCT, :name => 'stageGraph', :class => Graph},
- STAGELIST => {:type => ::Thrift::Types::LIST, :name => 'stageList', :element => {:type => ::Thrift::Types::STRUCT, :class => Stage}},
+ STAGEGRAPH => {:type => ::Thrift::Types::STRUCT, :name => 'stageGraph', :class => ::Graph},
+ STAGELIST => {:type => ::Thrift::Types::LIST, :name => 'stageList', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Stage}},
DONE => {:type => ::Thrift::Types::BOOL, :name => 'done'},
STARTED => {:type => ::Thrift::Types::BOOL, :name => 'started'}
}
@@ -243,7 +244,7 @@ class QueryPlan
STARTED = 3
FIELDS = {
- QUERIES => {:type => ::Thrift::Types::LIST, :name => 'queries', :element => {:type => ::Thrift::Types::STRUCT, :class => Query}},
+ QUERIES => {:type => ::Thrift::Types::LIST, :name => 'queries', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Query}},
DONE => {:type => ::Thrift::Types::BOOL, :name => 'done'},
STARTED => {:type => ::Thrift::Types::BOOL, :name => 'started'}
}
Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/ArchiveUtils.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/ArchiveUtils.java?rev=1406984&r1=1406983&r2=1406984&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/ArchiveUtils.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/ArchiveUtils.java Thu Nov 8 09:44:19 2012
@@ -204,7 +204,7 @@ public final class ArchiveUtils {
public static boolean isArchived(Partition p) {
Map<String, String> params = p.getParameters();
if ("true".equalsIgnoreCase(params.get(
- org.apache.hadoop.hive.metastore.api.Constants.IS_ARCHIVED))) {
+ org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.IS_ARCHIVED))) {
return true;
} else {
return false;
Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java?rev=1406984&r1=1406983&r2=1406984&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java Thu Nov 8 09:44:19 2012
@@ -151,7 +151,7 @@ import org.apache.hadoop.hive.ql.plan.Sw
import org.apache.hadoop.hive.ql.plan.UnlockTableDesc;
import org.apache.hadoop.hive.ql.plan.api.StageType;
import org.apache.hadoop.hive.ql.security.authorization.Privilege;
-import org.apache.hadoop.hive.serde.Constants;
+import org.apache.hadoop.hive.serde.serdeConstants;
import org.apache.hadoop.hive.serde2.Deserializer;
import org.apache.hadoop.hive.serde2.MetadataTypedColumnsetSerDe;
import org.apache.hadoop.hive.serde2.SerDeException;
@@ -1109,12 +1109,12 @@ public class DDLTask extends Task<DDLWor
private void setIsArchived(Partition p, boolean state, int level) {
Map<String, String> params = p.getParameters();
if (state) {
- params.put(org.apache.hadoop.hive.metastore.api.Constants.IS_ARCHIVED,
+ params.put(org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.IS_ARCHIVED,
"true");
params.put(ArchiveUtils.ARCHIVING_LEVEL, Integer
.toString(level));
} else {
- params.remove(org.apache.hadoop.hive.metastore.api.Constants.IS_ARCHIVED);
+ params.remove(org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.IS_ARCHIVED);
params.remove(ArchiveUtils.ARCHIVING_LEVEL);
}
}
@@ -1125,7 +1125,7 @@ public class DDLTask extends Task<DDLWor
private String getOriginalLocation(Partition p) {
Map<String, String> params = p.getParameters();
return params.get(
- org.apache.hadoop.hive.metastore.api.Constants.ORIGINAL_LOCATION);
+ org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.ORIGINAL_LOCATION);
}
/**
@@ -1134,9 +1134,9 @@ public class DDLTask extends Task<DDLWor
private void setOriginalLocation(Partition p, String loc) {
Map<String, String> params = p.getParameters();
if (loc == null) {
- params.remove(org.apache.hadoop.hive.metastore.api.Constants.ORIGINAL_LOCATION);
+ params.remove(org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.ORIGINAL_LOCATION);
} else {
- params.put(org.apache.hadoop.hive.metastore.api.Constants.ORIGINAL_LOCATION, loc);
+ params.put(org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.ORIGINAL_LOCATION, loc);
}
}
@@ -1992,25 +1992,25 @@ public class DDLTask extends Task<DDLWor
// If the four delimiters all exist in a CREATE TABLE query,
// this following order needs to be strictly followed,
// or the query will fail with a ParseException.
- if (delims.containsKey(Constants.FIELD_DELIM)) {
+ if (delims.containsKey(serdeConstants.FIELD_DELIM)) {
tbl_row_format += " FIELDS TERMINATED BY '" +
escapeHiveCommand(StringEscapeUtils.escapeJava(delims.get(
- Constants.FIELD_DELIM))) + "' \n";
+ serdeConstants.FIELD_DELIM))) + "' \n";
}
- if (delims.containsKey(Constants.COLLECTION_DELIM)) {
+ if (delims.containsKey(serdeConstants.COLLECTION_DELIM)) {
tbl_row_format += " COLLECTION ITEMS TERMINATED BY '" +
escapeHiveCommand(StringEscapeUtils.escapeJava(delims.get(
- Constants.COLLECTION_DELIM))) + "' \n";
+ serdeConstants.COLLECTION_DELIM))) + "' \n";
}
- if (delims.containsKey(Constants.MAPKEY_DELIM)) {
+ if (delims.containsKey(serdeConstants.MAPKEY_DELIM)) {
tbl_row_format += " MAP KEYS TERMINATED BY '" +
escapeHiveCommand(StringEscapeUtils.escapeJava(delims.get(
- Constants.MAPKEY_DELIM))) + "' \n";
+ serdeConstants.MAPKEY_DELIM))) + "' \n";
}
- if (delims.containsKey(Constants.LINE_DELIM)) {
+ if (delims.containsKey(serdeConstants.LINE_DELIM)) {
tbl_row_format += " LINES TERMINATED BY '" +
escapeHiveCommand(StringEscapeUtils.escapeJava(delims.get(
- Constants.LINE_DELIM))) + "' \n";
+ serdeConstants.LINE_DELIM))) + "' \n";
}
}
else {
@@ -2023,11 +2023,11 @@ public class DDLTask extends Task<DDLWor
escapeHiveCommand(sd.getOutputFormat()) + "'";
}
else {
- duplicateProps.add(org.apache.hadoop.hive.metastore.api.Constants.META_TABLE_STORAGE);
+ duplicateProps.add(org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_STORAGE);
tbl_row_format += " SERDE \n '" +
escapeHiveCommand(serdeInfo.getSerializationLib()) + "' \n";
tbl_row_format += "STORED BY \n '" + escapeHiveCommand(tbl.getParameters().get(
- org.apache.hadoop.hive.metastore.api.Constants.META_TABLE_STORAGE)) + "' \n";
+ org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_STORAGE)) + "' \n";
// SerDe Properties
if (serdeInfo.getParametersSize() > 0) {
tbl_row_format += "WITH SERDEPROPERTIES ( \n";
@@ -2304,7 +2304,7 @@ public class DDLTask extends Task<DDLWor
outStream = fs.create(resFile);
SortedSet<String> sortedFuncs = new TreeSet<String>(funcs);
// To remove the primitive types
- sortedFuncs.removeAll(Constants.PrimitiveTypes);
+ sortedFuncs.removeAll(serdeConstants.PrimitiveTypes);
Iterator<String> iterFuncs = sortedFuncs.iterator();
while (iterFuncs.hasNext()) {
@@ -3562,7 +3562,7 @@ public class DDLTask extends Task<DDLWor
if (crtTbl.getStorageHandler() != null) {
tbl.setProperty(
- org.apache.hadoop.hive.metastore.api.Constants.META_TABLE_STORAGE,
+ org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_STORAGE,
crtTbl.getStorageHandler());
}
HiveStorageHandler storageHandler = tbl.getStorageHandler();
@@ -3590,21 +3590,21 @@ public class DDLTask extends Task<DDLWor
}
if (crtTbl.getFieldDelim() != null) {
- tbl.setSerdeParam(Constants.FIELD_DELIM, crtTbl.getFieldDelim());
- tbl.setSerdeParam(Constants.SERIALIZATION_FORMAT, crtTbl.getFieldDelim());
+ tbl.setSerdeParam(serdeConstants.FIELD_DELIM, crtTbl.getFieldDelim());
+ tbl.setSerdeParam(serdeConstants.SERIALIZATION_FORMAT, crtTbl.getFieldDelim());
}
if (crtTbl.getFieldEscape() != null) {
- tbl.setSerdeParam(Constants.ESCAPE_CHAR, crtTbl.getFieldEscape());
+ tbl.setSerdeParam(serdeConstants.ESCAPE_CHAR, crtTbl.getFieldEscape());
}
if (crtTbl.getCollItemDelim() != null) {
- tbl.setSerdeParam(Constants.COLLECTION_DELIM, crtTbl.getCollItemDelim());
+ tbl.setSerdeParam(serdeConstants.COLLECTION_DELIM, crtTbl.getCollItemDelim());
}
if (crtTbl.getMapKeyDelim() != null) {
- tbl.setSerdeParam(Constants.MAPKEY_DELIM, crtTbl.getMapKeyDelim());
+ tbl.setSerdeParam(serdeConstants.MAPKEY_DELIM, crtTbl.getMapKeyDelim());
}
if (crtTbl.getLineDelim() != null) {
- tbl.setSerdeParam(Constants.LINE_DELIM, crtTbl.getLineDelim());
+ tbl.setSerdeParam(serdeConstants.LINE_DELIM, crtTbl.getLineDelim());
}
if (crtTbl.getSerdeProps() != null) {
Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/ExplainTask.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/ExplainTask.java?rev=1406984&r1=1406983&r2=1406984&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/ExplainTask.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/ExplainTask.java Thu Nov 8 09:44:19 2012
@@ -18,7 +18,7 @@
package org.apache.hadoop.hive.ql.exec;
-import static org.apache.hadoop.hive.serde.Constants.STRING_TYPE_NAME;
+import static org.apache.hadoop.hive.serde.serdeConstants.STRING_TYPE_NAME;
import java.io.OutputStream;
import java.io.PrintStream;
Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FetchOperator.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FetchOperator.java?rev=1406984&r1=1406983&r2=1406984&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FetchOperator.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FetchOperator.java Thu Nov 8 09:44:19 2012
@@ -230,7 +230,7 @@ public class FetchOperator implements Se
Deserializer serde = partition.getDeserializerClass().newInstance();
serde.initialize(job, partition.getProperties());
String pcols = partition.getTableDesc().getProperties().getProperty(
- org.apache.hadoop.hive.metastore.api.Constants.META_TABLE_PARTITION_COLUMNS);
+ org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_PARTITION_COLUMNS);
String[] partKeys = pcols.trim().split("/");
row[1] = createPartValue(partKeys, partition.getPartSpec());
return createRowInspector(getCurrent(serde), partKeys);
@@ -240,7 +240,7 @@ public class FetchOperator implements Se
Deserializer serde = table.getDeserializerClass().newInstance();
serde.initialize(job, table.getProperties());
String pcols = table.getProperties().getProperty(
- org.apache.hadoop.hive.metastore.api.Constants.META_TABLE_PARTITION_COLUMNS);
+ org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_PARTITION_COLUMNS);
String[] partKeys = pcols.trim().split("/");
row[1] = null;
return createRowInspector(getCurrent(serde), partKeys);
Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java?rev=1406984&r1=1406983&r2=1406984&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java Thu Nov 8 09:44:19 2012
@@ -218,7 +218,7 @@ import org.apache.hadoop.hive.ql.udf.xml
import org.apache.hadoop.hive.ql.udf.xml.UDFXPathLong;
import org.apache.hadoop.hive.ql.udf.xml.UDFXPathShort;
import org.apache.hadoop.hive.ql.udf.xml.UDFXPathString;
-import org.apache.hadoop.hive.serde.Constants;
+import org.apache.hadoop.hive.serde.serdeConstants;
import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector.Category;
import org.apache.hadoop.hive.serde2.typeinfo.ListTypeInfo;
@@ -380,26 +380,26 @@ public final class FunctionRegistry {
// Aliases for Java Class Names
// These are used in getImplicitConvertUDFMethod
- registerUDF(Constants.BOOLEAN_TYPE_NAME, UDFToBoolean.class, false,
+ registerUDF(serdeConstants.BOOLEAN_TYPE_NAME, UDFToBoolean.class, false,
UDFToBoolean.class.getSimpleName());
- registerUDF(Constants.TINYINT_TYPE_NAME, UDFToByte.class, false,
+ registerUDF(serdeConstants.TINYINT_TYPE_NAME, UDFToByte.class, false,
UDFToByte.class.getSimpleName());
- registerUDF(Constants.SMALLINT_TYPE_NAME, UDFToShort.class, false,
+ registerUDF(serdeConstants.SMALLINT_TYPE_NAME, UDFToShort.class, false,
UDFToShort.class.getSimpleName());
- registerUDF(Constants.INT_TYPE_NAME, UDFToInteger.class, false,
+ registerUDF(serdeConstants.INT_TYPE_NAME, UDFToInteger.class, false,
UDFToInteger.class.getSimpleName());
- registerUDF(Constants.BIGINT_TYPE_NAME, UDFToLong.class, false,
+ registerUDF(serdeConstants.BIGINT_TYPE_NAME, UDFToLong.class, false,
UDFToLong.class.getSimpleName());
- registerUDF(Constants.FLOAT_TYPE_NAME, UDFToFloat.class, false,
+ registerUDF(serdeConstants.FLOAT_TYPE_NAME, UDFToFloat.class, false,
UDFToFloat.class.getSimpleName());
- registerUDF(Constants.DOUBLE_TYPE_NAME, UDFToDouble.class, false,
+ registerUDF(serdeConstants.DOUBLE_TYPE_NAME, UDFToDouble.class, false,
UDFToDouble.class.getSimpleName());
- registerUDF(Constants.STRING_TYPE_NAME, UDFToString.class, false,
+ registerUDF(serdeConstants.STRING_TYPE_NAME, UDFToString.class, false,
UDFToString.class.getSimpleName());
- registerGenericUDF(Constants.TIMESTAMP_TYPE_NAME,
+ registerGenericUDF(serdeConstants.TIMESTAMP_TYPE_NAME,
GenericUDFTimestamp.class);
- registerGenericUDF(Constants.BINARY_TYPE_NAME,
+ registerGenericUDF(serdeConstants.BINARY_TYPE_NAME,
GenericUDFToBinary.class);
// Aggregate functions
@@ -628,13 +628,13 @@ public final class FunctionRegistry {
}
static {
- registerNumericType(Constants.TINYINT_TYPE_NAME, 1);
- registerNumericType(Constants.SMALLINT_TYPE_NAME, 2);
- registerNumericType(Constants.INT_TYPE_NAME, 3);
- registerNumericType(Constants.BIGINT_TYPE_NAME, 4);
- registerNumericType(Constants.FLOAT_TYPE_NAME, 5);
- registerNumericType(Constants.DOUBLE_TYPE_NAME, 6);
- registerNumericType(Constants.STRING_TYPE_NAME, 7);
+ registerNumericType(serdeConstants.TINYINT_TYPE_NAME, 1);
+ registerNumericType(serdeConstants.SMALLINT_TYPE_NAME, 2);
+ registerNumericType(serdeConstants.INT_TYPE_NAME, 3);
+ registerNumericType(serdeConstants.BIGINT_TYPE_NAME, 4);
+ registerNumericType(serdeConstants.FLOAT_TYPE_NAME, 5);
+ registerNumericType(serdeConstants.DOUBLE_TYPE_NAME, 6);
+ registerNumericType(serdeConstants.STRING_TYPE_NAME, 7);
}
/**
Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/JoinUtil.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/JoinUtil.java?rev=1406984&r1=1406983&r2=1406984&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/JoinUtil.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/JoinUtil.java Thu Nov 8 09:44:19 2012
@@ -360,11 +360,11 @@ public class JoinUtil {
TableDesc tblDesc = new TableDesc(LazyBinarySerDe.class,
SequenceFileInputFormat.class, HiveSequenceFileOutputFormat.class,
Utilities.makeProperties(
- org.apache.hadoop.hive.serde.Constants.SERIALIZATION_FORMAT, ""
+ org.apache.hadoop.hive.serde.serdeConstants.SERIALIZATION_FORMAT, ""
+ Utilities.ctrlaCode,
- org.apache.hadoop.hive.serde.Constants.LIST_COLUMNS, colNames
+ org.apache.hadoop.hive.serde.serdeConstants.LIST_COLUMNS, colNames
.toString(),
- org.apache.hadoop.hive.serde.Constants.LIST_COLUMN_TYPES,
+ org.apache.hadoop.hive.serde.serdeConstants.LIST_COLUMN_TYPES,
colTypes.toString()));
spillTableDesc.put((byte) tag, tblDesc);
}
Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/ListSinkOperator.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/ListSinkOperator.java?rev=1406984&r1=1406983&r2=1406984&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/ListSinkOperator.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/ListSinkOperator.java Thu Nov 8 09:44:19 2012
@@ -27,7 +27,7 @@ import org.apache.hadoop.hive.conf.HiveC
import org.apache.hadoop.hive.ql.metadata.HiveException;
import org.apache.hadoop.hive.ql.plan.ListSinkDesc;
import org.apache.hadoop.hive.ql.plan.api.OperatorType;
-import org.apache.hadoop.hive.serde.Constants;
+import org.apache.hadoop.hive.serde.serdeConstants;
import org.apache.hadoop.hive.serde2.DelimitedJSONSerDe;
import org.apache.hadoop.hive.serde2.SerDe;
import org.apache.hadoop.hive.serde2.SerDeException;
@@ -65,8 +65,8 @@ public class ListSinkOperator extends Op
// this is the default serialization format
if (serde instanceof DelimitedJSONSerDe) {
- serdeProp.put(Constants.SERIALIZATION_FORMAT, "" + Utilities.tabCode);
- serdeProp.put(Constants.SERIALIZATION_NULL_FORMAT, getConf().getSerializationNullFormat());
+ serdeProp.put(serdeConstants.SERIALIZATION_FORMAT, "" + Utilities.tabCode);
+ serdeProp.put(serdeConstants.SERIALIZATION_NULL_FORMAT, getConf().getSerializationNullFormat());
}
serde.initialize(conf, serdeProp);
return serde;
Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/MapOperator.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/MapOperator.java?rev=1406984&r1=1406983&r2=1406984&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/MapOperator.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/MapOperator.java Thu Nov 8 09:44:19 2012
@@ -257,7 +257,7 @@ public class MapOperator extends Operato
// get the list of partition names as well as allocate
// the serdes for the partition columns
String pcols = tblProps
- .getProperty(org.apache.hadoop.hive.metastore.api.Constants.META_TABLE_PARTITION_COLUMNS);
+ .getProperty(org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_PARTITION_COLUMNS);
// Log LOG = LogFactory.getLog(MapOperator.class.getName());
if (pcols != null && pcols.length() > 0) {
String[] partKeys = pcols.trim().split("/");
Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java?rev=1406984&r1=1406983&r2=1406984&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java Thu Nov 8 09:44:19 2012
@@ -127,7 +127,7 @@ import org.apache.hadoop.hive.ql.udf.gen
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPAnd;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPEqual;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPOr;
-import org.apache.hadoop.hive.serde.Constants;
+import org.apache.hadoop.hive.serde.serdeConstants;
import org.apache.hadoop.hive.serde2.SerDeException;
import org.apache.hadoop.hive.serde2.Serializer;
import org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe;
@@ -697,9 +697,9 @@ public final class Utilities {
public static TableDesc getTableDesc(String cols, String colTypes) {
return (new TableDesc(LazySimpleSerDe.class, SequenceFileInputFormat.class,
HiveSequenceFileOutputFormat.class, Utilities.makeProperties(
- org.apache.hadoop.hive.serde.Constants.SERIALIZATION_FORMAT, "" + Utilities.ctrlaCode,
- org.apache.hadoop.hive.serde.Constants.LIST_COLUMNS, cols,
- org.apache.hadoop.hive.serde.Constants.LIST_COLUMN_TYPES, colTypes)));
+ org.apache.hadoop.hive.serde.serdeConstants.SERIALIZATION_FORMAT, "" + Utilities.ctrlaCode,
+ org.apache.hadoop.hive.serde.serdeConstants.LIST_COLUMNS, cols,
+ org.apache.hadoop.hive.serde.serdeConstants.LIST_COLUMN_TYPES, colTypes)));
}
public static PartitionDesc getPartitionDesc(Partition part) throws HiveException {
@@ -1644,7 +1644,7 @@ public final class Utilities {
public static List<String> getColumnNames(Properties props) {
List<String> names = new ArrayList<String>();
- String colNames = props.getProperty(Constants.LIST_COLUMNS);
+ String colNames = props.getProperty(serdeConstants.LIST_COLUMNS);
String[] cols = colNames.trim().split(",");
if (cols != null) {
for (String col : cols) {
@@ -1658,7 +1658,7 @@ public final class Utilities {
public static List<String> getColumnTypes(Properties props) {
List<String> names = new ArrayList<String>();
- String colNames = props.getProperty(Constants.LIST_COLUMN_TYPES);
+ String colNames = props.getProperty(serdeConstants.LIST_COLUMN_TYPES);
String[] cols = colNames.trim().split(",");
if (cols != null) {
for (String col : cols) {
@@ -2003,7 +2003,7 @@ public final class Utilities {
columnNames.append(colInfo.getInternalName());
}
String columnNamesString = columnNames.toString();
- jobConf.set(Constants.LIST_COLUMNS, columnNamesString);
+ jobConf.set(serdeConstants.LIST_COLUMNS, columnNamesString);
}
public static void setColumnTypeList(JobConf jobConf, Operator op) {
@@ -2019,7 +2019,7 @@ public final class Utilities {
columnTypes.append(colInfo.getType().getTypeName());
}
String columnTypesString = columnTypes.toString();
- jobConf.set(Constants.LIST_COLUMN_TYPES, columnTypesString);
+ jobConf.set(serdeConstants.LIST_COLUMN_TYPES, columnTypesString);
}
public static void validatePartSpec(Table tbl, Map<String, String> partSpec)
@@ -2122,11 +2122,11 @@ public final class Utilities {
} else if (expr instanceof ExprNodeColumnDesc) {
// JDO filter now only support String typed literal -- see Filter.g and ExpressionTree.java
TypeInfo type = expr.getTypeInfo();
- if (type.getTypeName().equals(Constants.STRING_TYPE_NAME)) {
+ if (type.getTypeName().equals(serdeConstants.STRING_TYPE_NAME)) {
String colName = ((ExprNodeColumnDesc)expr).getColumn();
for (FieldSchema fs: tab.getPartCols()) {
if (fs.getName().equals(colName)) {
- if (fs.getType().equals(Constants.STRING_TYPE_NAME)) {
+ if (fs.getType().equals(serdeConstants.STRING_TYPE_NAME)) {
return null;
}
return "Partition column " + fs.getName() + " is not string type";
Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/io/HiveIgnoreKeyTextOutputFormat.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/io/HiveIgnoreKeyTextOutputFormat.java?rev=1406984&r1=1406983&r2=1406984&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/io/HiveIgnoreKeyTextOutputFormat.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/io/HiveIgnoreKeyTextOutputFormat.java Thu Nov 8 09:44:19 2012
@@ -26,7 +26,7 @@ import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hive.ql.exec.Utilities;
import org.apache.hadoop.hive.ql.exec.FileSinkOperator.RecordWriter;
-import org.apache.hadoop.hive.serde.Constants;
+import org.apache.hadoop.hive.serde.serdeConstants;
import org.apache.hadoop.io.BytesWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.io.Writable;
@@ -68,7 +68,7 @@ public class HiveIgnoreKeyTextOutputForm
Properties tableProperties, Progressable progress) throws IOException {
int rowSeparator = 0;
String rowSeparatorString = tableProperties.getProperty(
- Constants.LINE_DELIM, "\n");
+ serdeConstants.LINE_DELIM, "\n");
try {
rowSeparator = Byte.parseByte(rowSeparatorString);
} catch (NumberFormatException e) {