Return-Path: X-Original-To: apmail-hadoop-hdfs-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-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 223BDD3EE for ; Mon, 15 Oct 2012 19:12:16 +0000 (UTC) Received: (qmail 61611 invoked by uid 500); 15 Oct 2012 19:12:11 -0000 Delivered-To: apmail-hadoop-hdfs-user-archive@hadoop.apache.org Received: (qmail 61489 invoked by uid 500); 15 Oct 2012 19:12:11 -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 61482 invoked by uid 99); 15 Oct 2012 19:12:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Oct 2012 19:12:11 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of cordioli.alberto@gmail.com designates 209.85.220.176 as permitted sender) Received: from [209.85.220.176] (HELO mail-vc0-f176.google.com) (209.85.220.176) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Oct 2012 19:12:03 +0000 Received: by mail-vc0-f176.google.com with SMTP id gb22so7409024vcb.35 for ; Mon, 15 Oct 2012 12:11:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=az0mlenyURTExNudqrQPV6Jl4Ac0DckjF5kLQFK96Cc=; b=XQzeGk6XBC3yP0AZy81FgG5zK/K0aUP5sSn8g6LWuI/A2hlc2i1MPAhWkYWAfPmpxr IGhPuH3d0MH9UkJ5s260uG0coPJfshD16qZmwTIKzcWnkc/s9Wczci4koDrciT1Srqw9 kh/trDUgFTdd/YBwrbPy9tRJMXUfCoCFX8QcC8XL4Zl/ACYWlMJ5MjLJRZ6TcdA13fPd yYmAvz4EpPLCKiA/XLn542douIyBE4Gjt5P9kHrWaiHQEn6A2jSN8zM1k9FJ1VI2wk3A yn89osKIeS01ol+YLMtHAVN4wqKd/ctxevicRA2VwWmEE3Ygu8LUIb7qkskZv3Q5gMSn pc7w== Received: by 10.52.34.42 with SMTP id w10mr6068220vdi.10.1350328302459; Mon, 15 Oct 2012 12:11:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.34.199 with HTTP; Mon, 15 Oct 2012 12:11:27 -0700 (PDT) From: Alberto Cordioli Date: Mon, 15 Oct 2012 21:11:27 +0200 Message-ID: Subject: GroupingComparator To: user@hadoop.apache.org Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org Hi all, a very strange thing is happening with my hadoop program. My map simply emits tuples with a custom object as key (which implement WritableComparable). The object is made of 2 fields, and I implement my partitioner and groupingclass in such a way that only the first field is taken into account. The second field is just a tag and could be 1 or 2. This is the reducer's snippet: tag = key.getSecondField(); Iterator it1 = values.iterator(); while(it1.hasNext()){ it1.next(); collector.emit(new Text("dummy"), tag); } I would expect in my output all the lines with: dummy 1 ... dummy 1 but actually the value of tag changes in time and I obtain this type of output: dummy 1 ... dummy 1 dummy 2 ... dummy 2 Someone could explain me way, please? Thanks. -- Alberto Cordioli