David Teplow, Integra Technology Consul9ng 11/20/12 - - PowerPoint PPT Presentation

david teplow integra technology consul9ng
SMART_READER_LITE
LIVE PREVIEW

David Teplow, Integra Technology Consul9ng 11/20/12 - - PowerPoint PPT Presentation

David Teplow, Integra Technology Consul9ng 11/20/12 11/20/12 - The Database Emperor Has No Clothes 11/20/12 - The Database Emperor Has No Clothes


slide-1
SLIDE 1

David ¡Teplow, ¡Integra ¡Technology ¡Consul9ng ¡

11/20/12 ¡

slide-2
SLIDE 2

11/20/12 ¡-­‑ ¡ The ¡Database ¡Emperor ¡Has ¡No ¡Clothes ¡

slide-3
SLIDE 3

11/20/12 ¡-­‑ ¡ The ¡Database ¡Emperor ¡Has ¡No ¡Clothes ¡

slide-4
SLIDE 4

11/20/12 ¡-­‑ ¡ The ¡Database ¡Emperor ¡Has ¡No ¡Clothes ¡

slide-5
SLIDE 5

11/20/12 ¡-­‑ ¡ The ¡Database ¡Emperor ¡Has ¡No ¡Clothes ¡

slide-6
SLIDE 6

11/20/12 ¡-­‑ ¡ The ¡Database ¡Emperor ¡Has ¡No ¡Clothes ¡

slide-7
SLIDE 7

11/20/12 ¡-­‑ ¡ The ¡Database ¡Emperor ¡Has ¡No ¡Clothes ¡

slide-8
SLIDE 8

11/20/12 ¡-­‑ ¡ The ¡Database ¡Emperor ¡Has ¡No ¡Clothes ¡

slide-9
SLIDE 9

11/20/12 ¡-­‑ ¡ The ¡Database ¡Emperor ¡Has ¡No ¡Clothes ¡

slide-10
SLIDE 10

11/20/12 ¡-­‑ ¡ The ¡Database ¡Emperor ¡Has ¡No ¡Clothes ¡

slide-11
SLIDE 11

11/20/12 ¡-­‑ ¡ The ¡Database ¡Emperor ¡Has ¡No ¡Clothes ¡

slide-12
SLIDE 12

11/20/12 ¡-­‑ ¡ The ¡Database ¡Emperor ¡Has ¡No ¡Clothes ¡

slide-13
SLIDE 13

11/20/12 ¡-­‑ ¡ The ¡Database ¡Emperor ¡Has ¡No ¡Clothes ¡

slide-14
SLIDE 14

11/20/12 ¡-­‑ ¡ The ¡Database ¡Emperor ¡Has ¡No ¡Clothes ¡

slide-15
SLIDE 15

11/20/12 ¡-­‑ ¡ The ¡Database ¡Emperor ¡Has ¡No ¡Clothes ¡

slide-16
SLIDE 16

11/20/12 ¡-­‑ ¡ The ¡Database ¡Emperor ¡Has ¡No ¡Clothes ¡

package org.myorg; import java.io.IOException; import java.util.*; import org.apache.hadoop.fs.Path; import org.apache.hadoop.conf.*; import org.apache.hadoop.io.*; import org.apache.hadoop.mapred.*; import org.apache.hadoop.util.*; public class WordCount { public static class Map extends MapReduceBase implements Mapper<LongWritable, Text, Text, IntWritable> { private final static IntWritable one = new IntWritable(1); private Text word = new Text(); public void map(LongWritable key, Text value, OutputCollector<Text, IntWritable> output, Reporter reporter) throws IOException { String line = value.toString(); StringTokenizer tokenizer = new StringTokenizer(line); while (tokenizer.hasMoreTokens()) { word.set(tokenizer.nextToken());

  • utput.collect(word, one);

} } } public static class Reduce extends MapReduceBase implements Reducer<Text, IntWritable, Text, IntWritable> { public void reduce(Text key, Iterator<IntWritable> values, OutputCollector<Text, IntWritable> output, Reporter reporter) throws IOException { int sum = 0; while (values.hasNext()) { sum += values.next().get(); }

  • utput.collect(key, new IntWritable(sum));

} } public static void main(String[] args) throws Exception { JobConf conf = new JobConf(WordCount.class); conf.setJobName("wordcount"); conf.setOutputKeyClass(Text.class); conf.setOutputValueClass(IntWritable.class); conf.setMapperClass(Map.class); conf.setCombinerClass(Reduce.class); conf.setReducerClass(Reduce.class); conf.setInputFormat(TextInputFormat.class); conf.setOutputFormat(TextOutputFormat.class); FileInputFormat.setInputPaths(conf, new Path(args[0])); FileOutputFormat.setOutputPath(conf, new Path(args[1])); JobClient.runJob(conf); } }

slide-17
SLIDE 17

11/20/12 ¡-­‑ ¡ The ¡Database ¡Emperor ¡Has ¡No ¡Clothes ¡

slide-18
SLIDE 18

11/20/12 ¡-­‑ ¡ The ¡Database ¡Emperor ¡Has ¡No ¡Clothes ¡

slide-19
SLIDE 19

11/20/12 ¡-­‑ ¡ The ¡Database ¡Emperor ¡Has ¡No ¡Clothes ¡

slide-20
SLIDE 20

11/20/12 ¡-­‑ ¡ The ¡Database ¡Emperor ¡Has ¡No ¡Clothes ¡