You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by zs...@apache.org on 2009/08/19 23:03:05 UTC

svn commit: r805973 [1/19] - in /hadoop/hive/trunk: ./ data/files/ eclipse-templates/ metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/ metastore/src/gen-py/hive_metastore/ ql/ ql/if/ ql/src/gen-javabean/ ql/src/gen-javabean/org/ ql/src/...

Author: zshao
Date: Wed Aug 19 21:02:57 2009
New Revision: 805973

URL: http://svn.apache.org/viewvc?rev=805973&view=rev
Log:
HIVE-713. Integrate operator counters into query plan to view progress of queries. (Namit Jain and Raghu Murthy via zshao)

Added:
    hadoop/hive/trunk/data/files/sample-queryplan-in-history.txt
    hadoop/hive/trunk/data/files/sample-queryplan.txt
    hadoop/hive/trunk/ql/if/
    hadoop/hive/trunk/ql/if/queryplan.thrift
    hadoop/hive/trunk/ql/src/gen-javabean/
    hadoop/hive/trunk/ql/src/gen-javabean/org/
    hadoop/hive/trunk/ql/src/gen-javabean/org/apache/
    hadoop/hive/trunk/ql/src/gen-javabean/org/apache/hadoop/
    hadoop/hive/trunk/ql/src/gen-javabean/org/apache/hadoop/hive/
    hadoop/hive/trunk/ql/src/gen-javabean/org/apache/hadoop/hive/ql/
    hadoop/hive/trunk/ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/
    hadoop/hive/trunk/ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/
    hadoop/hive/trunk/ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Adjacency.java
    hadoop/hive/trunk/ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/AdjacencyType.java
    hadoop/hive/trunk/ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Graph.java
    hadoop/hive/trunk/ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/NodeType.java
    hadoop/hive/trunk/ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Operator.java
    hadoop/hive/trunk/ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/OperatorType.java
    hadoop/hive/trunk/ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Query.java
    hadoop/hive/trunk/ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/QueryPlan.java
    hadoop/hive/trunk/ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Stage.java
    hadoop/hive/trunk/ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/StageType.java
    hadoop/hive/trunk/ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Task.java
    hadoop/hive/trunk/ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/TaskType.java
    hadoop/hive/trunk/ql/src/gen-php/
    hadoop/hive/trunk/ql/src/gen-php/queryplan_types.php
    hadoop/hive/trunk/ql/src/gen-py/
    hadoop/hive/trunk/ql/src/gen-py/queryplan/
    hadoop/hive/trunk/ql/src/gen-py/queryplan/__init__.py
    hadoop/hive/trunk/ql/src/gen-py/queryplan/constants.py
    hadoop/hive/trunk/ql/src/gen-py/queryplan/ttypes.py
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/TaskHandle.java
Modified:
    hadoop/hive/trunk/CHANGES.txt
    hadoop/hive/trunk/build.xml
    hadoop/hive/trunk/eclipse-templates/.classpath
    hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Index.java
    hadoop/hive/trunk/metastore/src/gen-py/hive_metastore/ttypes.py
    hadoop/hive/trunk/ql/build.xml
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/Driver.java
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/QueryPlan.java
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/CollectOperator.java
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/ConditionalTask.java
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/CopyTask.java
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/ExecDriver.java
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/ExplainTask.java
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/ExtractOperator.java
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FetchTask.java
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FilterOperator.java
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/ForwardOperator.java
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionTask.java
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/GroupByOperator.java
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/JoinOperator.java
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/LimitOperator.java
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/MapJoinOperator.java
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/MapOperator.java
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/MapRedTask.java
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/Operator.java
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/OperatorFactory.java
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/ReduceSinkOperator.java
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/ScriptOperator.java
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/SelectOperator.java
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/TableScanOperator.java
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/Task.java
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/UnionOperator.java
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/history/HiveHistory.java
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
    hadoop/hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/plan/TestAddPartition.java
    hadoop/hive/trunk/ql/src/test/results/compiler/plan/case_sensitivity.q.xml
    hadoop/hive/trunk/ql/src/test/results/compiler/plan/cast1.q.xml
    hadoop/hive/trunk/ql/src/test/results/compiler/plan/groupby1.q.xml
    hadoop/hive/trunk/ql/src/test/results/compiler/plan/groupby2.q.xml
    hadoop/hive/trunk/ql/src/test/results/compiler/plan/groupby3.q.xml
    hadoop/hive/trunk/ql/src/test/results/compiler/plan/groupby4.q.xml
    hadoop/hive/trunk/ql/src/test/results/compiler/plan/groupby5.q.xml
    hadoop/hive/trunk/ql/src/test/results/compiler/plan/groupby6.q.xml
    hadoop/hive/trunk/ql/src/test/results/compiler/plan/input1.q.xml
    hadoop/hive/trunk/ql/src/test/results/compiler/plan/input2.q.xml
    hadoop/hive/trunk/ql/src/test/results/compiler/plan/input20.q.xml
    hadoop/hive/trunk/ql/src/test/results/compiler/plan/input3.q.xml
    hadoop/hive/trunk/ql/src/test/results/compiler/plan/input4.q.xml
    hadoop/hive/trunk/ql/src/test/results/compiler/plan/input5.q.xml
    hadoop/hive/trunk/ql/src/test/results/compiler/plan/input6.q.xml
    hadoop/hive/trunk/ql/src/test/results/compiler/plan/input7.q.xml
    hadoop/hive/trunk/ql/src/test/results/compiler/plan/input8.q.xml
    hadoop/hive/trunk/ql/src/test/results/compiler/plan/input9.q.xml
    hadoop/hive/trunk/ql/src/test/results/compiler/plan/input_part1.q.xml
    hadoop/hive/trunk/ql/src/test/results/compiler/plan/input_testsequencefile.q.xml
    hadoop/hive/trunk/ql/src/test/results/compiler/plan/input_testxpath.q.xml
    hadoop/hive/trunk/ql/src/test/results/compiler/plan/input_testxpath2.q.xml
    hadoop/hive/trunk/ql/src/test/results/compiler/plan/join1.q.xml
    hadoop/hive/trunk/ql/src/test/results/compiler/plan/join2.q.xml
    hadoop/hive/trunk/ql/src/test/results/compiler/plan/join3.q.xml
    hadoop/hive/trunk/ql/src/test/results/compiler/plan/join4.q.xml
    hadoop/hive/trunk/ql/src/test/results/compiler/plan/join5.q.xml
    hadoop/hive/trunk/ql/src/test/results/compiler/plan/join6.q.xml
    hadoop/hive/trunk/ql/src/test/results/compiler/plan/join7.q.xml
    hadoop/hive/trunk/ql/src/test/results/compiler/plan/join8.q.xml
    hadoop/hive/trunk/ql/src/test/results/compiler/plan/sample1.q.xml
    hadoop/hive/trunk/ql/src/test/results/compiler/plan/sample2.q.xml
    hadoop/hive/trunk/ql/src/test/results/compiler/plan/sample3.q.xml
    hadoop/hive/trunk/ql/src/test/results/compiler/plan/sample4.q.xml
    hadoop/hive/trunk/ql/src/test/results/compiler/plan/sample5.q.xml
    hadoop/hive/trunk/ql/src/test/results/compiler/plan/sample6.q.xml
    hadoop/hive/trunk/ql/src/test/results/compiler/plan/sample7.q.xml
    hadoop/hive/trunk/ql/src/test/results/compiler/plan/subq.q.xml
    hadoop/hive/trunk/ql/src/test/results/compiler/plan/udf1.q.xml
    hadoop/hive/trunk/ql/src/test/results/compiler/plan/udf4.q.xml
    hadoop/hive/trunk/ql/src/test/results/compiler/plan/udf6.q.xml
    hadoop/hive/trunk/ql/src/test/results/compiler/plan/udf_case.q.xml
    hadoop/hive/trunk/ql/src/test/results/compiler/plan/udf_when.q.xml
    hadoop/hive/trunk/ql/src/test/results/compiler/plan/union.q.xml
    hadoop/hive/trunk/service/build.xml
    hadoop/hive/trunk/service/if/hive_service.thrift
    hadoop/hive/trunk/service/lib/php/Thrift.php
    hadoop/hive/trunk/service/lib/php/autoload.php
    hadoop/hive/trunk/service/lib/php/ext/thrift_protocol/config.m4
    hadoop/hive/trunk/service/lib/php/ext/thrift_protocol/php_thrift_protocol.cpp
    hadoop/hive/trunk/service/lib/php/ext/thrift_protocol/php_thrift_protocol.h
    hadoop/hive/trunk/service/lib/php/protocol/TBinaryProtocol.php
    hadoop/hive/trunk/service/lib/php/protocol/TProtocol.php
    hadoop/hive/trunk/service/lib/php/transport/TBufferedTransport.php
    hadoop/hive/trunk/service/lib/php/transport/TFramedTransport.php
    hadoop/hive/trunk/service/lib/php/transport/THttpClient.php
    hadoop/hive/trunk/service/lib/php/transport/TMemoryBuffer.php
    hadoop/hive/trunk/service/lib/php/transport/TNullTransport.php
    hadoop/hive/trunk/service/lib/php/transport/TPhpStream.php
    hadoop/hive/trunk/service/lib/php/transport/TSocket.php
    hadoop/hive/trunk/service/lib/php/transport/TSocketPool.php
    hadoop/hive/trunk/service/lib/php/transport/TTransport.php
    hadoop/hive/trunk/service/lib/py/fb303/FacebookBase.py
    hadoop/hive/trunk/service/lib/py/fb303/FacebookService.py
    hadoop/hive/trunk/service/lib/py/fb303/ttypes.py
    hadoop/hive/trunk/service/lib/py/fb303_scripts/__init__.py
    hadoop/hive/trunk/service/lib/py/fb303_scripts/fb303_simple_mgmt.py
    hadoop/hive/trunk/service/lib/py/thrift/TSCons.py
    hadoop/hive/trunk/service/lib/py/thrift/Thrift.py
    hadoop/hive/trunk/service/lib/py/thrift/__init__.py
    hadoop/hive/trunk/service/lib/py/thrift/protocol/TBinaryProtocol.py
    hadoop/hive/trunk/service/lib/py/thrift/protocol/TProtocol.py
    hadoop/hive/trunk/service/lib/py/thrift/protocol/__init__.py
    hadoop/hive/trunk/service/lib/py/thrift/server/THttpServer.py
    hadoop/hive/trunk/service/lib/py/thrift/server/TNonblockingServer.py
    hadoop/hive/trunk/service/lib/py/thrift/server/TServer.py
    hadoop/hive/trunk/service/lib/py/thrift/server/__init__.py
    hadoop/hive/trunk/service/lib/py/thrift/transport/THttpClient.py
    hadoop/hive/trunk/service/lib/py/thrift/transport/TSocket.py
    hadoop/hive/trunk/service/lib/py/thrift/transport/TTransport.py
    hadoop/hive/trunk/service/lib/py/thrift/transport/TTwisted.py
    hadoop/hive/trunk/service/lib/py/thrift/transport/__init__.py
    hadoop/hive/trunk/service/src/gen-javabean/org/apache/hadoop/hive/service/ThriftHive.java
    hadoop/hive/trunk/service/src/gen-php/ThriftHive.php
    hadoop/hive/trunk/service/src/gen-php/hive_service_types.php
    hadoop/hive/trunk/service/src/gen-py/hive_service/ThriftHive-remote
    hadoop/hive/trunk/service/src/gen-py/hive_service/ThriftHive.py
    hadoop/hive/trunk/service/src/gen-py/hive_service/ttypes.py
    hadoop/hive/trunk/service/src/java/org/apache/hadoop/hive/service/HiveServer.java

Modified: hadoop/hive/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/CHANGES.txt?rev=805973&r1=805972&r2=805973&view=diff
==============================================================================
--- hadoop/hive/trunk/CHANGES.txt (original)
+++ hadoop/hive/trunk/CHANGES.txt Wed Aug 19 21:02:57 2009
@@ -18,6 +18,9 @@
     HIVE-699. Functions with variable length arguments
     (Zheng Shao via namit)
 
+    HIVE-713. Integrate operator counters into query plan to view progress of
+    queries. (Namit Jain and Raghu Murthy via zshao)
+
   IMPROVEMENTS
 
     HIVE-760. Add version info to META-INF/MANIFEST.MF.

Modified: hadoop/hive/trunk/build.xml
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/build.xml?rev=805973&r1=805972&r2=805973&view=diff
==============================================================================
--- hadoop/hive/trunk/build.xml (original)
+++ hadoop/hive/trunk/build.xml Wed Aug 19 21:02:57 2009
@@ -171,10 +171,24 @@
     <copy file="${hive.root}/bin/hive-config.sh" todir="${target.bin.dir}"/>
     <copy file="${basedir}/conf/hive-default.xml" todir="${target.conf.dir}"/>
     <copy file="${basedir}/conf/hive-log4j.properties" todir="${target.conf.dir}"/>
+    <!-- Create php thrift package -->
     <copy todir="${target.lib.dir}/php">
+     <fileset dir="${hive.root}/service/lib/php" excludes="**.svn"/>
+    </copy>
+    <copy todir="${target.lib.dir}/php/packages/serde">
       <fileset dir="${hive.root}/serde/src/gen-php" excludes="**/.svn"/>
+    </copy>
+    <copy todir="${target.lib.dir}/php/packages/hive_metastore">
       <fileset dir="${hive.root}/metastore/src/gen-php" excludes="**/.svn"/>
     </copy>
+    <copy todir="${target.lib.dir}/php/packages/hive_service">
+      <fileset dir="${hive.root}/service/src/gen-php" excludes="**/.svn"/>
+    </copy>
+    <copy todir="${target.lib.dir}/php/packages/queryplan">
+      <fileset dir="${hive.root}/ql/src/gen-php" excludes="**/.svn"/>
+    </copy>
+
+
     <!-- Create the python thrift package -->
     <copy todir="${target.lib.dir}/py">
       <fileset dir="${hive.root}/service/lib/py" excludes="**/.svn"/>
@@ -188,6 +202,11 @@
     <copy todir="${target.lib.dir}/py/hive_service">
       <fileset dir="${hive.root}/service/src/gen-py/hive_service" excludes="**/.svn"/>
     </copy>
+    <copy todir="${target.lib.dir}/py/queryplan">
+      <fileset dir="${hive.root}/ql/src/gen-py/queryplan" excludes="**/.svn"/>
+    </copy>
+
+    <!-- copy jar files -->
     <copy todir="${target.lib.dir}" preservelastmodified="true" flatten="true">
       <fileset dir="${hive.root}" includes="*/*.jar, */*/*.jar" excludes="**/antlr-2*,**/antlr-3*,**/TestSerDe.jar"/>
       <fileset file="${build.dir.hive}/cli/hive_cli.jar"/>

Added: hadoop/hive/trunk/data/files/sample-queryplan-in-history.txt
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/data/files/sample-queryplan-in-history.txt?rev=805973&view=auto
==============================================================================
--- hadoop/hive/trunk/data/files/sample-queryplan-in-history.txt (added)
+++ hadoop/hive/trunk/data/files/sample-queryplan-in-history.txt Wed Aug 19 21:02:57 2009
@@ -0,0 +1 @@
+Counters plan="{"queryId":"rmurthy_20090806105454","queryType":null,"queryAttributes":{"queryString":"select count(1) from nectar_fbalias_r where ds = '2009-08-03'"},"queryCounters":"null","stageGraph":{"nodeType":"1","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-1","stageType":"3","stageAttributes":"null","stageCounters":"null","taskList":[{"taskId":"Stage-1_map","taskType":"0","taskAttributes":"null","taskCounters":"null","operatorGraph":{"nodeType":"0","roots":"null","adjacencyList":[{"node":"TS_0","children":["FIL_8"],"adjacencyType":"0"},{"node":"FIL_8","children":["FIL_1"],"adjacencyType":"0"},{"node":"FIL_1","children":["SEL_2"],"adjacencyType":"0"},{"node":"SEL_2","children":["GBY_3"],"adjacencyType":"0"},{"node":"GBY_3","children":["RS_4"],"adjacencyType":"0"}]},"operatorList":[{"operatorId":"TS_0","operatorType":"9","operatorAttributes":"null","operatorCounters":{"CNTR_NAME_TS_0_TIME_TAKEN":"5048","CNTR_NAME_TS_0_NUM_INPUT_ROWS":"52482","CNTR_N
 AME_TS_0_NUM_OUTPUT_ROWS":"52482"}},{"operatorId":"FIL_8","operatorType":"3","operatorAttributes":"null","operatorCounters":{"CNTR_NAME_FIL_8_NUM_INPUT_ROWS":"52482","CNTR_NAME_FIL_8_NUM_OUTPUT_ROWS":"52482","CNTR_NAME_FIL_8_TIME_TAKEN":"4860"}},{"operatorId":"FIL_1","operatorType":"3","operatorAttributes":"null","operatorCounters":{"CNTR_NAME_FIL_1_TIME_TAKEN":"1368","CNTR_NAME_FIL_1_NUM_INPUT_ROWS":"52482","CNTR_NAME_FIL_1_NUM_OUTPUT_ROWS":"52482"}},{"operatorId":"SEL_2","operatorType":"8","operatorAttributes":"null","operatorCounters":{"CNTR_NAME_SEL_2_TIME_TAKEN":"604","CNTR_NAME_SEL_2_NUM_OUTPUT_ROWS":"52482","CNTR_NAME_SEL_2_NUM_INPUT_ROWS":"52482"}},{"operatorId":"GBY_3","operatorType":"5","operatorAttributes":"null","operatorCounters":{"CNTR_NAME_GBY_3_NUM_INPUT_ROWS":"52482","CNTR_NAME_GBY_3_TIME_TAKEN":"404","CNTR_NAME_GBY_3_NUM_OUTPUT_ROWS":"64"}},{"operatorId":"RS_4","operatorType":"11","operatorAttributes":"null","operatorCounters":{"CNTR_NAME_RS_4_NUM_INPUT_ROW
 S":"64","CNTR_NAME_RS_4_TIME_TAKEN":"119","CNTR_NAME_RS_4_NUM_OUTPUT_ROWS":"0"}}],"done":"false"},{"taskId":"Stage-1_reduce","taskType":"1","taskAttributes":"null","taskCounters":"null","operatorGraph":{"nodeType":"0","roots":"null","adjacencyList":[{"node":"GBY_5","children":["SEL_6"],"adjacencyType":"0"},{"node":"SEL_6","children":["FS_7"],"adjacencyType":"0"}]},"operatorList":[{"operatorId":"GBY_5","operatorType":"5","operatorAttributes":"null","operatorCounters":"null"},{"operatorId":"SEL_6","operatorType":"8","operatorAttributes":"null","operatorCounters":"null"},{"operatorId":"FS_7","operatorType":"10","operatorAttributes":"null","operatorCounters":"null"}],"done":"false"}],"done":"false"}],"done":"false"}" TIME="1249581360419"

Added: hadoop/hive/trunk/data/files/sample-queryplan.txt
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/data/files/sample-queryplan.txt?rev=805973&view=auto
==============================================================================
--- hadoop/hive/trunk/data/files/sample-queryplan.txt (added)
+++ hadoop/hive/trunk/data/files/sample-queryplan.txt Wed Aug 19 21:02:57 2009
@@ -0,0 +1 @@
+{"queryId":"rmurthy_20090806105454","queryType":null,"queryAttributes":{"queryString":"select count(1) from nectar_fbalias_r where ds = '2009-08-03'"},"queryCounters":"null","stageGraph":{"nodeType":"1","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-1","stageType":"3","stageAttributes":"null","stageCounters":"null","taskList":[{"taskId":"Stage-1_map","taskType":"0","taskAttributes":"null","taskCounters":"null","operatorGraph":{"nodeType":"0","roots":"null","adjacencyList":[{"node":"TS_0","children":["FIL_8"],"adjacencyType":"0"},{"node":"FIL_8","children":["FIL_1"],"adjacencyType":"0"},{"node":"FIL_1","children":["SEL_2"],"adjacencyType":"0"},{"node":"SEL_2","children":["GBY_3"],"adjacencyType":"0"},{"node":"GBY_3","children":["RS_4"],"adjacencyType":"0"}]},"operatorList":[{"operatorId":"TS_0","operatorType":"9","operatorAttributes":"null","operatorCounters":{"CNTR_NAME_TS_0_TIME_TAKEN":"4420","CNTR_NAME_TS_0_NUM_INPUT_ROWS":"47303","CNTR_NAME_TS_0_NUM_OU
 TPUT_ROWS":"47303"}},{"operatorId":"FIL_8","operatorType":"3","operatorAttributes":"null","operatorCounters":{"CNTR_NAME_FIL_8_NUM_INPUT_ROWS":"47303","CNTR_NAME_FIL_8_NUM_OUTPUT_ROWS":"47303","CNTR_NAME_FIL_8_TIME_TAKEN":"4251"}},{"operatorId":"FIL_1","operatorType":"3","operatorAttributes":"null","operatorCounters":{"CNTR_NAME_FIL_1_TIME_TAKEN":"1249","CNTR_NAME_FIL_1_NUM_INPUT_ROWS":"47303","CNTR_NAME_FIL_1_NUM_OUTPUT_ROWS":"47303"}},{"operatorId":"SEL_2","operatorType":"8","operatorAttributes":"null","operatorCounters":{"CNTR_NAME_SEL_2_TIME_TAKEN":"550","CNTR_NAME_SEL_2_NUM_OUTPUT_ROWS":"47303","CNTR_NAME_SEL_2_NUM_INPUT_ROWS":"47303"}},{"operatorId":"GBY_3","operatorType":"5","operatorAttributes":"null","operatorCounters":{"CNTR_NAME_GBY_3_NUM_INPUT_ROWS":"47303","CNTR_NAME_GBY_3_TIME_TAKEN":"368","CNTR_NAME_GBY_3_NUM_OUTPUT_ROWS":"57"}},{"operatorId":"RS_4","operatorType":"11","operatorAttributes":"null","operatorCounters":{"CNTR_NAME_RS_4_NUM_INPUT_ROWS":"57","CNTR_N
 AME_RS_4_TIME_TAKEN":"105","CNTR_NAME_RS_4_NUM_OUTPUT_ROWS":"0"}}],"done":"false"},{"taskId":"Stage-1_reduce","taskType":"1","taskAttributes":"null","taskCounters":"null","operatorGraph":{"nodeType":"0","roots":"null","adjacencyList":[{"node":"GBY_5","children":["SEL_6"],"adjacencyType":"0"},{"node":"SEL_6","children":["FS_7"],"adjacencyType":"0"}]},"operatorList":[{"operatorId":"GBY_5","operatorType":"5","operatorAttributes":"null","operatorCounters":"null"},{"operatorId":"SEL_6","operatorType":"8","operatorAttributes":"null","operatorCounters":"null"},{"operatorId":"FS_7","operatorType":"10","operatorAttributes":"null","operatorCounters":"null"}],"done":"false"}],"done":"false"}],"done":"false"}

Modified: hadoop/hive/trunk/eclipse-templates/.classpath
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/eclipse-templates/.classpath?rev=805973&r1=805972&r2=805973&view=diff
==============================================================================
--- hadoop/hive/trunk/eclipse-templates/.classpath (original)
+++ hadoop/hive/trunk/eclipse-templates/.classpath Wed Aug 19 21:02:57 2009
@@ -34,6 +34,7 @@
 	<classpathentry kind="src" path="metastore/src/java"/>
 	<classpathentry kind="src" path="metastore/src/model"/>
 	<classpathentry kind="src" path="metastore/src/test"/>
+	<classpathentry kind="src" path="ql/src/gen-javabean"/>
 	<classpathentry kind="src" path="ql/src/java"/>
 	<classpathentry kind="src" path="ql/src/test"/>
 	<classpathentry kind="src" path="serde/src/gen-java"/>

Modified: hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Index.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Index.java?rev=805973&r1=805972&r2=805973&view=diff
==============================================================================
--- hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Index.java (original)
+++ hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Index.java Wed Aug 19 21:02:57 2009
@@ -25,7 +25,6 @@
   private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)3);
   private static final TField DB_NAME_FIELD_DESC = new TField("dbName", TType.STRING, (short)4);
   private static final TField COL_NAMES_FIELD_DESC = new TField("colNames", TType.LIST, (short)5);
-  private static final TField PART_NAME_FIELD_DESC = new TField("partName", TType.STRING, (short)6);
 
   private String indexName;
   public static final int INDEXNAME = 1;
@@ -37,8 +36,6 @@
   public static final int DBNAME = 4;
   private List<String> colNames;
   public static final int COLNAMES = 5;
-  private String partName;
-  public static final int PARTNAME = 6;
 
   private final Isset __isset = new Isset();
   private static final class Isset implements java.io.Serializable {
@@ -57,8 +54,6 @@
     put(COLNAMES, new FieldMetaData("colNames", TFieldRequirementType.DEFAULT, 
         new ListMetaData(TType.LIST, 
             new FieldValueMetaData(TType.STRING))));
-    put(PARTNAME, new FieldMetaData("partName", TFieldRequirementType.DEFAULT, 
-        new FieldValueMetaData(TType.STRING)));
   }});
 
   static {
@@ -73,8 +68,7 @@
     int indexType,
     String tableName,
     String dbName,
-    List<String> colNames,
-    String partName)
+    List<String> colNames)
   {
     this();
     this.indexName = indexName;
@@ -83,7 +77,6 @@
     this.tableName = tableName;
     this.dbName = dbName;
     this.colNames = colNames;
-    this.partName = partName;
   }
 
   /**
@@ -108,9 +101,6 @@
       }
       this.colNames = __this__colNames;
     }
-    if (other.isSetPartName()) {
-      this.partName = other.partName;
-    }
   }
 
   @Override
@@ -219,23 +209,6 @@
     return this.colNames != null;
   }
 
-  public String getPartName() {
-    return this.partName;
-  }
-
-  public void setPartName(String partName) {
-    this.partName = partName;
-  }
-
-  public void unsetPartName() {
-    this.partName = null;
-  }
-
-  // Returns true if field partName is set (has been asigned a value) and false otherwise
-  public boolean isSetPartName() {
-    return this.partName != null;
-  }
-
   public void setFieldValue(int fieldID, Object value) {
     switch (fieldID) {
     case INDEXNAME:
@@ -278,14 +251,6 @@
       }
       break;
 
-    case PARTNAME:
-      if (value == null) {
-        unsetPartName();
-      } else {
-        setPartName((String)value);
-      }
-      break;
-
     default:
       throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
     }
@@ -308,9 +273,6 @@
     case COLNAMES:
       return getColNames();
 
-    case PARTNAME:
-      return getPartName();
-
     default:
       throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
     }
@@ -329,8 +291,6 @@
       return isSetDbName();
     case COLNAMES:
       return isSetColNames();
-    case PARTNAME:
-      return isSetPartName();
     default:
       throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
     }
@@ -394,15 +354,6 @@
         return false;
     }
 
-    boolean this_present_partName = true && this.isSetPartName();
-    boolean that_present_partName = true && that.isSetPartName();
-    if (this_present_partName || that_present_partName) {
-      if (!(this_present_partName && that_present_partName))
-        return false;
-      if (!this.partName.equals(that.partName))
-        return false;
-    }
-
     return true;
   }
 
@@ -468,13 +419,6 @@
             TProtocolUtil.skip(iprot, field.type);
           }
           break;
-        case PARTNAME:
-          if (field.type == TType.STRING) {
-            this.partName = iprot.readString();
-          } else { 
-            TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
         default:
           TProtocolUtil.skip(iprot, field.type);
           break;
@@ -519,11 +463,6 @@
       }
       oprot.writeFieldEnd();
     }
-    if (this.partName != null) {
-      oprot.writeFieldBegin(PART_NAME_FIELD_DESC);
-      oprot.writeString(this.partName);
-      oprot.writeFieldEnd();
-    }
     oprot.writeFieldStop();
     oprot.writeStructEnd();
   }
@@ -568,14 +507,6 @@
       sb.append(this.colNames);
     }
     first = false;
-    if (!first) sb.append(", ");
-    sb.append("partName:");
-    if (this.partName == null) {
-      sb.append("null");
-    } else {
-      sb.append(this.partName);
-    }
-    first = false;
     sb.append(")");
     return sb.toString();
   }

Modified: hadoop/hive/trunk/metastore/src/gen-py/hive_metastore/ttypes.py
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/metastore/src/gen-py/hive_metastore/ttypes.py?rev=805973&r1=805972&r2=805973&view=diff
==============================================================================
--- hadoop/hive/trunk/metastore/src/gen-py/hive_metastore/ttypes.py (original)
+++ hadoop/hive/trunk/metastore/src/gen-py/hive_metastore/ttypes.py Wed Aug 19 21:02:57 2009
@@ -1019,7 +1019,6 @@
    - tableName
    - dbName
    - colNames
-   - partName
   """
 
   thrift_spec = (
@@ -1029,16 +1028,14 @@
     (3, TType.STRING, 'tableName', None, None, ), # 3
     (4, TType.STRING, 'dbName', None, None, ), # 4
     (5, TType.LIST, 'colNames', (TType.STRING,None), None, ), # 5
-    (6, TType.STRING, 'partName', None, None, ), # 6
   )
 
-  def __init__(self, indexName=None, indexType=None, tableName=None, dbName=None, colNames=None, partName=None,):
+  def __init__(self, indexName=None, indexType=None, tableName=None, dbName=None, colNames=None,):
     self.indexName = indexName
     self.indexType = indexType
     self.tableName = tableName
     self.dbName = dbName
     self.colNames = colNames
-    self.partName = partName
 
   def read(self, iprot):
     if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
@@ -1079,11 +1076,6 @@
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
-      elif fid == 6:
-        if ftype == TType.STRING:
-          self.partName = iprot.readString();
-        else:
-          iprot.skip(ftype)
       else:
         iprot.skip(ftype)
       iprot.readFieldEnd()
@@ -1117,10 +1109,6 @@
         oprot.writeString(iter84)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
-    if self.partName != None:
-      oprot.writeFieldBegin('partName', TType.STRING, 6)
-      oprot.writeString(self.partName)
-      oprot.writeFieldEnd()
     oprot.writeFieldStop()
     oprot.writeStructEnd()
 

Modified: hadoop/hive/trunk/ql/build.xml
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/build.xml?rev=805973&r1=805972&r2=805973&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/build.xml (original)
+++ hadoop/hive/trunk/ql/build.xml Wed Aug 19 21:02:57 2009
@@ -28,6 +28,7 @@
 
   <property name="ql.test.query.clientpositive.dir" location="${ql.test.query.dir}/clientpositive"/>
   <property name="ql.test.results.clientpositive.dir" location="${ql.test.results.dir}/clientpositive"/>
+  <property name="thrift.args" value="--gen java:beans --gen php --gen py -I ${basedir}/include -I ${basedir}/.. -o ${basedir}/src"/>
 
   <import file="../build-common.xml"/>
 
@@ -50,6 +51,12 @@
     <path refid="classpath"/>
   </path>
 
+  <target name="thriftif">
+    <echo>Executing thrift (which needs to be in your path) on if/queryplan.thrift</echo>
+    <exec executable="thrift"  failonerror="true" dir=".">
+      <arg line="${thrift.args} if/queryplan.thrift " />
+    </exec>
+  </target>
 
   <target name="gen-test" depends="deploy-ant-tasks, test-conditions, test-init" >
     <taskdef name="qtestgen" classname="org.apache.hadoop.hive.ant.QTestGenTask"
@@ -112,7 +119,7 @@
     <echo message="Compiling: ${name}"/>
     <javac
      encoding="${build.encoding}"
-     srcdir="${src.dir}:${build.dir}/gen-java"
+     srcdir="${src.dir}:${basedir}/src/gen-javabean:${build.dir}/gen-java"
      includes="**/*.java"
      destdir="${build.classes}"
      debug="${javac.debug}"

Added: hadoop/hive/trunk/ql/if/queryplan.thrift
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/if/queryplan.thrift?rev=805973&view=auto
==============================================================================
--- hadoop/hive/trunk/ql/if/queryplan.thrift (added)
+++ hadoop/hive/trunk/ql/if/queryplan.thrift Wed Aug 19 21:02:57 2009
@@ -0,0 +1,76 @@
+namespace java org.apache.hadoop.hive.ql.plan.api
+namespace cpp Hive
+
+enum AdjacencyType { CONJUNCTIVE, DISJUNCTIVE }
+struct Adjacency {
+1: string node,
+2: list<string> children,
+3: AdjacencyType adjacencyType,
+}
+
+enum NodeType { OPERATOR, STAGE }
+struct Graph {
+1: NodeType nodeType,
+2: list<string> roots,
+3: list<Adjacency> adjacencyList,
+}
+
+#Represents a operator along with its counters
+enum OperatorType { JOIN, MAPJOIN, EXTRACT, FILTER, FORWARD, GROUPBY, LIMIT, SCRIPT, SELECT, TABLESCAN, FILESINK, REDUCESINK, UNION }
+struct Operator {
+1: string operatorId,
+2: OperatorType operatorType,
+3: map<string, string> operatorAttributes,
+4: map<string, i64> operatorCounters,
+5: bool done,
+6: bool started,
+}
+
+# Represents whether it is a map-reduce job or not. In future, different tasks can add their dependencies
+# The operator graph shows the operator tree
+enum TaskType { MAP, REDUCE, OTHER }
+struct Task {
+1: string taskId,
+2: TaskType taskType
+3: map<string, string> taskAttributes,
+4: map<string, i64> taskCounters,
+5: optional Graph operatorGraph,
+6: optional list<Operator> operatorList,
+7: bool done,
+8: bool started,
+}
+
+# Represents a Stage - unfortunately, it is represented as Task in ql/exec
+enum StageType { CONDITIONAL, COPY, DDL, MAPRED, EXPLAIN, FETCH, FUNC, MAPREDLOCAL, MOVE }
+
+struct Stage {
+1: string stageId,
+2: StageType stageType,
+3: map<string, string> stageAttributes,
+4: map<string, i64> stageCounters,
+5: list<Task> taskList,
+6: bool done,
+7: bool started,
+}
+
+# Represents a query - 
+# The graph maintains the stage dependency.In case of conditional tasks, it is represented as if only
+# one of the dependencies need to be executed
+struct Query {
+1: string queryId,
+2: string queryType,
+3: map<string, string> queryAttributes,
+4: map<string, i64> queryCounters,
+5: Graph stageGraph,
+6: list<Stage> stageList,
+7: bool done,
+8: bool started,
+}
+
+# List of all queries - each query maintains if it is done or started
+# This can be used to track all the queries in the session
+struct QueryPlan {
+1: list<Query> queries,
+2: bool done,
+3: bool started,
+}

Added: hadoop/hive/trunk/ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Adjacency.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Adjacency.java?rev=805973&view=auto
==============================================================================
--- hadoop/hive/trunk/ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Adjacency.java (added)
+++ hadoop/hive/trunk/ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Adjacency.java Wed Aug 19 21:02:57 2009
@@ -0,0 +1,393 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+package org.apache.hadoop.hive.ql.plan.api;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Collections;
+import org.apache.log4j.Logger;
+
+import org.apache.thrift.*;
+import org.apache.thrift.meta_data.*;
+import org.apache.thrift.protocol.*;
+
+public class Adjacency implements TBase, java.io.Serializable, Cloneable {
+  private static final TStruct STRUCT_DESC = new TStruct("Adjacency");
+  private static final TField NODE_FIELD_DESC = new TField("node", TType.STRING, (short)1);
+  private static final TField CHILDREN_FIELD_DESC = new TField("children", TType.LIST, (short)2);
+  private static final TField ADJACENCY_TYPE_FIELD_DESC = new TField("adjacencyType", TType.I32, (short)3);
+
+  private String node;
+  public static final int NODE = 1;
+  private List<String> children;
+  public static final int CHILDREN = 2;
+  private int adjacencyType;
+  public static final int ADJACENCYTYPE = 3;
+
+  private final Isset __isset = new Isset();
+  private static final class Isset implements java.io.Serializable {
+    public boolean adjacencyType = false;
+  }
+
+  public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
+    put(NODE, new FieldMetaData("node", TFieldRequirementType.DEFAULT, 
+        new FieldValueMetaData(TType.STRING)));
+    put(CHILDREN, new FieldMetaData("children", TFieldRequirementType.DEFAULT, 
+        new ListMetaData(TType.LIST, 
+            new FieldValueMetaData(TType.STRING))));
+    put(ADJACENCYTYPE, new FieldMetaData("adjacencyType", TFieldRequirementType.DEFAULT, 
+        new FieldValueMetaData(TType.I32)));
+  }});
+
+  static {
+    FieldMetaData.addStructMetaDataMap(Adjacency.class, metaDataMap);
+  }
+
+  public Adjacency() {
+  }
+
+  public Adjacency(
+    String node,
+    List<String> children,
+    int adjacencyType)
+  {
+    this();
+    this.node = node;
+    this.children = children;
+    this.adjacencyType = adjacencyType;
+    this.__isset.adjacencyType = true;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public Adjacency(Adjacency other) {
+    if (other.isSetNode()) {
+      this.node = other.node;
+    }
+    if (other.isSetChildren()) {
+      List<String> __this__children = new ArrayList<String>();
+      for (String other_element : other.children) {
+        __this__children.add(other_element);
+      }
+      this.children = __this__children;
+    }
+    __isset.adjacencyType = other.__isset.adjacencyType;
+    this.adjacencyType = other.adjacencyType;
+  }
+
+  @Override
+  public Adjacency clone() {
+    return new Adjacency(this);
+  }
+
+  public String getNode() {
+    return this.node;
+  }
+
+  public void setNode(String node) {
+    this.node = node;
+  }
+
+  public void unsetNode() {
+    this.node = null;
+  }
+
+  // Returns true if field node is set (has been asigned a value) and false otherwise
+  public boolean isSetNode() {
+    return this.node != null;
+  }
+
+  public int getChildrenSize() {
+    return (this.children == null) ? 0 : this.children.size();
+  }
+
+  public java.util.Iterator<String> getChildrenIterator() {
+    return (this.children == null) ? null : this.children.iterator();
+  }
+
+  public void addToChildren(String elem) {
+    if (this.children == null) {
+      this.children = new ArrayList<String>();
+    }
+    this.children.add(elem);
+  }
+
+  public List<String> getChildren() {
+    return this.children;
+  }
+
+  public void setChildren(List<String> children) {
+    this.children = children;
+  }
+
+  public void unsetChildren() {
+    this.children = null;
+  }
+
+  // Returns true if field children is set (has been asigned a value) and false otherwise
+  public boolean isSetChildren() {
+    return this.children != null;
+  }
+
+  public int getAdjacencyType() {
+    return this.adjacencyType;
+  }
+
+  public void setAdjacencyType(int adjacencyType) {
+    this.adjacencyType = adjacencyType;
+    this.__isset.adjacencyType = true;
+  }
+
+  public void unsetAdjacencyType() {
+    this.__isset.adjacencyType = false;
+  }
+
+  // Returns true if field adjacencyType is set (has been asigned a value) and false otherwise
+  public boolean isSetAdjacencyType() {
+    return this.__isset.adjacencyType;
+  }
+
+  public void setFieldValue(int fieldID, Object value) {
+    switch (fieldID) {
+    case NODE:
+      if (value == null) {
+        unsetNode();
+      } else {
+        setNode((String)value);
+      }
+      break;
+
+    case CHILDREN:
+      if (value == null) {
+        unsetChildren();
+      } else {
+        setChildren((List<String>)value);
+      }
+      break;
+
+    case ADJACENCYTYPE:
+      if (value == null) {
+        unsetAdjacencyType();
+      } else {
+        setAdjacencyType((Integer)value);
+      }
+      break;
+
+    default:
+      throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+    }
+  }
+
+  public Object getFieldValue(int fieldID) {
+    switch (fieldID) {
+    case NODE:
+      return getNode();
+
+    case CHILDREN:
+      return getChildren();
+
+    case ADJACENCYTYPE:
+      return getAdjacencyType();
+
+    default:
+      throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+    }
+  }
+
+  // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
+  public boolean isSet(int fieldID) {
+    switch (fieldID) {
+    case NODE:
+      return isSetNode();
+    case CHILDREN:
+      return isSetChildren();
+    case ADJACENCYTYPE:
+      return isSetAdjacencyType();
+    default:
+      throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+    }
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof Adjacency)
+      return this.equals((Adjacency)that);
+    return false;
+  }
+
+  public boolean equals(Adjacency that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_node = true && this.isSetNode();
+    boolean that_present_node = true && that.isSetNode();
+    if (this_present_node || that_present_node) {
+      if (!(this_present_node && that_present_node))
+        return false;
+      if (!this.node.equals(that.node))
+        return false;
+    }
+
+    boolean this_present_children = true && this.isSetChildren();
+    boolean that_present_children = true && that.isSetChildren();
+    if (this_present_children || that_present_children) {
+      if (!(this_present_children && that_present_children))
+        return false;
+      if (!this.children.equals(that.children))
+        return false;
+    }
+
+    boolean this_present_adjacencyType = true;
+    boolean that_present_adjacencyType = true;
+    if (this_present_adjacencyType || that_present_adjacencyType) {
+      if (!(this_present_adjacencyType && that_present_adjacencyType))
+        return false;
+      if (this.adjacencyType != that.adjacencyType)
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    return 0;
+  }
+
+  public void read(TProtocol iprot) throws TException {
+    TField field;
+    iprot.readStructBegin();
+    while (true)
+    {
+      field = iprot.readFieldBegin();
+      if (field.type == TType.STOP) { 
+        break;
+      }
+      switch (field.id)
+      {
+        case NODE:
+          if (field.type == TType.STRING) {
+            this.node = iprot.readString();
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case CHILDREN:
+          if (field.type == TType.LIST) {
+            {
+              TList _list0 = iprot.readListBegin();
+              this.children = new ArrayList<String>(_list0.size);
+              for (int _i1 = 0; _i1 < _list0.size; ++_i1)
+              {
+                String _elem2;
+                _elem2 = iprot.readString();
+                this.children.add(_elem2);
+              }
+              iprot.readListEnd();
+            }
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case ADJACENCYTYPE:
+          if (field.type == TType.I32) {
+            this.adjacencyType = iprot.readI32();
+            this.__isset.adjacencyType = true;
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        default:
+          TProtocolUtil.skip(iprot, field.type);
+          break;
+      }
+      iprot.readFieldEnd();
+    }
+    iprot.readStructEnd();
+
+    validate();
+  }
+
+  public void write(TProtocol oprot) throws TException {
+    validate();
+
+    oprot.writeStructBegin(STRUCT_DESC);
+    if (this.node != null) {
+      oprot.writeFieldBegin(NODE_FIELD_DESC);
+      oprot.writeString(this.node);
+      oprot.writeFieldEnd();
+    }
+    if (this.children != null) {
+      oprot.writeFieldBegin(CHILDREN_FIELD_DESC);
+      {
+        oprot.writeListBegin(new TList(TType.STRING, this.children.size()));
+        for (String _iter3 : this.children)        {
+          oprot.writeString(_iter3);
+        }
+        oprot.writeListEnd();
+      }
+      oprot.writeFieldEnd();
+    }
+    oprot.writeFieldBegin(ADJACENCY_TYPE_FIELD_DESC);
+    oprot.writeI32(this.adjacencyType);
+    oprot.writeFieldEnd();
+    oprot.writeFieldStop();
+    oprot.writeStructEnd();
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("Adjacency(");
+    boolean first = true;
+
+    sb.append("node:");
+    if (this.node == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.node);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("children:");
+    if (this.children == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.children);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("adjacencyType:");
+    String adjacencyType_name = AdjacencyType.VALUES_TO_NAMES.get(this.adjacencyType);
+    if (adjacencyType_name != null) {
+      sb.append(adjacencyType_name);
+      sb.append(" (");
+    }
+    sb.append(this.adjacencyType);
+    if (adjacencyType_name != null) {
+      sb.append(")");
+    }
+    first = false;
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws TException {
+    // check for required fields
+    // check that fields of type enum have valid values
+    if (isSetAdjacencyType() && !AdjacencyType.VALID_VALUES.contains(adjacencyType)){
+      throw new TProtocolException("The field 'adjacencyType' has been assigned the invalid value " + adjacencyType);
+    }
+  }
+
+}
+

Added: hadoop/hive/trunk/ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/AdjacencyType.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/AdjacencyType.java?rev=805973&view=auto
==============================================================================
--- hadoop/hive/trunk/ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/AdjacencyType.java (added)
+++ hadoop/hive/trunk/ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/AdjacencyType.java Wed Aug 19 21:02:57 2009
@@ -0,0 +1,28 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+package org.apache.hadoop.hive.ql.plan.api;
+
+
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Collections;
+import org.apache.thrift.IntRangeSet;
+import java.util.Map;
+import java.util.HashMap;
+
+public class AdjacencyType {
+  public static final int CONJUNCTIVE = 0;
+  public static final int DISJUNCTIVE = 1;
+
+  public static final IntRangeSet VALID_VALUES = new IntRangeSet(
+    CONJUNCTIVE, 
+    DISJUNCTIVE );
+
+  public static final Map<Integer, String> VALUES_TO_NAMES = new HashMap<Integer, String>() {{
+    put(CONJUNCTIVE, "CONJUNCTIVE");
+    put(DISJUNCTIVE, "DISJUNCTIVE");
+  }};
+}

Added: hadoop/hive/trunk/ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Graph.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Graph.java?rev=805973&view=auto
==============================================================================
--- hadoop/hive/trunk/ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Graph.java (added)
+++ hadoop/hive/trunk/ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Graph.java Wed Aug 19 21:02:57 2009
@@ -0,0 +1,430 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+package org.apache.hadoop.hive.ql.plan.api;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Collections;
+import org.apache.log4j.Logger;
+
+import org.apache.thrift.*;
+import org.apache.thrift.meta_data.*;
+import org.apache.thrift.protocol.*;
+
+public class Graph implements TBase, java.io.Serializable, Cloneable {
+  private static final TStruct STRUCT_DESC = new TStruct("Graph");
+  private static final TField NODE_TYPE_FIELD_DESC = new TField("nodeType", TType.I32, (short)1);
+  private static final TField ROOTS_FIELD_DESC = new TField("roots", TType.LIST, (short)2);
+  private static final TField ADJACENCY_LIST_FIELD_DESC = new TField("adjacencyList", TType.LIST, (short)3);
+
+  private int nodeType;
+  public static final int NODETYPE = 1;
+  private List<String> roots;
+  public static final int ROOTS = 2;
+  private List<Adjacency> adjacencyList;
+  public static final int ADJACENCYLIST = 3;
+
+  private final Isset __isset = new Isset();
+  private static final class Isset implements java.io.Serializable {
+    public boolean nodeType = false;
+  }
+
+  public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
+    put(NODETYPE, new FieldMetaData("nodeType", TFieldRequirementType.DEFAULT, 
+        new FieldValueMetaData(TType.I32)));
+    put(ROOTS, new FieldMetaData("roots", TFieldRequirementType.DEFAULT, 
+        new ListMetaData(TType.LIST, 
+            new FieldValueMetaData(TType.STRING))));
+    put(ADJACENCYLIST, new FieldMetaData("adjacencyList", TFieldRequirementType.DEFAULT, 
+        new ListMetaData(TType.LIST, 
+            new StructMetaData(TType.STRUCT, Adjacency.class))));
+  }});
+
+  static {
+    FieldMetaData.addStructMetaDataMap(Graph.class, metaDataMap);
+  }
+
+  public Graph() {
+  }
+
+  public Graph(
+    int nodeType,
+    List<String> roots,
+    List<Adjacency> adjacencyList)
+  {
+    this();
+    this.nodeType = nodeType;
+    this.__isset.nodeType = true;
+    this.roots = roots;
+    this.adjacencyList = adjacencyList;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public Graph(Graph other) {
+    __isset.nodeType = other.__isset.nodeType;
+    this.nodeType = other.nodeType;
+    if (other.isSetRoots()) {
+      List<String> __this__roots = new ArrayList<String>();
+      for (String other_element : other.roots) {
+        __this__roots.add(other_element);
+      }
+      this.roots = __this__roots;
+    }
+    if (other.isSetAdjacencyList()) {
+      List<Adjacency> __this__adjacencyList = new ArrayList<Adjacency>();
+      for (Adjacency other_element : other.adjacencyList) {
+        __this__adjacencyList.add(new Adjacency(other_element));
+      }
+      this.adjacencyList = __this__adjacencyList;
+    }
+  }
+
+  @Override
+  public Graph clone() {
+    return new Graph(this);
+  }
+
+  public int getNodeType() {
+    return this.nodeType;
+  }
+
+  public void setNodeType(int nodeType) {
+    this.nodeType = nodeType;
+    this.__isset.nodeType = true;
+  }
+
+  public void unsetNodeType() {
+    this.__isset.nodeType = false;
+  }
+
+  // Returns true if field nodeType is set (has been asigned a value) and false otherwise
+  public boolean isSetNodeType() {
+    return this.__isset.nodeType;
+  }
+
+  public int getRootsSize() {
+    return (this.roots == null) ? 0 : this.roots.size();
+  }
+
+  public java.util.Iterator<String> getRootsIterator() {
+    return (this.roots == null) ? null : this.roots.iterator();
+  }
+
+  public void addToRoots(String elem) {
+    if (this.roots == null) {
+      this.roots = new ArrayList<String>();
+    }
+    this.roots.add(elem);
+  }
+
+  public List<String> getRoots() {
+    return this.roots;
+  }
+
+  public void setRoots(List<String> roots) {
+    this.roots = roots;
+  }
+
+  public void unsetRoots() {
+    this.roots = null;
+  }
+
+  // Returns true if field roots is set (has been asigned a value) and false otherwise
+  public boolean isSetRoots() {
+    return this.roots != null;
+  }
+
+  public int getAdjacencyListSize() {
+    return (this.adjacencyList == null) ? 0 : this.adjacencyList.size();
+  }
+
+  public java.util.Iterator<Adjacency> getAdjacencyListIterator() {
+    return (this.adjacencyList == null) ? null : this.adjacencyList.iterator();
+  }
+
+  public void addToAdjacencyList(Adjacency elem) {
+    if (this.adjacencyList == null) {
+      this.adjacencyList = new ArrayList<Adjacency>();
+    }
+    this.adjacencyList.add(elem);
+  }
+
+  public List<Adjacency> getAdjacencyList() {
+    return this.adjacencyList;
+  }
+
+  public void setAdjacencyList(List<Adjacency> adjacencyList) {
+    this.adjacencyList = adjacencyList;
+  }
+
+  public void unsetAdjacencyList() {
+    this.adjacencyList = null;
+  }
+
+  // Returns true if field adjacencyList is set (has been asigned a value) and false otherwise
+  public boolean isSetAdjacencyList() {
+    return this.adjacencyList != null;
+  }
+
+  public void setFieldValue(int fieldID, Object value) {
+    switch (fieldID) {
+    case NODETYPE:
+      if (value == null) {
+        unsetNodeType();
+      } else {
+        setNodeType((Integer)value);
+      }
+      break;
+
+    case ROOTS:
+      if (value == null) {
+        unsetRoots();
+      } else {
+        setRoots((List<String>)value);
+      }
+      break;
+
+    case ADJACENCYLIST:
+      if (value == null) {
+        unsetAdjacencyList();
+      } else {
+        setAdjacencyList((List<Adjacency>)value);
+      }
+      break;
+
+    default:
+      throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+    }
+  }
+
+  public Object getFieldValue(int fieldID) {
+    switch (fieldID) {
+    case NODETYPE:
+      return getNodeType();
+
+    case ROOTS:
+      return getRoots();
+
+    case ADJACENCYLIST:
+      return getAdjacencyList();
+
+    default:
+      throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+    }
+  }
+
+  // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
+  public boolean isSet(int fieldID) {
+    switch (fieldID) {
+    case NODETYPE:
+      return isSetNodeType();
+    case ROOTS:
+      return isSetRoots();
+    case ADJACENCYLIST:
+      return isSetAdjacencyList();
+    default:
+      throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+    }
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof Graph)
+      return this.equals((Graph)that);
+    return false;
+  }
+
+  public boolean equals(Graph that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_nodeType = true;
+    boolean that_present_nodeType = true;
+    if (this_present_nodeType || that_present_nodeType) {
+      if (!(this_present_nodeType && that_present_nodeType))
+        return false;
+      if (this.nodeType != that.nodeType)
+        return false;
+    }
+
+    boolean this_present_roots = true && this.isSetRoots();
+    boolean that_present_roots = true && that.isSetRoots();
+    if (this_present_roots || that_present_roots) {
+      if (!(this_present_roots && that_present_roots))
+        return false;
+      if (!this.roots.equals(that.roots))
+        return false;
+    }
+
+    boolean this_present_adjacencyList = true && this.isSetAdjacencyList();
+    boolean that_present_adjacencyList = true && that.isSetAdjacencyList();
+    if (this_present_adjacencyList || that_present_adjacencyList) {
+      if (!(this_present_adjacencyList && that_present_adjacencyList))
+        return false;
+      if (!this.adjacencyList.equals(that.adjacencyList))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    return 0;
+  }
+
+  public void read(TProtocol iprot) throws TException {
+    TField field;
+    iprot.readStructBegin();
+    while (true)
+    {
+      field = iprot.readFieldBegin();
+      if (field.type == TType.STOP) { 
+        break;
+      }
+      switch (field.id)
+      {
+        case NODETYPE:
+          if (field.type == TType.I32) {
+            this.nodeType = iprot.readI32();
+            this.__isset.nodeType = true;
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case ROOTS:
+          if (field.type == TType.LIST) {
+            {
+              TList _list4 = iprot.readListBegin();
+              this.roots = new ArrayList<String>(_list4.size);
+              for (int _i5 = 0; _i5 < _list4.size; ++_i5)
+              {
+                String _elem6;
+                _elem6 = iprot.readString();
+                this.roots.add(_elem6);
+              }
+              iprot.readListEnd();
+            }
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case ADJACENCYLIST:
+          if (field.type == TType.LIST) {
+            {
+              TList _list7 = iprot.readListBegin();
+              this.adjacencyList = new ArrayList<Adjacency>(_list7.size);
+              for (int _i8 = 0; _i8 < _list7.size; ++_i8)
+              {
+                Adjacency _elem9;
+                _elem9 = new Adjacency();
+                _elem9.read(iprot);
+                this.adjacencyList.add(_elem9);
+              }
+              iprot.readListEnd();
+            }
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        default:
+          TProtocolUtil.skip(iprot, field.type);
+          break;
+      }
+      iprot.readFieldEnd();
+    }
+    iprot.readStructEnd();
+
+    validate();
+  }
+
+  public void write(TProtocol oprot) throws TException {
+    validate();
+
+    oprot.writeStructBegin(STRUCT_DESC);
+    oprot.writeFieldBegin(NODE_TYPE_FIELD_DESC);
+    oprot.writeI32(this.nodeType);
+    oprot.writeFieldEnd();
+    if (this.roots != null) {
+      oprot.writeFieldBegin(ROOTS_FIELD_DESC);
+      {
+        oprot.writeListBegin(new TList(TType.STRING, this.roots.size()));
+        for (String _iter10 : this.roots)        {
+          oprot.writeString(_iter10);
+        }
+        oprot.writeListEnd();
+      }
+      oprot.writeFieldEnd();
+    }
+    if (this.adjacencyList != null) {
+      oprot.writeFieldBegin(ADJACENCY_LIST_FIELD_DESC);
+      {
+        oprot.writeListBegin(new TList(TType.STRUCT, this.adjacencyList.size()));
+        for (Adjacency _iter11 : this.adjacencyList)        {
+          _iter11.write(oprot);
+        }
+        oprot.writeListEnd();
+      }
+      oprot.writeFieldEnd();
+    }
+    oprot.writeFieldStop();
+    oprot.writeStructEnd();
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("Graph(");
+    boolean first = true;
+
+    sb.append("nodeType:");
+    String nodeType_name = NodeType.VALUES_TO_NAMES.get(this.nodeType);
+    if (nodeType_name != null) {
+      sb.append(nodeType_name);
+      sb.append(" (");
+    }
+    sb.append(this.nodeType);
+    if (nodeType_name != null) {
+      sb.append(")");
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("roots:");
+    if (this.roots == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.roots);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("adjacencyList:");
+    if (this.adjacencyList == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.adjacencyList);
+    }
+    first = false;
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws TException {
+    // check for required fields
+    // check that fields of type enum have valid values
+    if (isSetNodeType() && !NodeType.VALID_VALUES.contains(nodeType)){
+      throw new TProtocolException("The field 'nodeType' has been assigned the invalid value " + nodeType);
+    }
+  }
+
+}
+

Added: hadoop/hive/trunk/ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/NodeType.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/NodeType.java?rev=805973&view=auto
==============================================================================
--- hadoop/hive/trunk/ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/NodeType.java (added)
+++ hadoop/hive/trunk/ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/NodeType.java Wed Aug 19 21:02:57 2009
@@ -0,0 +1,28 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+package org.apache.hadoop.hive.ql.plan.api;
+
+
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Collections;
+import org.apache.thrift.IntRangeSet;
+import java.util.Map;
+import java.util.HashMap;
+
+public class NodeType {
+  public static final int OPERATOR = 0;
+  public static final int STAGE = 1;
+
+  public static final IntRangeSet VALID_VALUES = new IntRangeSet(
+    OPERATOR, 
+    STAGE );
+
+  public static final Map<Integer, String> VALUES_TO_NAMES = new HashMap<Integer, String>() {{
+    put(OPERATOR, "OPERATOR");
+    put(STAGE, "STAGE");
+  }};
+}

Added: hadoop/hive/trunk/ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Operator.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Operator.java?rev=805973&view=auto
==============================================================================
--- hadoop/hive/trunk/ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Operator.java (added)
+++ hadoop/hive/trunk/ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Operator.java Wed Aug 19 21:02:57 2009
@@ -0,0 +1,646 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+package org.apache.hadoop.hive.ql.plan.api;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Collections;
+import org.apache.log4j.Logger;
+
+import org.apache.thrift.*;
+import org.apache.thrift.meta_data.*;
+import org.apache.thrift.protocol.*;
+
+public class Operator implements TBase, java.io.Serializable, Cloneable {
+  private static final TStruct STRUCT_DESC = new TStruct("Operator");
+  private static final TField OPERATOR_ID_FIELD_DESC = new TField("operatorId", TType.STRING, (short)1);
+  private static final TField OPERATOR_TYPE_FIELD_DESC = new TField("operatorType", TType.I32, (short)2);
+  private static final TField OPERATOR_ATTRIBUTES_FIELD_DESC = new TField("operatorAttributes", TType.MAP, (short)3);
+  private static final TField OPERATOR_COUNTERS_FIELD_DESC = new TField("operatorCounters", TType.MAP, (short)4);
+  private static final TField DONE_FIELD_DESC = new TField("done", TType.BOOL, (short)5);
+  private static final TField STARTED_FIELD_DESC = new TField("started", TType.BOOL, (short)6);
+
+  private String operatorId;
+  public static final int OPERATORID = 1;
+  private int operatorType;
+  public static final int OPERATORTYPE = 2;
+  private Map<String,String> operatorAttributes;
+  public static final int OPERATORATTRIBUTES = 3;
+  private Map<String,Long> operatorCounters;
+  public static final int OPERATORCOUNTERS = 4;
+  private boolean done;
+  public static final int DONE = 5;
+  private boolean started;
+  public static final int STARTED = 6;
+
+  private final Isset __isset = new Isset();
+  private static final class Isset implements java.io.Serializable {
+    public boolean operatorType = false;
+    public boolean done = false;
+    public boolean started = false;
+  }
+
+  public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
+    put(OPERATORID, new FieldMetaData("operatorId", TFieldRequirementType.DEFAULT, 
+        new FieldValueMetaData(TType.STRING)));
+    put(OPERATORTYPE, new FieldMetaData("operatorType", TFieldRequirementType.DEFAULT, 
+        new FieldValueMetaData(TType.I32)));
+    put(OPERATORATTRIBUTES, new FieldMetaData("operatorAttributes", TFieldRequirementType.DEFAULT, 
+        new MapMetaData(TType.MAP, 
+            new FieldValueMetaData(TType.STRING), 
+            new FieldValueMetaData(TType.STRING))));
+    put(OPERATORCOUNTERS, new FieldMetaData("operatorCounters", TFieldRequirementType.DEFAULT, 
+        new MapMetaData(TType.MAP, 
+            new FieldValueMetaData(TType.STRING), 
+            new FieldValueMetaData(TType.I64))));
+    put(DONE, new FieldMetaData("done", TFieldRequirementType.DEFAULT, 
+        new FieldValueMetaData(TType.BOOL)));
+    put(STARTED, new FieldMetaData("started", TFieldRequirementType.DEFAULT, 
+        new FieldValueMetaData(TType.BOOL)));
+  }});
+
+  static {
+    FieldMetaData.addStructMetaDataMap(Operator.class, metaDataMap);
+  }
+
+  public Operator() {
+  }
+
+  public Operator(
+    String operatorId,
+    int operatorType,
+    Map<String,String> operatorAttributes,
+    Map<String,Long> operatorCounters,
+    boolean done,
+    boolean started)
+  {
+    this();
+    this.operatorId = operatorId;
+    this.operatorType = operatorType;
+    this.__isset.operatorType = true;
+    this.operatorAttributes = operatorAttributes;
+    this.operatorCounters = operatorCounters;
+    this.done = done;
+    this.__isset.done = true;
+    this.started = started;
+    this.__isset.started = true;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public Operator(Operator other) {
+    if (other.isSetOperatorId()) {
+      this.operatorId = other.operatorId;
+    }
+    __isset.operatorType = other.__isset.operatorType;
+    this.operatorType = other.operatorType;
+    if (other.isSetOperatorAttributes()) {
+      Map<String,String> __this__operatorAttributes = new HashMap<String,String>();
+      for (Map.Entry<String, String> other_element : other.operatorAttributes.entrySet()) {
+
+        String other_element_key = other_element.getKey();
+        String other_element_value = other_element.getValue();
+
+        String __this__operatorAttributes_copy_key = other_element_key;
+
+        String __this__operatorAttributes_copy_value = other_element_value;
+
+        __this__operatorAttributes.put(__this__operatorAttributes_copy_key, __this__operatorAttributes_copy_value);
+      }
+      this.operatorAttributes = __this__operatorAttributes;
+    }
+    if (other.isSetOperatorCounters()) {
+      Map<String,Long> __this__operatorCounters = new HashMap<String,Long>();
+      for (Map.Entry<String, Long> other_element : other.operatorCounters.entrySet()) {
+
+        String other_element_key = other_element.getKey();
+        Long other_element_value = other_element.getValue();
+
+        String __this__operatorCounters_copy_key = other_element_key;
+
+        Long __this__operatorCounters_copy_value = other_element_value;
+
+        __this__operatorCounters.put(__this__operatorCounters_copy_key, __this__operatorCounters_copy_value);
+      }
+      this.operatorCounters = __this__operatorCounters;
+    }
+    __isset.done = other.__isset.done;
+    this.done = other.done;
+    __isset.started = other.__isset.started;
+    this.started = other.started;
+  }
+
+  @Override
+  public Operator clone() {
+    return new Operator(this);
+  }
+
+  public String getOperatorId() {
+    return this.operatorId;
+  }
+
+  public void setOperatorId(String operatorId) {
+    this.operatorId = operatorId;
+  }
+
+  public void unsetOperatorId() {
+    this.operatorId = null;
+  }
+
+  // Returns true if field operatorId is set (has been asigned a value) and false otherwise
+  public boolean isSetOperatorId() {
+    return this.operatorId != null;
+  }
+
+  public int getOperatorType() {
+    return this.operatorType;
+  }
+
+  public void setOperatorType(int operatorType) {
+    this.operatorType = operatorType;
+    this.__isset.operatorType = true;
+  }
+
+  public void unsetOperatorType() {
+    this.__isset.operatorType = false;
+  }
+
+  // Returns true if field operatorType is set (has been asigned a value) and false otherwise
+  public boolean isSetOperatorType() {
+    return this.__isset.operatorType;
+  }
+
+  public int getOperatorAttributesSize() {
+    return (this.operatorAttributes == null) ? 0 : this.operatorAttributes.size();
+  }
+
+  public void putToOperatorAttributes(String key, String val) {
+    if (this.operatorAttributes == null) {
+      this.operatorAttributes = new HashMap<String,String>();
+    }
+    this.operatorAttributes.put(key, val);
+  }
+
+  public Map<String,String> getOperatorAttributes() {
+    return this.operatorAttributes;
+  }
+
+  public void setOperatorAttributes(Map<String,String> operatorAttributes) {
+    this.operatorAttributes = operatorAttributes;
+  }
+
+  public void unsetOperatorAttributes() {
+    this.operatorAttributes = null;
+  }
+
+  // Returns true if field operatorAttributes is set (has been asigned a value) and false otherwise
+  public boolean isSetOperatorAttributes() {
+    return this.operatorAttributes != null;
+  }
+
+  public int getOperatorCountersSize() {
+    return (this.operatorCounters == null) ? 0 : this.operatorCounters.size();
+  }
+
+  public void putToOperatorCounters(String key, long val) {
+    if (this.operatorCounters == null) {
+      this.operatorCounters = new HashMap<String,Long>();
+    }
+    this.operatorCounters.put(key, val);
+  }
+
+  public Map<String,Long> getOperatorCounters() {
+    return this.operatorCounters;
+  }
+
+  public void setOperatorCounters(Map<String,Long> operatorCounters) {
+    this.operatorCounters = operatorCounters;
+  }
+
+  public void unsetOperatorCounters() {
+    this.operatorCounters = null;
+  }
+
+  // Returns true if field operatorCounters is set (has been asigned a value) and false otherwise
+  public boolean isSetOperatorCounters() {
+    return this.operatorCounters != null;
+  }
+
+  public boolean isDone() {
+    return this.done;
+  }
+
+  public void setDone(boolean done) {
+    this.done = done;
+    this.__isset.done = true;
+  }
+
+  public void unsetDone() {
+    this.__isset.done = false;
+  }
+
+  // Returns true if field done is set (has been asigned a value) and false otherwise
+  public boolean isSetDone() {
+    return this.__isset.done;
+  }
+
+  public boolean isStarted() {
+    return this.started;
+  }
+
+  public void setStarted(boolean started) {
+    this.started = started;
+    this.__isset.started = true;
+  }
+
+  public void unsetStarted() {
+    this.__isset.started = false;
+  }
+
+  // Returns true if field started is set (has been asigned a value) and false otherwise
+  public boolean isSetStarted() {
+    return this.__isset.started;
+  }
+
+  public void setFieldValue(int fieldID, Object value) {
+    switch (fieldID) {
+    case OPERATORID:
+      if (value == null) {
+        unsetOperatorId();
+      } else {
+        setOperatorId((String)value);
+      }
+      break;
+
+    case OPERATORTYPE:
+      if (value == null) {
+        unsetOperatorType();
+      } else {
+        setOperatorType((Integer)value);
+      }
+      break;
+
+    case OPERATORATTRIBUTES:
+      if (value == null) {
+        unsetOperatorAttributes();
+      } else {
+        setOperatorAttributes((Map<String,String>)value);
+      }
+      break;
+
+    case OPERATORCOUNTERS:
+      if (value == null) {
+        unsetOperatorCounters();
+      } else {
+        setOperatorCounters((Map<String,Long>)value);
+      }
+      break;
+
+    case DONE:
+      if (value == null) {
+        unsetDone();
+      } else {
+        setDone((Boolean)value);
+      }
+      break;
+
+    case STARTED:
+      if (value == null) {
+        unsetStarted();
+      } else {
+        setStarted((Boolean)value);
+      }
+      break;
+
+    default:
+      throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+    }
+  }
+
+  public Object getFieldValue(int fieldID) {
+    switch (fieldID) {
+    case OPERATORID:
+      return getOperatorId();
+
+    case OPERATORTYPE:
+      return getOperatorType();
+
+    case OPERATORATTRIBUTES:
+      return getOperatorAttributes();
+
+    case OPERATORCOUNTERS:
+      return getOperatorCounters();
+
+    case DONE:
+      return new Boolean(isDone());
+
+    case STARTED:
+      return new Boolean(isStarted());
+
+    default:
+      throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+    }
+  }
+
+  // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
+  public boolean isSet(int fieldID) {
+    switch (fieldID) {
+    case OPERATORID:
+      return isSetOperatorId();
+    case OPERATORTYPE:
+      return isSetOperatorType();
+    case OPERATORATTRIBUTES:
+      return isSetOperatorAttributes();
+    case OPERATORCOUNTERS:
+      return isSetOperatorCounters();
+    case DONE:
+      return isSetDone();
+    case STARTED:
+      return isSetStarted();
+    default:
+      throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+    }
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof Operator)
+      return this.equals((Operator)that);
+    return false;
+  }
+
+  public boolean equals(Operator that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_operatorId = true && this.isSetOperatorId();
+    boolean that_present_operatorId = true && that.isSetOperatorId();
+    if (this_present_operatorId || that_present_operatorId) {
+      if (!(this_present_operatorId && that_present_operatorId))
+        return false;
+      if (!this.operatorId.equals(that.operatorId))
+        return false;
+    }
+
+    boolean this_present_operatorType = true;
+    boolean that_present_operatorType = true;
+    if (this_present_operatorType || that_present_operatorType) {
+      if (!(this_present_operatorType && that_present_operatorType))
+        return false;
+      if (this.operatorType != that.operatorType)
+        return false;
+    }
+
+    boolean this_present_operatorAttributes = true && this.isSetOperatorAttributes();
+    boolean that_present_operatorAttributes = true && that.isSetOperatorAttributes();
+    if (this_present_operatorAttributes || that_present_operatorAttributes) {
+      if (!(this_present_operatorAttributes && that_present_operatorAttributes))
+        return false;
+      if (!this.operatorAttributes.equals(that.operatorAttributes))
+        return false;
+    }
+
+    boolean this_present_operatorCounters = true && this.isSetOperatorCounters();
+    boolean that_present_operatorCounters = true && that.isSetOperatorCounters();
+    if (this_present_operatorCounters || that_present_operatorCounters) {
+      if (!(this_present_operatorCounters && that_present_operatorCounters))
+        return false;
+      if (!this.operatorCounters.equals(that.operatorCounters))
+        return false;
+    }
+
+    boolean this_present_done = true;
+    boolean that_present_done = true;
+    if (this_present_done || that_present_done) {
+      if (!(this_present_done && that_present_done))
+        return false;
+      if (this.done != that.done)
+        return false;
+    }
+
+    boolean this_present_started = true;
+    boolean that_present_started = true;
+    if (this_present_started || that_present_started) {
+      if (!(this_present_started && that_present_started))
+        return false;
+      if (this.started != that.started)
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    return 0;
+  }
+
+  public void read(TProtocol iprot) throws TException {
+    TField field;
+    iprot.readStructBegin();
+    while (true)
+    {
+      field = iprot.readFieldBegin();
+      if (field.type == TType.STOP) { 
+        break;
+      }
+      switch (field.id)
+      {
+        case OPERATORID:
+          if (field.type == TType.STRING) {
+            this.operatorId = iprot.readString();
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case OPERATORTYPE:
+          if (field.type == TType.I32) {
+            this.operatorType = iprot.readI32();
+            this.__isset.operatorType = true;
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case OPERATORATTRIBUTES:
+          if (field.type == TType.MAP) {
+            {
+              TMap _map12 = iprot.readMapBegin();
+              this.operatorAttributes = new HashMap<String,String>(2*_map12.size);
+              for (int _i13 = 0; _i13 < _map12.size; ++_i13)
+              {
+                String _key14;
+                String _val15;
+                _key14 = iprot.readString();
+                _val15 = iprot.readString();
+                this.operatorAttributes.put(_key14, _val15);
+              }
+              iprot.readMapEnd();
+            }
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case OPERATORCOUNTERS:
+          if (field.type == TType.MAP) {
+            {
+              TMap _map16 = iprot.readMapBegin();
+              this.operatorCounters = new HashMap<String,Long>(2*_map16.size);
+              for (int _i17 = 0; _i17 < _map16.size; ++_i17)
+              {
+                String _key18;
+                long _val19;
+                _key18 = iprot.readString();
+                _val19 = iprot.readI64();
+                this.operatorCounters.put(_key18, _val19);
+              }
+              iprot.readMapEnd();
+            }
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case DONE:
+          if (field.type == TType.BOOL) {
+            this.done = iprot.readBool();
+            this.__isset.done = true;
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case STARTED:
+          if (field.type == TType.BOOL) {
+            this.started = iprot.readBool();
+            this.__isset.started = true;
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        default:
+          TProtocolUtil.skip(iprot, field.type);
+          break;
+      }
+      iprot.readFieldEnd();
+    }
+    iprot.readStructEnd();
+
+    validate();
+  }
+
+  public void write(TProtocol oprot) throws TException {
+    validate();
+
+    oprot.writeStructBegin(STRUCT_DESC);
+    if (this.operatorId != null) {
+      oprot.writeFieldBegin(OPERATOR_ID_FIELD_DESC);
+      oprot.writeString(this.operatorId);
+      oprot.writeFieldEnd();
+    }
+    oprot.writeFieldBegin(OPERATOR_TYPE_FIELD_DESC);
+    oprot.writeI32(this.operatorType);
+    oprot.writeFieldEnd();
+    if (this.operatorAttributes != null) {
+      oprot.writeFieldBegin(OPERATOR_ATTRIBUTES_FIELD_DESC);
+      {
+        oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.operatorAttributes.size()));
+        for (Map.Entry<String, String> _iter20 : this.operatorAttributes.entrySet())        {
+          oprot.writeString(_iter20.getKey());
+          oprot.writeString(_iter20.getValue());
+        }
+        oprot.writeMapEnd();
+      }
+      oprot.writeFieldEnd();
+    }
+    if (this.operatorCounters != null) {
+      oprot.writeFieldBegin(OPERATOR_COUNTERS_FIELD_DESC);
+      {
+        oprot.writeMapBegin(new TMap(TType.STRING, TType.I64, this.operatorCounters.size()));
+        for (Map.Entry<String, Long> _iter21 : this.operatorCounters.entrySet())        {
+          oprot.writeString(_iter21.getKey());
+          oprot.writeI64(_iter21.getValue());
+        }
+        oprot.writeMapEnd();
+      }
+      oprot.writeFieldEnd();
+    }
+    oprot.writeFieldBegin(DONE_FIELD_DESC);
+    oprot.writeBool(this.done);
+    oprot.writeFieldEnd();
+    oprot.writeFieldBegin(STARTED_FIELD_DESC);
+    oprot.writeBool(this.started);
+    oprot.writeFieldEnd();
+    oprot.writeFieldStop();
+    oprot.writeStructEnd();
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("Operator(");
+    boolean first = true;
+
+    sb.append("operatorId:");
+    if (this.operatorId == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.operatorId);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("operatorType:");
+    String operatorType_name = OperatorType.VALUES_TO_NAMES.get(this.operatorType);
+    if (operatorType_name != null) {
+      sb.append(operatorType_name);
+      sb.append(" (");
+    }
+    sb.append(this.operatorType);
+    if (operatorType_name != null) {
+      sb.append(")");
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("operatorAttributes:");
+    if (this.operatorAttributes == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.operatorAttributes);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("operatorCounters:");
+    if (this.operatorCounters == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.operatorCounters);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("done:");
+    sb.append(this.done);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("started:");
+    sb.append(this.started);
+    first = false;
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws TException {
+    // check for required fields
+    // check that fields of type enum have valid values
+    if (isSetOperatorType() && !OperatorType.VALID_VALUES.contains(operatorType)){
+      throw new TProtocolException("The field 'operatorType' has been assigned the invalid value " + operatorType);
+    }
+  }
+
+}
+

Added: hadoop/hive/trunk/ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/OperatorType.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/OperatorType.java?rev=805973&view=auto
==============================================================================
--- hadoop/hive/trunk/ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/OperatorType.java (added)
+++ hadoop/hive/trunk/ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/OperatorType.java Wed Aug 19 21:02:57 2009
@@ -0,0 +1,61 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+package org.apache.hadoop.hive.ql.plan.api;
+
+
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Collections;
+import org.apache.thrift.IntRangeSet;
+import java.util.Map;
+import java.util.HashMap;
+
+public class OperatorType {
+  public static final int JOIN = 0;
+  public static final int MAPJOIN = 1;
+  public static final int EXTRACT = 2;
+  public static final int FILTER = 3;
+  public static final int FORWARD = 4;
+  public static final int GROUPBY = 5;
+  public static final int LIMIT = 6;
+  public static final int SCRIPT = 7;
+  public static final int SELECT = 8;
+  public static final int TABLESCAN = 9;
+  public static final int FILESINK = 10;
+  public static final int REDUCESINK = 11;
+  public static final int UNION = 12;
+
+  public static final IntRangeSet VALID_VALUES = new IntRangeSet(
+    JOIN, 
+    MAPJOIN, 
+    EXTRACT, 
+    FILTER, 
+    FORWARD, 
+    GROUPBY, 
+    LIMIT, 
+    SCRIPT, 
+    SELECT, 
+    TABLESCAN, 
+    FILESINK, 
+    REDUCESINK, 
+    UNION );
+
+  public static final Map<Integer, String> VALUES_TO_NAMES = new HashMap<Integer, String>() {{
+    put(JOIN, "JOIN");
+    put(MAPJOIN, "MAPJOIN");
+    put(EXTRACT, "EXTRACT");
+    put(FILTER, "FILTER");
+    put(FORWARD, "FORWARD");
+    put(GROUPBY, "GROUPBY");
+    put(LIMIT, "LIMIT");
+    put(SCRIPT, "SCRIPT");
+    put(SELECT, "SELECT");
+    put(TABLESCAN, "TABLESCAN");
+    put(FILESINK, "FILESINK");
+    put(REDUCESINK, "REDUCESINK");
+    put(UNION, "UNION");
+  }};
+}