Starting from protocol Versionedprotocol 3--clientprotocol, Datanodeprotocol, Namenodeprotocol, Refreshauthorizationpolicyprotocol, Refreshusermappingsprotocol

Source: Internet
Author: User

1, ClientProtocol This thing version number is 61l;datanodeprotocol is 26l;namenodeprotocol is 3L; Refreshauthorizationpolicyprotocol is 1l,refreshusermappingsprotocol is 1L,

Well, to enumerate what the use of this thing, we also see, in fact, the most often change is clientprotocol, and then is Datanodeprotocol, behind that two basic haven't moved, hey

People write code is not casually come, there are order

public class NameNode implements ClientProtocol, Datanodeprotocol,
Namenodeprotocol, Fsconstants,
Refreshauthorizationpolicyprotocol,
Refreshusermappingsprotocol

2, first look at ClientProtocol, this inside method is many, constant also many, enumeration under constant


public int get_stats_capacity_idx = 0;
public int get_stats_used_idx = 1;
public int get_stats_remaining_idx = 2;
public int get_stats_under_replicated_idx = 3;
public int get_stats_corrupt_blocks_idx = 4;
public int get_stats_missing_blocks_idx = 5;

What do these six numbers do?

Don't worry, look slowly,

This protocol has a total of three parts:

respectively is

File contents, Namespace management, System issues and management

The first part is file contents, a total of 14 methods, inside Create and Addblock are overloaded methods.

Getblocklocations, create (2), append, Recoverlease, isfileclosed, Setreplication, SetPermission, SetOwner, Abandonblock, Addblock (2), complete, reportbadblocks.

According to the additions and deletions to the division,

Add: Create (2), Addblock (2),

Deletion: Abandonblock

Change: Append, Setreplication, SetPermission, SetOwner, recoverlease

Check: Getblocklocations, isfileclosed, complete, reportbadblocks

Starting from protocol Versionedprotocol 3--clientprotocol, Datanodeprotocol, Namenodeprotocol, Refreshauthorizationpolicyprotocol, Refreshusermappingsprotocol

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.