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 D534F1027D for ; Mon, 2 Dec 2013 14:00:04 +0000 (UTC) Received: (qmail 19052 invoked by uid 500); 2 Dec 2013 13:59:25 -0000 Delivered-To: apmail-hadoop-hdfs-user-archive@hadoop.apache.org Received: (qmail 18916 invoked by uid 500); 2 Dec 2013 13:59:23 -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 18906 invoked by uid 99); 2 Dec 2013 13:59:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Dec 2013 13:59:22 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [188.44.40.17] (HELO jaffar.cs.msu.su) (188.44.40.17) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Dec 2013 13:59:16 +0000 Received: from SERNOTE (sernote-wifi.mlab.cs.msu.su [158.250.19.131]) (authenticated bits=0) by jaffar.cs.msu.su (8.13.8/8.13.8) with ESMTP id rB2DwbxC026796 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Mon, 2 Dec 2013 17:58:39 +0400 Reply-To: From: "Sergey Gerasimov" To: Subject: passing configuration parameter to comparator Date: Mon, 2 Dec 2013 17:58:47 +0400 Message-ID: <008501ceef66$9ff0bca0$dfd235e0$@mlab.cs.msu.su> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0086_01CEEF88.27043160" X-Mailer: Microsoft Outlook 14.0 Thread-Index: Ac7vZZj5nfK1L3C4SRut5bKS8F+UBg== Content-Language: ru X-Virus-Checked: Checked by ClamAV on apache.org This is a multipart message in MIME format. ------=_NextPart_000_0086_01CEEF88.27043160 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hello, What is the best way to pass job configuration parameter to class like GroupingComparator which is instantiated by hadoop. I know there is setup method in map class and probably I can initialize some static variable in setup and use it in GroupingComparator, not sure that is correct (not sure there is guarantee that GroupingComparator will be instantiated after first call of map on this node) But what is preferred pattern for the case? Maybe there is some unified way to access job config from anywhere? Thanks! Sergey. ------=_NextPart_000_0086_01CEEF88.27043160 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hello,

 

What is the best way to pass job configuration parameter to = class like GroupingComparator which is instantiated by hadoop. I know = there is setup method in map class and probably I can initialize some = static variable in setup and use it in GroupingComparator, not sure that = is correct (not sure there is guarantee that GroupingComparator will be = instantiated after first call of map on this node) But what is preferred = pattern for the case? Maybe there is some unified way to access job = config from anywhere?

 

Thanks!

Sergey.

------=_NextPart_000_0086_01CEEF88.27043160--