📜  MapReduce 和 Pig 的区别

📅  最后修改于: 2021-10-27 06:49:10             🧑  作者: Mango

MapReduce是一种在 Hadoop 上工作的模型,可高效访问存储在 HDFS(Hadoop 分布式文件系统)中的大数据。它是 Hadoop 的核心组件,它将大数据分成小块并并行处理。

MapReduce 的特点:

  • 它可以在各种服务器上存储和分发大量数据。
  • 允许用户将数据存储在地图中并减少表格以进行处理。
  • 它保护系统免受任何未经授权的访问。
  • 它支持并行处理模型。

Pig是一种基于 Hadoop 生态系统构建的开源工具,用于提供更好的大数据处理。它是一种高级脚本语言,通常称为 Pig Latin 脚本。它适用于支持使用各种类型数据的 HDFS(Hadoop 分布式文件系统)。

猪的特点:

  • 它允许用户创建自定义的用户定义函数。
  • 它可以扩展使用。
  • 支持多种数据类型,例如 char long float 模式和函数。
  • 提供对 HDFS 的不同操作,如 GROUP、FILTER、JOIN、SORT。

MapReduce 和 Pig 的区别:

S.No

MapReduce

Pig

1. It is a Data Processing Language. It is a Data Flow Language.
2. It converts the job into map-reduce functions. It converts the query into map-reduce functions.
3. It is a Low-level Language. It is a High-level Language
4. It is difficult for the user to perform join operations. Makes it easy for the user to perform Join operations.
5. The user has to write 10 times more lines of code to perform a similar task than Pig. The user has to write fewer lines of code because it supports the multi-query approach.
6. It has several jobs therefore execution time is more. It is less compilation time as the Pig operator converts it into MapReduce jobs.
7. It is supported by recent versions of the Hadoop. It is supported with all versions of Hadoop.