hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sofia Georgiakaki <geosofie_...@yahoo.com>
Subject cannot get configuration settings from API
Date Wed, 27 Jul 2011 16:41:44 GMT
Good afternoon,

during writing a MapReduce job, I need to get the value of some configuration settings.
For instance, I need to get the value of "dfs.write.packet.size" inside the reducer, so I
write, using the context of the reducer:
                Configuration the_conf=context.getConfiguration();
                int data_packet_size=the_conf.getInt("dfs.write.packet.size",
0);

However, this does not return 64KB (which is the value by default), but it gives 0 instead. 

Could you please help me, by telling me how I can get and set the value of these configuration
parameters? 


Thank you in advance,
Sofia

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message