gpt4 book ai didi

hadoop - Apache Pig 和 Hadoop 的实现

转载 作者:可可西里 更新时间:2023-11-01 15:17:42 24 4
gpt4 key购买 nike

我了解到 Pig 是构建在 Apache Hadoop 之上的。但是我无法找到 Pig 所具有的裸 hadoop 实现所缺少的额外功能。是什么导致需要像 Pig Latin 这样的语言? Hadoop 缺少什么?

最佳答案

引用自维基:

Pig is a high-level platform for creating MapReduce programs used with Hadoop.The language for this platform is called Pig Latin. Pig Latin abstracts the programming from the Java MapReduce idiom into a notation which makes MapReduce programming high level, similar to that of SQL for RDBMS systems. Pig Latin can be extended using UDF (User Defined Functions) which the user can write in Java, Python or JavaScript and then call directly from the language.

现在,上面的关键词是high-levelabstracts。我们让 DBA 可以在不了解任何主要编程语言的情况下创建/管理数据库的方式,但对于 SQL,类似地,我们可以让数据工程师使用 Pig 创建/管理数据管道/仓库,而无需了解如何/什么是正在发生的复杂性作为 hadoop 作业实现/执行。因此,为了回答您的问题,Pig 并不能补充 Hadoop 所缺少的任何功能,它只是一个构建在 hadoop 之上的高级框架,可以更快地完成工作(开发时间)。

您当然可以用 Hadoop 完成 Pig 所做的一切,但是尝试 Pig 的一些高级功能并为它们编写 hadoop 作业将花费一些非常好的时间。因此,非常自由地说,一些在整个数据工程中通用/通用的任务已经预先以 Pig 的形式在裸 hadoop 中实现,您只需要用 Pig-Latin 告诉它执行。

关于hadoop - Apache Pig 和 Hadoop 的实现,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16259209/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com