HDFs source code Analysis of RPC

Source: Internet
Author: User

To understand the message communication mechanism of Hadoop, we need to understand the dynamic agent of Java.

This is a decorative mode, with dynamic proxy implementation, with static factory generated by the specific implementation of the proxy class. Here is the proxy for set set.

When defining a generic method, you must precede a <t> to declare that this is a generic method, hold a generic t, and then use generic t as the function return value.

The Invocationhandler interface is used to intercept the method calls of the proxy object.

Next is the specific use of the proxy object

After using the proxy object, the function of set is upgraded (wrapper mode), and the function of logging is accomplished by intercepting the proxy object.

Write here today, at night if you have time to write, RPC is the core of Hadoop communication, the bottom layer is through the dynamic proxy to achieve, but the specific implementation of the object of the agent may be in the remote virtual machine, class capacity, slowly analyze it

HDFs source code Analysis of RPC

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.