Skip to content
Snippets Groups Projects
Commit 9e85bb71 authored by Kazuaki Ishizaki's avatar Kazuaki Ishizaki Committed by Kousuke Saruta
Browse files

[SPARK-12502][BUILD][PYTHON] Script /dev/run-tests fails when IBM Java is used

fix an exception with IBM JDK by removing update field from a JavaVersion tuple. This is because IBM JDK does not have information on update '_xx'

Author: Kazuaki Ishizaki <ishizaki@jp.ibm.com>

Closes #10463 from kiszk/SPARK-12502.
parent ead6abf7
No related branches found
No related tags found
No related merge requests found
......@@ -148,7 +148,7 @@ def determine_java_executable():
return java_exe if java_exe else which("java")
JavaVersion = namedtuple('JavaVersion', ['major', 'minor', 'patch', 'update'])
JavaVersion = namedtuple('JavaVersion', ['major', 'minor', 'patch'])
def determine_java_version(java_exe):
......@@ -164,14 +164,13 @@ def determine_java_version(java_exe):
# find raw version string, eg 'java version "1.8.0_25"'
raw_version_str = next(x for x in raw_output_lines if " version " in x)
match = re.search('(\d+)\.(\d+)\.(\d+)_(\d+)', raw_version_str)
match = re.search('(\d+)\.(\d+)\.(\d+)', raw_version_str)
major = int(match.group(1))
minor = int(match.group(2))
patch = int(match.group(3))
update = int(match.group(4))
return JavaVersion(major, minor, patch, update)
return JavaVersion(major, minor, patch)
# -------------------------------------------------------------------------------------------------
# Functions for running the other build and test scripts
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment