Author: xuefu
Date: Thu Jun 11 13:10:59 2015
New Revision: 1684877
URL: http://svn.apache.org/r1684877
Log:
PIG-4593: Enable TestMultiQueryLocal in spark mode (Liyun via Xuefu)
Modified:
pig/branches/spark/shims/test/hadoop20/org/apache/pig/test/SparkMiniCluster.java
pig/branches/spark/shims/test/hadoop23/org/apache/pig/test/SparkMiniCluster.java
pig/branches/spark/test/org/apache/pig/test/MiniGenericCluster.java
Modified:
pig/branches/spark/shims/test/hadoop20/org/apache/pig/test/SparkMiniCluster.java
URL:
http://svn.apache.org/viewvc/pig/branches/spark/shims/test/hadoop20/org/apache/pig/test/SparkMiniCluster.java?rev=1684877&r1=1684876&r2=1684877&view=diff
==============================================================================
---
pig/branches/spark/shims/test/hadoop20/org/apache/pig/test/SparkMiniCluster.java
(original)
+++
pig/branches/spark/shims/test/hadoop20/org/apache/pig/test/SparkMiniCluster.java
Thu Jun 11 13:10:59 2015
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.pig.test;
import java.io.File;
Modified:
pig/branches/spark/shims/test/hadoop23/org/apache/pig/test/SparkMiniCluster.java
URL:
http://svn.apache.org/viewvc/pig/branches/spark/shims/test/hadoop23/org/apache/pig/test/SparkMiniCluster.java?rev=1684877&r1=1684876&r2=1684877&view=diff
==============================================================================
---
pig/branches/spark/shims/test/hadoop23/org/apache/pig/test/SparkMiniCluster.java
(original)
+++
pig/branches/spark/shims/test/hadoop23/org/apache/pig/test/SparkMiniCluster.java
Thu Jun 11 13:10:59 2015
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.pig.test;
import java.io.File;
@@ -14,7 +31,9 @@ import org.apache.hadoop.hdfs.MiniDFSClu
import org.apache.hadoop.mapreduce.v2.MiniMRYarnCluster;
import org.apache.hadoop.yarn.conf.YarnConfiguration;
import org.apache.pig.ExecType;
+import org.apache.pig.backend.hadoop.executionengine.Launcher;
import org.apache.pig.backend.hadoop.executionengine.spark.SparkExecType;
+import org.apache.pig.backend.hadoop.executionengine.spark.SparkLauncher;
public class SparkMiniCluster extends MiniGenericCluster {
private static final File CONF_DIR = new File("build/classes");
@@ -125,4 +144,8 @@ public class SparkMiniCluster extends Mi
YARN_CONF_FILE.delete();
}
}
+
+ static public Launcher getLauncher() {
+ return new SparkLauncher();
+ }
}
Modified: pig/branches/spark/test/org/apache/pig/test/MiniGenericCluster.java
URL:
http://svn.apache.org/viewvc/pig/branches/spark/test/org/apache/pig/test/MiniGenericCluster.java?rev=1684877&r1=1684876&r2=1684877&view=diff
==============================================================================
--- pig/branches/spark/test/org/apache/pig/test/MiniGenericCluster.java
(original)
+++ pig/branches/spark/test/org/apache/pig/test/MiniGenericCluster.java Thu Jun
11 13:10:59 2015
@@ -160,7 +160,9 @@ abstract public class MiniGenericCluster
return MiniCluster.getLauncher();
} else if (execType.equalsIgnoreCase(EXECTYPE_TEZ)) {
return TezMiniCluster.getLauncher();
- } else {
+ } else if(execType.equalsIgnoreCase(EXECTYPE_SPARK)){
+ return SparkMiniCluster.getLauncher();
+ } else{
throw new RuntimeException("Unknown test.exec.type: " + execType);
}
}