You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ha...@apache.org on 2012/03/10 18:10:54 UTC
svn commit: r1299237 -
/hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/QTestUtil.java
Author: hashutosh
Date: Sat Mar 10 17:10:54 2012
New Revision: 1299237
URL: http://svn.apache.org/viewvc?rev=1299237&view=rev
Log:
HIVE-2857 : QTestUtil.cleanUp() fails with FileNotException on 0.23 (Carl Steinbach via hashutosh)
Modified:
hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/QTestUtil.java
Modified: hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/QTestUtil.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/QTestUtil.java?rev=1299237&r1=1299236&r2=1299237&view=diff
==============================================================================
--- hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/QTestUtil.java (original)
+++ hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/QTestUtil.java Sat Mar 10 17:10:54 2012
@@ -386,9 +386,14 @@ public class QTestUtil {
// delete any contents in the warehouse dir
Path p = new Path(testWarehouse);
FileSystem fs = p.getFileSystem(conf);
- FileStatus [] ls = fs.listStatus(p);
- for (int i=0; (ls != null) && (i<ls.length); i++) {
- fs.delete(ls[i].getPath(), true);
+
+ try {
+ FileStatus [] ls = fs.listStatus(p);
+ for (int i=0; (ls != null) && (i<ls.length); i++) {
+ fs.delete(ls[i].getPath(), true);
+ }
+ } catch (FileNotFoundException e) {
+ // Best effort
}
FunctionRegistry.unregisterTemporaryUDF("test_udaf");