09.10.2023 Views

Advanced Data Analytics Using Python_ With Machine Learning, Deep Learning and NLP Examples ( 2023)

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 7

Analytics at Scale

}

{

}

String[] temp = currValue.

split("sec:");

if(temp.length > 1)

secondvalue = temp[1];

}

}

for(String trans : translist)

{

output.collect(key, new Text(trans

+'\t' + secondvalue));

}

////////////////////////////////////////////////////////

@SuppressWarnings("deprecation")

public static class TransactionMapper extends

MapReduceBase implements Mapper<LongWritable, Text,

Text, Text>

{

int index1 = 0;

public void configure(JobConf job) {

index1 = Integer.parseInt(job.

get("index1"));

}

public void map(LongWritable key, Text value,

OutputCollector<Text, Text> output, Reporter

reporter) throws IOException

163

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!