Return-Path: X-Original-To: apmail-airavata-dev-archive@www.apache.org Delivered-To: apmail-airavata-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 8CA21C250 for ; Wed, 3 Jul 2013 00:57:07 +0000 (UTC) Received: (qmail 19193 invoked by uid 500); 3 Jul 2013 00:57:07 -0000 Delivered-To: apmail-airavata-dev-archive@airavata.apache.org Received: (qmail 19167 invoked by uid 500); 3 Jul 2013 00:57:07 -0000 Mailing-List: contact dev-help@airavata.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airavata.apache.org Delivered-To: mailing list dev@airavata.apache.org Received: (qmail 19159 invoked by uid 99); 3 Jul 2013 00:57:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Jul 2013 00:57:07 +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 thejaka.amila@gmail.com designates 209.85.219.50 as permitted sender) Received: from [209.85.219.50] (HELO mail-oa0-f50.google.com) (209.85.219.50) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Jul 2013 00:57:00 +0000 Received: by mail-oa0-f50.google.com with SMTP id k7so7391315oag.9 for ; Tue, 02 Jul 2013 17:56:39 -0700 (PDT) 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=QVGGuxDodF4Yzg7Z8GeMp25kkM9gQmD9WXt8Z4KOPmc=; b=JQlpJrgZgRTbgv6DQgyTLSDHpsWAOS9dJzC8ARsjWR1DX04MJQe5WocZklMIqBnPJh 9r9hBYRSImjT4bH3LzBfOEwytd+Nl8ntzkwij/seFG7rTYK9olJHVNP3WVnJmlaMNxbF cc8CvkEhRCSdRQcwLrPO9Zzx/BWt3F8NbWcmrhaB0EAjco2nHASsviiD0oZ4yejHwEc7 K+6cTI13v83XHAY+gzT4dWQaBIgHve3pG4/asYVtCwkpher+pcHuS4HG3Hi/6aOfCZDH /vlFK/fU1QDdvbTYnWkw/JS1Ra2qlLv8RAyu44hLCzQzOMb7H4JMV+shpD5UhvfnifIm BLXA== MIME-Version: 1.0 X-Received: by 10.60.155.135 with SMTP id vw7mr13974373oeb.67.1372812998849; Tue, 02 Jul 2013 17:56:38 -0700 (PDT) Received: by 10.76.82.135 with HTTP; Tue, 2 Jul 2013 17:56:38 -0700 (PDT) In-Reply-To: References: <49E55B39-CC7A-4A55-9FA1-15CE00619C47@apache.org> Date: Tue, 2 Jul 2013 20:56:38 -0400 Message-ID: Subject: Re: Question about null check in GFacUtils From: Amila Jayasekara To: dev@airavata.apache.org Content-Type: multipart/alternative; boundary=047d7bd7672023bf9304e090ef24 X-Virus-Checked: Checked by ClamAV on apache.org --047d7bd7672023bf9304e090ef24 Content-Type: text/plain; charset=ISO-8859-1 Hi Saminda, On Tue, Jul 2, 2013 at 7:14 PM, Saminda Wijeratne wrote: > is it the name you are confused with or the function of it? > > The waitFor function runs until the job is completed or failed. Correct. But actual status of the job is report to statusChange method. statusChange method calls "setStatus" method. The setStatus method has a call to "GFacUtils.updateApplicationJobStatus(context,job.getIDAsString(), GFacUtils.getApplicationJobStatus(status));" So whether job is finished or failed is already recorded through the setStatus method. I guess we dont need to record it again in waitFor method. Thanks Amila > The way it > knows that the job is completed is by checking the gram status of the job > periodically via a while loop. > > On Tue, Jul 2, 2013 at 6:34 PM, Amila Jayasekara >wrote: > > > The "updateApplicationJobStatusUpdateTime" method is called from > > GramJobSubmissionListener.waitFor method. I dont understand why that > method > > is called from waitFor method. > > > > Could you please explain ? > > > > Thanks > > Amila > > > > > > On Tue, Jul 2, 2013 at 5:26 PM, Saminda Wijeratne > >wrote: > > > > > Hi Amila, > > > > > > These are my additions. Basically we are recording the status of the > > > application execution with the time which it was observed. However > > > sometimes the same status is observed continuously by the > > > observers/listeners defined in the provider for that job. In those > times > > we > > > update only the time which that same status was observed last. > > > > > > If you think that the name of the function is confusing shall we change > > it? > > > These are util functions which the providers may or may not use for > their > > > convenience. > > > > > > Saminda > > > > > > > > > On Tue, Jul 2, 2013 at 4:57 PM, Amila Jayasekara < > > thejaka.amila@gmail.com > > > >wrote: > > > > > > > Hi Lahiru, > > > > > > > > I have few more questions related to this. > > > > In GFacUtils class I see following 2 methods; > > > > > > > > public static void > > > > updateApplicationJobStatusUpdateTime(JobExecutionContext context, > > String > > > > jobId, Date statusUpdateTime) > > > > public static void updateApplicationJobStatus(JobExecutionContext > > > > context, String jobId, ApplicationJobStatus status, Date > > > statusUpdateTime) > > > > > > > > What is the difference between about 2 methods ? More precisely I am > > > having > > > > difficulty understanding the need for 1st method. > > > > > > > > Thanks > > > > Amila > > > > > > > > > > > > > > > > On Tue, Jul 2, 2013 at 3:13 PM, Suresh Marru > > wrote: > > > > > > > > > On Jul 2, 2013, at 2:19 PM, Saminda Wijeratne > > > > wrote: > > > > > > > > > > > Are we not going to allow using the GFac libraries as standalone > > > tool? > > > > It > > > > > > could be useful for devs who dont want to use the workflow > context > > to > > > > run > > > > > > applications. > > > > > > > > > > I would vote against direct use of GFac API from clients. We need > to > > > > > brainstorm and decide on the component level API's and their > > > implications > > > > > once we discuss Airavata 1.0( may be also 2.0) roadmaps. > > > > > > > > > > In short, I see the need for GFac API's to evolve to facilitate > more > > > > > dynamism and multi-phased interactions between workflow interpreter > > and > > > > > GFac. I think we should limit all client integrations to Airavata > API > > > so > > > > we > > > > > can put in extra effort to ensure backward compatibility is > > maintained > > > > > within major versions. > > > > > > > > > > Suresh > > > > > > > > > > > On Tue, Jul 2, 2013 at 9:53 AM, Lahiru Gunathilake < > > > glahiru@gmail.com > > > > > >wrote: > > > > > > > > > > > >> It's not required now. Please remove it. > > > > > >> > > > > > >> > > > > > >> Lahiru > > > > > >> > > > > > >> On Tuesday, July 2, 2013, Amila Jayasekara wrote: > > > > > >> > > > > > >>> Hi All, > > > > > >>> > > > > > >>> In GFacUtils I see methods like follows; > > > > > >>> > > > > > >>> public static void > > > > > >> updateApplicationJobStatusUpdateTime(JobExecutionContext > > > > > >>> context, String jobId, Date statusUpdateTime){ > > > > > >>> AiravataAPI airavataAPI = > > > > > >>> context.getGFacConfiguration().getAiravataAPI(); > > > > > >>> if(airavataAPI != null){ > > > > > >>> try { > > > > > >>> > > > > > >>> > > > > > >> > > > > > > > > > > > > > > > airavataAPI.getProvenanceManager().updateApplicationJobStatusUpdateTime(jobId, > > > > > >>> statusUpdateTime); > > > > > >>> } catch (AiravataAPIInvocationException e) { > > > > > >>> log.error("Error in updating application job status time > > > > > >>> "+statusUpdateTime.toString()+" for job Id "+jobId+"!!!", e); > > > > > >>> } > > > > > >>> } > > > > > >>> } > > > > > >>> > > > > > >>> Any particular reason to have "if(airavataAPI != null)" > > condition ? > > > > > >>> > > > > > >>> Thanks > > > > > >>> Amila > > > > > >>> > > > > > >> > > > > > >> > > > > > >> -- > > > > > >> System Analyst Programmer > > > > > >> PTI Lab > > > > > >> Indiana University > > > > > >> > > > > > > > > > > > > > > > > > > > > --047d7bd7672023bf9304e090ef24--