Return-Path: X-Original-To: apmail-hive-user-archive@www.apache.org Delivered-To: apmail-hive-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 CE8A0E7EE for ; Mon, 11 Mar 2013 03:51:49 +0000 (UTC) Received: (qmail 4763 invoked by uid 500); 11 Mar 2013 03:51:48 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 4708 invoked by uid 500); 11 Mar 2013 03:51:48 -0000 Mailing-List: contact user-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hive.apache.org Delivered-To: mailing list user@hive.apache.org Received: (qmail 4691 invoked by uid 99); 11 Mar 2013 03:51:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Mar 2013 03:51:47 +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 nagarjuna.kanamarlapudi@gmail.com designates 209.85.216.173 as permitted sender) Received: from [209.85.216.173] (HELO mail-qc0-f173.google.com) (209.85.216.173) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Mar 2013 03:51:42 +0000 Received: by mail-qc0-f173.google.com with SMTP id b12so1339014qca.32 for ; Sun, 10 Mar 2013 20:51:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:x-mailer:date:message-id:in-reply-to :references:x-orchestra-oid:x-orchestra-sig:x-orchestra-thrid :x-orchestra-thrid-sig:x-orchestra-account:from:to:cc:subject :content-type; bh=i9OkiF3pHKgbfDp+1EQQrwzzLBFwCOnQw00isU0Yb4w=; b=sVDbv0TXWGbjbdMuMFNjgo/cf4HxlfUsKyGKRNr0tWWwPNbZcorHdZhPIwJiUGECf4 h/NqBF6qRCAV/6szbzkiOg5wK9N91sypBhuu6UOnar+EdCRqJv0jq+C+304kDhCoZqLi /s5ikRznwIKu4jKjyztVYOE/stlcXjV58Ixojaj7UcGedpdqWIr52kLt5k8weL3laUvq w18Bl2NEClbc3FYpWg36mFDtxQwTVn07XJlEtz+ntFD7ac3w7BgStkRKR7ij3UfFXGPD cou1n5/jINkPHStAtuwYmx6+TqbmZmdW+wX8+wlTjZZTwE9vLZeB/3OmBRL02LnF1pGJ OODQ== X-Received: by 10.224.59.15 with SMTP id j15mr15083438qah.58.1362973881564; Sun, 10 Mar 2013 20:51:21 -0700 (PDT) Received: from [127.0.0.1] (ec2-54-235-159-149.compute-1.amazonaws.com. [54.235.159.149]) by mx.google.com with ESMTPS id bb8sm22790982qeb.5.2013.03.10.20.51.20 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 10 Mar 2013 20:51:20 -0700 (PDT) MIME-Version: 1.0 X-Mailer: Nodemailer (0.3.28; +http://andris9.github.com/Nodemailer/) Date: Sun, 10 Mar 2013 20:51:20 -0700 (PDT) Message-Id: <1362973879992.797ff74d@Nodemailer> In-Reply-To: References: X-Orchestra-Oid: BA862DA8-58E8-4C51-A453-A01FFE683A00 X-Orchestra-Sig: 0584898bcd5bbaf5242766f2b142c93f828b538d X-Orchestra-Thrid: T2517148B-0D8B-4877-97A4-FCD7B35FBE4C_1429179346766007060 X-Orchestra-Thrid-Sig: 0a9ac56e2fc050ca506d51affa4a648cedb7df7b X-Orchestra-Account: 72e421ba51334bb8ea5eb68b5b22dd455c2a69ba From: "Nagarjuna Kanamarlapudi" To: user@hive.apache.org Cc: user@hive.apache.org Subject: Re: UDFs and Thread Safety? Content-Type: multipart/alternative; boundary="----mailcomposer-?=_1-1362973880712" X-Virus-Checked: Checked by ClamAV on apache.org ------mailcomposer-?=_1-1362973880712 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Yes , in a map only query your udf will be executed at the mapper side. I don't know how you can make your udf thread safe. =C2=A0But what I do set= the number of reducers to 1 and make sure that I write a query which has = both map and reduce.=C2=A0 Then the udf will be executed at the reduce phase and suffice my = requirement .=C2=A0 =E2=80=94 Sent from iPhone On Mon, Mar 11, 2013 at 8:43 AM, Shaun Clowes wrote: > Hi All, > Could anyone describe what the required thread safety for a UDF is=3F I > understand that one is instantiated for each use of the function in an > expression, but can there be multiple threads executing the methods of a > single UDF object at once=3F > Thanks, > Shaun ------mailcomposer-?=_1-1362973880712 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable

Yes , in a map only query your udf will be executed at the mapper side.=


I don't know how you can make your udf thread safe.= =C2=A0But what I do set the number of reducers to 1 and make sure that I = write a query which has both map and reduce.=C2=A0
Then the udf = will be executed at the reduce phase and suffice my requirement .= =C2=A0
=E2=80=94
Sent from = iPhone


On Mon, Mar 11, = 2013 at 8:43 AM, Shaun Clowes <sclowes@a= tlassian.com> wrote:

Hi All,= =C2=A0

Could anyone describe what the = required thread safety for a UDF is=3F I understand that one is = instantiated for each use of the function in an expression, but can there = be multiple threads executing the methods of a single UDF object at = once=3F=C2=A0

Thanks,
Shaun

------mailcomposer-?=_1-1362973880712--