Sarde
Sarde

Reputation: 688

Running jar on hadoop server as a service

i made one jar

which analyzes system logs .. for running this jar on HADOOP server i can do it using command line like "bin/hadoop jar log.jar"

but my problem is i want to make this jar executable in background as a service on Ubuntu master machine.

can any one help me how can i make HADOOP jar as a service so it can run like a background service on Ubuntu Machine .. runs after every 1hrs.

Upvotes: 1

Views: 277

Answers (1)

Chris White
Chris White

Reputation: 30089

You have a few options, here's two:

  • Configure a crontab job to run your job every hour, something like (you'll need to fully qualify the path to hadoop and the jar itself):
  0 * * * *   /usr/lib/hadoop/bin/hadoop jar /path/to/jar/log.jar
  • Run an OOZIE server and configure a coordinator to submit the job on an hourly basis. More effort that the above suggestion but worth a look.

Upvotes: 1

Related Questions