1
我看到下面的代碼片段中this blogSpark如何解析字符串中的系統屬性(無字符串插值)?
val warehouseLocation = "file:${system:user.dir}/spark-warehouse"
val spark = SparkSession
.builder()
.appName("SparkSessionZipsExample")
.config("spark.sql.warehouse.dir", warehouseLocation)
.enableHiveSupport()
.getOrCreate()
系統如何屬性user.dir
在warehouseLocation值被替換。不應該是s"file:${System.getProperty("user.dir")}/spark-warehouse"
?