Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Can we create a WAR file with Hadoop MR jars and run it from a webapp server.

Can we create a WAR file with Hadoop MR jars and run it from a webapp server.

New Contributor

Hi,

I recently came across a team that is trying to create a WAR file with Hadoop MR jars and other web app jars and deploy them onto a webserver like JBoss and run the end to end application on web?

 

In the local pseudo hadoop cluster, the team was able to run the jar and get desired output.

 

But when they created a war file of all the jars that have Hadoop MR jars and other web application jars, and run it from Jboss, the MR jobs are not being executed.

 

I dont think so it is a good idea to create a WAR file as we have the MR jars deployed on edge node and use connectors from other web applications to execute the jobs.

 

Please advise me and correct me if I am wrong.

 

Thanks,

Sai

1 REPLY 1

Re: Can we create a WAR file with Hadoop MR jars and run it from a webapp server.

Master Guru
When you say 'not being executed', what do you mean specifically? What is the precise error or behaviour observed?

It could indeed get messy if you bundle jars rather than use it from the installed classpath of CDH, but deploying such bundled web applications have been a generally common pattern in my experience - and is fine to do, if there is such a need that the existing tools do not already solve adequately for you.

You can certainly make it work, but I'd advise planning on a upgrade-handling mechanism early, to absorb in all client-side fixes when the cluster is updated/upgraded, bringing with it a new set of jars.