In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "what is the principle of serialization in hadoop2.2". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what is the principle of serialization in hadoop2.2".
Serialization refers to encoding an object into a byte stream and then refactoring the object from the byte stream
Why do you need serialization?
A: using the serialization interface, you can store object instances from a local file or transfer them to a node on the other side of the network.
Serialization process:
The three main uses of serialization:
1. As a persistent format
two。 A data format for communication between network nodes
3. Copy and clone
Serialization mechanism of hadoop:
Call the write () method to serialize the object into the stream, and call the readFile () method to deserialize.
The main differences between java serialization and hadoop serialization:
Java serialized objects cannot be reused, so new objects are constantly created during deserialization.
Hadoop serialized objects can be reused, so objects can be reused in the deserialization process, and multiple deserialized results of a serialized object can be obtained.
The serialization mechanism of hadoop reduces the allocation and recovery of java objects, and improves the efficiency of application.
Advantages of the hadoop serialization mechanism:
1. Compact: the scarcest resource in Hadoop is broadband, so the compact serialization mechanism can take full advantage of broadband.
two。 Fast: serialization mechanisms are heavily used in communication, so you need to reduce the cost of serialization and deserialization.
3. Scalable: it can be upgraded with the upgrade of communication protocol.
4. Interoperability: supports communication between different development languages.
Hadoop serialization mechanism:
The serialization mechanism implemented by Hadoop through the Writable interface.
The interface provides two methods, write and readFiles.
Hadoop also includes several other important serialization interfaces, WritableCompareable, RawComparator, and WritableComparator.
Thank you for reading, the above is the content of "what is the principle of serialization in hadoop2.2". After the study of this article, I believe you have a deeper understanding of what the principle of serialization in hadoop2.2 is, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.