Author: angeloh
Date: Wed Oct 26 19:28:42 2011
New Revision: 1189403
URL: http://svn.apache.org/viewvc?rev=1189403&view=rev
Log:
OOZIE-38 LocalOozie example and improvement
Added:
incubator/oozie/trunk/core/src/test/java/org/apache/oozie/test/MiniOozieTestCase.java
incubator/oozie/trunk/docs/src/site/twiki/ENG_MiniOozie.twiki
incubator/oozie/trunk/minitest/
incubator/oozie/trunk/minitest/pom.xml
incubator/oozie/trunk/minitest/src/
incubator/oozie/trunk/minitest/src/test/
incubator/oozie/trunk/minitest/src/test/java/
incubator/oozie/trunk/minitest/src/test/java/org/
incubator/oozie/trunk/minitest/src/test/java/org/apache/
incubator/oozie/trunk/minitest/src/test/java/org/apache/oozie/
incubator/oozie/trunk/minitest/src/test/java/org/apache/oozie/test/
incubator/oozie/trunk/minitest/src/test/java/org/apache/oozie/test/WorkflowTest.java
incubator/oozie/trunk/minitest/src/test/resources/
incubator/oozie/trunk/minitest/src/test/resources/oozie-log4j.properties
incubator/oozie/trunk/minitest/src/test/resources/wf-test.xml
Modified:
incubator/oozie/trunk/core/pom.xml
incubator/oozie/trunk/docs/src/site/twiki/index.twiki
incubator/oozie/trunk/release-log.txt
incubator/oozie/trunk/src/main/assemblies/distro.xml
Modified: incubator/oozie/trunk/core/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/oozie/trunk/core/pom.xml?rev=1189403&r1=1189402&r2=1189403&view=diff
==============================================================================
--- incubator/oozie/trunk/core/pom.xml (original)
+++ incubator/oozie/trunk/core/pom.xml Wed Oct 26 19:28:42 2011
@@ -400,6 +400,65 @@
</build>
</profile>
+ <profile>
+ <id>test-jar-all</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ <property>
+ <name>testJarAll</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+
<groupId>org.apache.maven.plugins</groupId>
+
<artifactId>maven-jar-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+
<goal>test-jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <profile>
+ <id>test-jar-simple</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ <property>
+ <name>testJarSimple</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+
<groupId>org.apache.maven.plugins</groupId>
+
<artifactId>maven-jar-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+
<goal>test-jar</goal>
+ </goals>
+ <configuration>
+
<includes>
+
<include>**/XTestCase.class</include>
+
<include>**/XTestCase$1.class</include>
+
<include>**/XFsTestCase.class</include>
+
<include>**/MiniOozieTestCase.class</include>
+
<include>**/XTestCase$Predicate.class</include>
+
</includes>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
<!-- Include MySQL JDBC driver -->
<profile>
<id>mysql</id>
Added:
incubator/oozie/trunk/core/src/test/java/org/apache/oozie/test/MiniOozieTestCase.java
URL:
http://svn.apache.org/viewvc/incubator/oozie/trunk/core/src/test/java/org/apache/oozie/test/MiniOozieTestCase.java?rev=1189403&view=auto
==============================================================================
---
incubator/oozie/trunk/core/src/test/java/org/apache/oozie/test/MiniOozieTestCase.java
(added)
+++
incubator/oozie/trunk/core/src/test/java/org/apache/oozie/test/MiniOozieTestCase.java
Wed Oct 26 19:28:42 2011
@@ -0,0 +1,74 @@
+/**
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.apache.oozie.test;
+
+import org.apache.oozie.test.XFsTestCase;
+import org.apache.oozie.client.OozieClient;
+import org.apache.oozie.local.LocalOozie;
+
+/**
+ * Base JUnit <code>TestCase</code> subclass used to run independent test
toward Oozie.
+ * <p/>
+ * This class provides the following functionality:
+ * <p/>
+ * <ul>
+ * <li>Creates a unique test working directory per test method on HDFS using
MiniDFSCluster.</li>
+ * <li>Provides a test framework to execute tests for Oozie Workflow,
Coordinator and Bundle.</li>
+ * <li>WaitFor that supports a predicate,to wait for a condition. It has
timeout.</li>
+ * </ul>
+ * <p/>
+ * As part of its setup, this testcase class creates a unique test working
directory per test method in the FS.
+ * <p/>
+ * The URI of the namenode can be specified via the
<code>oozie.test.name.node</code> system property. The default value is
+ * 'hdfs://localhost:9000'.
+ * <p/>
+ * The test working directory is created in the specified FS URI, under the
current user name home directory, under the
+ * subdirectory name specified wit the system property {@link
XTestCase#OOZIE_TEST_DIR}. The default value is '/tmp'.
+ * <p/> The path of the test working directory is:
'$FS_URI/user/$USER/$OOZIE_TEST_DIR/oozietest/$TEST_CASE_CLASS/$TEST_CASE_METHOD/'
+ * <p/> For example:
'hdfs://localhost:9000/user/tucu/tmp/oozietest/org.apache.oozie.service.TestELService/testEL/'
+ * <p/>
+ * To run Oozie test, subclass create OozieClient via <code>OozieClient wc =
getClient()</code> and submit Oozie job
+ * with job properties and job xml.
+ * <p/>
+ * To check job's progress, subclass retrieve job object via
<code>getJobInfo()</code> and then check job's status via
<code>getStatus()</code>.
+ * <p/>
+ * For example,
+ * <code>
+ * WorkflowJob wf = wc.getJobInfo(jobId);<p/> assertNotNull(wf);<p/>
assertEquals(WorkflowJob.Status.PREP, wf.getStatus());
+ * </code>
+ */
+public abstract class MiniOozieTestCase extends XFsTestCase {
+
+ @Override
+ protected void setUp() throws Exception {
+ System.setProperty("hadoop20", "true");
+ super.setUp();
+ LocalOozie.start();
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ LocalOozie.stop();
+ super.tearDown();
+ }
+
+ public static OozieClient getClient() {
+ return LocalOozie.getClient();
+ }
+
+}
Added: incubator/oozie/trunk/docs/src/site/twiki/ENG_MiniOozie.twiki
URL:
http://svn.apache.org/viewvc/incubator/oozie/trunk/docs/src/site/twiki/ENG_MiniOozie.twiki?rev=1189403&view=auto
==============================================================================
--- incubator/oozie/trunk/docs/src/site/twiki/ENG_MiniOozie.twiki (added)
+++ incubator/oozie/trunk/docs/src/site/twiki/ENG_MiniOozie.twiki Wed Oct 26
19:28:42 2011
@@ -0,0 +1,73 @@
+[[index][::Go back to Oozie Documentation Index::]]
+
+---+!! Running MiniOozie Tests
+
+%TOC%
+
+---++ System Requirements
+
+ * Unix box (tested on Mac OS X and Linux)
+ * Java JDK 1.6+
+ * Eclipse (tested on 3.5 and 3.6)
+ * [[http://maven.apache.org/][Maven 3.0.1+]]
+
+The Maven command (mvn) must be in the command path.
+
+---++ Installing Oozie Jars To Maven Cache
+
+Oozie source tree is at Apache SVN or Apache GIT. MiniOozie sample project is
under Oozie source tree.
+
+The following command downloads Oozie trunk to local:
+
+<verbatim>
+$ svn co https://svn.apache.org/repos/asf/incubator/oozie/trunk
+</verbatim>
+
+OR
+
+<verbatim>
+$ git clone git://github.com/apache/oozie.git
+</verbatim>
+
+To run MiniOozie tests, the required jars like oozie-core, oozie-client,
oozie-core-tests need to be
+available in remote maven repositories or local maven repository. The local
maven cache for the above
+jars can be created and installed using the command:
+
+<verbatim>
+$ mvn clean install -DskipTests -DtestJarSimple
+</verbatim>
+
+The following properties should be specified to install correct jars for
MiniOozie:
+
+ * -DskipTests : ignore executing Oozie unittests
+ * -DtestJarSimple= : build only required test classes to oozie-core-tests
+
+MiniOozie is a folder named 'minitest' under Oozie source tree. Two sample
tests are included in the project.
+The following command to execute tests under MiniOozie:
+
+<verbatim>
+$ cd minitest
+$ mvn clean test
+</verbatim>
+
+---++ Create Tests Using MiniOozie
+
+MiniOozie is a junit test class to test Oozie applications such as workflow
and coordinator. The test case
+needs to extend from MiniOozieTestCase and does the same as the example class
'WorkflowTest.java' to create Oozie
+workflow application properties and workflow XML. The example file is under
Oozie source tree:
+
+ * =minitest/src/test/java/org/apache/oozie/test/WorkflowTest.java=
+
+---++ IDE Setup
+
+Eclipse and IntelliJ can use directly MiniOozie Maven project files. MiniOozie
project can be imported to
+Eclipse and IntelliJ as independent project.
+
+The test directories under MiniOozie are:
+
+ * =minitest/src/test/java= : as test-source directory
+ * =minitest/src/test/resources= : as test-resource directory
+
+[[index][::Go back to Oozie Documentation Index::]]
+
+</noautolink>
\ No newline at end of file
Modified: incubator/oozie/trunk/docs/src/site/twiki/index.twiki
URL:
http://svn.apache.org/viewvc/incubator/oozie/trunk/docs/src/site/twiki/index.twiki?rev=1189403&r1=1189402&r2=1189403&view=diff
==============================================================================
--- incubator/oozie/trunk/docs/src/site/twiki/index.twiki (original)
+++ incubator/oozie/trunk/docs/src/site/twiki/index.twiki Wed Oct 26 19:28:42
2011
@@ -80,4 +80,8 @@ Oozie uses a modified version of the Apa
* [[ENG_Building][Building Oozie]]
* [[./dependencies.html][Dependencies Report]]
+---++ MiniOozie Documentation
+
+ * [[ENG_MiniOozie][Testing User Oozie Applications Using MiniOozie]]
+
</noautolink>
Added: incubator/oozie/trunk/minitest/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/oozie/trunk/minitest/pom.xml?rev=1189403&view=auto
==============================================================================
--- incubator/oozie/trunk/minitest/pom.xml (added)
+++ incubator/oozie/trunk/minitest/pom.xml Wed Oct 26 19:28:42 2011
@@ -0,0 +1,130 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.oozie.test</groupId>
+ <artifactId>oozie-mini</artifactId>
+ <version>3.1.2</version>
+ <repositories>
+ <repository>
+ <id>central</id>
+ <url>http://repo1.maven.org/maven2</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ <repository>
+ <id>Codehaus repository</id>
+ <url>http://repository.codehaus.org/</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ <repository>
+ <id>yahoo.github</id>
+ <url>http://yahoo.github.com/maven/repository</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
+ <repository>
+ <id>m2apache.snapshots</id>
+
<url>http://people.apache.org/repo/m2-snapshot-repository</url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+
+ <properties>
+ <test.exclude>_</test.exclude>
+ <test.exclude.pattern>_</test.exclude.pattern>
+ <oozie.data.dir>${project.build.directory}/test-data</oozie.data.dir>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>com.yahoo.oozie</groupId>
+ <artifactId>oozie-core</artifactId>
+ <version>3.1.2</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.yahoo.oozie</groupId>
+ <artifactId>oozie-core</artifactId>
+ <version>3.1.2</version>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.yahoo.hadoop</groupId>
+ <artifactId>hadoop-core</artifactId>
+ <version>0.20.104.2</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.yahoo.hadoop</groupId>
+ <artifactId>hadoop-test</artifactId>
+ <version>0.20.104.2</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.jackson</groupId>
+ <artifactId>jackson-mapper-asl</artifactId>
+ <version>1.5.2</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.jackson</groupId>
+ <artifactId>jackson-core-asl</artifactId>
+ <version>1.5.2</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+
<groupId>org.apache.maven.plugins</groupId>
+
<artifactId>maven-compiler-plugin</artifactId>
+ <version>2.3.2</version>
+ </plugin>
+ <plugin>
+
<groupId>org.apache.maven.plugins</groupId>
+
<artifactId>maven-surefire-plugin</artifactId>
+ <version>2.7</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <forkMode>always</forkMode>
+ <argLine>-Xmx1024m</argLine>
+ <systemPropertiesVariables>
+
<hadoop.log.dir>/tmp</hadoop.log.dir>
+
<oozie.data.dir>${oozie.data.dir}</oozie.data.dir>
+ </systemPropertiesVariables>
+ <excludes>
+
<exclude>**/${test.exclude}.java</exclude>
+
<exclude>${test.exclude.pattern}</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Added:
incubator/oozie/trunk/minitest/src/test/java/org/apache/oozie/test/WorkflowTest.java
URL:
http://svn.apache.org/viewvc/incubator/oozie/trunk/minitest/src/test/java/org/apache/oozie/test/WorkflowTest.java?rev=1189403&view=auto
==============================================================================
---
incubator/oozie/trunk/minitest/src/test/java/org/apache/oozie/test/WorkflowTest.java
(added)
+++
incubator/oozie/trunk/minitest/src/test/java/org/apache/oozie/test/WorkflowTest.java
Wed Oct 26 19:28:42 2011
@@ -0,0 +1,189 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.oozie.test;
+
+import org.apache.oozie.service.XLogService;
+import org.apache.oozie.test.MiniOozieTestCase;
+import org.apache.oozie.client.OozieClient;
+import org.apache.oozie.client.WorkflowJob;
+import org.apache.oozie.local.LocalOozie;
+import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.Path;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.io.Writer;
+import java.io.OutputStreamWriter;
+import java.util.Properties;
+
+/**
+ * MiniOozie unit test
+ */
+public class WorkflowTest extends MiniOozieTestCase {
+
+ @Override
+ protected void setUp() throws Exception {
+ System.setProperty(XLogService.LOG4J_FILE, "oozie-log4j.properties");
+ super.setUp();
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ public void testWorkflowRun() throws Exception {
+ String wfApp = "<workflow-app xmlns='uri:oozie:workflow:0.1'
name='test-wf'>" + " <start to='end'/>"
+ + " <end name='end'/>" + "</workflow-app>";
+
+ FileSystem fs = getFileSystem();
+ Path appPath = new Path(getFsTestCaseDir(), "app");
+ fs.mkdirs(appPath);
+ fs.mkdirs(new Path(appPath, "lib"));
+
+ Writer writer = new OutputStreamWriter(fs.create(new Path(appPath,
"workflow.xml")));
+ writer.write(wfApp);
+ writer.close();
+
+ final OozieClient wc = LocalOozie.getClient();
+
+ Properties conf = wc.createConfiguration();
+ conf.setProperty(OozieClient.APP_PATH, appPath.toString() +
File.separator + "workflow.xml");
+ conf.setProperty(OozieClient.USER_NAME, getTestUser());
+ conf.setProperty(OozieClient.GROUP_NAME, getTestGroup());
+ injectKerberosInfo(conf);
+
+ final String jobId = wc.submit(conf);
+ assertNotNull(jobId);
+
+ WorkflowJob wf = wc.getJobInfo(jobId);
+ assertNotNull(wf);
+ assertEquals(WorkflowJob.Status.PREP, wf.getStatus());
+
+ wc.start(jobId);
+
+ waitFor(1000, new Predicate() {
+ public boolean evaluate() throws Exception {
+ WorkflowJob wf = wc.getJobInfo(jobId);
+ return wf.getStatus() == WorkflowJob.Status.SUCCEEDED;
+ }
+ });
+
+ wf = wc.getJobInfo(jobId);
+ assertNotNull(wf);
+ assertEquals(WorkflowJob.Status.SUCCEEDED, wf.getStatus());
+
+ }
+
+ public void testWorkflowRunFromFile() throws Exception {
+ FileSystem fs = getFileSystem();
+ Path appPath = new Path(getFsTestCaseDir(), "app");
+ fs.mkdirs(appPath);
+ fs.mkdirs(new Path(appPath, "lib"));
+
+ Reader reader = getResourceAsReader("wf-test.xml", -1);
+ Writer writer = new OutputStreamWriter(fs.create(new Path(appPath,
"workflow.xml")));
+ copyCharStream(reader, writer);
+ writer.close();
+ reader.close();
+
+ Path path = getFsTestCaseDir();
+
+ final OozieClient wc = LocalOozie.getClient();
+
+ Properties conf = wc.createConfiguration();
+ conf.setProperty(OozieClient.APP_PATH, appPath.toString() +
File.separator + "workflow.xml");
+ conf.setProperty(OozieClient.USER_NAME, getTestUser());
+ conf.setProperty(OozieClient.GROUP_NAME, getTestGroup());
+ conf.setProperty("nnbase", path.toString());
+ conf.setProperty("base", path.toUri().getPath());
+
+ injectKerberosInfo(conf);
+
+ final String jobId = wc.submit(conf);
+ assertNotNull(jobId);
+
+ WorkflowJob wf = wc.getJobInfo(jobId);
+ assertNotNull(wf);
+ assertEquals(WorkflowJob.Status.PREP, wf.getStatus());
+
+ wc.start(jobId);
+
+ waitFor(15 * 1000, new Predicate() {
+ public boolean evaluate() throws Exception {
+ WorkflowJob wf = wc.getJobInfo(jobId);
+ return wf.getStatus() == WorkflowJob.Status.SUCCEEDED;
+ }
+ });
+
+ wf = wc.getJobInfo(jobId);
+ assertNotNull(wf);
+ assertEquals(WorkflowJob.Status.SUCCEEDED, wf.getStatus());
+
+ }
+
+ /**
+ * Return a classpath resource as a stream.
+ * <p/>
+ *
+ * @param path classpath for the resource.
+ * @param maxLen max content length allowed.
+ * @return the stream for the resource.
+ * @throws IOException thrown if the resource could not be read.
+ */
+ public InputStream getResourceAsStream(String path, int maxLen) throws
IOException {
+ InputStream is =
Thread.currentThread().getContextClassLoader().getResourceAsStream(path);
+ if (is == null) {
+ throw new IllegalArgumentException("resource " + path + " not
found");
+ }
+ return is;
+ }
+
+ /**
+ * Return a classpath resource as a reader.
+ * <p/>
+ * It is assumed that the resource is a text resource.
+ *
+ * @param path classpath for the resource.
+ * @param maxLen max content length allowed.
+ * @return the reader for the resource.
+ * @throws IOException thrown if the resource could not be read.
+ */
+ public Reader getResourceAsReader(String path, int maxLen) throws
IOException {
+ return new InputStreamReader(getResourceAsStream(path, maxLen));
+ }
+
+ /**
+ * Copies an char input stream into an char output stream.
+ *
+ * @param reader reader to copy from.
+ * @param writer writer to copy to.
+ * @throws IOException thrown if the copy failed.
+ */
+ public void copyCharStream(Reader reader, Writer writer) throws
IOException {
+ char[] buffer = new char[4096];
+ int read;
+ while ((read = reader.read(buffer)) > -1) {
+ writer.write(buffer, 0, read);
+ }
+ }
+
+}
Added: incubator/oozie/trunk/minitest/src/test/resources/oozie-log4j.properties
URL:
http://svn.apache.org/viewvc/incubator/oozie/trunk/minitest/src/test/resources/oozie-log4j.properties?rev=1189403&view=auto
==============================================================================
--- incubator/oozie/trunk/minitest/src/test/resources/oozie-log4j.properties
(added)
+++ incubator/oozie/trunk/minitest/src/test/resources/oozie-log4j.properties
Wed Oct 26 19:28:42 2011
@@ -0,0 +1,37 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#
+log4j.rootLogger=DEBUG, test
+
+log4j.appender.test=org.apache.log4j.ConsoleAppender
+log4j.appender.test.Target=System.out
+log4j.appender.test.layout=org.apache.log4j.PatternLayout
+log4j.appender.test.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
+
+log4j.appender.none=org.apache.log4j.varia.NullAppender
+
+log4j.logger.oozieops=OFF, none
+log4j.logger.oozieinstrumentation=OFF, none
+log4j.logger.oozieaudit=OFF, none
+
+log4j.logger.openjpa=INFO, test
+log4j.logger.org.apache.openjpa=INFO, test
+log4j.logger.org.apache.hadoop=INFO, test
+log4j.logger.com.yahoo.hadoop=INFO, test
+log4j.logger.org.mortbay=INFO, test
+log4j.logger.org.hsqldb=INFO, test
Added: incubator/oozie/trunk/minitest/src/test/resources/wf-test.xml
URL:
http://svn.apache.org/viewvc/incubator/oozie/trunk/minitest/src/test/resources/wf-test.xml?rev=1189403&view=auto
==============================================================================
--- incubator/oozie/trunk/minitest/src/test/resources/wf-test.xml (added)
+++ incubator/oozie/trunk/minitest/src/test/resources/wf-test.xml Wed Oct 26
19:28:42 2011
@@ -0,0 +1,51 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+*
+http://www.apache.org/licenses/LICENSE-2.0
+*
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<workflow-app xmlns="uri:oozie:workflow:0.1" name="recovery-wf">
+ <start to="fs1"/>
+ <action name="fs1">
+ <fs>
+ <mkdir path="${nnbase}/p1"/>
+ </fs>
+ <ok to="fs2"/>
+ <error to="k"/>
+ </action>
+ <action name="fs2">
+ <fs>
+ <move source="${nnbase}/p1" target="${base}/p2"/>
+ </fs>
+ <ok to="dec3"/>
+ <error to="k"/>
+ </action>
+ <decision name="dec3">
+ <switch>
+ <case to="fs4">${fs:exists(concat(nnbase, '/p2'))}</case>
+ <default to="k"/>
+ </switch>
+ </decision>
+ <action name="fs4">
+ <fs>
+ <move source="${nnbase}/p2" target="${base}/p3"/>
+ </fs>
+ <ok to="end"/>
+ <error to="k"/>
+ </action>
+ <kill name="k">
+ <message>kill</message>
+ </kill>
+ <end name="end"/>
+</workflow-app>
Modified: incubator/oozie/trunk/release-log.txt
URL:
http://svn.apache.org/viewvc/incubator/oozie/trunk/release-log.txt?rev=1189403&r1=1189402&r2=1189403&view=diff
==============================================================================
--- incubator/oozie/trunk/release-log.txt (original)
+++ incubator/oozie/trunk/release-log.txt Wed Oct 26 19:28:42 2011
@@ -1,5 +1,6 @@
-- Oozie 3.1.2 release
+OOZIE-38 LocalOozie example and improvement
OOZIE-580 use xml element to handle string escape when configure evaluator
OOZIE-585 Coordinator job fail to retrieve log with date range and action
range.
OOZIE-553 Ability to view log for coordinator actions that ran in a date range.
Modified: incubator/oozie/trunk/src/main/assemblies/distro.xml
URL:
http://svn.apache.org/viewvc/incubator/oozie/trunk/src/main/assemblies/distro.xml?rev=1189403&r1=1189402&r2=1189403&view=diff
==============================================================================
--- incubator/oozie/trunk/src/main/assemblies/distro.xml (original)
+++ incubator/oozie/trunk/src/main/assemblies/distro.xml Wed Oct 26 19:28:42
2011
@@ -90,6 +90,16 @@
<source>${basedir}/../core/src/main/resources/oozie-default.xml</source>
<outputDirectory>/conf</outputDirectory>
</file>
+ <!-- Oozie core jar -->
+ <file>
+
<source>${basedir}/../core/target/oozie-core-${project.version}.jar</source>
+ <outputDirectory>/oozie-core</outputDirectory>
+ </file>
+ <!-- Oozie core test jar -->
+ <file>
+
<source>${basedir}/../core/target/oozie-core-${project.version}-tests.jar</source>
+ <outputDirectory>/oozie-core</outputDirectory>
+ </file>
<!-- Oozie war -->
<file>
<source>${basedir}/../webapp/target/oozie-webapp-${project.version}.war</source>