上面所有关于 Savepoints 的内容听起来与我们在之前的文章中对 Checkpoints 的介绍非常相似。
trx_savepoints:InnoDB 中多个 trx_named_savept_t 对象形成的链表。...用户线程中有一个 m_savepoints 链表,用户创建的多个 savepoint 通过 prev 属性形成链表,m_savepoints 就指向最新创建的 savepoint。...删除同名 savepoint 如果在用户线程的 m_savepoints 链表中找到了和本次创建的 savepoint 同名的 savepoint,需要先删除 m_savepoints 链表中的同名 savepoint...InnoDB 从事务对象的 trx_savepoints 链表中删除 trx_named_savept_t 对象之后,server 层接着从用户线程的 m_savepoints 链表中删除 server...server 层创建的 SAVEPOINT 对象会放入 m_savepoints 链表的末尾。
查找 savepoint 每个用户线程都有一个 m_savepoints 链表,用户每创建一个 savepoint,它的对象都会追加到链表末尾。...m_savepoints 链表的指针,指向最新加入的 savepoint 对象。...m_savepoints 链表的指针指向最新加入的 savepoint 对象,查找过程自然就是从后往前了。...从后往前遍历 m_savepoints 链表的过程中,如果当前遍历的 savepoint 对象名字等于要回滚的那个 savepoint 对象名字,就找到了,否则,继续往前遍历。...删除 savept3 之后,m_savepoints 链表如下图所示: 6. 总结 回滚到某个 savepoint,首先要从 m_savepoints 链表中找到这个 savepoint。
state.checkpoints.dir: hdfs://namenode-host:port/flink-checkpoints # Default target directory for savepoints..., optional. # # state.savepoints.dir: hdfs://namenode-host:port/flink-checkpoints # Flag to enable/...该目录必须对所有参与的TaskManagers及JobManagers可见 state.checkpoints.num-retained,默认为1,用于指定保留的已完成的checkpoints个数 state.savepoints.dir...,默认为none,用于指定savepoints的默认目录 taskmanager.state.local.root-dirs,默认为none 小结 可以通过使用StreamExecutionEnvironment.enableCheckpointing...的相关配置,主要是state backend的配置,比如state.backend.async、state.backend.incremental、state.checkpoints.dir、state.savepoints.dir
# Default target directory for savepoints, optional. # # state.savepoints.dir: hdfs://namenode-host:port.../flink-savepoints state.savepoints.dir: hdfs://bd171:8020/sp 二、在 Dinky 中恢复 FlinkSQL 作业 创建 Yarn Session
PERFORMANCE_SCHEMA Support: YES Comment: Performance Schema Transactions: NO XA: NO Savepoints...Comment: Supports transactions, row-level locking, and foreign keys Transactions: YES XA: YES Savepoints...Support: YES Comment: Collection of identical MyISAM tables Transactions: NO XA: NO Savepoints.../dev/null storage engine (anything you write to it disappears) Transactions: NO XA: NO Savepoints...Engine: MyISAM Support: YES Comment: MyISAM storage engine Transactions: NO XA: NO Savepoints
ENGINE 存储引擎的名称 SUPPORT 存储引擎的支持级别,后面做介绍 COMMENT 对于该存储引擎的一个简介 TRANSACTIONS 该存储引擎是否支持事务 XA 该存储引擎是否支持分布式事务 SAVEPOINTS...该存储引擎是否支持保存点(SAVEPOINTS) 接下来对上面的一些栏位做进一步的介绍 1.1 存储引擎的支持级别 该表的SUPPORT栏位有如下可能的值 值 意义 YES 引擎是被支持的且被激活 DEFAULT
Connection connection = null; PreparedStatement preparedStatement=null; LinkedList savepoints...// 设置回滚点 Savepoint savepoint = connection.setSavepoint(); savepoints.addLast...= connection){ try { //Savepoint sp = savepoints.getLast();...Savepoint sp = savepoints.get(4); if(null !
. */ @Nullable private final Path baseCheckpointPath; /** The path where savepoints will...* @param baseSavepointPath The default directory for savepoints, or null, if none is set....* @param baseSavepointPath The default directory for savepoints, or null, if none is set....* * @return The default directory for savepoints, or null, if no default directory has been...File State Backend (" + "checkpoints: '" + getCheckpointPath() + "', savepoints
. */ @Nullable private final Path baseCheckpointPath; /** The path where savepoints will...* @param baseSavepointPath The default directory for savepoints, or null, if none is set....* @param baseSavepointPath The default directory for savepoints, or null, if none is set....* * @return The default directory for savepoints, or null, if no default directory has been...File State Backend (" + "checkpoints: '" + getCheckpointPath() + "', savepoints
Savepoint目录,有两种方式来指定 需要配置Savepoint的默认路径,需要在Flink的配置文件conf/flink-conf.yaml中,添加如下配置,设置Savepoint存储目录 state.savepoints.dir...: hdfs://namenode01.td.com/flink/flink-savepoints 手动执行savepoint命令的时候,指定Savepoint存储目录 bin/flink savepoint...Savepoint数据 bin/flink savepoint 40dcc6d2ba90f13930abce295de8d038 hdfs://namenode01.td.com/tmp/flink/savepoints...savepointPath [:runArgs] 以上面保存的Savepoint为例,恢复Job运行 bin/flink run -s hdfs://namenode01.td.com/tmp/flink/savepoints
. */ @Nullable private final Path baseCheckpointPath; /** The path where savepoints will...MemoryStateBackend, setting optionally the path to persist checkpoint metadata * to, and to persist savepoints...* @param savepointPath The path to write savepoints to....Creates a new MemoryStateBackend, setting optionally the paths to persist checkpoint metadata * and savepoints...* @param savepointPath The path to write savepoints to.
其实我们可以使用SQL Server中的Savepoints来解决上述问题。 示例如下: 1.先建立测试表: CREATE TABLE [dbo]....values(4,’4′); rollback tran point1 commit 执行结果如下: Id mark 3 3 可见,虽然3,4都在一个事务中,但是由于使用了SavePoints
. */ @Nullable private final Path baseCheckpointPath; /** The path where savepoints will...MemoryStateBackend, setting optionally the path to persist checkpoint metadata * to, and to persist savepoints...* @param savepointPath The path to write savepoints to....Creates a new MemoryStateBackend, setting optionally the paths to persist checkpoint metadata * and savepoints...* @param savepointPath The path to write savepoints to.
但是,你可以配置检查点定期持久化存储在外部系统中,类似于保存点(savepoints)。这些外部持久化的检查点将其元数据写入持久性存储中,即使在作业失败时也不会自动清除。...checkpointMetaDataPath [:runArgs] 备注: Flink版本:1.4 术语翻译: 术语 翻译 Checkpoints 检查点 Externalized Checkpoints 外部检查点 savepoints
ALTER SYSTEM SET wal_level = 'minimal'; 4.3 Savepoints Savepoints 允许事务在进行部分回滚时定义一个保存点,以便稍后可以回到该点继续执行。...可以使用 SAVEPOINT 和 ROLLBACK TO 语句来操作 Savepoints。
十三,Savepoints 使用Data Stream API编写的程序可以从Savepoints恢复执行。Savepoints允许更新程序和Flink集群,而不会丢失任何状态。...Savepoints 是手动触发的checkpoints,它们记录程序的快照并将其写入状态后端。他们依靠这个常规的检查点机制。执行过程中,定期在工作节点上快照并生成检查点。...Savepoints 与这些定期checkpoints类似,除了它们由用户触发,并且在较新的检查点完成时不会自动过期。可以从命令行创建保存点,也可以通过REST API取消作业。
Managers, Task Managers, Clients 作业管理器,任务管理器,客户端 Task Slots and Resources 任务执行槽和资源 State Backends 转态后端 Savepoints...Savepoints 保存点 用数据流API写的程序可以从一个保存点恢复执行。保存点可以在不丢失状态的情况下更新你的程序和Flink集群。...保存点Savepoints 是人工触发的检查点,保存点就是把程序的执行做个快照并且写入状态端。用常规检查点机制就可以做到这样的。在执行时,程序会被周期性的在工作节点上做快照,并且产生检查点。
high-availability.zookeeper.path.root: /flink state.checkpoints.dir: hdfs:///flink/checkpoints state.savepoints.dir...: hdfs:///flink/savepoints 4.2 启动hdfs 关于hadoop的配置文件与启动方式在这就不赘述了; 4.3 启动Flink中Zookeeper 进入flink文件夹 .
/* Static space for the 2 default backends */ Savepoint *pSavepoint; /* List of active savepoints... /* Busy handler timeout, in msec */ int nSavepoint; /* Number of non-transaction savepoints
领取专属 10元无门槛券
手把手带您无忧上云