Return-Path: X-Original-To: apmail-crunch-user-archive@www.apache.org Delivered-To: apmail-crunch-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 95CE9102EB for ; Mon, 10 Jun 2013 00:07:22 +0000 (UTC) Received: (qmail 21268 invoked by uid 500); 10 Jun 2013 00:07:22 -0000 Delivered-To: apmail-crunch-user-archive@crunch.apache.org Received: (qmail 21208 invoked by uid 500); 10 Jun 2013 00:07:22 -0000 Mailing-List: contact user-help@crunch.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@crunch.apache.org Delivered-To: mailing list user@crunch.apache.org Received: (qmail 21200 invoked by uid 99); 10 Jun 2013 00:07:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Jun 2013 00:07:21 +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 (athena.apache.org: domain of sandy.ryza@cloudera.com designates 209.85.160.52 as permitted sender) Received: from [209.85.160.52] (HELO mail-pb0-f52.google.com) (209.85.160.52) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Jun 2013 00:07:16 +0000 Received: by mail-pb0-f52.google.com with SMTP id xa12so6640060pbc.11 for ; Sun, 09 Jun 2013 17:06:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type :x-gm-message-state; bh=UThbIycqDHzKj9ua3wj+FmALLuDvpFjfqv1qmlEhBME=; b=G3DwSLNNhpZ/RlH0Uc63cC8sC8XmYJo4qrCCtJa9P4fhKGmk+JJCRQeSxV4eUZPuQp 13K5buVSEWLwqJqPbkAHqSH7WZD0LB3Pe1JaEOZwER0/hgPTZQf1D/i8lGy19rsVHrTr zuqWwefDh/uDgSYI2XQlRCHucu3mwnBG2ORJhIY9Cxu0woHVDZ3dM/Nuw8s8syBJc+za 5mYyTtz86hMhrQYgflsMglW6eZ13ZgP0Uy6GxHrb+eHot5d4Xeg/EdI8dHOPQjGNL5G3 Qc6sEcK2yqE5HN6GTUxwdCTAxwnx4kWhGraLWbcKskfi4OI8oyedsCc9hpPgyfidJgSu hgaw== MIME-Version: 1.0 X-Received: by 10.68.134.131 with SMTP id pk3mr7794574pbb.83.1370822816367; Sun, 09 Jun 2013 17:06:56 -0700 (PDT) Received: by 10.70.95.10 with HTTP; Sun, 9 Jun 2013 17:06:56 -0700 (PDT) Date: Sun, 9 Jun 2013 17:06:56 -0700 Message-ID: Subject: emitting the same object with different internals From: Sandy Ryza To: user@crunch.apache.org Content-Type: multipart/alternative; boundary=047d7b10cd81051b3c04dec18fe0 X-Gm-Message-State: ALoCoQlMR0CU69jgmJ53sL9ZIqoj8gkW/y2DYniprdBcYA52fY84ZGionhwp78d7aP9j7UAnALpO X-Virus-Checked: Checked by ClamAV on apache.org --047d7b10cd81051b3c04dec18fe0 Content-Type: text/plain; charset=ISO-8859-1 Will the following code work in Crunch? --- private SomeMutableObject smo; public void process(Integer input, Emitter emitter) { smo.mutate(input); emitter.emit(smo); } --- i.e. will the object be written/copied when emit is called is called so that changes to it in a later call of the process function won't change what was emitted in an earlier one? thanks for any help! Sandy --047d7b10cd81051b3c04dec18fe0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Will the following code work in Crunch?

---
private SomeMutableObject smo;
<= div style>
public void process(Integer input, Emitter<SomeMutab= leObject> emitter) {
=A0 smo.mutate(input);
=A0 emitter.emit(smo);
}
=
---

i.e. will the object be writt= en/copied when emit is called is called so that changes to it in a later ca= ll of the process function won't change what was emitted in an earlier = one?


thanks for any help!
Sandy
--047d7b10cd81051b3c04dec18fe0--