-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/52399/
-----------------------------------------------------------

(Updated Oct. 26, 2016, 4:18 p.m.)


Review request for oozie, András Piros, Peter Cseh, Peter Bacsko, and Robert 
Kanter.


Changes
-------

- Allow specifying temp directory for compiling JSP pages via oozie-default.xml
- Fail server startup if address is already in use
- Refactor (mainly renames + dependency injection for testability)
- Add more unit tests for JSP handling
- Add missing licenses to 403 and 404 pages


Repository: oozie-git


Description (updated)
-------

Embedding jetty into Oozie so that it can run as a standalone application. The 
changes also try to address OOZIE-2317 (i.e. Tomcat 6 is EOL). Jetty 9.2 is 
used as it works with Java 7; see 
http://www.eclipse.org/jetty/documentation/current/what-jetty-version.html.

New functionality
- By default build Oozie with embedded jetty. 'tomcat' profile can be used to 
build Oozie with embedded Tomcat.
- New module (server) is added that sets up an embedded Jetty server and start 
Oozie services. Servlet mapping is done by reading web.xml of webapp at 
runtime. JSP is handled with custom code. Server version is not revealed in 
server repsonses.
- SSL protocols and cipher suites, thread pool's size can be configured via 
oozie-default.xml for jetty.
- temp directory for JSP is also configured via oozie-default.xml 
   
To pass additional options to jetty, one could set and export JETTY_OPTS 
environment variable prior to starting Oozie.
Logging 

Changes
- Excluded jetty 6 dependencies from core and updated tests accordingly  
- Refactored assembly. Extracted distro-tomcat.xml 
- New profile in root pom: 'tomcat'. It is used to build Oozie with tomcat
- Refactored scripts: extracted tomcat and jetty starter scripts.
- oozie.sh is modified so that it starts Oozie with embedded jetty by default. 
If someone would like to use tomcat for any reason, they can build with profile 
'tomcat'.

TODOs:
- Even more code reviews if possible
- Update Oozie Documentation (can it move to a follow up JIRA maybe? It would 
be good to know if we want to further support embedded Tomcat. Documentation 
should be updated accordingly.)
 
Note: we cannot get rid of the Eclipse jdt compiler for compiling JSP (see 
https://github.com/eclipse/jetty.project/issues/706)


Diffs (updated)
-----

  bin/mkdistro.sh 1ccd495bd5d49446e91250fd71eca5a6a723524a 
  core/src/main/conf/oozie-env.sh 390c955c0e9ef8b4c50226a4a50188d0b047af60 
  core/src/main/java/org/apache/oozie/util/ConfigUtils.java 
a56c5a295052fc7099c77be1409d4a89bcfc09e8 
  core/src/main/java/org/apache/oozie/util/Instrumentation.java 
99d64acec76a7f23a0d5b7fc98a2b9620b3b9a7d 
  core/src/main/resources/oozie-default.xml 
e71ebe3b7a85e6b23176ef30713af63847144498 
  distro/pom.xml c50572c57a376b28963d4e7da8ac7df777fe0480 
  distro/src/main/bin/oozie-jetty-server.sh PRE-CREATION 
  distro/src/main/bin/oozie-setup.sh 79b049bccceb2690f8a673a885a615c8d4d9578c 
  distro/src/main/bin/oozie-sys.sh 97d55a2b69c34ede007d4f65cdfc66f1ac2cfd13 
  distro/src/main/bin/oozie-tomcat-server.sh PRE-CREATION 
  distro/src/main/bin/oozied.sh a869c3da177c863a068f2af45c7bca9d5cb771ac 
  pom.xml ade1f250106daff83022dc9954cadea5addcacfd 
  server/pom.xml PRE-CREATION 
  server/src/main/assemblies/empty.xml PRE-CREATION 
  server/src/main/java/org/apache/oozie/server/EmbeddedOozieServer.java 
PRE-CREATION 
  server/src/main/java/org/apache/oozie/server/FilterMapper.java PRE-CREATION 
  server/src/main/java/org/apache/oozie/server/HttpConfigurationWrapper.java 
PRE-CREATION 
  server/src/main/java/org/apache/oozie/server/JspHandler.java PRE-CREATION 
  server/src/main/java/org/apache/oozie/server/SSLServerConnectorFactory.java 
PRE-CREATION 
  server/src/main/java/org/apache/oozie/server/ServletMapper.java PRE-CREATION 
  server/src/main/java/org/apache/oozie/server/WebRootResourceLocator.java 
PRE-CREATION 
  
server/src/main/java/org/apache/oozie/server/guice/ConstraintSecurityHandlerProvider.java
 PRE-CREATION 
  server/src/main/java/org/apache/oozie/server/guice/JettyServerProvider.java 
PRE-CREATION 
  server/src/main/java/org/apache/oozie/server/guice/JspHandlerProvider.java 
PRE-CREATION 
  server/src/main/java/org/apache/oozie/server/guice/OozieGuiceModule.java 
PRE-CREATION 
  
server/src/main/java/org/apache/oozie/server/guice/RewriteHandlerProvider.java 
PRE-CREATION 
  server/src/main/java/org/apache/oozie/server/guice/ServicesProvider.java 
PRE-CREATION 
  server/src/main/resources/checkstyle-header.txt PRE-CREATION 
  server/src/main/resources/checkstyle.xml PRE-CREATION 
  server/src/test/java/org/apache/oozie/server/TestEmbeddedOozieServer.java 
PRE-CREATION 
  server/src/test/java/org/apache/oozie/server/TestJspHandler.java PRE-CREATION 
  
server/src/test/java/org/apache/oozie/server/TestSSLServerConnectorFactory.java 
PRE-CREATION 
  src/main/assemblies/distro-jetty.xml PRE-CREATION 
  src/main/assemblies/distro-tomcat.xml PRE-CREATION 
  src/main/assemblies/distro.xml 1ffbfd6d2ba33b390999e9094cbb336fbce45c21 
  webapp/src/main/webapp/403.html PRE-CREATION 
  webapp/src/main/webapp/404.html PRE-CREATION 

Diff: https://reviews.apache.org/r/52399/diff/


Testing (updated)
-------

- Tested basic functionality by executing a workflow that uses the sample 
JavaAction
    - without SSL - on a 2.4.0 pseudo Hadoop cluster
    - SSL with Kerberos is using a test CDH cluster 
- Added new unit tests that check
    - If oozie.ssl.enabled is not specified in oozie-default.xml or in 
oozie-size.xml, server starts without SSL settings 
    - If oozie.ssl.enabled is specified in oozie-default.xml or in 
oozie-size.xml, server starts with SSL settings
    - SSL protocols and ciphers can be configured via system properties and 
environment variables 
- Ran subset of tests using Hadoop-2 profile
    - mvn clean package assembly:single   -DjavaVersion=1.8 -DtargetVersion=1.7 
 -Dtest=TestJavaActionExecutor  -Phadoop-2 -Dhadoop.version=2.4.0
    - also executed all units by having the patches uploaded to JIRA


Thanks,

Attila Sasvari

Reply via email to