hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c..@apache.org
Subject svn commit: r1081934 - in /hive/trunk: ./ ant/src/org/apache/hadoop/hive/ant/ contrib/ hbase-handler/ hbase-handler/src/test/templates/ ql/ ql/src/test/queries/clientnegative/ ql/src/test/results/clientnegative/ ql/src/test/templates/
Date Tue, 15 Mar 2011 20:40:27 GMT
Author: cws
Date: Tue Mar 15 20:40:27 2011
New Revision: 1081934

URL: http://svn.apache.org/viewvc?rev=1081934&view=rev
Log:
HIVE-1867 Add mechanism for disabling tests with intermittent failures (Marcel Kornacker via
cws)

Added:
    hive/trunk/ql/src/test/queries/clientnegative/dyn_part_empty.q.disabled
    hive/trunk/ql/src/test/results/clientnegative/dyn_part_empty.q.disabled.out
Removed:
    hive/trunk/ql/src/test/queries/clientnegative/dyn_part_empty.q
    hive/trunk/ql/src/test/results/clientnegative/dyn_part_empty.q.out
Modified:
    hive/trunk/ant/src/org/apache/hadoop/hive/ant/QTestGenTask.java
    hive/trunk/build-common.xml
    hive/trunk/contrib/build.xml
    hive/trunk/hbase-handler/build.xml
    hive/trunk/hbase-handler/src/test/templates/TestHBaseCliDriver.vm
    hive/trunk/ql/build.xml
    hive/trunk/ql/src/test/templates/TestCliDriver.vm
    hive/trunk/ql/src/test/templates/TestNegativeCliDriver.vm
    hive/trunk/ql/src/test/templates/TestParse.vm
    hive/trunk/ql/src/test/templates/TestParseNegative.vm

Modified: hive/trunk/ant/src/org/apache/hadoop/hive/ant/QTestGenTask.java
URL: http://svn.apache.org/viewvc/hive/trunk/ant/src/org/apache/hadoop/hive/ant/QTestGenTask.java?rev=1081934&r1=1081933&r2=1081934&view=diff
==============================================================================
--- hive/trunk/ant/src/org/apache/hadoop/hive/ant/QTestGenTask.java (original)
+++ hive/trunk/ant/src/org/apache/hadoop/hive/ant/QTestGenTask.java Tue Mar 15 20:40:27 2011
@@ -58,6 +58,12 @@ public class QTestGenTask extends Task {
     
   }
   
+  public class DisabledQFileFilter implements FileFilter { 
+    public boolean accept(File fpath) {
+      return !fpath.isDirectory() && fpath.getName().endsWith(".q.disabled");
+    }  
+  }
+  
   public class QFileRegexFilter extends QFileFilter {
     Pattern filterPattern;
     
@@ -97,6 +103,8 @@ public class QTestGenTask extends Task {
   private String logFile;
 
   private String clusterMode;
+
+  private String runDisabled;
   
   private String hadoopVersion;
 
@@ -116,6 +124,14 @@ public class QTestGenTask extends Task {
     return clusterMode;
   }
 
+  public void setRunDisabled(String runDisabled) {
+    this.runDisabled = runDisabled;
+  }
+
+  public String getRunDisabled() {
+    return runDisabled;
+  }
+
   public void setLogFile(String logFile) {
     this.logFile = logFile;
   }
@@ -264,6 +280,8 @@ public class QTestGenTask extends Task {
         }
       } else if (queryFileRegex != null && !queryFileRegex.equals("")) {
         qFiles.addAll(Arrays.asList(inpDir.listFiles(new QFileRegexFilter(queryFileRegex))));
+      } else if (runDisabled != null && runDisabled.equals("true")) {
+        qFiles.addAll(Arrays.asList(inpDir.listFiles(new DisabledQFileFilter())));      
 
       } else {
         qFiles.addAll(Arrays.asList(inpDir.listFiles(new QFileFilter())));
       }

Modified: hive/trunk/build-common.xml
URL: http://svn.apache.org/viewvc/hive/trunk/build-common.xml?rev=1081934&r1=1081933&r2=1081934&view=diff
==============================================================================
--- hive/trunk/build-common.xml (original)
+++ hive/trunk/build-common.xml Tue Mar 15 20:40:27 2011
@@ -373,6 +373,12 @@
       </not>
     </condition>
 
+    <condition property="run_disabled" value="false">
+      <not>
+        <isset property="run_disabled"/>
+      </not>
+    </condition>
+
   </target>
 
   <!-- target to deploy anttasks -->

Modified: hive/trunk/contrib/build.xml
URL: http://svn.apache.org/viewvc/hive/trunk/contrib/build.xml?rev=1081934&r1=1081933&r2=1081934&view=diff
==============================================================================
--- hive/trunk/contrib/build.xml (original)
+++ hive/trunk/contrib/build.xml Tue Mar 15 20:40:27 2011
@@ -71,6 +71,7 @@
               queryDirectory="${contrib.test.query.dir}/positive"
               queryFile="${qfile}"
               queryFileRegex="${qfile_regex}"
+              runDisabled="${run_disabled}"
               resultsDirectory="${contrib.test.results.dir}/compiler" className="TestContribParse"
               logFile="${test.log.dir}/testcontribparsegen.log"
               logDirectory="${test.log.dir}/contribpositive"/>
@@ -80,6 +81,7 @@
               queryDirectory="${contrib.test.query.dir}/negative" 
               queryFile="${qfile}"
               queryFileRegex="${qfile_regex}"
+              runDisabled="${run_disabled}"
               resultsDirectory="${contrib.test.results.dir}/compiler/errors" className="TestContribParseNegative"
               logFile="${test.log.dir}/testcontribparseneggen.log"
               logDirectory="${test.log.dir}/contribnegative"/>
@@ -89,6 +91,7 @@
               queryDirectory="${contrib.test.query.dir}/clientpositive" 
               queryFile="${qfile}"
               queryFileRegex="${qfile_regex}"
+              runDisabled="${run_disabled}"
               clusterMode="${clustermode}"
               resultsDirectory="${contrib.test.results.dir}/clientpositive" className="TestContribCliDriver"
               logFile="${test.log.dir}/testcontribclidrivergen.log"
@@ -101,6 +104,7 @@
               queryDirectory="${contrib.test.query.dir}/clientnegative" 
               queryFile="${qfile}"
               queryFileRegex="${qfile_regex}"
+              runDisabled="${run_disabled}"
               resultsDirectory="${contrib.test.results.dir}/clientnegative" className="TestContribNegativeCliDriver"
               logFile="${test.log.dir}/testcontribnegclidrivergen.log"
               logDirectory="${test.log.dir}/contribclientnegative"/>

Modified: hive/trunk/hbase-handler/build.xml
URL: http://svn.apache.org/viewvc/hive/trunk/hbase-handler/build.xml?rev=1081934&r1=1081933&r2=1081934&view=diff
==============================================================================
--- hive/trunk/hbase-handler/build.xml (original)
+++ hive/trunk/hbase-handler/build.xml Tue Mar 15 20:40:27 2011
@@ -71,6 +71,7 @@
               templatePath="${ql.hbase.test.template.dir}" template="TestHBaseCliDriver.vm"

               queryDirectory="${hbase-handler.test.query.dir}" 
               queryFile="${qfile}"
+              runDisabled="${run_disabled}"
               clusterMode="${clustermode}"
               resultsDirectory="${hbase-handler.test.results.dir}" className="TestHBaseCliDriver"
               logFile="${test.log.dir}/testhbaseclidrivergen.log"
@@ -79,6 +80,7 @@
               templatePath="${ql.hbase.test.template.dir}" template="TestHBaseCliDriver.vm"

               queryDirectory="${hbase-handler.test.query.dir}" 
               queryFile="hbase_bulk.m"
+              runDisabled="${run_disabled}"
               clusterMode="miniMR"
               resultsDirectory="${hbase-handler.test.results.dir}" className="TestHBaseMinimrCliDriver"
               logFile="${test.log.dir}/testhbaseminimrclidrivergen.log"

Modified: hive/trunk/hbase-handler/src/test/templates/TestHBaseCliDriver.vm
URL: http://svn.apache.org/viewvc/hive/trunk/hbase-handler/src/test/templates/TestHBaseCliDriver.vm?rev=1081934&r1=1081933&r2=1081934&view=diff
==============================================================================
--- hive/trunk/hbase-handler/src/test/templates/TestHBaseCliDriver.vm (original)
+++ hive/trunk/hbase-handler/src/test/templates/TestHBaseCliDriver.vm Tue Mar 15 20:40:27
2011
@@ -73,7 +73,7 @@ public class $className extends TestCase
     HBaseTestSetup setup = new HBaseTestSetup(suite);
 #foreach ($qf in $qfiles)
   #set ($fname = $qf.getName())
-  #set ($eidx = $fname.length() - 2)
+  #set ($eidx = $fname.indexOf('.'))
   #set ($tname = $fname.substring(0, $eidx))
     suite.addTest(new $className("testCliDriver_$tname", setup));
 #end
@@ -82,7 +82,7 @@ public class $className extends TestCase
 
 #foreach ($qf in $qfiles)
   #set ($fname = $qf.getName())
-  #set ($eidx = $fname.length() - 2)
+  #set ($eidx = $fname.indexOf('.'))
   #set ($tname = $fname.substring(0, $eidx))
   public void testCliDriver_$tname() throws Exception {
     try {

Modified: hive/trunk/ql/build.xml
URL: http://svn.apache.org/viewvc/hive/trunk/ql/build.xml?rev=1081934&r1=1081933&r2=1081934&view=diff
==============================================================================
--- hive/trunk/ql/build.xml (original)
+++ hive/trunk/ql/build.xml Tue Mar 15 20:40:27 2011
@@ -71,6 +71,7 @@
               queryDirectory="${ql.test.query.dir}/positive"
               queryFile="${qfile}"
               queryFileRegex="${qfile_regex}"
+              runDisabled="${run_disabled}"
               resultsDirectory="${ql.test.results.dir}/compiler" className="TestParse"
               logFile="${test.log.dir}/testparsegen.log"
               hadoopVersion="${hadoopVersion}"
@@ -81,6 +82,7 @@
               queryDirectory="${ql.test.query.dir}/negative" 
               queryFile="${qfile}"
               queryFileRegex="${qfile_regex}"
+              runDisabled="${run_disabled}"
               resultsDirectory="${ql.test.results.dir}/compiler/errors" className="TestParseNegative"
               logFile="${test.log.dir}/testparseneggen.log"
               hadoopVersion="${hadoopVersion}"
@@ -93,6 +95,7 @@
               excludeQueryFile="${ql.test.clientpositive.exclude}"
               queryFileRegex="${qfile_regex}"
               clusterMode="${clustermode}"
+              runDisabled="${run_disabled}"
               resultsDirectory="${ql.test.results.clientpositive.dir}" className="TestCliDriver"
               logFile="${test.log.dir}/testclidrivergen.log"
               logDirectory="${test.log.dir}/clientpositive"
@@ -110,6 +113,7 @@
                   queryFile="${minimr.query.files}"
                   queryFileRegex="${qfile_regex}"
                   clusterMode="miniMR"
+                  runDisabled="${run_disabled}"
                   resultsDirectory="${ql.test.results.clientpositive.dir}" className="TestMinimrCliDriver"
                   logFile="${test.log.dir}/testminimrclidrivergen.log"
                   logDirectory="${test.log.dir}/clientpositive"
@@ -123,6 +127,7 @@
               queryDirectory="${ql.test.query.dir}/clientnegative" 
               queryFile="${qfile}"
               queryFileRegex="${qfile_regex}"
+              runDisabled="${run_disabled}"
               resultsDirectory="${ql.test.results.dir}/clientnegative" className="TestNegativeCliDriver"
               logFile="${test.log.dir}/testnegclidrivergen.log"
               logDirectory="${test.log.dir}/clientnegative"

Added: hive/trunk/ql/src/test/queries/clientnegative/dyn_part_empty.q.disabled
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientnegative/dyn_part_empty.q.disabled?rev=1081934&view=auto
==============================================================================
--- hive/trunk/ql/src/test/queries/clientnegative/dyn_part_empty.q.disabled (added)
+++ hive/trunk/ql/src/test/queries/clientnegative/dyn_part_empty.q.disabled Tue Mar 15 20:40:27
2011
@@ -0,0 +1,8 @@
+set hive.exec.dynamic.partition=true;
+set hive.exec.dynamic.partition.mode=nonstrict;
+set hive.stats.autogether=false;
+set hive.error.on.empty.partition=true;
+
+create table dyn_err(key string, value string) partitioned by (ds string);
+
+insert overwrite table dyn_err partition(ds) select key, value, ds from srcpart where ds
is not null and key = 'no exists';

Added: hive/trunk/ql/src/test/results/clientnegative/dyn_part_empty.q.disabled.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientnegative/dyn_part_empty.q.disabled.out?rev=1081934&view=auto
==============================================================================
--- hive/trunk/ql/src/test/results/clientnegative/dyn_part_empty.q.disabled.out (added)
+++ hive/trunk/ql/src/test/results/clientnegative/dyn_part_empty.q.disabled.out Tue Mar 15
20:40:27 2011
@@ -0,0 +1,14 @@
+PREHOOK: query: create table dyn_err(key string, value string) partitioned by (ds string)
+PREHOOK: type: CREATETABLE
+POSTHOOK: query: create table dyn_err(key string, value string) partitioned by (ds string)
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: default@dyn_err
+PREHOOK: query: insert overwrite table dyn_err partition(ds) select key, value, ds from srcpart
where ds is not null and key = 'no exists'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=11
+PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=12
+PREHOOK: Input: default@srcpart@ds=2008-04-09/hr=11
+PREHOOK: Input: default@srcpart@ds=2008-04-09/hr=12
+PREHOOK: Output: default@dyn_err
+Failed with exception This query creates no partitions. To turn off this error, set hive.error.on.empty.partition=false.
+FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask

Modified: hive/trunk/ql/src/test/templates/TestCliDriver.vm
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/templates/TestCliDriver.vm?rev=1081934&r1=1081933&r2=1081934&view=diff
==============================================================================
--- hive/trunk/ql/src/test/templates/TestCliDriver.vm (original)
+++ hive/trunk/ql/src/test/templates/TestCliDriver.vm Tue Mar 15 20:40:27 2011
@@ -87,7 +87,7 @@ public class $className extends TestCase
     TestSuite suite = new TestSuite();
 #foreach ($qf in $qfiles)
   #set ($fname = $qf.getName())
-  #set ($eidx = $fname.length() - 2)
+  #set ($eidx = $fname.indexOf('.'))
   #set ($tname = $fname.substring(0, $eidx))
     suite.addTest(new $className("testCliDriver_$tname"));
 #end
@@ -100,7 +100,7 @@ public class $className extends TestCase
 
 #foreach ($qf in $qfiles)
   #set ($fname = $qf.getName())
-  #set ($eidx = $fname.length() - 2)
+  #set ($eidx = $fname.indexOf('.'))
   #set ($tname = $fname.substring(0, $eidx))
   public void testCliDriver_$tname() throws Exception {
     try {

Modified: hive/trunk/ql/src/test/templates/TestNegativeCliDriver.vm
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/templates/TestNegativeCliDriver.vm?rev=1081934&r1=1081933&r2=1081934&view=diff
==============================================================================
--- hive/trunk/ql/src/test/templates/TestNegativeCliDriver.vm (original)
+++ hive/trunk/ql/src/test/templates/TestNegativeCliDriver.vm Tue Mar 15 20:40:27 2011
@@ -66,7 +66,7 @@ public class $className extends TestCase
     TestSuite suite = new TestSuite();
 #foreach ($qf in $qfiles)
   #set ($fname = $qf.getName())
-  #set ($eidx = $fname.length() - 2)
+  #set ($eidx = $fname.indexOf('.'))
   #set ($tname = $fname.substring(0, $eidx))
     suite.addTest(new $className("testNegativeCliDriver_$tname"));
 #end
@@ -86,7 +86,7 @@ public class $className extends TestCase
 
 #foreach ($qf in $qfiles)
   #set ($fname = $qf.getName())
-  #set ($eidx = $fname.length() - 2)
+  #set ($eidx = $fname.indexOf('.'))
   #set ($tname = $fname.substring(0, $eidx))
   public void testNegativeCliDriver_$tname() throws Exception {
     try {

Modified: hive/trunk/ql/src/test/templates/TestParse.vm
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/templates/TestParse.vm?rev=1081934&r1=1081933&r2=1081934&view=diff
==============================================================================
--- hive/trunk/ql/src/test/templates/TestParse.vm (original)
+++ hive/trunk/ql/src/test/templates/TestParse.vm Tue Mar 15 20:40:27 2011
@@ -69,7 +69,7 @@ public class $className extends TestCase
 
 #foreach ($qf in $qfiles)
   #set ($fname = $qf.getName())
-  #set ($eidx = $fname.length() - 2)
+  #set ($eidx = $fname.indexOf('.'))
   #set ($tname = $fname.substring(0, $eidx))
     suite.addTest(new $className("testParse_$tname"));
 #end
@@ -89,7 +89,7 @@ public class $className extends TestCase
 
 #foreach ($qf in $qfiles)
   #set ($fname = $qf.getName())
-  #set ($eidx = $fname.length() - 2)
+  #set ($eidx = $fname.indexOf('.'))
   #set ($tname = $fname.substring(0, $eidx))
   public void testParse_$tname() throws Exception {
     try {

Modified: hive/trunk/ql/src/test/templates/TestParseNegative.vm
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/templates/TestParseNegative.vm?rev=1081934&r1=1081933&r2=1081934&view=diff
==============================================================================
--- hive/trunk/ql/src/test/templates/TestParseNegative.vm (original)
+++ hive/trunk/ql/src/test/templates/TestParseNegative.vm Tue Mar 15 20:40:27 2011
@@ -77,7 +77,7 @@ public class $className extends TestCase
 
 #foreach ($qf in $qfiles)
   #set ($fname = $qf.getName())
-  #set ($eidx = $fname.length() - 2)
+  #set ($eidx = $fname.indexOf('.'))
   #set ($tname = $fname.substring(0, $eidx))
     suite.addTest(new $className("testParseNegative_$tname"));
 #end
@@ -90,7 +90,7 @@ public class $className extends TestCase
 
 #foreach ($qf in $qfiles)
   #set ($fname = $qf.getName())
-  #set ($eidx = $fname.length() - 2)
+  #set ($eidx = $fname.indexOf('.'))
   #set ($tname = $fname.substring(0, $eidx))
   public void testParseNegative_$tname() throws Exception {
     try {



Mime
View raw message