You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oozie.apache.org by "jun aoki (JIRA)" <ji...@apache.org> on 2012/11/22 01:00:59 UTC

[jira] [Created] (OOZIE-1085) jaxb2 binding for xml import and export

jun aoki created OOZIE-1085:
-------------------------------

             Summary: jaxb2 binding for xml import and export
                 Key: OOZIE-1085
                 URL: https://issues.apache.org/jira/browse/OOZIE-1085
             Project: Oozie
          Issue Type: Improvement
          Components: workflow
    Affects Versions: trunk
            Reporter: jun aoki
            Priority: Minor
             Fix For: trunk


There will be xml import and export for wfgen.
They should be done through a xml binding.
I made a patch with jaxb2.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OOZIE-1085) jaxb2 xml binding for workflow.xml serialization and deserialization

Posted by "jun aoki (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OOZIE-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13509607#comment-13509607 ] 

jun aoki commented on OOZIE-1085:
---------------------------------

I have updated the review request. Please review.
https://reviews.apache.org/r/8232/

1. All workflow xsd files and the corresponding xml loaders.
2. Negative tests for each loaders.
                
> jaxb2 xml binding for workflow.xml serialization and deserialization 
> ---------------------------------------------------------------------
>
>                 Key: OOZIE-1085
>                 URL: https://issues.apache.org/jira/browse/OOZIE-1085
>             Project: Oozie
>          Issue Type: Improvement
>          Components: workflow
>    Affects Versions: trunk
>            Reporter: jun aoki
>            Assignee: jun aoki
>            Priority: Minor
>              Labels: patch
>             Fix For: trunk
>
>         Attachments: OOZIE-1085-2.patch, OOZIE-1085-3.patch, OOZIE-1085-4.patch, OOZIE-1085.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> There will be xml import and export for wfgen.
> They should be done through a xml binding.
> I made a patch with jaxb2.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (OOZIE-1085) jaxb2 binding for xml import and export

Posted by "jun aoki (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OOZIE-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

jun aoki updated OOZIE-1085:
----------------------------

    Attachment: OOZIE-1085-2.patch
    
> jaxb2 binding for xml import and export
> ---------------------------------------
>
>                 Key: OOZIE-1085
>                 URL: https://issues.apache.org/jira/browse/OOZIE-1085
>             Project: Oozie
>          Issue Type: Improvement
>          Components: workflow
>    Affects Versions: trunk
>            Reporter: jun aoki
>            Priority: Minor
>              Labels: patch
>             Fix For: trunk
>
>         Attachments: OOZIE-1085-2.patch, OOZIE-1085.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> There will be xml import and export for wfgen.
> They should be done through a xml binding.
> I made a patch with jaxb2.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OOZIE-1085) jaxb2 binding for xml import and export

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OOZIE-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13502676#comment-13502676 ] 

Hadoop QA commented on OOZIE-1085:
----------------------------------

Testing JIRA OOZIE-1085

Cleaning local svn workspace

----------------------------

{color:green}+1 PATCH_APPLIES{color}
{color:green}+1 CLEAN{color}
{color:green}+1 RAW_PATCH_ANALYSIS{color}
.    {color:green}+1{color} the patch does not introduce any @author tags
.    {color:green}+1{color} the patch does not introduce any tabs
.    {color:green}+1{color} the patch does not introduce any trailing spaces
.    {color:green}+1{color} the patch does not introduce any line longer than 132
.    {color:green}+1{color} the patch does adds/modifies 1 testcase(s)
{color:green}+1 RAT{color}
.    {color:green}+1{color} the patch does not seem to introduce new RAT warnings
{color:green}+1 JAVADOC{color}
.    {color:green}+1{color} the patch does not seem to introduce new Javadoc warnings
{color:green}+1 COMPILE{color}
.    {color:green}+1{color} HEAD compiles
.    {color:green}+1{color} patch compiles
.    {color:green}+1{color} the patch does not seem to introduce new javac warnings
{color:green}+1 BACKWARDS_COMPATIBILITY{color}
.    {color:green}+1{color} the patch does not change any JPA Entity/Colum/Basic/Lob/Transient annotations
.    {color:green}+1{color} the patch does not modify JPA files
{color:green}+1 TESTS{color}
.    Tests run: 921
{color:green}+1 DISTRO{color}
.    {color:green}+1{color} distro tarball builds with the patch 

----------------------------
{color:green}*+1 Overall result, good!, no -1s*{color}


The full output of the test-patch run is available at

.   https://builds.apache.org/job/oozie-trunk-precommit-build/195/
                
> jaxb2 binding for xml import and export
> ---------------------------------------
>
>                 Key: OOZIE-1085
>                 URL: https://issues.apache.org/jira/browse/OOZIE-1085
>             Project: Oozie
>          Issue Type: Improvement
>          Components: workflow
>    Affects Versions: trunk
>            Reporter: jun aoki
>            Priority: Minor
>              Labels: patch
>             Fix For: trunk
>
>         Attachments: OOZIE-1085-2.patch, OOZIE-1085-3.patch, OOZIE-1085-4.patch, OOZIE-1085.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> There will be xml import and export for wfgen.
> They should be done through a xml binding.
> I made a patch with jaxb2.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (OOZIE-1085) jaxb2 binding for xml import and export

Posted by "jun aoki (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OOZIE-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

jun aoki updated OOZIE-1085:
----------------------------

    Attachment: OOZIE-1085-4.patch

4th patch
                
> jaxb2 binding for xml import and export
> ---------------------------------------
>
>                 Key: OOZIE-1085
>                 URL: https://issues.apache.org/jira/browse/OOZIE-1085
>             Project: Oozie
>          Issue Type: Improvement
>          Components: workflow
>    Affects Versions: trunk
>            Reporter: jun aoki
>            Priority: Minor
>              Labels: patch
>             Fix For: trunk
>
>         Attachments: OOZIE-1085-2.patch, OOZIE-1085-3.patch, OOZIE-1085-4.patch, OOZIE-1085.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> There will be xml import and export for wfgen.
> They should be done through a xml binding.
> I made a patch with jaxb2.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OOZIE-1085) jaxb2 binding for xml import and export

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OOZIE-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13502547#comment-13502547 ] 

Hadoop QA commented on OOZIE-1085:
----------------------------------

Testing JIRA OOZIE-1085

Cleaning local svn workspace

----------------------------

{color:green}+1 PATCH_APPLIES{color}
{color:green}+1 CLEAN{color}
{color:green}+1 RAW_PATCH_ANALYSIS{color}
.    {color:green}+1{color} the patch does not introduce any @author tags
.    {color:green}+1{color} the patch does not introduce any tabs
.    {color:green}+1{color} the patch does not introduce any trailing spaces
.    {color:green}+1{color} the patch does not introduce any line longer than 132
.    {color:green}+1{color} the patch does adds/modifies 1 testcase(s)
{color:green}+1 RAT{color}
.    {color:green}+1{color} the patch does not seem to introduce new RAT warnings
{color:green}+1 JAVADOC{color}
.    {color:green}+1{color} the patch does not seem to introduce new Javadoc warnings
{color:red}-1 COMPILE{color}
.    {color:green}+1{color} HEAD compiles
.    {color:green}+1{color} patch compiles
.    {color:red}-1{color} the patch seems to introduce 1 new javac warning(s)
{color:green}+1 BACKWARDS_COMPATIBILITY{color}
.    {color:green}+1{color} the patch does not change any JPA Entity/Colum/Basic/Lob/Transient annotations
.    {color:green}+1{color} the patch does not modify JPA files
{color:red}-1 TESTS{color}
.    Tests run: 921
.    Tests failed: 0
.    Tests errors: 1

.    The patch failed the following testcases:

.      

{color:green}+1 DISTRO{color}
.    {color:green}+1{color} distro tarball builds with the patch 

----------------------------
{color:red}*-1 Overall result, please check the reported -1(s)*{color}


The full output of the test-patch run is available at

.   https://builds.apache.org/job/oozie-trunk-precommit-build/192/
                
> jaxb2 binding for xml import and export
> ---------------------------------------
>
>                 Key: OOZIE-1085
>                 URL: https://issues.apache.org/jira/browse/OOZIE-1085
>             Project: Oozie
>          Issue Type: Improvement
>          Components: workflow
>    Affects Versions: trunk
>            Reporter: jun aoki
>            Priority: Minor
>              Labels: patch
>             Fix For: trunk
>
>         Attachments: OOZIE-1085.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> There will be xml import and export for wfgen.
> They should be done through a xml binding.
> I made a patch with jaxb2.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OOZIE-1085) jaxb2 xml binding for workflow.xml serialization and deserialization

Posted by "Ryota Egashira (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OOZIE-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13509645#comment-13509645 ] 

Ryota Egashira commented on OOZIE-1085:
---------------------------------------

it's been great work.
excuse my ignorance about jaxb2, can I ask questions on how to best utilize this? 
1. can we run this jaxb2 in client-side?  (i.e., as javascript)
in that case, need to load all versions of xsd files on browser locally? 

2. if running jaxb2 on server-side and do XML validation/manipulation,  does client(running on browser) send xml to server (through AJAX etc.), and server parses it using jaxb2?  I believe that GWT provides GWT-RPC, serialization/deserialization between client and server communication, just wondering if jaxb2 coexists with it?  
                
> jaxb2 xml binding for workflow.xml serialization and deserialization 
> ---------------------------------------------------------------------
>
>                 Key: OOZIE-1085
>                 URL: https://issues.apache.org/jira/browse/OOZIE-1085
>             Project: Oozie
>          Issue Type: Improvement
>          Components: workflow
>    Affects Versions: trunk
>            Reporter: jun aoki
>            Assignee: jun aoki
>            Priority: Minor
>              Labels: patch
>             Fix For: trunk
>
>         Attachments: OOZIE-1085-2.patch, OOZIE-1085-3.patch, OOZIE-1085-4.patch, OOZIE-1085.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> There will be xml import and export for wfgen.
> They should be done through a xml binding.
> I made a patch with jaxb2.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OOZIE-1085) jaxb2 xml binding for workflow.xml serialization and deserialization

Posted by "jun aoki (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OOZIE-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13509292#comment-13509292 ] 

jun aoki commented on OOZIE-1085:
---------------------------------

Hi Robert, 

Yes jaxb2 generates a set of classes per a xsd file.
(Strictly speaking it is by a namespace. Say if there is 2 <element1> elements from 2 different namespaces, whether or not from a single xsd file, then 2 classes are generated.)
It is not possible to merge them together into one generic class set because it is strictly type-safe. 
For example, the 0.4 xsd defines <global> but the 0.3 does not, they are just different elements and so are the corresponding binding classes.

I will add more tests and supported xsd files and will add the patch to the review request.
https://reviews.apache.org/r/8232/

                
> jaxb2 xml binding for workflow.xml serialization and deserialization 
> ---------------------------------------------------------------------
>
>                 Key: OOZIE-1085
>                 URL: https://issues.apache.org/jira/browse/OOZIE-1085
>             Project: Oozie
>          Issue Type: Improvement
>          Components: workflow
>    Affects Versions: trunk
>            Reporter: jun aoki
>            Priority: Minor
>              Labels: patch
>             Fix For: trunk
>
>         Attachments: OOZIE-1085-2.patch, OOZIE-1085-3.patch, OOZIE-1085-4.patch, OOZIE-1085.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> There will be xml import and export for wfgen.
> They should be done through a xml binding.
> I made a patch with jaxb2.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OOZIE-1085) jaxb2 xml binding for workflow.xml serialization and deserialization

Posted by "jun aoki (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OOZIE-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507771#comment-13507771 ] 

jun aoki commented on OOZIE-1085:
---------------------------------

Hi Alejandro,

>> will you have different sets of jaxb2 XML binding java classes for each XSD?
You gave me a good hint. I would probably have to create number of xml loaders, depending on xsd files.
My pseudo code is

class OozieWorkflow04XmlLoader{
  public OozieWorkflow04XmlLoader(){
        Schema schema = sf.newSchema("../client/src/main/resources/oozie-workflow-0.4.xsd");
  }

  public WORKFLOWAPP loadString(String xml){ ... }
}

where WORKFLOWAPP class is generated by jaxb2 from oozie-workflow-0.4.xsd.
jaxb2 will generate a different WORKFLOWAPP from 0.3.xsd and so on.

Or, probably I can try maiking a single XmlLoader with generics. But I am not too certain if I can design this way.
class XmlLoader<T>{
  public XmlLoader(){
        Schema schema = sf.newSchema("../client/src/main/resources/oozie-workflow-0.4.xsd");
  }

  public T loadString(String xml){ ... }
}

>> if so, how will you handle that from the WFGEN easily?
Currently, client module owns the xsd files. e.g. http://svn.apache.org/viewvc/oozie/trunk/client/src/main/resources/
So I am open to have the XmlLoader under client, and have wfgen pom depend on the client module.


                
> jaxb2 xml binding for workflow.xml serialization and deserialization 
> ---------------------------------------------------------------------
>
>                 Key: OOZIE-1085
>                 URL: https://issues.apache.org/jira/browse/OOZIE-1085
>             Project: Oozie
>          Issue Type: Improvement
>          Components: workflow
>    Affects Versions: trunk
>            Reporter: jun aoki
>            Priority: Minor
>              Labels: patch
>             Fix For: trunk
>
>         Attachments: OOZIE-1085-2.patch, OOZIE-1085-3.patch, OOZIE-1085-4.patch, OOZIE-1085.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> There will be xml import and export for wfgen.
> They should be done through a xml binding.
> I made a patch with jaxb2.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OOZIE-1085) jaxb2 xml binding for workflow.xml serialization and deserialization

Posted by "Robert Kanter (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OOZIE-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13508866#comment-13508866 ] 

Robert Kanter commented on OOZIE-1085:
--------------------------------------

Oh, so jaxb2 is actually generating different classes?  (I'm not at all familiar with jaxb2).  It would be better if we didn't have to generate several similar classes, but if that's not possible, then I think this approach might be ok.  
                
> jaxb2 xml binding for workflow.xml serialization and deserialization 
> ---------------------------------------------------------------------
>
>                 Key: OOZIE-1085
>                 URL: https://issues.apache.org/jira/browse/OOZIE-1085
>             Project: Oozie
>          Issue Type: Improvement
>          Components: workflow
>    Affects Versions: trunk
>            Reporter: jun aoki
>            Priority: Minor
>              Labels: patch
>             Fix For: trunk
>
>         Attachments: OOZIE-1085-2.patch, OOZIE-1085-3.patch, OOZIE-1085-4.patch, OOZIE-1085.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> There will be xml import and export for wfgen.
> They should be done through a xml binding.
> I made a patch with jaxb2.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OOZIE-1085) jaxb2 binding for xml import and export

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OOZIE-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13502634#comment-13502634 ] 

Hadoop QA commented on OOZIE-1085:
----------------------------------

Testing JIRA OOZIE-1085

Cleaning local svn workspace

----------------------------

{color:green}+1 PATCH_APPLIES{color}
{color:green}+1 CLEAN{color}
{color:green}+1 RAW_PATCH_ANALYSIS{color}
.    {color:green}+1{color} the patch does not introduce any @author tags
.    {color:green}+1{color} the patch does not introduce any tabs
.    {color:green}+1{color} the patch does not introduce any trailing spaces
.    {color:green}+1{color} the patch does not introduce any line longer than 132
.    {color:green}+1{color} the patch does adds/modifies 1 testcase(s)
{color:green}+1 RAT{color}
.    {color:green}+1{color} the patch does not seem to introduce new RAT warnings
{color:green}+1 JAVADOC{color}
.    {color:green}+1{color} the patch does not seem to introduce new Javadoc warnings
{color:red}-1 COMPILE{color}
.    {color:green}+1{color} HEAD compiles
.    {color:green}+1{color} patch compiles
.    {color:red}-1{color} the patch seems to introduce 1 new javac warning(s)
{color:green}+1 BACKWARDS_COMPATIBILITY{color}
.    {color:green}+1{color} the patch does not change any JPA Entity/Colum/Basic/Lob/Transient annotations
.    {color:green}+1{color} the patch does not modify JPA files
{color:green}+1 TESTS{color}
.    Tests run: 921
{color:green}+1 DISTRO{color}
.    {color:green}+1{color} distro tarball builds with the patch 

----------------------------
{color:red}*-1 Overall result, please check the reported -1(s)*{color}


The full output of the test-patch run is available at

.   https://builds.apache.org/job/oozie-trunk-precommit-build/194/
                
> jaxb2 binding for xml import and export
> ---------------------------------------
>
>                 Key: OOZIE-1085
>                 URL: https://issues.apache.org/jira/browse/OOZIE-1085
>             Project: Oozie
>          Issue Type: Improvement
>          Components: workflow
>    Affects Versions: trunk
>            Reporter: jun aoki
>            Priority: Minor
>              Labels: patch
>             Fix For: trunk
>
>         Attachments: OOZIE-1085-2.patch, OOZIE-1085.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> There will be xml import and export for wfgen.
> They should be done through a xml binding.
> I made a patch with jaxb2.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (OOZIE-1085) jaxb2 binding for xml import and export

Posted by "jun aoki (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OOZIE-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

jun aoki updated OOZIE-1085:
----------------------------

    Attachment: OOZIE-1085.patch

patch with jaxb2
                
> jaxb2 binding for xml import and export
> ---------------------------------------
>
>                 Key: OOZIE-1085
>                 URL: https://issues.apache.org/jira/browse/OOZIE-1085
>             Project: Oozie
>          Issue Type: Improvement
>          Components: workflow
>    Affects Versions: trunk
>            Reporter: jun aoki
>            Priority: Minor
>              Labels: patch
>             Fix For: trunk
>
>         Attachments: OOZIE-1085.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> There will be xml import and export for wfgen.
> They should be done through a xml binding.
> I made a patch with jaxb2.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OOZIE-1085) jaxb2 xml binding for workflow.xml serialization and deserialization

Posted by "Alejandro Abdelnur (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OOZIE-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507529#comment-13507529 ] 

Alejandro Abdelnur commented on OOZIE-1085:
-------------------------------------------

How are you planning to handle the multiple XSD versions for WF.XML?
                
> jaxb2 xml binding for workflow.xml serialization and deserialization 
> ---------------------------------------------------------------------
>
>                 Key: OOZIE-1085
>                 URL: https://issues.apache.org/jira/browse/OOZIE-1085
>             Project: Oozie
>          Issue Type: Improvement
>          Components: workflow
>    Affects Versions: trunk
>            Reporter: jun aoki
>            Priority: Minor
>              Labels: patch
>             Fix For: trunk
>
>         Attachments: OOZIE-1085-2.patch, OOZIE-1085-3.patch, OOZIE-1085-4.patch, OOZIE-1085.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> There will be xml import and export for wfgen.
> They should be done through a xml binding.
> I made a patch with jaxb2.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OOZIE-1085) jaxb2 binding for xml import and export

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OOZIE-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13502703#comment-13502703 ] 

Hadoop QA commented on OOZIE-1085:
----------------------------------

Testing JIRA OOZIE-1085

Cleaning local svn workspace

----------------------------

{color:green}+1 PATCH_APPLIES{color}
{color:green}+1 CLEAN{color}
{color:green}+1 RAW_PATCH_ANALYSIS{color}
.    {color:green}+1{color} the patch does not introduce any @author tags
.    {color:green}+1{color} the patch does not introduce any tabs
.    {color:green}+1{color} the patch does not introduce any trailing spaces
.    {color:green}+1{color} the patch does not introduce any line longer than 132
.    {color:green}+1{color} the patch does adds/modifies 1 testcase(s)
{color:green}+1 RAT{color}
.    {color:green}+1{color} the patch does not seem to introduce new RAT warnings
{color:green}+1 JAVADOC{color}
.    {color:green}+1{color} the patch does not seem to introduce new Javadoc warnings
{color:green}+1 COMPILE{color}
.    {color:green}+1{color} HEAD compiles
.    {color:green}+1{color} patch compiles
.    {color:green}+1{color} the patch does not seem to introduce new javac warnings
{color:green}+1 BACKWARDS_COMPATIBILITY{color}
.    {color:green}+1{color} the patch does not change any JPA Entity/Colum/Basic/Lob/Transient annotations
.    {color:green}+1{color} the patch does not modify JPA files
{color:green}+1 TESTS{color}
.    Tests run: 921
{color:green}+1 DISTRO{color}
.    {color:green}+1{color} distro tarball builds with the patch 

----------------------------
{color:green}*+1 Overall result, good!, no -1s*{color}


The full output of the test-patch run is available at

.   https://builds.apache.org/job/oozie-trunk-precommit-build/196/
                
> jaxb2 binding for xml import and export
> ---------------------------------------
>
>                 Key: OOZIE-1085
>                 URL: https://issues.apache.org/jira/browse/OOZIE-1085
>             Project: Oozie
>          Issue Type: Improvement
>          Components: workflow
>    Affects Versions: trunk
>            Reporter: jun aoki
>            Priority: Minor
>              Labels: patch
>             Fix For: trunk
>
>         Attachments: OOZIE-1085-2.patch, OOZIE-1085-3.patch, OOZIE-1085-4.patch, OOZIE-1085.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> There will be xml import and export for wfgen.
> They should be done through a xml binding.
> I made a patch with jaxb2.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OOZIE-1085) jaxb2 xml binding for workflow.xml serialization and deserialization

Posted by "jun aoki (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OOZIE-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507830#comment-13507830 ] 

jun aoki commented on OOZIE-1085:
---------------------------------

Question: does oozie support all workflow xml defined in http://svn.apache.org/viewvc/oozie/trunk/client/src/main/resources/ ?
I guess oozie supports certain version so could jaxb2 binding class.
                
> jaxb2 xml binding for workflow.xml serialization and deserialization 
> ---------------------------------------------------------------------
>
>                 Key: OOZIE-1085
>                 URL: https://issues.apache.org/jira/browse/OOZIE-1085
>             Project: Oozie
>          Issue Type: Improvement
>          Components: workflow
>    Affects Versions: trunk
>            Reporter: jun aoki
>            Priority: Minor
>              Labels: patch
>             Fix For: trunk
>
>         Attachments: OOZIE-1085-2.patch, OOZIE-1085-3.patch, OOZIE-1085-4.patch, OOZIE-1085.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> There will be xml import and export for wfgen.
> They should be done through a xml binding.
> I made a patch with jaxb2.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OOZIE-1085) jaxb2 xml binding for workflow.xml serialization and deserialization

Posted by "jun aoki (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OOZIE-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13509886#comment-13509886 ] 

jun aoki commented on OOZIE-1085:
---------------------------------

Hi Ryota,

1. jaxb2 does not run on the client side. It is all Java so it runs on JVM. 
(There might be a javascript version of XML parser library but I don't know. By nature, javascript has JSON so it should be the markup language instead of XML though.)

2. jaxb2 is parsing java to xml and the opposite way and that's all about it, but does nothing with client-server communication.
(say, if you make a mere CLI app, jaxb2 serves for you too)
We would have to find the best approach for ajax solution with GWT but it is a different story. (I prefer JQuery.ajax but not sure if GWT lets us use it ... )

Hope it clarifies your concerns.

                
> jaxb2 xml binding for workflow.xml serialization and deserialization 
> ---------------------------------------------------------------------
>
>                 Key: OOZIE-1085
>                 URL: https://issues.apache.org/jira/browse/OOZIE-1085
>             Project: Oozie
>          Issue Type: Improvement
>          Components: workflow
>    Affects Versions: trunk
>            Reporter: jun aoki
>            Assignee: jun aoki
>            Priority: Minor
>              Labels: patch
>             Fix For: trunk
>
>         Attachments: OOZIE-1085-2.patch, OOZIE-1085-3.patch, OOZIE-1085-4.patch, OOZIE-1085.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> There will be xml import and export for wfgen.
> They should be done through a xml binding.
> I made a patch with jaxb2.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OOZIE-1085) jaxb2 xml binding for workflow.xml serialization and deserialization

Posted by "jun aoki (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OOZIE-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507889#comment-13507889 ] 

jun aoki commented on OOZIE-1085:
---------------------------------

Hi Robert,

For example, there will be 2 different WORKFLOWAPP classes from oozie-workflow-0.1.xsd and oozie-worflow-0.4.xsd generated by jaxb2. 
Compare the two xsd files under  <xs:complexType name="WORKFLOW-APP">
http://svn.apache.org/viewvc/oozie/trunk/client/src/main/resources/oozie-workflow-0.1.xsd?view=markup
http://svn.apache.org/viewvc/oozie/trunk/client/src/main/resources/oozie-workflow-0.4.xsd?view=markup

A WORKFLOWAPP class from 0.4 will have "credential", "global", etc but the one from 0.1 will not.
That's where jaxb2 pom config sets a java package for a xsd file so that there are no conflict between the same name elements but from different xsd files.

Let me rewrite the same pseudo code with the fully qualified class names.

// This is dedicated to oozie-workflow-0.4.xsd
class OozieWorkflow04XmlLoader{
  public OozieWorkflow04XmlLoader(){
    Schema schema = sf.newSchema("oozie-workflow-0.4.xsd");
  }
  public oozie.xsd04.WORKFLOWAPP load(String xsd04CompliantXmlFilePath) {...] // because this load returns a particular WORKFLOWAPP class
}

// This is dedicated to oozie-workflow-0.1.xsd
class OozieWorkflow01XmlLoader{
  public OozieWorkflow01XmlLoader(){
    Schema schema = sf.newSchema("oozie-workflow-0.1.xsd");
  }
  public oozie.xsd01.WORKFLOWAPP load(String xsd01CompliantXmlFilePath) {...] // also the same reason
}

The names are ugly but I hope I made my point clearer.

                
> jaxb2 xml binding for workflow.xml serialization and deserialization 
> ---------------------------------------------------------------------
>
>                 Key: OOZIE-1085
>                 URL: https://issues.apache.org/jira/browse/OOZIE-1085
>             Project: Oozie
>          Issue Type: Improvement
>          Components: workflow
>    Affects Versions: trunk
>            Reporter: jun aoki
>            Priority: Minor
>              Labels: patch
>             Fix For: trunk
>
>         Attachments: OOZIE-1085-2.patch, OOZIE-1085-3.patch, OOZIE-1085-4.patch, OOZIE-1085.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> There will be xml import and export for wfgen.
> They should be done through a xml binding.
> I made a patch with jaxb2.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OOZIE-1085) jaxb2 xml binding for workflow.xml serialization and deserialization

Posted by "jun aoki (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OOZIE-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13504400#comment-13504400 ] 

jun aoki commented on OOZIE-1085:
---------------------------------

I also made a review request. Please review it
https://reviews.apache.org/r/8232/

jaxb2 is a library to serialize workflow.xml from java and and deserialize to java based up the xsd.
It will be easy to handle xml files with xml binding.
                
> jaxb2 xml binding for workflow.xml serialization and deserialization 
> ---------------------------------------------------------------------
>
>                 Key: OOZIE-1085
>                 URL: https://issues.apache.org/jira/browse/OOZIE-1085
>             Project: Oozie
>          Issue Type: Improvement
>          Components: workflow
>    Affects Versions: trunk
>            Reporter: jun aoki
>            Priority: Minor
>              Labels: patch
>             Fix For: trunk
>
>         Attachments: OOZIE-1085-2.patch, OOZIE-1085-3.patch, OOZIE-1085-4.patch, OOZIE-1085.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> There will be xml import and export for wfgen.
> They should be done through a xml binding.
> I made a patch with jaxb2.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OOZIE-1085) jaxb2 xml binding for workflow.xml serialization and deserialization

Posted by "Robert Kanter (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OOZIE-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507841#comment-13507841 ] 

Robert Kanter commented on OOZIE-1085:
--------------------------------------

Yes, Oozie supports all of those xsd's.  Is there a reason why you can't simply have the XmlLoader take the xsd as an argument?  
                
> jaxb2 xml binding for workflow.xml serialization and deserialization 
> ---------------------------------------------------------------------
>
>                 Key: OOZIE-1085
>                 URL: https://issues.apache.org/jira/browse/OOZIE-1085
>             Project: Oozie
>          Issue Type: Improvement
>          Components: workflow
>    Affects Versions: trunk
>            Reporter: jun aoki
>            Priority: Minor
>              Labels: patch
>             Fix For: trunk
>
>         Attachments: OOZIE-1085-2.patch, OOZIE-1085-3.patch, OOZIE-1085-4.patch, OOZIE-1085.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> There will be xml import and export for wfgen.
> They should be done through a xml binding.
> I made a patch with jaxb2.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (OOZIE-1085) jaxb2 xml binding for workflow.xml serialization and deserialization

Posted by "jun aoki (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OOZIE-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

jun aoki updated OOZIE-1085:
----------------------------

    Summary: jaxb2 xml binding for workflow.xml serialization and deserialization   (was: jaxb2 binding for xml import and export)
    
> jaxb2 xml binding for workflow.xml serialization and deserialization 
> ---------------------------------------------------------------------
>
>                 Key: OOZIE-1085
>                 URL: https://issues.apache.org/jira/browse/OOZIE-1085
>             Project: Oozie
>          Issue Type: Improvement
>          Components: workflow
>    Affects Versions: trunk
>            Reporter: jun aoki
>            Priority: Minor
>              Labels: patch
>             Fix For: trunk
>
>         Attachments: OOZIE-1085-2.patch, OOZIE-1085-3.patch, OOZIE-1085-4.patch, OOZIE-1085.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> There will be xml import and export for wfgen.
> They should be done through a xml binding.
> I made a patch with jaxb2.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OOZIE-1085) jaxb2 binding for xml import and export

Posted by "jun aoki (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OOZIE-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13502661#comment-13502661 ] 

jun aoki commented on OOZIE-1085:
---------------------------------

Please ignore the 3rd patch. It contaminates wrong setting.
                
> jaxb2 binding for xml import and export
> ---------------------------------------
>
>                 Key: OOZIE-1085
>                 URL: https://issues.apache.org/jira/browse/OOZIE-1085
>             Project: Oozie
>          Issue Type: Improvement
>          Components: workflow
>    Affects Versions: trunk
>            Reporter: jun aoki
>            Priority: Minor
>              Labels: patch
>             Fix For: trunk
>
>         Attachments: OOZIE-1085-2.patch, OOZIE-1085-3.patch, OOZIE-1085.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> There will be xml import and export for wfgen.
> They should be done through a xml binding.
> I made a patch with jaxb2.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OOZIE-1085) jaxb2 xml binding for workflow.xml serialization and deserialization

Posted by "jun aoki (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OOZIE-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507658#comment-13507658 ] 

jun aoki commented on OOZIE-1085:
---------------------------------

Hi Alejandro,

I am thinking 2 options.
1. Multiple classes for XmlLoader. e.g. XmlLoader04, XmlLoader03, XmlLoader02, XmlLoader025 etc.
2. Once XmlLoader with a constructor that takes some enum to represent a version number.
e.g. XmlLoader(WorkflowXsdVersionEnum version)
and WorkflowXsdVersionEnum has WorkflowXsdVersionEnum.Ver04, WorkflowXsdVersionEnum.Ver025 etc.

I like the second option better.
What do you think?

                
> jaxb2 xml binding for workflow.xml serialization and deserialization 
> ---------------------------------------------------------------------
>
>                 Key: OOZIE-1085
>                 URL: https://issues.apache.org/jira/browse/OOZIE-1085
>             Project: Oozie
>          Issue Type: Improvement
>          Components: workflow
>    Affects Versions: trunk
>            Reporter: jun aoki
>            Priority: Minor
>              Labels: patch
>             Fix For: trunk
>
>         Attachments: OOZIE-1085-2.patch, OOZIE-1085-3.patch, OOZIE-1085-4.patch, OOZIE-1085.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> There will be xml import and export for wfgen.
> They should be done through a xml binding.
> I made a patch with jaxb2.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OOZIE-1085) jaxb2 xml binding for workflow.xml serialization and deserialization

Posted by "Alejandro Abdelnur (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OOZIE-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507661#comment-13507661 ] 

Alejandro Abdelnur commented on OOZIE-1085:
-------------------------------------------

But, will you have different sets of jaxb2 XML binding java classes for each XSD? if so, how will you handle that from the WFGEN easily?
                
> jaxb2 xml binding for workflow.xml serialization and deserialization 
> ---------------------------------------------------------------------
>
>                 Key: OOZIE-1085
>                 URL: https://issues.apache.org/jira/browse/OOZIE-1085
>             Project: Oozie
>          Issue Type: Improvement
>          Components: workflow
>    Affects Versions: trunk
>            Reporter: jun aoki
>            Priority: Minor
>              Labels: patch
>             Fix For: trunk
>
>         Attachments: OOZIE-1085-2.patch, OOZIE-1085-3.patch, OOZIE-1085-4.patch, OOZIE-1085.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> There will be xml import and export for wfgen.
> They should be done through a xml binding.
> I made a patch with jaxb2.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (OOZIE-1085) jaxb2 binding for xml import and export

Posted by "jun aoki (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OOZIE-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

jun aoki updated OOZIE-1085:
----------------------------

    Attachment: OOZIE-1085-3.patch

3rd patch
                
> jaxb2 binding for xml import and export
> ---------------------------------------
>
>                 Key: OOZIE-1085
>                 URL: https://issues.apache.org/jira/browse/OOZIE-1085
>             Project: Oozie
>          Issue Type: Improvement
>          Components: workflow
>    Affects Versions: trunk
>            Reporter: jun aoki
>            Priority: Minor
>              Labels: patch
>             Fix For: trunk
>
>         Attachments: OOZIE-1085-2.patch, OOZIE-1085-3.patch, OOZIE-1085.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> There will be xml import and export for wfgen.
> They should be done through a xml binding.
> I made a patch with jaxb2.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira