Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hadoop >> mail # user >> best practice to work with resources

Copy link to this message
Re: best practice to work with resources
Thank you for detailed answer:

On Tue, May 25, 2010 at 5:48 PM, Harsh J <[EMAIL PROTECTED]> wrote:

> Hi,
> You can use the Hadoop-provided Configuration API to place your custom
> configuration name-value pairs while creating a job (This is actually
> an XML solution in the end, as the conf gets written to the job.xml).
> Its roughly like this:
> Configuration conf = new Configuration();
> (...)
> conf.set("myproperty.myname", "Eggs and Spam");
> // Likewise, you can set Int/Float/Long/Booleans also.
> (...)
> // Submit/Exec job now.
>From above example I understand that you have to write data to job.xml file
using java code. Is it possible work with resources  without java code
changes? I mean writing to file. In case I have to add some values to file I
have to recompile java code , but I want to make changes only in properties
file (properties , or xml) without  java code changes.