alluxio rpc analysis

本贴最后更新于 2655 天前,其中的信息可能已经时移世改
title: alluxio rpc analysis

date: 2017-01-18 11:08:15

tags: [技术学习,bigdata,alluxio,en]

categories: 技术学习

keywords: 技术学习,bigdata,alluxio,en

description: alluxio rpc analysis

RPC communication

A class which extends parent class AbstractThriftClient will be a RPC client. They use the method retryRPC to invoke a PRC call, then ServiceHandler's method which override Service.Iface's abstract method will receive the calling.

To catch the exception during the calling from RPC client uniformity, it is a better way to use method RpcUtils.call() and provide a instance implements the abstract method call which defined in interface RpcCallable to handle the callback.

RPC call

RPC client invoke a RPC call to RPC service which is implemented by serviceHandler through clientService. There are three role in Alluxio, the call direction could be Client->Master, Worker->Master, Client->Worker.

The ServiceHandler implements ClientService.Iface which will called by RPC Client, usually ServiceHandler have a member to execute concrete operation on master or worker.

The following table shows six kind RPC call in Alluxio.

RPC Client ClientService(thrift) ServiceHandler Master/Worker call direction
FileSystemMasterClient FileSystemMasterClientService FileSystemMasterClientServiceHandler FileSystemMaster Client->Master
FileSystemMasterClient' FileSystemMasterWorkerService FileSystemMasterWorkerServiceHandler FileSystemMaster Worker->Master
RetryHandlingBlockMasterClient BlockMasterClientService BlockMasterClientServiceHandler BlockMaster Client->Master
BlockMasterClient BlockMasterWorkerService BlockMasterWorkerServiceHandler BlockMaster Worker->Master
FileSystemWorkerClient FileSystemWorkerClientService FileSystemWorkerClientServiceHandler FileSystemWorker Client->Worker
RetryHandlingBlockWorkerClient BlockWorkerClientService BlockWorkerClientServiceHandler BlockWorker Client->Worker

RPC method

master

  • FileSystemMasterClientServiceHandler

    • checkConsistency
    • completeFile
    • createDirectory
    • createFile
    • free
    • getFileBlockInfoList
    • getNewBlockIdForFile
    • getStatus
    • getStatusInternal
    • getUfsAddress
    • listStatus
    • loadMetadata
    • mount
    • remove
    • rename
    • scheduleAsyncPersist
    • setAttribute
    • unmount
  • FileSystemMasterWorkerServiceHandler

    • getFileInfo
    • getPinIdList
    • heartbeat
  • BlockMasterClientServiceHandler

    • getWorkerInfoList
    • getCapacityBytes
    • getUsedBytes
    • getBlockInfo
  • BlockMasterWorkerServiceHandler

    • getWorkerId
    • registerWorker
    • heartbeat
    • commitBlock

worker

  • BlockWorkerClientServiceHandler

    • accessBlock
    • cacheBlock
    • cancelBlock
    • lockBlock
    • promoteBlock
    • removeBlock
    • requestBlockLocation
    • requestSpace
    • unlockBlock
    • sessionHeartbeat
  • FileSystemWorkerClientServiceHandler

    • cancelUfsFile
    • closeUfsFile
    • completeUfsFile
    • createUfsFile
    • openUfsFile
    • sessionHeartbeat
  • 技术学习
    3 引用 • 1 回帖
  • 大数据

    大数据(big data)是指无法在一定时间范围内用常规软件工具进行捕捉、管理和处理的数据集合,是需要新处理模式才能具有更强的决策力、洞察发现力和流程优化能力的海量、高增长率和多样化的信息资产。

    89 引用 • 113 回帖
  • alluxio
    3 引用 • 1 回帖
  • en
    1 引用

相关帖子

欢迎来到这里!

我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。

注册 关于
请输入回帖内容 ...