Return-Path: X-Original-To: apmail-hama-dev-archive@www.apache.org Delivered-To: apmail-hama-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 029BED939 for ; Fri, 16 Nov 2012 07:10:28 +0000 (UTC) Received: (qmail 87516 invoked by uid 500); 16 Nov 2012 07:10:27 -0000 Delivered-To: apmail-hama-dev-archive@hama.apache.org Received: (qmail 87463 invoked by uid 500); 16 Nov 2012 07:10:26 -0000 Mailing-List: contact dev-help@hama.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hama.apache.org Delivered-To: mailing list dev@hama.apache.org Received: (qmail 87435 invoked by uid 99); 16 Nov 2012 07:10:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Nov 2012 07:10:25 +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 (nike.apache.org: domain of thomas.jungblut@gmail.com designates 209.85.212.47 as permitted sender) Received: from [209.85.212.47] (HELO mail-vb0-f47.google.com) (209.85.212.47) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Nov 2012 07:10:16 +0000 Received: by mail-vb0-f47.google.com with SMTP id ez10so2669954vbb.34 for ; Thu, 15 Nov 2012 23:09:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=/rPSBgl7ZjuIeLd+aXmkxldqYzYoSnmdbN1vFfIuf4w=; b=ML/DYh/K2kph2QYyFv2lPaqAB/eSzatzqVlvVos2ezbRj5PVYzYhkWOSFWSt4OoucR 5XIvYZPxK9e9uuls9LVGiXViAX2SHK6j8nZ7MWAI8PZ2KKX2f8pics6cZAh190EhwYWm W7TEG0CAxdhduXZOQHT8Qzrsr+NQIjr6tHg/IF0bXorFvLKXL9lA9jK3FjW2CvqZGPh+ 54MunmG7ZePBwIH/slNkdQBXE9HMIEPNKADflBIp4qEwU4DJvXij9udWECEoSsJUpV07 08GSEwciQ+rZTjB7FyRp1tJ6X12+1SbAnT3Rdjie/hYpMYAGVcFrICsd1h2PZVUbuNlv 2NBw== MIME-Version: 1.0 Received: by 10.220.154.2 with SMTP id m2mr5203850vcw.18.1353049795091; Thu, 15 Nov 2012 23:09:55 -0800 (PST) Received: by 10.220.1.201 with HTTP; Thu, 15 Nov 2012 23:09:54 -0800 (PST) Received: by 10.220.1.201 with HTTP; Thu, 15 Nov 2012 23:09:54 -0800 (PST) In-Reply-To: References: Date: Fri, 16 Nov 2012 08:09:54 +0100 Message-ID: Subject: Re: Strange input read behavior From: Thomas Jungblut To: dev@hama.apache.org Content-Type: multipart/alternative; boundary=f46d043c81a6665df004ce9774f2 X-Virus-Checked: Checked by ClamAV on apache.org --f46d043c81a6665df004ce9774f2 Content-Type: text/plain; charset=ISO-8859-1 You have to read up to max number of tasks, if there is less, pick the least number. But I think we should restrict everything below 32m to a single task. This would also solve the problem. Am 16.11.2012 07:30 schrieb "Edward J. Yoon" : > TextInputFormat has no problem so I was able to test Graph jobs with > desired number of tasks. > > I prefer the first solution. > > On Fri, Nov 16, 2012 at 3:00 PM, Thomas Jungblut > wrote: > > The problem is, that the tasks were too many for the input to split. > > There are two ways to solve this: > > - make the splitter honor the record boundary, which basically means we > > have to determine the number of records before splitting which is crazy > > - remove the functionality for a "goal-size" and make the split totally > > based on the filesystem's blocksize, which is safer because it takes care > > of record boundaries. > > > > You choose, I would be +1 on the least - we would have to make the error > be > > more transparent to users when a job can't be scheduled then. > > > > 2012/11/16 Edward J. Yoon > > > >> I didn't look at SequenceFile closely when I implement I/O system. So, > >> don't know exactly. > >> > >> FYI, https://twitter.com/QwertyManiac/status/269093180220272640 > >> > >> On Thu, Nov 15, 2012 at 11:57 PM, Thomas Jungblut > >> wrote: > >> > Most interestingly is that we took the stuff from Hadoop, so the bug > must > >> > also be contained in Hadoop. > >> > > >> > 2012/11/15 Edward J. Yoon > >> > > >> >> I think, we have to fix InputFormatters, BSPJobClient, and splitter > in > >> >> FileInputFormat (+ unit tests). I'm not sure when can I do it. > >> >> > >> >> On Thu, Nov 15, 2012 at 10:58 PM, Tommaso Teofili > >> >> wrote: > >> >> > I've tried and it works with a small no of tasks (< 19) but it > fails > >> if > >> >> > it's not set (so getting the default behavior). > >> >> > I'm not sure I understand the rationale of the fix without going > >> deeper > >> >> > into the code, I'm just concerned if this is just a corner case or > may > >> >> > affect some others which would be bad. > >> >> > I see that adding some more lines to my test file the error doesn't > >> occur > >> >> > anymore ... > >> >> > > >> >> > If that is not a major issue but just a corner case then it's ok > >> >> otherwise > >> >> > I think it'd be better to fix before releasing. > >> >> > Regards, > >> >> > Tommaso > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > 2012/11/15 Edward J. Yoon > >> >> > > >> >> >> > Tommaso, your job works with different 'tasknum' correctly for > same > >> >> >> input? > >> >> >> > >> >> >> Not working. (and I found HAMA-476) > >> >> >> > >> >> >> Let's release 0.6 first. I'll fix this problem ASAP, then release > >> 0.6.1. > >> >> >> > >> >> >> What do you think? > >> >> >> > >> >> >> On Thu, Nov 15, 2012 at 7:10 PM, Edward J. Yoon < > >> edwardyoon@apache.org> > >> >> >> wrote: > >> >> >> > I've changed only computeGoalSize(). > >> >> >> > > >> >> >> > protected long computeGoalSize(int numSplits, long > totalSize) { > >> >> >> > - return totalSize / (numSplits == 0 ? 1 : numSplits); > >> >> >> > + // The minus 1 is for the remainder. > >> >> >> > + return totalSize / (numSplits <= 1 ? 1 : numSplits - 1); > >> >> >> > } > >> >> >> > > >> >> >> > I don't remember exactly what happens if a split is not on a > record > >> >> >> boundary? > >> >> >> > > >> >> >> > Tommaso, your job works with different 'tasknum' correctly for > same > >> >> >> input? > >> >> >> > > >> >> >> > On Thu, Nov 15, 2012 at 6:23 PM, Thomas Jungblut > >> >> >> > wrote: > >> >> >> >> Edward changed something to the split behavious last night. > Maybe > >> it > >> >> >> broke > >> >> >> >> it. > >> >> >> >> > >> >> >> >> 2012/11/15 Tommaso Teofili > >> >> >> >> > >> >> >> >>> Hi guys, > >> >> >> >>> > >> >> >> >>> I was just running a couple of tests with GradientDescentBSP > >> when I > >> >> >> >>> realized that using the newly installed RC5 the algorithm > fails > >> at > >> >> its > >> >> >> very > >> >> >> >>> beginning because it seems it cannot read from input. > >> >> >> >>> > >> >> >> >>> java.io.IOException: cannot read input vector size > >> >> >> >>> at > >> >> >> >>> > >> >> >> >>> > >> >> >> > >> >> > >> > org.apache.hama.ml.regression.GradientDescentBSP.getXSize(GradientDescentBSP.java:268) > >> >> >> >>> at > >> >> >> >>> > >> >> >> >>> > >> >> >> > >> >> > >> > org.apache.hama.ml.regression.GradientDescentBSP.getInitialTheta(GradientDescentBSP.java:244) > >> >> >> >>> at > >> >> >> >>> > >> >> >> >>> > >> >> >> > >> >> > >> > org.apache.hama.ml.regression.GradientDescentBSP.bsp(GradientDescentBSP.java:72) > >> >> >> >>> at > >> >> >> >>> > >> >> >> > >> >> > >> > org.apache.hama.bsp.LocalBSPRunner$BSPRunner.run(LocalBSPRunner.java:254) > >> >> >> >>> at > >> >> >> >>> > >> >> >> > >> >> > >> > org.apache.hama.bsp.LocalBSPRunner$BSPRunner.call(LocalBSPRunner.java:284) > >> >> >> >>> at > >> >> >> >>> > >> >> >> > >> >> > >> > org.apache.hama.bsp.LocalBSPRunner$BSPRunner.call(LocalBSPRunner.java:211) > >> >> >> >>> at > >> >> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) > >> >> >> >>> at java.util.concurrent.FutureTask.run(FutureTask.java:138) > >> >> >> >>> at > >> >> >> > >> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439) > >> >> >> >>> at > >> >> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) > >> >> >> >>> at java.util.concurrent.FutureTask.run(FutureTask.java:138) > >> >> >> >>> at > >> >> >> >>> > >> >> >> >>> > >> >> >> > >> >> > >> > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) > >> >> >> >>> at > >> >> >> >>> > >> >> >> >>> > >> >> >> > >> >> > >> > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) > >> >> >> >>> at java.lang.Thread.run(Thread.java:680) > >> >> >> >>> > >> >> >> >>> > >> >> >> >>> Since I didn't change anything on that side and it works with > >> >> >> >>> 0.6.0-SNAPSHOT I wonder if the latest stuff related to input > >> split > >> >> >> caused > >> >> >> >>> problems. > >> >> >> >>> > >> >> >> >>> WDYT? > >> >> >> >>> > >> >> >> >>> Tommaso > >> >> >> >>> > >> >> >> >>> p.s.: > >> >> >> >>> I noticed this just after my +1 on the RC vote but please keep > >> it on > >> >> >> hold > >> >> >> >>> while we track this issue > >> >> >> >>> > >> >> >> > > >> >> >> > > >> >> >> > > >> >> >> > -- > >> >> >> > Best Regards, Edward J. Yoon > >> >> >> > @eddieyoon > >> >> >> > >> >> >> > >> >> >> > >> >> >> -- > >> >> >> Best Regards, Edward J. Yoon > >> >> >> @eddieyoon > >> >> >> > >> >> > >> >> > >> >> > >> >> -- > >> >> Best Regards, Edward J. Yoon > >> >> @eddieyoon > >> >> > >> > >> > >> > >> -- > >> Best Regards, Edward J. Yoon > >> @eddieyoon > >> > > > > -- > Best Regards, Edward J. Yoon > @eddieyoon > --f46d043c81a6665df004ce9774f2--