Package org.apache.hadoop.hive.contrib.mr

Examples of org.apache.hadoop.hive.contrib.mr.Reducer


/**
* Example Reducer (WordCount).
*/
public final class WordCountReduce {
  public static void main(final String[] args) throws Exception {
    new GenericMR().reduce(System.in, System.out, new Reducer() {
      public void reduce(String key, Iterator<String[]> records, Output output) throws Exception {
        int count = 0;
       
        while (records.hasNext()) {
          // note we use col[1] -- the key is provided again as col[0]
View Full Code Here


  private WordCountReduce() {
    // prevent instantiation
  }

  public static void main(final String[] args) throws Exception {
    new GenericMR().reduce(System.in, System.out, new Reducer() {
      public void reduce(String key, Iterator<String[]> records, Output output)
          throws Exception {
        int count = 0;

        while (records.hasNext()) {
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hive.contrib.mr.Reducer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.