What language to use for Hadoop Map / Reduce software? Java or PHP?

I recently wrote a couple of map / reduce programs in java. But I also know that a scripting language like php can also be used. However, basically, everyone recommends java or python. I am currently working on php. So I was wondering which language is better for map / abbreviations?

One of the main disadvantages of PHP for implementing map / reduce is that it is not multithreaded. In addition, hasoop has an extensive structure of classes, interfaces, and methods specially created in java that php programs cannot use. In addition, php is not intended to handle the heavy data processing task.

So can anyone tell me at wide points which one to choose as a tool of choice for implementing a map / zoom out?

+4
source share
1 answer

shanthanu, your first question

Q) what scripting language is good for hadoop?

A) Most scripting languages ​​like php, python, perl, ruby ​​bash are good. Any language that can be read using stdin, written on sdtout and on the parsing tab, and on new string characters will work: Hadoop Streaming simply passes the string representations of key value pairs in the form of concatenation with the tab to any program that should be executed on each node task tracker.

Most linux distributions used to configure hadoop, python, bash, ruby, perl ... clusters are already installed, but nothing will stop you from minimizing your own runtime for your favorite script or compiled programming language.

Q) PHP is not multithreaded?

A) yes, but there are ways we can make PHP multithreaded. For example, use: pnctl_fork () (but this does not work in windows)

The question you should always keep in mind before moving on to scripting languages ​​with hadoop is not "what scripting language?" because everything is in order.

But the difference between java and the scripting language is "Heart Beat of the child nodes will not be sent to the parent nodes when we use the scripting languages."

+7
source

Source: https://habr.com/ru/post/1387161/


All Articles