Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hadoop >> mail # user >> Re: Possible to run an application jar as a hadoop daemon?


Copy link to this message
-
Re: Possible to run an application jar as a hadoop daemon?
Hi,

On Fri, Jan 4, 2013 at 8:10 PM, Krishna Rao <[EMAIL PROTECTED]> wrote:
> If I want to run the jar I need to run it using "hadoop jar <application jar>", so that it can access HDFS (that is running "java -jar <application jar> results in a HDFS error").

The latter is because running a Hadoop program requires Hadoop
dependencies and configs to be available in its runtime classpath.
This can be achieved by either creating a fat jar assembly, containing
config files and all required dependency jars; or you can run it as:
java -cp yourjar.jar:`hadoop classpath` YourMainClass <args> such that
the classpath is automatically setup for you.

--
Harsh J
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB