作为分布式架构的文件缓存系统,rpc调用必不可少

client作为客户端

master提供thrift rpc的服务,管理以下信息:

  • block信息
  • fileSystem信息
  • meta信息
  • metrics信息
  • lineage信息

worker提供thrift rpc和netty rpc,管理一下信息:

  • block的实际访问与存储

alluxio源码解析-rpc调用概述(1)

 

不同版本alluxio,rpc方式的变化

在不断的迭代更新中,rpc调用方式也发生了变化:

1.4版本:只采用thrift作为rpc的手段

1.8版本:采用thrift和netty作为rpc的手段

alluxio源码解析-rpc调用概述(1)

 

2.0版本:采用grpc和netty作为rpc的手段

 alluxio源码解析-rpc调用概述(1)

 

 

(1.8版本)client和worker之间rpc调用的交互流程

下图中,包括了基本的读取,删除,写入,创建目录等操作.

 

alluxio源码解析-rpc调用概述(1)

 

通过抓包分析,也可以粗略的看到各种rpc调用

 thrift调用:

抓取方法:(比较笨的方法,过滤掉用无用的心跳包)

thrift  and tcp.len ne 90 and tcp.len ne 2423 and tcp.len ne 60  and tcp.len ne 116 and tcp.len ne 45 and tcp.len ne 67 and tcp.len ne 54 and tcp.len ne 37 and tcp.len ne 2566

 

上传
alluxio源码解析-rpc调用概述(1)
 
 
 
读取
alluxio源码解析-rpc调用概述(1)
 
 
 
删除
alluxio源码解析-rpc调用概述(1)
 
 
创建文件夹
alluxio源码解析-rpc调用概述(1)
 
删除文件夹
alluxio源码解析-rpc调用概述(1)
 

netty调用(Short circuit):

抓取方法:

 tcp.port eq 29999

 

netty调用(纯网络传输):

alluxio.user.short.circuit.enabled=false

抓取方法:

 tcp.port eq 29999
上传
alluxio源码解析-rpc调用概述(1)
 
 
 
读取
alluxio源码解析-rpc调用概述(1)

相关文章: