📜  pyspark 检查当前 hadoop 版本 - 任何代码示例

📅  最后修改于: 2022-03-11 15:00:47.728000             🧑  作者: Mango

代码示例1
from pyspark.sql import SparkSession
spark = SparkSession.getOrCreate()
sc = spark.sparkContext
print(f"Hadoop version = {sc._jvm.org.apache.hadoop.util.VersionInfo.getVersion()}")