Return-Path: X-Original-To: apmail-incubator-hama-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-hama-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 87167921F for ; Tue, 24 Apr 2012 01:33:36 +0000 (UTC) Received: (qmail 6095 invoked by uid 500); 24 Apr 2012 01:33:36 -0000 Delivered-To: apmail-incubator-hama-dev-archive@incubator.apache.org Received: (qmail 6069 invoked by uid 500); 24 Apr 2012 01:33:36 -0000 Mailing-List: contact hama-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hama-dev@incubator.apache.org Delivered-To: mailing list hama-dev@incubator.apache.org Received: (qmail 6061 invoked by uid 99); 24 Apr 2012 01:33:36 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Apr 2012 01:33:36 +0000 Received: from localhost (HELO mail-qc0-f175.google.com) (127.0.0.1) (smtp-auth username edwardyoon, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Apr 2012 01:33:36 +0000 Received: by qcso7 with SMTP id o7so99688qcs.6 for ; Mon, 23 Apr 2012 18:33:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding:x-gm-message-state; bh=UUex+MsVUxFR9Bl62FP7k5FhHMw8WVZYF2FgLhToOWk=; b=lO+ZZh5HhQteBqKHVHu3bSYo0Wh74GgXvnbEX+Br0elBvtstcwRLFduyJfg6LPCAEe D+deqT8WipbKdrIbGGFbPo1JJXvxHvzx52dihmXbmouuNkHEEYTDKzy1B86tsQPpOZT7 9nwH5K1kbExRiTSoJO6/aumPL0MSBdUX1Qjb0xYR6nGmkT8LnE0ECgKIO0Q/OG7OFTY8 WrRZjMiN4RejOvlAgvgt1c1xqRtYvnjTIYzE1QR0Lq5jpMSMWWp/vdBkuXpaEn0n9hXI B9WP1xh8L0JKR2C+TltVeaHp3U++4st9tBWVDBCXELUBG3mECJ+Sy2B8+v5Q4Xwqk0Ur hmEg== MIME-Version: 1.0 Received: by 10.229.137.71 with SMTP id v7mr4707206qct.103.1335231214875; Mon, 23 Apr 2012 18:33:34 -0700 (PDT) Received: by 10.229.188.205 with HTTP; Mon, 23 Apr 2012 18:33:34 -0700 (PDT) In-Reply-To: References: <1472222380.5689.1335203675628.JavaMail.tomcat@hel.zones.apache.org> Date: Tue, 24 Apr 2012 10:33:34 +0900 Message-ID: Subject: Re: [jira] [Assigned] (ACCUMULO-532) Add BSP input/output formats to client package From: "Edward J. Yoon" To: hama-dev@incubator.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQkK3ukmHmqhJlTPWohvv8sScwFOJ80XxOGHOsRQixKYDuPf2Sp52EtyE2K9+YzLk42qjufw According to CHANGE log, I've added input/output system to BSP framework. But, I don't know exactly why we need to check (conf.get("bsp.input (or output).dir") !=3D null) conditions when initialize record reader/writer objects? If there's no objection or opinion, I'd like to change like this: Index: core/src/main/java/org/apache/hama/bsp/BSPPeerImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/src/main/java/org/apache/hama/bsp/BSPPeerImpl.java (revision 13295= 23) +++ core/src/main/java/org/apache/hama/bsp/BSPPeerImpl.java (working copy) @@ -185,8 +185,7 @@ initInput(); - // just output something when the user configured it - if (conf.get("bsp.output.dir") !=3D null) { + if (!bspJob.getInputFormat().getClass().equals(NullOutputFormat.class)= ) { Path outdir =3D new Path(conf.get("bsp.output.dir"), Task.getOutputName(partition)); outWriter =3D bspJob.getOutputFormat().getRecordWriter(fs, bspJob, @@ -204,8 +203,7 @@ @SuppressWarnings("unchecked") public final void initInput() throws IOException { - // just read input if the user defined one - if (conf.get("bsp.input.dir") !=3D null) { + if (!bspJob.getInputFormat().getClass().equals(NullInputFormat.class))= { InputSplit inputSplit =3D null; // reinstantiate the split try { On Tue, Apr 24, 2012 at 6:39 AM, Edward J. Yoon wro= te: > FYI, > > "Let me know if you see any issues with this. =C2=A0It could probably use= some more testing. =C2=A0I was able to get the unit tests working (even th= e part commented out in the patch) but I had to set fake input and output p= aths. =C2=A0It seems that BSP doesn't initialize the RecordReader and Recor= dWriter unless the configuration options "bsp.input.dir" and "bsp.output.di= r" are set." > > Sent from my iPad > > Begin forwarded message: > >> From: "Billie Rinaldi (JIRA)" >> Date: April 24, 2012 2:54:35 AM GMT+09:00 >> To: dev@accumulo.apache.org >> Subject: [jira] [Assigned] (ACCUMULO-532) Add BSP input/output formats t= o client package >> Reply-To: dev@accumulo.apache.org >> >> Let me know if you see any issues with this. =C2=A0It could probably use= some more testing. =C2=A0I was able to get the unit tests working (even th= e part commented out in the patch) but I had to set fake input and output p= aths. =C2=A0It seems that BSP doesn't initialize the RecordReader and Recor= dWriter unless the configuration options "bsp.input.dir" and "bsp.output.di= r" are set. --=20 Best Regards, Edward J. Yoon @eddieyoon