Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
Hadoop >> mail # user >> Please help with hadoop configuration parameter set and get


+
Peng, Wei 2010-12-17, 06:58
Copy link to this message
-
Re: Please help with hadoop configuration parameter set and get
You can use hadoop counter to pass this information.
This way, you see the counters in job report.

On Thu, Dec 16, 2010 at 10:58 PM, Peng, Wei <[EMAIL PROTECTED]> wrote:

> Hi,
>
>
>
> I am a newbie of hadoop.
>
> Today I was struggling with a hadoop problem for several hours.
>
>
>
> I initialize a parameter by setting job configuration in main.
>
> E.g. Configuration con = new Configuration();
>
> con.set("test", "1");
>
> Job job = new Job(con);
>
>
>
> Then in the mapper class, I want to set "test" to "2". I did it by
>
> context.getConfiguration().set("test","2");
>
>
>
> Finally in the main method, after the job is finished, I check the
> "test" again by
>
> job.getConfiguration().get("test");
>
>
>
> However, the value of "test" is still "1".
>
>
>
> The reason why I want to change the parameter inside Mapper class is
> that I want to determine when to stop an iteration in the main method.
> For example, for doing breadth-first search, when there is no new nodes
> are added for further expansion, the searching iteration should stop.
>
>
>
> Your help will be deeply appreciated. Thank you
>
>
>
> Wei
>
>
+
James Seigel 2010-12-17, 15:01
+
Arindam Khaled 2010-12-17, 15:35
+
Peng, Wei 2010-12-17, 16:31
+
Ted Dunning 2010-12-17, 17:32
+
James Seigel 2010-12-17, 17:34
+
Arindam Khaled 2010-12-17, 18:07
+
Arindam Khaled 2010-12-17, 18:13
+
Peng, Wei 2010-12-17, 18:43
+
Aman 2010-12-17, 21:10
+
Peng, Wei 2010-12-17, 19:52
+
Aman 2010-12-17, 21:24
+
Peng, Wei 2010-12-17, 22:14
+
Peng, Wei 2010-12-17, 22:33
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB