You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by br...@apache.org on 2014/09/20 07:14:44 UTC
svn commit: r1626382 -
/hive/trunk/itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java
Author: brock
Date: Sat Sep 20 05:14:44 2014
New Revision: 1626382
URL: http://svn.apache.org/r1626382
Log:
HIVE-8100 - Add QTEST_LEAVE_FILES to QTestUtil (Brock reviewed by Szehon)
Modified:
hive/trunk/itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java
Modified: hive/trunk/itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java
URL: http://svn.apache.org/viewvc/hive/trunk/itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java?rev=1626382&r1=1626381&r2=1626382&view=diff
==============================================================================
--- hive/trunk/itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java (original)
+++ hive/trunk/itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java Sat Sep 20 05:14:44 2014
@@ -103,6 +103,7 @@ public class QTestUtil {
public static final String UTF_8 = "UTF-8";
private static final Log LOG = LogFactory.getLog("QTestUtil");
+ private static final String QTEST_LEAVE_FILES = "QTEST_LEAVE_FILES";
private final String defaultInitScript = "q_test_init.sql";
private final String defaultCleanupScript = "q_test_cleanup.sql";
@@ -537,6 +538,9 @@ public class QTestUtil {
* Clear out any side effects of running tests
*/
public void clearTestSideEffects() throws Exception {
+ if (System.getenv(QTEST_LEAVE_FILES) != null) {
+ return;
+ }
// Delete any tables other than the source tables
// and any databases other than the default database.
for (String dbName : db.getAllDatabases()) {
@@ -598,6 +602,9 @@ public class QTestUtil {
if(!isSessionStateStarted) {
startSessionState();
}
+ if (System.getenv(QTEST_LEAVE_FILES) != null) {
+ return;
+ }
SessionState.get().getConf().setBoolean("hive.test.shutdown.phase", true);