Skip to content

Commit

Permalink
[CALCITE-4587] Set "spark.driver.bindAddress" explicitly to avoid "Bi…
Browse files Browse the repository at this point in the history
…ndException" thrown by Spark (Jiatao Tao)
  • Loading branch information
Aaaaaaron authored and zabetak committed Apr 19, 2021
1 parent 8169246 commit 7e3abc5
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -27,6 +27,7 @@
import org.apache.calcite.util.Util;
import org.apache.calcite.util.javac.JaninoCompiler;

import org.apache.spark.SparkConf;
import org.apache.spark.api.java.JavaSparkContext;

import java.io.File;
Expand All @@ -44,8 +45,10 @@
public class SparkHandlerImpl implements CalcitePrepare.SparkHandler {
private final HttpServer classServer;
private final AtomicInteger classId;
private final SparkConf sparkConf =
new SparkConf().set("spark.driver.bindAddress", "localhost");
private final JavaSparkContext sparkContext =
new JavaSparkContext("local[1]", "calcite");
new JavaSparkContext("local[1]", "calcite", sparkConf);

/** Thread-safe holder. */
private static class Holder {
Expand Down

0 comments on commit 7e3abc5

Please sign in to comment.