Author: xuefu
Date: Thu Mar 31 02:29:21 2016
New Revision: 1737172
URL: http://svn.apache.org/viewvc?rev=1737172&view=rev
Log:
PIG-4837: TestNativeMapReduce test fix (Liyun via Xuefu)
Modified:
pig/branches/spark/src/org/apache/pig/backend/hadoop/executionengine/spark/SparkLauncher.java
pig/branches/spark/test/excluded-tests-spark
Modified:
pig/branches/spark/src/org/apache/pig/backend/hadoop/executionengine/spark/SparkLauncher.java
URL:
http://svn.apache.org/viewvc/pig/branches/spark/src/org/apache/pig/backend/hadoop/executionengine/spark/SparkLauncher.java?rev=1737172&r1=1737171&r2=1737172&view=diff
==============================================================================
---
pig/branches/spark/src/org/apache/pig/backend/hadoop/executionengine/spark/SparkLauncher.java
(original)
+++
pig/branches/spark/src/org/apache/pig/backend/hadoop/executionengine/spark/SparkLauncher.java
Thu Mar 31 02:29:21 2016
@@ -17,10 +17,8 @@
*/
package org.apache.pig.backend.hadoop.executionengine.spark;
-import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
-import java.io.InputStreamReader;
import java.io.PrintStream;
import java.nio.file.Files;
import java.nio.file.Paths;
@@ -456,38 +454,11 @@ public class SparkLauncher extends Launc
return sparkPlan;
}
- private static String executeCommand(String command) {
-
- StringBuffer output = new StringBuffer();
-
- Process p;
- try {
- p = Runtime.getRuntime().exec(command);
- p.waitFor();
- BufferedReader reader =
- new BufferedReader(new
InputStreamReader(p.getInputStream()));
-
- String line = "";
- while ((line = reader.readLine())!= null) {
- output.append(line + "\n");
- }
-
- } catch (Exception e) {
- e.printStackTrace();
- }
-
- return output.toString();
-
- }
-
-
/**
* Only one SparkContext may be active per JVM (SPARK-2243). When multiple
threads start SparkLaucher,
* the static member sparkContext should be initialized only once
*/
private static synchronized void startSparkIfNeeded(PigContext pc) throws
PigException {
- String ARG_MAX= executeCommand("getconf ARG_MAX");
- LOG.info("ARG_MAX:"+ARG_MAX);
if (sparkContext == null) {
String master = null;
if (pc.getExecType().isLocal()) {
Modified: pig/branches/spark/test/excluded-tests-spark
URL:
http://svn.apache.org/viewvc/pig/branches/spark/test/excluded-tests-spark?rev=1737172&r1=1737171&r2=1737172&view=diff
==============================================================================
--- pig/branches/spark/test/excluded-tests-spark (original)
+++ pig/branches/spark/test/excluded-tests-spark Thu Mar 31 02:29:21 2016
@@ -1,2 +1,3 @@
**/Test*MR.java
**/tez/*.java
+**/TestNativeMapReduce.java