[ 
https://issues.apache.org/jira/browse/OOZIE-2827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15950734#comment-15950734
 ] 

Peter Bacsko commented on OOZIE-2827:
-------------------------------------

I checked patch v3, but I still have mixed feelings about certain things.

1. There is still one method with empty body - if it's OK, pls add the comment 
I advised above

2. In the patch, you still add a {{null}} element to the list. On the 
ReviewBoard page, you mentioned that it's necessary for the list to have a 
predetermined length - could you explain where this matters? I'm also wondering 
how this part of the patch can execute without an NPE:

{code}
            List<WorkflowActionBean> wfActions = 
coordEngine.getWfActionInCoord(jobId, action, offset, len);
            JSONArray array = new JSONArray();
            for (WorkflowActionBean wfAction : wfActions) {
                array.add(wfAction.toJSONObject());
            }
{code}

3. I have a problem with catching {{JPAExecutorException}}. This can mean two 
things - there was an underlying database issue or the WF action in question 
was not found. Perhaps the second case is more common, but with this approach 
we're using exceptions as control flow, which is an anti-pattern, plus we 
swallow DB problems. If the DB issue is transient, we might end up returning a 
broken list of beans.

I suggest modifying {{WorkflowActionGetJPAExecutor}}. You can add an extra 
constructor with a boolean argument which defines whether having a null result 
is acceptable or not. The current single-arg constructor could call this new 
constructor with a false value. Then in {{execute()}} you return either null or 
throw an exception depending on this flag.

Thanks.

> More directly view of the coordinator’s history from perspective of workflow 
> action.
> ------------------------------------------------------------------------------------
>
>                 Key: OOZIE-2827
>                 URL: https://issues.apache.org/jira/browse/OOZIE-2827
>             Project: Oozie
>          Issue Type: Improvement
>            Reporter: Alonzo Zhou
>         Attachments: OOZIE-2827-0001.patch, OOZIE-2827-0002.patch, 
> OOZIE-2827-0003.patch
>
>
> Background: 
> When we monitor a coordinator job, statistics of historical workflow 
> instances such as running time can be directly visualized.
> But, we lack the ability to monitor historical statistics of coordinator from 
> perspective of  workflow action.For example, running time of a coordinator 
> action is longer than before, but we can't see the exact change tendency of a 
> sepcific workflow action in it。
> Functional optimization: 
> More detailed view of the coordinator’s history can be observed from 
> perspective of  workflow action.Furthermore,  the trend of a workflow action 
> can be shown directly on front-end graph.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to