Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Sqoop runs in local mode while calling it from java

avatar
Contributor

I've a java programs which calls the sqoop . It runs fine and import the data to hbase. But it runs in localmode though I've specified  options.setNumMappers(5);

 

Please suggest how to run it in distributed mode. 

1 ACCEPTED SOLUTION

avatar
Mentor
Your java program needs to include cluster client configs on its
classpath for the Configuration class to be able to read and discover
the actual MR cluster automatically.

Typically you can achieve this by adding the directory
/etc/hadoop/conf to your classpath, if you are not launching your
custom application using the 'hadoop jar' command (which auto-sets the
desirable classpath).

View solution in original post

2 REPLIES 2

avatar
Mentor
Your java program needs to include cluster client configs on its
classpath for the Configuration class to be able to read and discover
the actual MR cluster automatically.

Typically you can achieve this by adding the directory
/etc/hadoop/conf to your classpath, if you are not launching your
custom application using the 'hadoop jar' command (which auto-sets the
desirable classpath).

avatar
Contributor

Thanks. It is now working in distributed mode.