You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oozie.apache.org by "Andras Piros (JIRA)" <ji...@apache.org> on 2016/12/05 11:53:58 UTC
[jira] [Comment Edited] (OOZIE-2751) LocalOozieClient is missing
methods from OozieClient
[ https://issues.apache.org/jira/browse/OOZIE-2751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15722066#comment-15722066 ]
Andras Piros edited comment on OOZIE-2751 at 12/5/16 11:53 AM:
---------------------------------------------------------------
[~abhishekbafna] nice suggestions!
Once touched, I'd go for a small refactor that involves extracting an {{interface}} from {{OozieClient}} s methods that must be overridden, and let {{OozieClient}}, {{LocalOozieClient}}, and {{LocalOozieClientCoord}} implement that. That way it would be clear what is needed on what level.
I'd also extract the duplicated functionality from {{LocalOozieClient}} and {{LocalOozieClientCoord}} to a new {{class}} and let both ones use that w/ composition.
was (Author: andras.piros):
[~abhishekbafna] nice suggestions!
Once touched, I'd go for a small refactor that involves extracting an {{interface}} from {{OozieClient}}s methods that must be overridden, and let {{OozieClient}}, {{LocalOozieClient}}, and {{LocalOozieClientCoord}} implement that. That way it would be clear what is needed on what level.
I'd also extract the duplicated functionality from {{LocalOozieClient}} and {{LocalOozieClientCoord}} to a new {{class}} and let both ones use that w/ composition.
> LocalOozieClient is missing methods from OozieClient
> ----------------------------------------------------
>
> Key: OOZIE-2751
> URL: https://issues.apache.org/jira/browse/OOZIE-2751
> Project: Oozie
> Issue Type: Bug
> Reporter: Robert Kanter
> Assignee: Abhishek Bafna
> Fix For: 5.0.0
>
>
> {{LocalOozieClient}} works by wrapping direct calls to {{DagEngine}} in the normal {{OozieClient}} methods instead of making REST calls to an Oozie Server. However, it currently doesn't override all methods, which means you hit the {{OozieClient}} implementation, which tries to make a REST call and will fail (because it's not setup for that). For example, {{getStatus(String jobId)}} isn't overridden, and doesn't work when used from {{LocalOozieClient}}.
> We should also create a test that verifies that all methods are overridden.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)