From 9663c4061ae07634697345560c84359574a75692 Mon Sep 17 00:00:00 2001 From: Yuming Wang Date: Thu, 8 Apr 2021 23:03:51 -0700 Subject: [PATCH] [SPARK-35002][INFRA] Fix the java.net.BindException when testing with Github Action ### What changes were proposed in this pull request? This PR tries to fix the `java.net.BindException` when testing with Github Action: ``` [info] org.apache.spark.sql.kafka010.producer.InternalKafkaProducerPoolSuite *** ABORTED *** (282 milliseconds) [info] java.net.BindException: Cannot assign requested address: Service 'sparkDriver' failed after 100 retries (on a random free port)! Consider explicitly setting the appropriate binding address for the service 'sparkDriver' (for example spark.driver.bindAddress for SparkDriver) to the correct binding address. [info] at sun.nio.ch.Net.bind0(Native Method) [info] at sun.nio.ch.Net.bind(Net.java:461) [info] at sun.nio.ch.Net.bind(Net.java:453) ``` https://github.com/apache/spark/pull/32090/checks?check_run_id=2295418529 ### Why are the changes needed? Fix test framework. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Test by Github Action. Closes #32096 from wangyum/SPARK_LOCAL_IP=localhost. Authored-by: Yuming Wang Signed-off-by: Dongjoon Hyun --- .github/workflows/benchmark.yml | 1 + .github/workflows/build_and_test.yml | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 918e59350dac6..c4d41bb8719f5 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -47,6 +47,7 @@ jobs: SPARK_BENCHMARK_NUM_SPLITS: ${{ github.event.inputs.num-splits }} SPARK_BENCHMARK_CUR_SPLIT: ${{ matrix.split }} SPARK_GENERATE_BENCHMARK_FILES: 1 + SPARK_LOCAL_IP: 127.0.0.1 steps: - name: Checkout Spark repository uses: actions/checkout@v2 diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 3abe20608a11a..2e2fd3bbf4f26 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -83,6 +83,7 @@ jobs: CONDA_PREFIX: /usr/share/miniconda GITHUB_PREV_SHA: ${{ github.event.before }} GITHUB_INPUT_BRANCH: ${{ github.event.inputs.target }} + SPARK_LOCAL_IP: 127.0.0.1 steps: - name: Checkout Spark repository uses: actions/checkout@v2 @@ -171,6 +172,7 @@ jobs: CONDA_PREFIX: /usr/share/miniconda GITHUB_PREV_SHA: ${{ github.event.before }} GITHUB_INPUT_BRANCH: ${{ github.event.inputs.target }} + SPARK_LOCAL_IP: 127.0.0.1 steps: - name: Checkout Spark repository uses: actions/checkout@v2 @@ -238,6 +240,7 @@ jobs: HIVE_PROFILE: hive2.3 GITHUB_PREV_SHA: ${{ github.event.before }} GITHUB_INPUT_BRANCH: ${{ github.event.inputs.target }} + SPARK_LOCAL_IP: 127.0.0.1 steps: - name: Checkout Spark repository uses: actions/checkout@v2 @@ -468,6 +471,8 @@ jobs: tpcds-1g: name: Run TPC-DS queries with SF=1 runs-on: ubuntu-20.04 + env: + SPARK_LOCAL_IP: 127.0.0.1 steps: - name: Checkout Spark repository uses: actions/checkout@v2