Giraph源码分析(一)— 启动ZooKeeper服务

本文详细介绍了Apache Giraph,一个基于Hadoop构建的高可扩展图处理系统,以及其如何利用ZooKeeper进行计算状态管理。在Giraph中,GraphMapper类扩展了Hadoop的Mapper,实现BSP模型。文章深入剖析了GraphMapper的setup、map、cleanup和run方法,特别是如何在setup中启动ZooKeeper服务,包括ZooKeeperManager的初始化和选举过程。
摘要由CSDN通过智能技术生成

作者 | 白松

【注:本文为原创,引用转载需与博主联系。】

Giraph介绍:

Apache Giraph is an iterative graph processing system built for high scalability. For example, it is currently used at Facebook to analyze the social graph formed by users and their connections. Giraph originated as the open-source counterpart to Pregel, the graph processing architecture developed at Google and described in a 2010 paper. Both systems are inspired by the Bulk Synchronous Parallelmodel of distributed computation introduced by Leslie Valiant. Giraph adds several features beyond the basic Pregel model, including master computation, sharded aggregators, edge-oriented input, out-of-core computation, and more. With a steady development cycle and a growing community of users worldwide, Giraph is a natural choice for unleashing the potential of structured datasets at a massive scale.

原理:

Giraph基于Hadoop而建,将MapReduce中Mapper进行封装,未使用reducer。在Mapper中进行多次迭代,每次迭代等价于BSP模型中的SuperStep。一个Hadoop Job等价于一次BSP作业。基础结构如下图所示。

每部分的功能如下:

1. ZooKeeper: responsible for computation state

–partition/worker mapping

–global state: #superstep

–checkpoint paths, aggregator values, statistics

2. Master: responsible for coordination

–assigns partitions to workers

–coordinates synchronization

–requests checkpoints

–aggregates aggregator values

–collects health statuses

<
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值