[ 
https://issues.apache.org/jira/browse/OOZIE-2273?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Kanter updated OOZIE-2273:
---------------------------------
    Attachment: OOZIE-2273.001.patch

The patch:
- Makes {{XTestCase}} not assume it's being run from Oozie with a "core" 
directory by falling back to a dummy value.  It also now tries to load the 
hadoop-config.xml from the classpath (i.e. in an oozie jar) in the same way 
that the oozie-site.xml gets loaded in this situation.  With these changes, 
{{MiniOozie}} now works outside of Oozie.
- Makes the Hive Metastore off by default instead of on by default
-- I tried to make it so that we could shutdown the Metastore between tests, 
but it looks like Hive doesn't expose a way to do that.  It looks like we'd 
have to copy a bunch of code, like 
[this|https://github.com/kite-sdk/kite/blob/53dce370a884d25fb4ed7c04e79c29226ac4a9df/kite-minicluster/src/main/java/org/kitesdk/minicluster/HiveService.java].
  So once the Metastore is running, it will stay running during the rest of 
that Module, as it does now; however, if you're running a subset of tests that 
don't use the Metastore, you won't waste time starting it now at least.
- Cleans up some of the {{MiniHS2}} handling in {{XTestCase}} and makes it a 
bit more similar to how the Metastore is handled

> MiniOozie does not work outside of Oozie
> ----------------------------------------
>
>                 Key: OOZIE-2273
>                 URL: https://issues.apache.org/jira/browse/OOZIE-2273
>             Project: Oozie
>          Issue Type: Bug
>          Components: tests
>    Affects Versions: 4.2.0
>            Reporter: Robert Kanter
>         Attachments: OOZIE-2273.001.patch
>
>
> {{MiniOozie}} doesn't appear to work correctly outside of Oozie, due to some 
> hardcoded paths/assumptions.  We should fix this.
> As a quick workaround, I added the "core" folder and sub folders/files.  For 
> example:
> {noformat}
> project-root
> |- src
> |- pom.xml
> |- (other typical maven stuff)
> |- core
> |- |- src
> |- |- |- test
> |- |- |- |- resources
> |- |- |- |- |- hadoop-config.xml (a copy of this file [1])
> {noformat}
> Also, the Metastore doesn't work properly either (not sure why).  It can be 
> disabled by adding {{System.setProperty("oozie.test.metastore.server", 
> "false");}} in the {{setUp()}} method, as done at \[2], but we should fix 
> that as well.
> \[1] 
> https://raw.githubusercontent.com/apache/oozie/master/core/src/test/resources/hadoop-config.xml
> \[2] 
> https://github.com/apache/oozie/blob/master/minitest/src/test/java/org/apache/oozie/test/WorkflowTest.java#L45



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to