取消設定

重置給定鍵的配置屬性。

語法

unset(key: str)

參數

參數 類型 說明
key str 設定的關鍵是取消設定。

Examples

spark.conf.set("my_key", "my_value")
spark.conf.get("my_key")
# 'my_value'
spark.conf.unset("my_key")
spark.conf.get("my_key")
# Traceback (most recent call last):
#    ...
# pyspark...SparkNoSuchElementException: ... The SQL config "my_key" cannot be found...