Repository: oozie Updated Branches: refs/heads/master fde88ab69 -> 37e9d7cf9
OOZIE-3084 Add missing JVM properties to Jetty startup script (andras.piros) Project: http://git-wip-us.apache.org/repos/asf/oozie/repo Commit: http://git-wip-us.apache.org/repos/asf/oozie/commit/37e9d7cf Tree: http://git-wip-us.apache.org/repos/asf/oozie/tree/37e9d7cf Diff: http://git-wip-us.apache.org/repos/asf/oozie/diff/37e9d7cf Branch: refs/heads/master Commit: 37e9d7cf9fc10985ca708a0702222e8c43a90f3a Parents: fde88ab Author: Andras Piros <[email protected]> Authored: Fri Nov 3 12:30:40 2017 +0100 Committer: Andras Piros <[email protected]> Committed: Fri Nov 3 12:30:40 2017 +0100 ---------------------------------------------------------------------- core/src/main/resources/oozie-default.xml | 8 -------- .../oozie/service/TestJobsConcurrencyService.java | 7 ++++--- .../test/java/org/apache/oozie/test/XTestCase.java | 5 +++++ .../java/org/apache/oozie/test/ZKXTestCase.java | 2 +- distro/src/main/bin/oozie-jetty-server.sh | 1 + distro/src/main/bin/oozie-sys.sh | 15 +++++++++++++++ docs/src/site/twiki/AG_Install.twiki | 16 +++------------- release-log.txt | 1 + 8 files changed, 30 insertions(+), 25 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/oozie/blob/37e9d7cf/core/src/main/resources/oozie-default.xml ---------------------------------------------------------------------- diff --git a/core/src/main/resources/oozie-default.xml b/core/src/main/resources/oozie-default.xml index b203699..8285df0 100644 --- a/core/src/main/resources/oozie-default.xml +++ b/core/src/main/resources/oozie-default.xml @@ -2683,14 +2683,6 @@ will be the requeue interval for the actions which are waiting for a long time w </property> <property> - <name>oozie.instance.id</name> - <value>${oozie.http.hostname}</value> - <description> - Each Oozie server should have its own unique instance id. - </description> - </property> - - <property> <name>oozie.server.threadpool.max.threads</name> <value>150</value> <description> http://git-wip-us.apache.org/repos/asf/oozie/blob/37e9d7cf/core/src/test/java/org/apache/oozie/service/TestJobsConcurrencyService.java ---------------------------------------------------------------------- diff --git a/core/src/test/java/org/apache/oozie/service/TestJobsConcurrencyService.java b/core/src/test/java/org/apache/oozie/service/TestJobsConcurrencyService.java index 011a574..513784a 100644 --- a/core/src/test/java/org/apache/oozie/service/TestJobsConcurrencyService.java +++ b/core/src/test/java/org/apache/oozie/service/TestJobsConcurrencyService.java @@ -27,6 +27,7 @@ import org.apache.oozie.client.rest.RestConstants; import org.apache.oozie.test.XTestCase; import org.apache.oozie.util.ConfigUtils; import org.apache.oozie.util.Instrumentation; +import org.apache.oozie.util.ZKUtils; public class TestJobsConcurrencyService extends XTestCase { @@ -86,8 +87,8 @@ public class TestJobsConcurrencyService extends XTestCase { jcs.init(Services.get()); Map<String, String> map = jcs.getServerUrls(); assertEquals(1, map.size()); - assertEquals(Services.get().getConf().get("oozie.instance.id"), map.keySet().iterator().next()); - assertEquals(ConfigUtils.getOozieURL(false), map.get(Services.get().getConf().get("oozie.instance.id"))); + assertEquals(Services.get().getConf().get(ZKUtils.OOZIE_INSTANCE_ID), map.keySet().iterator().next()); + assertEquals(ConfigUtils.getOozieURL(false), map.get(Services.get().getConf().get(ZKUtils.OOZIE_INSTANCE_ID))); } finally { jcs.destroy(); @@ -119,7 +120,7 @@ public class TestJobsConcurrencyService extends XTestCase { try { jcs.init(Services.get()); jcs.instrument(instr); - String servers = ConfigurationService.get("oozie.instance.id") + "=" + ConfigUtils.getOozieEffectiveUrl(); + String servers = ConfigurationService.get(ZKUtils.OOZIE_INSTANCE_ID) + "=" + ConfigUtils.getOozieEffectiveUrl(); assertEquals(servers, instr.getVariables().get("oozie").get("servers").getValue()); } finally { jcs.destroy(); http://git-wip-us.apache.org/repos/asf/oozie/blob/37e9d7cf/core/src/test/java/org/apache/oozie/test/XTestCase.java ---------------------------------------------------------------------- diff --git a/core/src/test/java/org/apache/oozie/test/XTestCase.java b/core/src/test/java/org/apache/oozie/test/XTestCase.java index 584aa12..912c3f3 100644 --- a/core/src/test/java/org/apache/oozie/test/XTestCase.java +++ b/core/src/test/java/org/apache/oozie/test/XTestCase.java @@ -97,6 +97,7 @@ import org.apache.oozie.util.IOUtils; import org.apache.oozie.util.ParamChecker; import org.apache.oozie.util.XConfiguration; import org.apache.oozie.util.XLog; +import org.apache.oozie.util.ZKUtils; import org.apache.openjpa.persistence.ArgumentException; import org.apache.openjpa.persistence.RollbackException; @@ -444,6 +445,10 @@ public abstract class XTestCase extends TestCase { setSystemProperty(HadoopAccessorService.SUPPORTED_FILESYSTEMS,"*"); + if (System.getProperty(ZKUtils.OOZIE_INSTANCE_ID) == null) { + System.setProperty(ZKUtils.OOZIE_INSTANCE_ID, ZKXTestCase.ZK_ID); + } + if (mrCluster != null) { OutputStream os = new FileOutputStream(new File(hadoopConfDir, "core-site.xml")); Configuration conf = createJobConfFromMRCluster(); http://git-wip-us.apache.org/repos/asf/oozie/blob/37e9d7cf/core/src/test/java/org/apache/oozie/test/ZKXTestCase.java ---------------------------------------------------------------------- diff --git a/core/src/test/java/org/apache/oozie/test/ZKXTestCase.java b/core/src/test/java/org/apache/oozie/test/ZKXTestCase.java index dfbea88..abc7c9f 100644 --- a/core/src/test/java/org/apache/oozie/test/ZKXTestCase.java +++ b/core/src/test/java/org/apache/oozie/test/ZKXTestCase.java @@ -88,7 +88,7 @@ public abstract class ZKXTestCase extends XDataTestCase { private void setUpZK() throws Exception { zkServer = setupZKServer(); Services.get().getConf().set("oozie.zookeeper.connection.string", zkServer.getConnectString()); - Services.get().getConf().set("oozie.instance.id", ZK_ID); + Services.get().getConf().set(ZKUtils.OOZIE_INSTANCE_ID, ZK_ID); Services.get().getConf().setBoolean(ZKConnectionListener.CONF_SHUTDOWN_ON_TIMEOUT, false); createClient(); createServiceDiscovery(); http://git-wip-us.apache.org/repos/asf/oozie/blob/37e9d7cf/distro/src/main/bin/oozie-jetty-server.sh ---------------------------------------------------------------------- diff --git a/distro/src/main/bin/oozie-jetty-server.sh b/distro/src/main/bin/oozie-jetty-server.sh index 8acfc2e..228a5c1 100644 --- a/distro/src/main/bin/oozie-jetty-server.sh +++ b/distro/src/main/bin/oozie-jetty-server.sh @@ -73,6 +73,7 @@ setup_jetty_opts() { jetty_opts="${jetty_opts} -Doozie.config.dir=${OOZIE_CONFIG}"; jetty_opts="${jetty_opts} -Doozie.log.dir=${OOZIE_LOG}"; jetty_opts="${jetty_opts} -Doozie.data.dir=${OOZIE_DATA}"; + jetty_opts="${jetty_opts} -Doozie.instance.id=${OOZIE_INSTANCE_ID}"; jetty_opts="${jetty_opts} -Doozie.config.file=${OOZIE_CONFIG_FILE}"; jetty_opts="${jetty_opts} -Doozie.log4j.file=${OOZIE_LOG4J_FILE}"; jetty_opts="${jetty_opts} -Doozie.log4j.reload=${OOZIE_LOG4J_RELOAD}"; http://git-wip-us.apache.org/repos/asf/oozie/blob/37e9d7cf/distro/src/main/bin/oozie-sys.sh ---------------------------------------------------------------------- diff --git a/distro/src/main/bin/oozie-sys.sh b/distro/src/main/bin/oozie-sys.sh index 7d6cb08..55f101c 100755 --- a/distro/src/main/bin/oozie-sys.sh +++ b/distro/src/main/bin/oozie-sys.sh @@ -160,6 +160,21 @@ else print "Using OOZIE_LOG4J_RELOAD: ${OOZIE_LOG4J_RELOAD}" fi +if [ "${OOZIE_HTTP_HOSTNAME}" = "" ]; then + oozieHttpHostname=$(hostname -f) + export OOZIE_HTTP_HOSTNAME=${oozieHttpHostname} + print "Setting OOZIE_HTTP_HOSTNAME: ${OOZIE_HTTP_HOSTNAME}" +else + print "Using OOZIE_HTTP_HOSTNAME: ${OOZIE_HTTP_HOSTNAME}" +fi + +if [ "${OOZIE_INSTANCE_ID}" = "" ]; then + export OOZIE_INSTANCE_ID="${OOZIE_HTTP_HOSTNAME}" + print "Setting OOZIE_INSTANCE_ID: ${OOZIE_INSTANCE_ID}" +else + print "Using OOZIE_INSTANCE_ID: ${OOZIE_INSTANCE_ID}" +fi + print setup_ooziedb() { http://git-wip-us.apache.org/repos/asf/oozie/blob/37e9d7cf/docs/src/site/twiki/AG_Install.twiki ---------------------------------------------------------------------- diff --git a/docs/src/site/twiki/AG_Install.twiki b/docs/src/site/twiki/AG_Install.twiki index dc8ee0f..e073c58 100644 --- a/docs/src/site/twiki/AG_Install.twiki +++ b/docs/src/site/twiki/AG_Install.twiki @@ -976,21 +976,11 @@ their own HA, they should have their own namespace. The default value is shown </property> </verbatim> -6. (Optional) Add the following property to oozie-site.xml in all Oozie servers to specify the each host instance id. -Each Oozie server in HA should have its own unique instance id. The default is =${OOZIE_HTTP_HOSTNAME}= (i.e. the hostname). +6. (Optional) If using a secure cluster, see [[AG_Install#Security][Security]] below on configuring Kerberos with Oozie HA. -<verbatim> -<property> - <name>oozie.instance.id</name> - <value>hostname</value> -</property> -</verbatim> - -7. (Optional) If using a secure cluster, see [[AG_Install#Security][Security]] below on configuring Kerberos with Oozie HA. - -8. Start the ZooKeeper servers. +7. Start the ZooKeeper servers. -9. Start the Oozie servers. +8. Start the Oozie servers. Note: If one of the Oozie servers becomes unavailable, querying Oozie for the logs from a job in the Web UI, REST API, or client may be missing information until that server comes back up. http://git-wip-us.apache.org/repos/asf/oozie/blob/37e9d7cf/release-log.txt ---------------------------------------------------------------------- diff --git a/release-log.txt b/release-log.txt index cfac155..caf6fa0 100644 --- a/release-log.txt +++ b/release-log.txt @@ -1,5 +1,6 @@ -- Oozie 5.0.0 release (trunk - unreleased) +OOZIE-3084 Add missing JVM properties to Jetty startup script (andras.piros) OOZIE-3097 Change version in pom in master to 5.0.0-beta1 (dbist13 via gezapeti) OOZIE-3098 Allow to use the rest api to get the creation time of the Coordinator (chiwen via andras.piros) OOZIE-3100 Upgrade javax.mail:mail to 1.4.7 (andras.piros)
