Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class ConfigReader extends Configured implements Tool{
- public static class CRMapper extends Mapper<LongWritable, Text, Text, IntWritable>
- {
- @Override
- protected void map( LongWritable key,Text value,org.apache.hadoop.mapreduce.Mapper.Context context)throws IOException,
- InterruptedException {
- Configuration conf = context.getConfiguration();
- String propValue = conf.get("propertyName");
- }
- }
- public int run(String[] args) throws Exception {
- Configuration myConf = getConf();
- Configuration tdpConf = new Configuration();
- myConf.addResource("conf-file.xml");
- }
- public static void main(String[] args) throws Exception {
- int exitCode = ToolRunner.run(new ConfigReader(), args);
- System.exit(exitCode);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement