本文介绍: 【HDFS】一天一个RPC系列–updateBlockForPipeline

本文目标是:

  • 弄清updateBlockForPipeline这个RPC的作用。
  • 弄清updateBlockForPipeline RPC的使用场景,代码里的调用点。

一、updateBlockForPipeline的作用

其定义在ClientProtocol接口里,是Client与NameNode之间的接口。

看其代码注释描述:
为一个under construction状态下的block获取一个新的GS与access token。
此RPC只有在client需要恢复一个失败的pipeline时、或者为了append建立一个pipeline时会被调用。

  /**
   * Get a new generation stamp together with an access token for
   * a block under construction
   *
   * This method is called only when a client needs to recover a failed
   * pipeline or set up a pipeline for appending to a block.
   *
   * @param block a block
   * @param clientName the name of the client
   * @return a located block with a new generation stamp and an access token
   * @throws IOException if any error occurs
   */
  

原文地址:https://blog.csdn.net/yexiguafu/article/details/135885814

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。

如若转载,请注明出处:http://www.7code.cn/show_64241.html

如若内容造成侵权/违法违规/事实不符,请联系代码007邮箱:suwngjj01@126.com进行投诉反馈,一经查实,立即删除!

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注