[ https://issues.apache.org/jira/browse/OOZIE-3435?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16802997#comment-16802997 ]
Andras Salamon commented on OOZIE-3435: --------------------------------------- I think it would be better to use only equals. I found references to this in the documentation [here|https://oozie.apache.org/docs/5.1.0/DG_CommandLineTool.html] and [here|https://oozie.apache.org/docs/5.1.0/WebServicesAPI.html]. The documentation implies that we use equals but lists the possible values as wf, coordinator, bundle. Did you find any other documentation? So I think we should both handle 'coord' and 'coordinator'. > Inconsistent jobtype filtering > ------------------------------ > > Key: OOZIE-3435 > URL: https://issues.apache.org/jira/browse/OOZIE-3435 > Project: Oozie > Issue Type: Bug > Affects Versions: trunk > Reporter: Andras Salamon > Assignee: Shubham > Priority: Minor > > It is possible for specifying the jobtype during jobs filter in the REST API > and in the command line as well. Supported jobtypes are: {{wf}}, {{coord}}, > {{bundle}} > For some reason Oozie checks the jobtype using {{contains}} and > {{startsWith}} also in > [OozieCLI|https://github.com/apache/oozie/blob/master/client/src/main/java/org/apache/oozie/cli/OozieCLI.java#L1757-L1765]: > {noformat} > else if (jobtype.toLowerCase().contains("wf")) { > ... > } > else if (jobtype.toLowerCase().startsWith("coord")) { > ... > } > else if (jobtype.toLowerCase().startsWith("bundle")) { > ... > } > {noformat} > and in > [V1JobsServlet|https://github.com/apache/oozie/blob/master/core/src/main/java/org/apache/oozie/servlet/V1JobsServlet.java#L302-L310]: > {noformat} > if (jobtype.contains("wf")) { > json = getWorkflowJobs(request); > } > else if (jobtype.contains("coord")) { > json = getCoordinatorJobs(request); > } > else if (jobtype.contains("bundle")) { > json = getBundleJobs(request); > } > {noformat} > This has several strange side effects: > * It is possible to filter using jobtypes like: {{wfxxx}}, {{coordxxxx}}, > {{bundlexxxx, xxxwfxxx}}. > * It is possible to filter for coordinators using {{xxxcoordxxx}} in REST > API but it's not working in CLI. > * It is possible to filter for {{coordxxxxwf}}, this will filter for > workflows. > * Filtering for {{bundlecoord}} will list the bundles in CLI and it will > list the coordinators in the REST API. -- This message was sent by Atlassian JIRA (v7.6.3#76005)