Package org.apache.hadoop.examples
package org.apache.hadoop.examples
Hadoop example code.
-
ClassesClassDescriptionorg.apache.hadoop.examples.AggregateWordCountThis is an example Aggregated Hadoop Map/Reduce application.org.apache.hadoop.examples.AggregateWordCount.WordCountPlugInClassorg.apache.hadoop.examples.AggregateWordHistogramThis is an example Aggregated Hadoop Map/Reduce application.org.apache.hadoop.examples.AggregateWordHistogram.AggregateWordHistogramPluginorg.apache.hadoop.examples.BaileyBorweinPlouffeA map/reduce program that uses Bailey-Borwein-Plouffe to compute exact digits of Pi.org.apache.hadoop.examples.BaileyBorweinPlouffe.BbpInputFormatInput format for the
BaileyBorweinPlouffe.BbpMapper.org.apache.hadoop.examples.BaileyBorweinPlouffe.BbpMapperMapper class computing digits of Pi.org.apache.hadoop.examples.BaileyBorweinPlouffe.BbpReducerReducer for concatenating map outputs.org.apache.hadoop.examples.BaileyBorweinPlouffe.BbpSplitInput split for theBaileyBorweinPlouffe.BbpInputFormat.org.apache.hadoop.examples.DBCountPageViewThis is a demonstrative program, which uses DBInputFormat for reading the input data from a database, and DBOutputFormat for writing the data to the database.org.apache.hadoop.examples.ExampleDriverA description of an example program based on its class and a human-readable description.org.apache.hadoop.examples.Greporg.apache.hadoop.examples.JoinGiven a set of sorted datasets keyed with the same class and yielding equal partitions, it is possible to effect a join of those datasets prior to the map.org.apache.hadoop.examples.MultiFileWordCountMultiFileWordCount is an example to demonstrate the usage of MultiFileInputFormat.org.apache.hadoop.examples.MultiFileWordCount.CombineFileLineRecordReaderRecordReader is responsible from extracting records from a chunk of the CombineFileSplit.org.apache.hadoop.examples.MultiFileWordCount.MapClassThis Mapper is similar to the one inWordCount.TokenizerMapper.org.apache.hadoop.examples.MultiFileWordCount.MyInputFormatTo useCombineFileInputFormat, one should extend it, to return a (custom)RecordReader.org.apache.hadoop.examples.MultiFileWordCount.WordOffsetThis record keeps <filename,offset> pairs.org.apache.hadoop.examples.QuasiMonteCarloA map/reduce program that estimates the value of Pi using a quasi-Monte Carlo (qMC) method.org.apache.hadoop.examples.QuasiMonteCarlo.QmcMapperMapper class for Pi estimation.org.apache.hadoop.examples.QuasiMonteCarlo.QmcReducerReducer class for Pi estimation.org.apache.hadoop.examples.RandomTextWriterThis program uses map/reduce to just run a distributed job where there is no interaction between the tasks and each task writes a large unsorted random sequence of words.org.apache.hadoop.examples.RandomWriterThis program uses map/reduce to just run a distributed job where there is no interaction between the tasks and each task write a large unsorted random binary sequence file of BytesWritable.org.apache.hadoop.examples.SecondarySortThis is an example Hadoop Map/Reduce application.org.apache.hadoop.examples.SecondarySort.FirstGroupingComparatorCompare only the first part of the pair, so that reduce is called once for each value of the first part.org.apache.hadoop.examples.SecondarySort.FirstPartitionerPartition based on the first part of the pair.org.apache.hadoop.examples.SecondarySort.IntPairDefine a pair of integers that are writable.org.apache.hadoop.examples.SecondarySort.IntPair.ComparatorA Comparator that compares serialized IntPair.org.apache.hadoop.examples.SecondarySort.MapClassRead two integers from each line and generate a key, value pair as ((left, right), right).org.apache.hadoop.examples.SecondarySort.ReduceA reducer class that just emits the sum of the input values.org.apache.hadoop.examples.Sort<K,V> This is the trivial map/reduce program that does absolutely nothing other than use the framework to fragment and sort the input values.org.apache.hadoop.examples.WordCountorg.apache.hadoop.examples.WordCount.IntSumReducerorg.apache.hadoop.examples.WordCount.TokenizerMapperorg.apache.hadoop.examples.WordMeanorg.apache.hadoop.examples.WordMean.WordMeanMapperMaps words from line of text into 2 key-value pairs; one key-value pair for counting the word, another for counting its length.org.apache.hadoop.examples.WordMean.WordMeanReducerPerforms integer summation of all the values for each key.org.apache.hadoop.examples.WordMedianorg.apache.hadoop.examples.WordMedian.WordMedianMapperMaps words from line of text into a key-value pair; the length of the word as the key, and 1 as the value.org.apache.hadoop.examples.WordMedian.WordMedianReducerPerforms integer summation of all the values for each key.org.apache.hadoop.examples.WordStandardDeviationorg.apache.hadoop.examples.WordStandardDeviation.WordStandardDeviationMapperMaps words from line of text into 3 key-value pairs; one key-value pair for counting the word, one for counting its length, and one for counting the square of its length.org.apache.hadoop.examples.WordStandardDeviation.WordStandardDeviationReducerPerforms integer summation of all the values for each key.