You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pirk.apache.org by tellison <gi...@git.apache.org> on 2016/07/27 11:07:37 UTC

[GitHub] incubator-pirk pull request #28: [PIRK-19] Further restructuring in schema l...

GitHub user tellison opened a pull request:

    https://github.com/apache/incubator-pirk/pull/28

    [PIRK-19] Further restructuring in schema loading.

     - Additional re-factoring of the query schema loading code.
     - Pull out XML document parsing to helper methods.
     - Narrowing of exception type thrown by data partitioner methods.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/tellison/incubator-pirk pirk-19

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-pirk/pull/28.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #28
    
----

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-pirk pull request #28: [PIRK-19] Further restructuring in schema l...

Posted by tellison <gi...@git.apache.org>.
Github user tellison commented on a diff in the pull request:

    https://github.com/apache/incubator-pirk/pull/28#discussion_r72583147
  
    --- Diff: src/main/java/org/apache/pirk/schema/data/DataSchemaLoader.java ---
    @@ -181,19 +172,34 @@ public DataSchema loadSchema(InputStream stream) throws IOException, PIRExceptio
           Node nNode = nList.item(i);
           if (nNode.getNodeType() == Node.ELEMENT_NODE)
           {
    -        parseElementNode((Element) nNode, dataSchema);
    +        extractElementNode((Element) nNode, dataSchema);
           }
         }
     
         return dataSchema;
       }
     
    -  private void parseElementNode(Element eElement, DataSchema schema) throws PIRException
    +  private Document parseXMLDocument(InputStream stream) throws IOException, PIRException
    +  {
    +    Document doc;
    +    try
    +    {
    +      DocumentBuilder dBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
    --- End diff --
    
    No, the DocumentBuilder does not need to (cannot) be closed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-pirk issue #28: [PIRK-19] Further restructuring in schema loading.

Posted by tellison <gi...@git.apache.org>.
Github user tellison commented on the issue:

    https://github.com/apache/incubator-pirk/pull/28
  
    @ellisonanne yes, this is ready to merge pls.
    
    There may be minor changes but this is the bulk of the clean-up restructuring I intend to do right now.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-pirk issue #28: [PIRK-19] Further restructuring in schema loading.

Posted by ellisonanne <gi...@git.apache.org>.
Github user ellisonanne commented on the issue:

    https://github.com/apache/incubator-pirk/pull/28
  
    Are you ready for this to be merged?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-pirk issue #28: [PIRK-19] Further restructuring in schema loading.

Posted by ellisonanne <gi...@git.apache.org>.
Github user ellisonanne commented on the issue:

    https://github.com/apache/incubator-pirk/pull/28
  
    +1  


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-pirk pull request #28: [PIRK-19] Further restructuring in schema l...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-pirk/pull/28


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-pirk pull request #28: [PIRK-19] Further restructuring in schema l...

Posted by smarthi <gi...@git.apache.org>.
Github user smarthi commented on a diff in the pull request:

    https://github.com/apache/incubator-pirk/pull/28#discussion_r72548798
  
    --- Diff: src/main/java/org/apache/pirk/schema/data/DataSchemaLoader.java ---
    @@ -181,19 +172,34 @@ public DataSchema loadSchema(InputStream stream) throws IOException, PIRExceptio
           Node nNode = nList.item(i);
           if (nNode.getNodeType() == Node.ELEMENT_NODE)
           {
    -        parseElementNode((Element) nNode, dataSchema);
    +        extractElementNode((Element) nNode, dataSchema);
           }
         }
     
         return dataSchema;
       }
     
    -  private void parseElementNode(Element eElement, DataSchema schema) throws PIRException
    +  private Document parseXMLDocument(InputStream stream) throws IOException, PIRException
    +  {
    +    Document doc;
    +    try
    +    {
    +      DocumentBuilder dBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
    --- End diff --
    
    can this be made try (DocumentBuilder .....) ?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---