Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/apache-spark/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache spark unpersist()异步与同步_Apache Spark_Spark Dataframe_Spark Streaming - Fatal编程技术网

Apache spark unpersist()异步与同步

Apache spark unpersist()异步与同步,apache-spark,spark-dataframe,spark-streaming,Apache Spark,Spark Dataframe,Spark Streaming,我正在处理一个流应用程序,并试图取消持久化一个数据帧,所以用哪个方法清除cache unpersist()--异步调用更好 或取消持久化(true)--阻止调用 使用哪个更好?为什么?DF中的数据大小接近150Gb。 在这两种情况下,内部会发生什么 df.unpersist() //df is a cached dataframe val inputDf: DataFrame = readFile(spec, sparkSession) //read file from S3 or anyoth

我正在处理一个流应用程序,并试图取消持久化一个数据帧,所以用哪个方法清除cache unpersist()--异步调用更好 或取消持久化(true)--阻止调用

使用哪个更好?为什么?DF中的数据大小接近150Gb。 在这两种情况下,内部会发生什么

df.unpersist() //df is a cached dataframe
val inputDf: DataFrame = readFile(spec, sparkSession) //read file from S3
or anyother source
val recreateddf = inputDf.persist()
Spark文档

DataFrame   unpersist() 
DataFrame   unpersist(boolean blocking) 

我无法回答您的问题,但我很好奇,当您取消持久化150gb DF,然后重建并持久化它时,您会看到什么样的延迟?通常需要多长时间?