structured streaming的checkpoint文件无限增长

2024-04-03 18:38

本文主要是介绍structured streaming的checkpoint文件无限增长,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

目录

  • structured streaming的checkpoint文件无限增长

structured streaming的checkpoint文件无限增长

原理和处理办法:
https://www.waitingforcode.com/apache-spark-structured-streaming/checkpoint-storage-structured-streaming/read#will_it_grow_indifinetely

Will it grow indefinitely?
No. Apache Spark will always keep the number of checkpointed files that you specified in the configuration entry. The configuration entry responsible for that number is spark.sql.streaming.minBatchesToRetain and its default is 100.

You should not ignore this property since it will define your data reprocessing period. For example, if you decided to keep only the last 10 entries that are generated every minute, you will be unable to reprocess the data older than 10 minutes - or at least, you will be unable to do it easily by simply promoting checkpointed information to the one to use by the query. Checkpoint cleaning is a physical delete operation, so you lose the information indefinitely.

答案:
you can use a more global property called spark.sql.streaming.checkpointLocation. If this property is used, Apache Spark will create a checkpoint directory under s p a r k . s q l . s t r e a m i n g . c h e c k p o i n t L o c a t i o n / {spark.sql.streaming.checkpointLocation}/ spark.sql.streaming.checkpointLocation/{options.queryName}. If queryName options is missing it will generate a directory with random UUID identifier.

Always define queryName alongside the spark.sql.streaming.checkpointLocation
If you want to use the checkpoint as your main fault-tolerance mechanism and you configure it with spark.sql.streaming.checkpointLocation, always define the queryName sink option. Otherwise when the query will restart, Apache Spark will create a completely new checkpoint directory and, therefore, do not restore your checkpointed state!

这篇关于structured streaming的checkpoint文件无限增长的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/873679

相关文章

任务5.1 初识Spark Streaming

实战概述:使用Spark Streaming进行词频统计 1. 项目背景与目标 背景: Spark Streaming是Apache Spark的流处理框架,用于构建可伸缩、高吞吐量的实时数据处理应用。目标: 实现一个实时词频统计系统,能够处理流式数据并统计文本中的单词出现频率。 2. 技术要点 Spark Streaming集成: 与Spark生态的其他组件如Spark SQL、ML

三十八篇:架构大师之路:探索软件设计的无限可能

架构大师之路:探索软件设计的无限可能 1. 引言:架构的艺术与科学 在软件工程的广阔天地中,系统架构不仅是设计的骨架,更是灵魂所在。它如同建筑师手中的蓝图,决定了系统的结构、性能、可维护性以及未来的扩展性。本节将深入探讨软件架构的定义、其在系统设计中的核心作用,以及不同架构风格对系统特性的影响。 软件架构的定义及其在系统设计中的核心作用 软件架构,简而言之,是指软件系统的基本组织结构,

vector对象在内存空间中是如何增长的

vector对象在内存空间中是如何增长的   我们都知道vector对象是动态存储的,从这一点看有点像链表,可以动态的增加或减少元素。我们也知道链表中是有指针变量,专门用于存储上一个和下一个元素的地址。正是因为这两个指针的存在,我们才能做到动态的存储数据,即不用像数组那样必须事先申请好空间。链表的缺点就是不能够快速的随机访问其中元素,必须通过指针层层查找。 但是,vector既可以实现动态存储数

硅谷产品实战-总结:23、增长的核心在于减少用户阻力

本文笔记全部来自极客时间中《硅谷产品实战36讲》 一个产品的用户数量,往往取决于以下三方面: 产品的质量是不是满足用户的需求;用户是不是知道如何使用;用户为了使用产品所花费的时间和他们得到的价值是不是匹配 产品经理问题汇总 什么是用户阻力? 要减少用户阻力,那你必须允要明确人阻力什么? 你产品的体验要尽可能地减少用户学习如何使用产品、操作产品的阻力,从而才能实现高速增长。

IOS Swift 从入门到精通: For 循环, While 循环, 重复循环, 退出循环, 退出多重循环, 跳过项目, 无限循环

文章目录 For 循环While 循环重复循环退出循环退出多重循环跳过项目无限循环总结 For 循环 Swift 有几种编写循环的方法,但它们的底层机制是相同的:重复运行一些代码,直到条件计算为假。 Swift 中最常见的循环是一个for循环:它将循环遍历数组和范围,并且每次循环时它都会取出一个项目并分配给一个常量。 例如,这里有一个数字范围: let count = 1.

抖音商城618好物节消费数据报告发布,带货成交额同比增长300%

6月21日,“抖音商城618好物节”消费数据报告发布,呈现618期间平台全域经营情况及大众消费趋势。 今年618大促活动中,抖音电商投入流量资源和消费券,鼓励商家、达人双向经营货架场景和内容场景,不断激活消费市场。 报告显示,5月24日至6月18日,平台直播累计时长达1.49亿小时,超19万名作者带货GMV同比增长300%,头部达人稳定发挥影响力,拉动交易增量。抖音电商整体动销商品数较去

[Qt]Qt框架解析:从入门到精通,探索平台开发的无限可能

一、Qt的概述         Qt是一个跨平台的C++图形用户界面应用程序框架(GUI)。它为应用程序开发者提供建立艺术级图形界面所需的所有功能。它是完全面向对象的,很容易扩展,并且允许真正的组件编程。开发环境为Qt creator5.8.0,下载网址:http://download.qt.io/archive/qt/ 二、创建工程 1、准备工作 (1)点击工具中选项 (2)设置编

解决无限debugger总结

基本工具 1: Notepad(修改保存) + ReRes(插件替换) ReRes安装教程 2: Fidder + 编程猫 + hook 情况 fidder基本:fidder插件使用hook构造器, 例如下 //配合编程猫专用工具进行hook(function() {'use strict'//过瑞数 debugervar eval_ = window.eval;window.ev

mysql实现sequence自增长

1、创建表tb_sequence,用来存放sequence值:   create table tb_sequence(name varchar(50) not null,current_value int not null,_increment int not null default 1, primary key(name));     2.现在插入一条记录  insert into t