In my map-reduce program, the mapper needs to access a small txt file. I pack this file in my job jar file, so theoretically when the jar file gets extracted on each node (mapper or reducer), the mapper should have access to it. But how can I tell the mapper that the file exists locally?
Asked
Active
Viewed 24 times
0
-
Did you try getResourceAsStream ()? – Ravindra babu Nov 27 '15 at 01:39
-
no, could you explain it more? – HHH Nov 27 '15 at 01:47
-
http://stackoverflow.com/questions/1464291/how-to-really-read-text-file-from-classpath-in-java – Ravindra babu Nov 27 '15 at 01:49