Re: Fwd: Properties file not loaded with hadoop jar command

2015-09-10 Thread Nishanth S
Thanks.Yep its a java issue.using Thread.contextclassloader would solve this. -Nishanth On Fri, Jul 17, 2015 at 8:17 AM, Shahab Yunus wrote: > This seems to be a Java issue rather than Hadoop? > > Have you seen these below, regarding intricacies involved in reading a >

Re: Fwd: Properties file not loaded with hadoop jar command

2015-07-17 Thread Harshit Mathur
Are you reading the file in map or reduce task? On Jul 17, 2015 2:51 AM, Nishanth S chinchu2...@gmail.com wrote: Hello, I have built a jar file with maven as build tool which reads properties from a file.I am doing this like InputStream is =

Re: Fwd: Properties file not loaded with hadoop jar command

2015-07-17 Thread Shahab Yunus
This seems to be a Java issue rather than Hadoop? Have you seen these below, regarding intricacies involved in reading a resource file in Java jar? http://javarevisited.blogspot.com/2014/07/how-to-load-resources-from-classpath-in-java-example.html

Fwd: Properties file not loaded with hadoop jar command

2015-07-16 Thread Nishanth S
Hello, I have built a jar file with maven as build tool which reads properties from a file.I am doing this like InputStream is = ClassLoader.getSystemResourceAsStream((hadoop.properties)) on start iup.No qonce the jar is built I could see that the properties get loaded when I do java -jar