0

Is there any method that takes in a directory path and adds all jar files to the classpath of my map-reduce job?

The one I know is DistributedCache.addFileToClassPath(file, conf) but it seems like this only works for single file. In my case I have all the JAR files required in a single dir and I want all these in the classpath of my MR job.

Also I want this to be done via my java program in which I am using hadoop API to submit my job and not submitting via command prompt.

Harinder
  • 11,776
  • 16
  • 70
  • 126

1 Answers1

0

You can use "-libjars" to give hadoop all your libraries. You only need to add it and the location of your libraries in your execution command

EMBorque
  • 145
  • 9