Return-Path: X-Original-To: apmail-hadoop-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B0E5917A81 for ; Mon, 13 Apr 2015 00:40:12 +0000 (UTC) Received: (qmail 89965 invoked by uid 500); 13 Apr 2015 00:40:07 -0000 Delivered-To: apmail-hadoop-user-archive@hadoop.apache.org Received: (qmail 89847 invoked by uid 500); 13 Apr 2015 00:40:06 -0000 Mailing-List: contact user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hadoop.apache.org Delivered-To: mailing list user@hadoop.apache.org Received: (qmail 89837 invoked by uid 99); 13 Apr 2015 00:40:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Apr 2015 00:40:06 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of xeonmailinglist@gmail.com designates 209.85.212.176 as permitted sender) Received: from [209.85.212.176] (HELO mail-wi0-f176.google.com) (209.85.212.176) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Apr 2015 00:39:38 +0000 Received: by wizk4 with SMTP id k4so53573386wiz.1 for ; Sun, 12 Apr 2015 17:39:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type; bh=lC6GVAm35rO5Q0og9SiHRsnJSr1uLokHyWOMw++F7t0=; b=uhcsM3kwM+9ALU9cU9QvxpnMPuo14C8ISr8r0CCG2c5lVaGnDQhx5tGO/+j8HJtLDW 2uka09/xzxkxSPXHl7cDjZqPznC10ZZLpEmBKLAL9Nji9bMbCh6zbg010OPpgkvMeifv XhfGC/O6Z3FNi4htu53w2HErnH7MxkedrWcjqvo5y+dhtyBF/sZgjyJMa8JWvZuA5P2J niLyKzi/w2DW0oZCMd0rSJYvwRUaQtP7EbEwnomSHJsD3lMajDJGqjMi67vjyoAzWkic 1mluP7cQUKh9azLBLDjpJj43AYmpLCWLLt23jN/CwA404CBTjZQ5Ds8MXL4d2D/9RI5c Q+pQ== X-Received: by 10.180.37.101 with SMTP id x5mr16916490wij.74.1428885577608; Sun, 12 Apr 2015 17:39:37 -0700 (PDT) Received: from [192.168.10.108] ([81.193.39.238]) by mx.google.com with ESMTPSA id k2sm9068405wif.3.2015.04.12.17.39.36 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 12 Apr 2015 17:39:36 -0700 (PDT) Message-ID: <552B1047.2000109@gmail.com> Date: Mon, 13 Apr 2015 01:39:35 +0100 From: xeonmailinglist-gmail User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: "user@hadoop.apache.org" Subject: What the class GenericMRLoadGenerator.java does? Content-Type: multipart/alternative; boundary="------------060208080103080306020408" X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. --------------060208080103080306020408 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Hi I am trying to understand what the |/src/test/org/apache/hadoop/mapred/GenericMRLoadGenerator.java| does. I have noticed that the map and reduce functions uses this method, but I don’t understand what it does. What is the purpose of this class? What this method is doing? | protected void emit(K key, V val, OutputCollector out) throws IOException { ++total; while((float) kept / total < keep) { ++kept; out.collect(key, val); } } } | ​ -- -- --------------060208080103080306020408 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

Hi

I am trying to understand what the /src/test/org/apache/hadoop/mapred/GenericMRLoadGenerator.java does. I have noticed that the map and reduce functions uses this method, but I don’t understand what it does. What is the purpose of this class? What this method is doing?


    protected void emit(K key, V val, OutputCollector<K,V> out)
        throws IOException {
      ++total;
      while((float) kept / total < keep) {
        ++kept;
        out.collect(key, val);
      }
    }
  }
-- 
--
--------------060208080103080306020408--