官方这么说的

[Since Spark 1.2] Configuring write ahead logs - Since Spark 1.2, we have introduced write ahead logs for achieving strong fault-tolerance guarantees. If enabled, all the data received from a receiver gets written into a write ahead log in the configuration checkpoint directory. This prevents data loss on driver recovery, thus ensuring zero data loss (discussed in detail in the Fault-tolerance Semantics section). This can be enabled by setting the configuration parameter spark.streaming.receiver.writeAheadLog.enable to true. However, these stronger semantics may come at the cost of the receiving throughput of individual receivers. This can be corrected by running more receivers in parallel to increase aggregate throughput. Additionally, it is recommended that the replication of the received data within Spark be disabled when the write ahead log is enabled as the log is already stored in a replicated storage system. This can be done by setting the storage level for the input stream to StorageLevel.MEMORY_AND_DISK_SER.

我理解,当worker或者driver挂掉后,可能会将receive的数据丢失,那么官方给的方案就是将接受的数据checkpoint到本地。

通过使用spark.streaming.receiver.writeAheadLog.enable=true来启用。 另外,如果启动这个的话, 那么streaming的存储策略就没有必要多个复本了,官方推荐使用StorageLevel.MEMORY_AND_DISK_SER即可

spark streaming的容错:防止数据丢失的更多相关文章

  1. Spark Streaming的容错和数据无丢失机制

    spark是迭代式的内存计算框架,具有很好的高可用性.sparkStreaming作为其模块之一,常被用于进行实时的流式计算.实时的流式处理系统必须是7*24运行的,同时可以从各种各样的系统错误中恢复 ...

  2. 62、Spark Streaming:容错机制以及事务语义

    一. 容错机制 1.背景 要理解Spark Streaming提供的容错机制,先回忆一下Spark RDD的基础容错语义: 1.RDD,Ressilient Distributed Dataset,是 ...

  3. Spark Streaming 的容错

    Spark Streaming 为了实现容错特性,接收到的数据需要在集群的多个Worker 节点上的 executors 之间保存副本(默认2份).当故障发生时,有两种数据需要恢复: 1. 已接收并且 ...

  4. 3.spark streaming Job 架构和容错解析

    一.Spark streaming Job 架构 SparkStreaming框架会自动启动Job并每隔BatchDuration时间会自动触发Job的调用. Spark Streaming的Job ...

  5. Spark入门实战系列--7.Spark Streaming(上)--实时流计算Spark Streaming原理介绍

    [注]该系列文章以及使用到安装包/测试数据 可以在<倾情大奉送--Spark入门实战系列>获取 .Spark Streaming简介 1.1 概述 Spark Streaming 是Spa ...

  6. Spark Streaming编程指南

    Overview A Quick Example Basic Concepts Linking Initializing StreamingContext Discretized Streams (D ...

  7. Spark Streaming和Kafka整合保证数据零丢失

    当我们正确地部署好Spark Streaming,我们就可以使用Spark Streaming提供的零数据丢失机制.为了体验这个关键的特性,你需要满足以下几个先决条件: 1.输入的数据来自可靠的数据源 ...

  8. .Spark Streaming(上)--实时流计算Spark Streaming原理介

    Spark入门实战系列--7.Spark Streaming(上)--实时流计算Spark Streaming原理介绍 http://www.cnblogs.com/shishanyuan/p/474 ...

  9. spark streaming的理解和应用

    1.Spark Streaming简介 官方网站解释:http://spark.apache.org/docs/latest/streaming-programming-guide.html 该博客转 ...

随机推荐

  1. javaWeb接口开发

    链接:http://blog.csdn.net/zxw136511485/article/details/51437115

  2. dedecms织梦列表页调用TAG标签并带上链接的实现方法

    在需要调用的地方添加如下代码: [field:id runphp='yes'] global $cfg_cmspath; $tags = GetTags(@me); $revalue = ''; $t ...

  3. JavaScript 获取 flash 对象

    关于js获取flash对象,网上有非常多的例子,我也尝试了不少方法. 虽然都能用,但是没有我最想要的东西, 后来看了下百度的,虽然很规范,各种情况都考虑到了,但是代码量却不是不容乐观, 前前后后将近2 ...

  4. CSS规范 - 最佳实践--(来自网易)

    最佳选择器写法(模块) /* 这是某个模块 */ .m-nav{}/* 模块容器 */ .m-nav li,.m-nav a{}/* 先共性 优化组合 */ .m-nav li{}/* 后个性 语义化 ...

  5. 阿里云Linux服务器挂载数据盘

    步骤1.登录服务器2.检查磁盘信息 命令:fdisk -l3.磁盘分区 命令:fdisk /dev/xvdb 查看命令帮助 m n //新增一个分区 p //建立一个主分区 1 //设置盘符为1 回车 ...

  6. plsql免安装客户端的配置

    不安装oracle,在安装了plsql之后,需要连接数据库,连接数据库需要在tns中tnsnames.ora中配置 首先需要两个文件: network instantclient-basic-win3 ...

  7. 【API】遍历进程的几种方式

    1.说明 枚举进程的常见几种方法 方法1:CreateToolhelp32Snapshot().Process32First()和Process32Next() 方法2:EnumProcesses() ...

  8. /etc/sysctl.conf 调优 & 优化Linux内核参数

    from: http://apps.hi.baidu.com/share/detail/15652067 http://keyknight.blog.163.com/blog/static/36637 ...

  9. git使用常用命令

    第一部分:个人整理部分(读<Git教程By廖雪峰.pdf>笔记) /* 配置全局参数 */git config --global user.name "username" ...

  10. os_mudule_docs

    pydoc os Help on module os: NAME os - OS routines for Mac, NT, or Posix depending on what system we' ...