hadoop-hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nzh...@apache.org
Subject svn commit: r912061 - in /hadoop/hive/branches/branch-0.4: ./ ql/src/test/org/apache/hadoop/hive/ql/ ql/src/test/templates/
Date Sat, 20 Feb 2010 01:44:44 GMT
Author: nzhang
Date: Sat Feb 20 01:44:44 2010
New Revision: 912061

URL: http://svn.apache.org/viewvc?rev=912061&view=rev
Log:
HIVE-1182: Fix TestCliDriver too many open file error

Modified:
    hadoop/hive/branches/branch-0.4/CHANGES.txt
    hadoop/hive/branches/branch-0.4/ql/src/test/org/apache/hadoop/hive/ql/QTestUtil.java
    hadoop/hive/branches/branch-0.4/ql/src/test/templates/TestCliDriver.vm
    hadoop/hive/branches/branch-0.4/ql/src/test/templates/TestNegativeCliDriver.vm
    hadoop/hive/branches/branch-0.4/ql/src/test/templates/TestParse.vm
    hadoop/hive/branches/branch-0.4/ql/src/test/templates/TestParseNegative.vm

Modified: hadoop/hive/branches/branch-0.4/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hive/branches/branch-0.4/CHANGES.txt?rev=912061&r1=912060&r2=912061&view=diff
==============================================================================
--- hadoop/hive/branches/branch-0.4/CHANGES.txt (original)
+++ hadoop/hive/branches/branch-0.4/CHANGES.txt Sat Feb 20 01:44:44 2010
@@ -280,6 +280,9 @@
     HIVE-813. Show the actual exception thrown in UDF evaluation.
     (Zheng Shao via rmurthy)
 
+    HIVE-1182. Fix TestCliDriver too many open file error.
+    (Zheng Shao via Ning Zhang)
+
   OPTIMIZATIONS
 
     HIVE-279. Predicate Pushdown support (Prasad Chakka via athusoo).

Modified: hadoop/hive/branches/branch-0.4/ql/src/test/org/apache/hadoop/hive/ql/QTestUtil.java
URL: http://svn.apache.org/viewvc/hadoop/hive/branches/branch-0.4/ql/src/test/org/apache/hadoop/hive/ql/QTestUtil.java?rev=912061&r1=912060&r2=912061&view=diff
==============================================================================
--- hadoop/hive/branches/branch-0.4/ql/src/test/org/apache/hadoop/hive/ql/QTestUtil.java (original)
+++ hadoop/hive/branches/branch-0.4/ql/src/test/org/apache/hadoop/hive/ql/QTestUtil.java Sat
Feb 20 01:44:44 2010
@@ -231,6 +231,8 @@
       qsb.append(dis.readLine() + "\n");
     }
     qMap.put(qf.getName(), qsb.toString());
+    
+    dis.close();
   }
 
   public void cleanUp() throws Exception {
@@ -432,6 +434,10 @@
     ss.out = new PrintStream(fo, true, "UTF-8");
     ss.err = ss.out;
     ss.setIsSilent(true);
+    SessionState oldSs = SessionState.get();
+    if (oldSs != null) {
+      oldSs.out.close();
+    }
     SessionState.start(ss);
     cliDriver = new CliDriver();
   }

Modified: hadoop/hive/branches/branch-0.4/ql/src/test/templates/TestCliDriver.vm
URL: http://svn.apache.org/viewvc/hadoop/hive/branches/branch-0.4/ql/src/test/templates/TestCliDriver.vm?rev=912061&r1=912060&r2=912061&view=diff
==============================================================================
--- hadoop/hive/branches/branch-0.4/ql/src/test/templates/TestCliDriver.vm (original)
+++ hadoop/hive/branches/branch-0.4/ql/src/test/templates/TestCliDriver.vm Sat Feb 20 01:44:44
2010
@@ -38,9 +38,6 @@
 
       qt = new QTestUtil("$resultsDir.getCanonicalPath()", "$logDir.getCanonicalPath()",
miniMR);
 
-#foreach ($qf in $qfiles)
-      qt.addFile("$qf.getCanonicalPath()");
-#end
     }
     catch (Exception e) {
       System.out.println("Exception: " + e.getMessage());
@@ -81,6 +78,9 @@
   public void testCliDriver_$tname() throws Exception {
     try {
       System.out.println("Begin query: " + "$fname");
+
+      qt.addFile("$qf.getCanonicalPath()");
+
       qt.cliInit("$fname");
       int ecode = qt.executeClient("$fname");
       if (ecode != 0) {

Modified: hadoop/hive/branches/branch-0.4/ql/src/test/templates/TestNegativeCliDriver.vm
URL: http://svn.apache.org/viewvc/hadoop/hive/branches/branch-0.4/ql/src/test/templates/TestNegativeCliDriver.vm?rev=912061&r1=912060&r2=912061&view=diff
==============================================================================
--- hadoop/hive/branches/branch-0.4/ql/src/test/templates/TestNegativeCliDriver.vm (original)
+++ hadoop/hive/branches/branch-0.4/ql/src/test/templates/TestNegativeCliDriver.vm Sat Feb
20 01:44:44 2010
@@ -27,9 +27,6 @@
     try {
       qt = new QTestUtil("$resultsDir.getCanonicalPath()", "$logDir.getCanonicalPath()");
 
-#foreach ($qf in $qfiles)
-      qt.addFile("$qf.getCanonicalPath()");
-#end
     }
     catch (Throwable e) {
       e.printStackTrace();
@@ -56,6 +53,9 @@
   public void testNegativeCliDriver_$tname() throws Exception {
     try {
       System.out.println("Begin query: " + "$fname");
+
+      qt.addFile("$qf.getCanonicalPath()");
+
       qt.cliInit("$fname");
       int ecode = qt.executeClient("$fname");
       if (ecode == 0) {

Modified: hadoop/hive/branches/branch-0.4/ql/src/test/templates/TestParse.vm
URL: http://svn.apache.org/viewvc/hadoop/hive/branches/branch-0.4/ql/src/test/templates/TestParse.vm?rev=912061&r1=912060&r2=912061&view=diff
==============================================================================
--- hadoop/hive/branches/branch-0.4/ql/src/test/templates/TestParse.vm (original)
+++ hadoop/hive/branches/branch-0.4/ql/src/test/templates/TestParse.vm Sat Feb 20 01:44:44
2010
@@ -23,10 +23,6 @@
   protected void setUp() {
     try {
       qt = new QTestUtil("$resultsDir.getCanonicalPath()", "$logDir.getCanonicalPath()");
-
-#foreach ($qf in $qfiles)
-      qt.addFile("$qf.getCanonicalPath()");
-#end
     }
     catch (Exception e) {
       System.out.println("Exception: " + e.getMessage());
@@ -54,6 +50,9 @@
   public void testParse_$tname() throws Exception {
     try {
       System.out.println("Begin query: " + "$fname");
+
+      qt.addFile("$qf.getCanonicalPath()");
+
       qt.init("$fname");
       ASTNode tree = qt.parseQuery("$fname");
       int ecode = qt.checkParseResults("$fname", tree);

Modified: hadoop/hive/branches/branch-0.4/ql/src/test/templates/TestParseNegative.vm
URL: http://svn.apache.org/viewvc/hadoop/hive/branches/branch-0.4/ql/src/test/templates/TestParseNegative.vm?rev=912061&r1=912060&r2=912061&view=diff
==============================================================================
--- hadoop/hive/branches/branch-0.4/ql/src/test/templates/TestParseNegative.vm (original)
+++ hadoop/hive/branches/branch-0.4/ql/src/test/templates/TestParseNegative.vm Sat Feb 20
01:44:44 2010
@@ -23,10 +23,6 @@
   protected void setUp() {
     try {
       qt = new QTestUtil("$resultsDir.getCanonicalPath()", "$logDir.getCanonicalPath()");
-
-#foreach ($qf in $qfiles)
-      qt.addFile("$qf.getCanonicalPath()");
-#end
     }
     catch (Exception e) {
       System.out.println("Exception: " + e.getMessage());
@@ -54,6 +50,9 @@
   public void testParseNegative_$tname() throws Exception {
     try {
       System.out.println("Begin query: " + "$fname");
+
+      qt.addFile("$qf.getCanonicalPath()");
+
       qt.init("$fname");
       ASTNode tree = qt.parseQuery("$fname");
       List<Task<? extends Serializable>> tasks = qt.analyzeAST(tree);



Mime
View raw message