diff --git itests/qtest-spark/pom.xml itests/qtest-spark/pom.xml
index b31db8e..a533e8d 100644
--- itests/qtest-spark/pom.xml
+++ itests/qtest-spark/pom.xml
@@ -37,7 +37,7 @@
false
-
+ spark
false
${hadoop-23.version}
-mkdir -p
@@ -356,6 +356,7 @@
queryDirectory="${basedir}/${hive.path.to.root}/ql/src/test/queries/clientpositive/"
queryFile="${qfile}"
queryFileRegex="${qfile_regex}"
+ clusterMode="${clustermode}"
includeQueryFile="${spark.query.files}"
runDisabled="${run_disabled}"
hiveConfDir="${basedir}/${hive.path.to.root}/data/conf/spark"
diff --git itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java
index 3f47749..d25800b 100644
--- itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java
+++ itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java
@@ -222,7 +222,7 @@ public void normalizeNames(File path) throws Exception {
public QTestUtil(String outDir, String logDir, String initScript, String cleanupScript) throws
Exception {
- this(outDir, logDir, MiniClusterType.none, null, "0.20", initScript, cleanupScript);
+ this(outDir, logDir, MiniClusterType.spark, null, "0.20", initScript, cleanupScript);
}
public String getOutputDirectory() {
@@ -280,6 +280,7 @@ public void initConf() throws Exception {
public enum MiniClusterType {
mr,
tez,
+ spark,
none;
public static MiniClusterType valueForString(String type) {
@@ -287,6 +288,8 @@ public static MiniClusterType valueForString(String type) {
return mr;
} else if (type.equals("tez")) {
return tez;
+ } else if (type.equals("spark")) {
+ return spark;
} else {
return none;
}
@@ -322,7 +325,7 @@ public QTestUtil(String outDir, String logDir, MiniClusterType clusterType,
HadoopShims shims = ShimLoader.getHadoopShims();
int numberOfDataNodes = 4;
- if (clusterType != MiniClusterType.none) {
+ if (clusterType != MiniClusterType.none && clusterType != MiniClusterType.spark) {
dfs = shims.getMiniDfs(conf, numberOfDataNodes, true, null);
FileSystem fs = dfs.getFileSystem();
String uriString = WindowsPathUtil.getHdfsUriString(fs.getUri().toString());
@@ -766,7 +769,7 @@ public String cliInit(String tname, boolean recreate) throws Exception {
ss.setIsSilent(true);
SessionState oldSs = SessionState.get();
- if (oldSs != null && clusterType == MiniClusterType.tez) {
+ if (oldSs != null && (clusterType == MiniClusterType.tez || clusterType == MiniClusterType.spark)) {
oldSs.close();
}
@@ -800,7 +803,7 @@ private CliSessionState startSessionState()
ss.err = System.out;
SessionState oldSs = SessionState.get();
- if (oldSs != null && clusterType == MiniClusterType.tez) {
+ if (oldSs != null && (clusterType == MiniClusterType.tez || clusterType == MiniClusterType.spark)) {
oldSs.close();
}
if (oldSs != null && oldSs.out != null && oldSs.out != System.out) {
@@ -1500,7 +1503,7 @@ public void run() {
{
QTestUtil[] qt = new QTestUtil[qfiles.length];
for (int i = 0; i < qfiles.length; i++) {
- qt[i] = new QTestUtil(resDir, logDir, MiniClusterType.none, null, "0.20", "", "");
+ qt[i] = new QTestUtil(resDir, logDir, MiniClusterType.spark, null, "0.20", "", "");
qt[i].addFile(qfiles[i]);
qt[i].clearTestSideEffects();
}