You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oozie.apache.org by "Robert Kanter (JIRA)" <ji...@apache.org> on 2017/05/16 15:29:06 UTC

[jira] [Commented] (OOZIE-2339) Use JAXB to provide a Java interface for writing Jobs based on the XSD schemas

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

Robert Kanter commented on OOZIE-2339:
--------------------------------------

{quote}every XSD version{quote}
I think this is more of a "nice to have".  The evolution of our schemas has generally been forward compatible - i.e. we've only added fields or reduced the restrictiveness of fields.  To upgrade, simply upping the schema version is all that's necessary 99% of the time.  And there's no reason anyone creating a new workflow/coord/bundle should start off with an older schema today.  So I think it's fine if we end up only supporting the latest schemas.  Of course, if it's super easy to add the older ones, we may as well.  And once this interface supports a schema version we shouldn't remove it in the future without first deprecating it.  Anyway, I just wouldn't want to gate this feature on it supporting all of the older schemas if that ends up being complicated or a lot of extra work.

> Use JAXB to provide a Java interface for writing Jobs based on the XSD schemas
> ------------------------------------------------------------------------------
>
>                 Key: OOZIE-2339
>                 URL: https://issues.apache.org/jira/browse/OOZIE-2339
>             Project: Oozie
>          Issue Type: New Feature
>          Components: client
>    Affects Versions: trunk
>            Reporter: Robert Kanter
>
> Users often complain about the XML they have to write for Oozie jobs.  It would be nice if they could write them in something like Java, but we don't want to have to maintain a separate Java API for this.  I was looking around and saw that JAXB might be the right thing here.  From what I can tell, it lets you create Java classes from XSD schemas.  So, we should be able to auto-generate a Java API for writing Oozie jobs, without having to really maintain it.
> We should investigate if this is feasible and, if so, implement it.
> Some useful looking links:
> * [JAXB overview|https://en.wikipedia.org/wiki/Java_Architecture_for_XML_Binding]
> * [JAXB description|https://jaxb.java.net/2.2.11/docs/ch03.html]
> * [Maven JAXB plugin|https://java.net/projects/maven-jaxb2-plugin/pages/Home]
> * [Apache Falcon|https://falcon.apache.org]
> Key features:
> * must have:
> ** inside an {{oozie-jobs-api}} artifact
> ** able to create workflow / coordinator / bundle definitions programmatically
> ** synchronizing each and every XSD change on rebuild
> ** can write {{workflow.xml}}, {{coordinator.xml}}, {{bundle.xml}}, and {{jobs.properties}} artifacts of every XSD version
> ** XSD version(s) can be provided. When not provided, latest ones are considered as valid
> ** cloneability of workflow etc. {{Object}} s
> ** perform cross checks, e.g. that the workflow graph is a DAG
> * nice to have:
> ** implement a [*fluent API*|https://en.wikipedia.org/wiki/Fluent_interface]
> ** have a Python / Jython REPL to make it easy to experiment
> ** create documentation about usage
> ** can read {{workflow.xml}}, {{coordinator.xml}}, {{bundle.xml}}, and {{jobs.properties}} artifacts of every XSD version
> ** can convert between XSD versions
> ** support XSD change on the fly (within REPL)
> ** support HDFS reads / writes
> ** support dry run on an Oozie server to perform checks



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