I found a problem with getWorkflowOutputs(), causing an exception when called (this is trunk rev 1448):
java.lang.ArrayIndexOutOfBoundsException: -1
at hu.sztaki.lpds.pgportal.services.asm.ASMService.convertOutput(ASMService.java:1501)
at hu.sztaki.lpds.pgportal.services.asm.ASMService.getWorkflowOutputs(ASMService.java:1853)
at com.verce.forwardmodelling.ForwardPortlet.downloadOutput(ForwardPortlet.java:314)
...
The problem happens because convertOutput() expects only entries with a path like "<jobname>/outputs/runtimeId/", but getWorkflowOutputs() actually provides it with all workflow files:</jobname>
is = getFileStreamFromStorage(userId, workflowName, null, null, DownloadTypeConstants.All);
convertOutput() should be able to handle the other workflow files as well. Especially since any input stream it gets will always contain an entry with just the directory, which convertOutput immediately fails on.
getWorkflowOutputs() should probably use DownloadTypeConstants.AllOutputs;
I would also like to propose adding getWorkflowLogs(), that is basically the same as getWorkflowOutputs(), but returns only the log files (basically the inverse of DownloadTypeConstants.AllButLogs);
Let me know what you think. Best regards,
Jonas
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you very much for detailing this issue, I sympathize the solution you proposed finally, beside I would try to resolve this possibility of exception in getWorkflowOutputs method as well.
Hopefully during this week (probably on Wednesday) I can commit the solution on the trunk. May I ask you to try it then?
Thank you,
Best regards,
akos
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I commited my modifications that resolves the issue around convertOutput and changes getWorkflowOutputs to download outputs of the jobs only. Unfortunatelly gUSE itself does not support downloading just the logs, hence what you proposed, the inverse of DownloadTypeConstants.AllButLogs could not be supported by ASM yet.
Please let me know if it works correctly for you too, or do you need any further modifications.
Thanks you,
akos
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I found a problem with getWorkflowOutputs(), causing an exception when called (this is trunk rev 1448):
The problem happens because convertOutput() expects only entries with a path like "<jobname>/outputs/runtimeId/", but getWorkflowOutputs() actually provides it with all workflow files:</jobname>
e.g.:
I think two things might be worth fixing:
I would also like to propose adding getWorkflowLogs(), that is basically the same as getWorkflowOutputs(), but returns only the log files (basically the inverse of DownloadTypeConstants.AllButLogs);
Let me know what you think. Best regards,
Jonas
Hi Jonas,
Thank you very much for detailing this issue, I sympathize the solution you proposed finally, beside I would try to resolve this possibility of exception in getWorkflowOutputs method as well.
Hopefully during this week (probably on Wednesday) I can commit the solution on the trunk. May I ask you to try it then?
Thank you,
Best regards,
akos
Hi Akos,
Thanks! I'll check back here to see when it's committed and give it a shot.
Regards,
Jonas
Dear Jonas,
I commited my modifications that resolves the issue around convertOutput and changes getWorkflowOutputs to download outputs of the jobs only. Unfortunatelly gUSE itself does not support downloading just the logs, hence what you proposed, the inverse of DownloadTypeConstants.AllButLogs could not be supported by ASM yet.
Please let me know if it works correctly for you too, or do you need any further modifications.
Thanks you,
akos
Dear Akos,
Your changes have fixed the reported issue. Thanks.
Best regards,
Jonas