You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@airavata.apache.org by Nadeem Anjum <na...@gmail.com> on 2014/06/17 14:39:10 UTC

[GSoC] Clarification about OutputUtils.java

Hello,

If have registered an application (a genapp module) on my local airavata
server. The experiment completes successfully but an exception is thrown
while retrieving the results.

ERROR org.apache.airavata.gfac.core.provider.GFacProviderException  - Error
in retrieving results
java.lang.Exception: Data for the output parameter 'output1' was not found
at
org.apache.airavata.gfac.core.utils.OutputUtils.parseStdout(OutputUtils.java:137)


The output is created as expected in the scratch working directory, in the
file alignApp2.stdout. I just need to retrieve the output as it is created.

I am not really sure on what parseStdout function in OutputUtils.java [1]
is attempting to do by Pattern Matching (which is causing this exception as
no match is found).

I will be grateful if someone can clarify this.

[1]:
https://github.com/apache/airavata/blob/c83330e98aecfd7d60865d69d1450faf759670d7/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/OutputUtils.java#l87

Thanks,
Nadeem.

Re: [GSoC] Clarification about OutputUtils.java

Posted by Nadeem Anjum <na...@gmail.com>.
I figured it the problem was because I was'nt waiting sufficiently long for
the experiment to be completed. I am getting the expected results now.


On Tue, Jun 17, 2014 at 5:00 PM, Nadeem Anjum <na...@gmail.com>
wrote:

> I will try debugging registry.add call.
>
> Even the SimpleEcho2 experiment (which is there in the
> createExperiment.php of php-sdk) return output value as ""
>
> {
>     ["key"]=>
>     string(11) "echo_output"
>     ["value"]=>
>     string(0) ""
>     ["type"]=>
>     int(0)
>     ["metaData"]=>
>     NULL
>   }
>
> Is that the expected output of SimpleEcho2?
>
>
> On Tue, Jun 17, 2014 at 4:04 PM, Raminder Singh <ra...@gmail.com>
> wrote:
>
>> You can debug the following call in the output handler or LocalProvider
>> code. This is the method to persist the outputs to registry. If you face
>> difficulty, share details about your application description and i can try
>> to debug it.
>>
>> registry.add(ChildDataType.EXPERIMENT_OUTPUT, outputArray,
>> jobExecutionContext.getExperimentID());
>>
>> Thanks
>> Raminder
>>
>>
>> On Jun 17, 2014, at 9:56 AM, Nadeem Anjum <na...@gmail.com>
>> wrote:
>>
>> I found out I needed to change name outputParamType to "StdOut" from
>> "stdout".
>>
>> Now the results are retrieved without any exception, but even though
>> outputArray [1] has value:
>>
>> [DataObjectType(key:output1, value:{"hi":"align
>> executable","computation":"sqrt( abs( input1 * input2 ) )","output1":0}
>> , type:STDOUT)]
>>
>> the result returned by php-sdk's method getOutput has value as ""
>>
>>
>>
>>    1. key: "output1"
>>    2. metaData: null
>>    3. type: 0
>>    4. value: ""
>>
>>
>> [1]:
>> https://github.com/apache/airavata/blob/c83330e98aecfd7d60865d69d1450faf759670d7/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/OutputUtils.java#l61
>>
>> I am not sure where something is going wrong.
>>
>>
>>    1.
>>
>>
>>
>> On Tue, Jun 17, 2014 at 3:52 PM, Lahiru Gunathilake <gl...@gmail.com>
>> wrote:
>>
>>> output content has to be properly matched with output names, As far as I
>>> can see your output name is output1 and output has to be like below
>>>
>>> output1=whatever output you have (file path or string content or some
>>> primitive type values
>>>
>>>
>>> this approach is helpful when you have multiple output types dealing
>>> with workflows.
>>>
>>>
>>> On Tue, Jun 17, 2014 at 8:39 AM, Nadeem Anjum <na...@gmail.com>
>>> wrote:
>>>
>>>> Hello,
>>>>
>>>> If have registered an application (a genapp module) on my local
>>>> airavata server. The experiment completes successfully but an exception is
>>>> thrown while retrieving the results.
>>>>
>>>> ERROR org.apache.airavata.gfac.core.provider.GFacProviderException  -
>>>> Error in retrieving results
>>>> java.lang.Exception: Data for the output parameter 'output1' was not
>>>> found
>>>>  at
>>>> org.apache.airavata.gfac.core.utils.OutputUtils.parseStdout(OutputUtils.java:137)
>>>>
>>>>
>>>> The output is created as expected in the scratch working directory, in
>>>> the file alignApp2.stdout. I just need to retrieve the output as it is
>>>> created.
>>>>
>>>> I am not really sure on what parseStdout function in OutputUtils.java
>>>> [1] is attempting to do by Pattern Matching (which is causing this
>>>> exception as no match is found).
>>>>
>>>> I will be grateful if someone can clarify this.
>>>>
>>>> [1]:
>>>> https://github.com/apache/airavata/blob/c83330e98aecfd7d60865d69d1450faf759670d7/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/OutputUtils.java#l87
>>>>
>>>> Thanks,
>>>> Nadeem.
>>>>
>>>
>>>
>>>
>>> --
>>> System Analyst Programmer
>>> PTI Lab
>>> Indiana University
>>>
>>
>>
>>
>

Re: [GSoC] Clarification about OutputUtils.java

Posted by Nadeem Anjum <na...@gmail.com>.
I will try debugging registry.add call.

Even the SimpleEcho2 experiment (which is there in the createExperiment.php
of php-sdk) return output value as ""

{
    ["key"]=>
    string(11) "echo_output"
    ["value"]=>
    string(0) ""
    ["type"]=>
    int(0)
    ["metaData"]=>
    NULL
  }

Is that the expected output of SimpleEcho2?


On Tue, Jun 17, 2014 at 4:04 PM, Raminder Singh <ra...@gmail.com>
wrote:

> You can debug the following call in the output handler or LocalProvider
> code. This is the method to persist the outputs to registry. If you face
> difficulty, share details about your application description and i can try
> to debug it.
>
> registry.add(ChildDataType.EXPERIMENT_OUTPUT, outputArray,
> jobExecutionContext.getExperimentID());
>
> Thanks
> Raminder
>
>
> On Jun 17, 2014, at 9:56 AM, Nadeem Anjum <na...@gmail.com> wrote:
>
> I found out I needed to change name outputParamType to "StdOut" from
> "stdout".
>
> Now the results are retrieved without any exception, but even though
> outputArray [1] has value:
>
> [DataObjectType(key:output1, value:{"hi":"align
> executable","computation":"sqrt( abs( input1 * input2 ) )","output1":0}
> , type:STDOUT)]
>
> the result returned by php-sdk's method getOutput has value as ""
>
>
>
>    1. key: "output1"
>    2. metaData: null
>    3. type: 0
>    4. value: ""
>
>
> [1]:
> https://github.com/apache/airavata/blob/c83330e98aecfd7d60865d69d1450faf759670d7/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/OutputUtils.java#l61
>
> I am not sure where something is going wrong.
>
>
>    1.
>
>
>
> On Tue, Jun 17, 2014 at 3:52 PM, Lahiru Gunathilake <gl...@gmail.com>
> wrote:
>
>> output content has to be properly matched with output names, As far as I
>> can see your output name is output1 and output has to be like below
>>
>> output1=whatever output you have (file path or string content or some
>> primitive type values
>>
>>
>> this approach is helpful when you have multiple output types dealing with
>> workflows.
>>
>>
>> On Tue, Jun 17, 2014 at 8:39 AM, Nadeem Anjum <na...@gmail.com>
>> wrote:
>>
>>> Hello,
>>>
>>> If have registered an application (a genapp module) on my local airavata
>>> server. The experiment completes successfully but an exception is thrown
>>> while retrieving the results.
>>>
>>> ERROR org.apache.airavata.gfac.core.provider.GFacProviderException  -
>>> Error in retrieving results
>>> java.lang.Exception: Data for the output parameter 'output1' was not
>>> found
>>>  at
>>> org.apache.airavata.gfac.core.utils.OutputUtils.parseStdout(OutputUtils.java:137)
>>>
>>>
>>> The output is created as expected in the scratch working directory, in
>>> the file alignApp2.stdout. I just need to retrieve the output as it is
>>> created.
>>>
>>> I am not really sure on what parseStdout function in OutputUtils.java
>>> [1] is attempting to do by Pattern Matching (which is causing this
>>> exception as no match is found).
>>>
>>> I will be grateful if someone can clarify this.
>>>
>>> [1]:
>>> https://github.com/apache/airavata/blob/c83330e98aecfd7d60865d69d1450faf759670d7/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/OutputUtils.java#l87
>>>
>>> Thanks,
>>> Nadeem.
>>>
>>
>>
>>
>> --
>> System Analyst Programmer
>> PTI Lab
>> Indiana University
>>
>
>
>

Re: [GSoC] Clarification about OutputUtils.java

Posted by Raminder Singh <ra...@gmail.com>.
You can debug the following call in the output handler or LocalProvider code. This is the method to persist the outputs to registry. If you face difficulty, share details about your application description and i can try to debug it. 

registry.add(ChildDataType.EXPERIMENT_OUTPUT, outputArray, jobExecutionContext.getExperimentID());

Thanks
Raminder


On Jun 17, 2014, at 9:56 AM, Nadeem Anjum <na...@gmail.com> wrote:

> I found out I needed to change name outputParamType to "StdOut" from "stdout".
> 
> Now the results are retrieved without any exception, but even though outputArray [1] has value:
> 
> [DataObjectType(key:output1, value:{"hi":"align executable","computation":"sqrt( abs( input1 * input2 ) )","output1":0}
> , type:STDOUT)]
> 
> the result returned by php-sdk's method getOutput has value as ""
> 
> 
> 
> key: "output1"
> 
> metaData: null
> 
> type: 0
> 
> value: ""
> 
> 
> [1]: https://github.com/apache/airavata/blob/c83330e98aecfd7d60865d69d1450faf759670d7/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/OutputUtils.java#l61
> 
> 
> I am not sure where something is going wrong. 
> 
> 
> 
> On Tue, Jun 17, 2014 at 3:52 PM, Lahiru Gunathilake <gl...@gmail.com> wrote:
> output content has to be properly matched with output names, As far as I can see your output name is output1 and output has to be like below
> 
> output1=whatever output you have (file path or string content or some primitive type values
> 
> 
> this approach is helpful when you have multiple output types dealing with workflows.
> 
> 
> On Tue, Jun 17, 2014 at 8:39 AM, Nadeem Anjum <na...@gmail.com> wrote:
> Hello,
> 
> If have registered an application (a genapp module) on my local airavata server. The experiment completes successfully but an exception is thrown while retrieving the results.
> 
> ERROR org.apache.airavata.gfac.core.provider.GFacProviderException  - Error in retrieving results
> java.lang.Exception: Data for the output parameter 'output1' was not found
> 	at org.apache.airavata.gfac.core.utils.OutputUtils.parseStdout(OutputUtils.java:137)
> 
> 
> The output is created as expected in the scratch working directory, in the file alignApp2.stdout. I just need to retrieve the output as it is created. 
> 
> I am not really sure on what parseStdout function in OutputUtils.java [1] is attempting to do by Pattern Matching (which is causing this exception as no match is found).
> 
> I will be grateful if someone can clarify this.
> 
> [1]: https://github.com/apache/airavata/blob/c83330e98aecfd7d60865d69d1450faf759670d7/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/OutputUtils.java#l87
> 
> Thanks,
> Nadeem.
> 
> 
> 
> -- 
> System Analyst Programmer
> PTI Lab
> Indiana University
> 


Re: [GSoC] Clarification about OutputUtils.java

Posted by Nadeem Anjum <na...@gmail.com>.
I found out I needed to change name outputParamType to "StdOut" from
"stdout".

Now the results are retrieved without any exception, but even though
outputArray [1] has value:

[DataObjectType(key:output1, value:{"hi":"align
executable","computation":"sqrt( abs( input1 * input2 ) )","output1":0}
, type:STDOUT)]

the result returned by php-sdk's method getOutput has value as ""



   1. key: "output1"
   2. metaData: null
   3. type: 0
   4. value: ""


[1]:
https://github.com/apache/airavata/blob/c83330e98aecfd7d60865d69d1450faf759670d7/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/OutputUtils.java#l61

I am not sure where something is going wrong.


   1.



On Tue, Jun 17, 2014 at 3:52 PM, Lahiru Gunathilake <gl...@gmail.com>
wrote:

> output content has to be properly matched with output names, As far as I
> can see your output name is output1 and output has to be like below
>
> output1=whatever output you have (file path or string content or some
> primitive type values
>
>
> this approach is helpful when you have multiple output types dealing with
> workflows.
>
>
> On Tue, Jun 17, 2014 at 8:39 AM, Nadeem Anjum <na...@gmail.com>
> wrote:
>
>> Hello,
>>
>> If have registered an application (a genapp module) on my local airavata
>> server. The experiment completes successfully but an exception is thrown
>> while retrieving the results.
>>
>> ERROR org.apache.airavata.gfac.core.provider.GFacProviderException  -
>> Error in retrieving results
>> java.lang.Exception: Data for the output parameter 'output1' was not found
>>  at
>> org.apache.airavata.gfac.core.utils.OutputUtils.parseStdout(OutputUtils.java:137)
>>
>>
>> The output is created as expected in the scratch working directory, in
>> the file alignApp2.stdout. I just need to retrieve the output as it is
>> created.
>>
>> I am not really sure on what parseStdout function in OutputUtils.java [1]
>> is attempting to do by Pattern Matching (which is causing this exception as
>> no match is found).
>>
>> I will be grateful if someone can clarify this.
>>
>> [1]:
>> https://github.com/apache/airavata/blob/c83330e98aecfd7d60865d69d1450faf759670d7/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/OutputUtils.java#l87
>>
>> Thanks,
>> Nadeem.
>>
>
>
>
> --
> System Analyst Programmer
> PTI Lab
> Indiana University
>

Re: [GSoC] Clarification about OutputUtils.java

Posted by Lahiru Gunathilake <gl...@gmail.com>.
output content has to be properly matched with output names, As far as I
can see your output name is output1 and output has to be like below

output1=whatever output you have (file path or string content or some
primitive type values


this approach is helpful when you have multiple output types dealing with
workflows.


On Tue, Jun 17, 2014 at 8:39 AM, Nadeem Anjum <na...@gmail.com>
wrote:

> Hello,
>
> If have registered an application (a genapp module) on my local airavata
> server. The experiment completes successfully but an exception is thrown
> while retrieving the results.
>
> ERROR org.apache.airavata.gfac.core.provider.GFacProviderException  -
> Error in retrieving results
> java.lang.Exception: Data for the output parameter 'output1' was not found
>  at
> org.apache.airavata.gfac.core.utils.OutputUtils.parseStdout(OutputUtils.java:137)
>
>
> The output is created as expected in the scratch working directory, in the
> file alignApp2.stdout. I just need to retrieve the output as it is created.
>
> I am not really sure on what parseStdout function in OutputUtils.java [1]
> is attempting to do by Pattern Matching (which is causing this exception as
> no match is found).
>
> I will be grateful if someone can clarify this.
>
> [1]:
> https://github.com/apache/airavata/blob/c83330e98aecfd7d60865d69d1450faf759670d7/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/OutputUtils.java#l87
>
> Thanks,
> Nadeem.
>



-- 
System Analyst Programmer
PTI Lab
Indiana University