Review Board 1.7.22


Add 'show version' command to Hive CLI

Review Request #8958 - Created Jan. 15, 2013 and updated

Zhuoluo Yang
HIVE-1151
Reviewers
hive
brocknoland, carl
hive
We add a simple ddl grammar, called "show version".
The version info is generated automatically while compiling.
zhuoluo@zhuoluo-Latitude-E6420:~$ hive --version
Hive 0.11.0-SNAPSHOT
Subversion git://github.com/apache/hive.git on branch trunk -r 34c95e9e6ab2110653af20e6d34a8fe02b04198d
Compiled by zhuoluo on Wed Jan 16 12:26:12 CST 2013
zhuoluo@zhuoluo-Latitude-E6420:~$ hive
Hive history file=/tmp/zhuoluo/hive_job_log_zhuoluo_201301161232_1201027344.txt
hive> show version;
OK
0.11.0-SNAPSHOT from 34c95e9e6ab2110653af20e6d34a8fe02b04198d by zhuoluo on Wed Jan 16 12:26:12 CST 2013
git://github.com/apache/hive.git on branch trunk
Time taken: 0.522 seconds, Fetched: 2 row(s)
hive> 
http://svn.apache.org/repos/asf/hive/trunk/build.xml
Revision 1433285 New Change
[20] 240 lines
[+20]
241
    <ivy:cleancache />
241
    <ivy:cleancache />
242
  </target>
242
  </target>
243

    
   
243

   
244
  <target name="init" depends="ivy-init-antlib,deploy-ant-tasks">
244
  <target name="init" depends="ivy-init-antlib,deploy-ant-tasks">
245
    <echo message="Project: ${ant.project.name}"/>
245
    <echo message="Project: ${ant.project.name}"/>

    
   
246
    <exec executable="sh"> 

    
   
247
      <arg line="ql/src/saveVersion.sh ${version}"/>

    
   
248
    </exec>
246
    <iterate-all target="init"/>
249
    <iterate-all target="init"/>
247
  </target>
250
  </target>
248

    
   
251

   
249
  <target name="test-init">
252
  <target name="test-init">
250
    <echo message="Project: ${ant.project.name}"/>
253
    <echo message="Project: ${ant.project.name}"/>
[+20] [20] 1129 lines
http://svn.apache.org/repos/asf/hive/trunk/bin/hive
Revision 1433285 New Change
 
http://svn.apache.org/repos/asf/hive/trunk/bin/ext/version.sh
New File
 
http://svn.apache.org/repos/asf/hive/trunk/ql/src/saveVersion.sh
New File
 
http://svn.apache.org/repos/asf/hive/trunk/ql/src/java/org/apache/hadoop/hive/HiveVersionAnnotation.java
New File
 
http://svn.apache.org/repos/asf/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
Revision 1433285 New Change
 
http://svn.apache.org/repos/asf/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java
Revision 1433285 New Change
 
http://svn.apache.org/repos/asf/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g
Revision 1433285 New Change
 
http://svn.apache.org/repos/asf/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzerFactory.java
Revision 1433285 New Change
 
http://svn.apache.org/repos/asf/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/DDLWork.java
Revision 1433285 New Change
 
http://svn.apache.org/repos/asf/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/ShowVersionDesc.java
New File
 
http://svn.apache.org/repos/asf/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/util/HiveVersionInfo.java
New File
 
  1. http://svn.apache.org/repos/asf/hive/trunk/build.xml: Loading...
  2. http://svn.apache.org/repos/asf/hive/trunk/bin/hive: Loading...
  3. http://svn.apache.org/repos/asf/hive/trunk/bin/ext/version.sh: Loading...
  4. http://svn.apache.org/repos/asf/hive/trunk/ql/src/saveVersion.sh: Loading...
  5. http://svn.apache.org/repos/asf/hive/trunk/ql/src/java/org/apache/hadoop/hive/HiveVersionAnnotation.java: Loading...
  6. http://svn.apache.org/repos/asf/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java: Loading...
  7. http://svn.apache.org/repos/asf/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java: Loading...
  8. http://svn.apache.org/repos/asf/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g: Loading...
  9. http://svn.apache.org/repos/asf/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzerFactory.java: Loading...
  10. http://svn.apache.org/repos/asf/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/DDLWork.java: Loading...
  11. http://svn.apache.org/repos/asf/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/ShowVersionDesc.java: Loading...
  12. http://svn.apache.org/repos/asf/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/util/HiveVersionInfo.java: Loading...