Re: Review Request 52399: OOZIE-2666 Support embedding Jetty into Oozie

2016-11-12 Thread Robert Kanter

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


Ship it!




Ship It!

- Robert Kanter


On Nov. 9, 2016, 4:24 p.m., Attila Sasvari wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52399/
> ---
> 
> (Updated Nov. 9, 2016, 4:24 p.m.)
> 
> 
> Review request for oozie, András Piros, Peter Cseh, Peter Bacsko, and Robert 
> Kanter.
> 
> 
> Repository: oozie-git
> 
> 
> Description
> ---
> 
> 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'.
> - change default oozie.http.hostname to 0.0.0.0 so that Oozie listens on all 
> available network interface(s)
> 
> 
> TODOs:
> - Even more code reviews if possible
> - Update Oozie Documentation in 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
> -
> 
>   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 

Re: Review Request 52399: OOZIE-2666 Support embedding Jetty into Oozie

2016-11-09 Thread Attila Sasvari

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

(Updated Nov. 9, 2016, 4:24 p.m.)


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


Changes
---

- Fixes according to review comments
- Fix oozie-setup.sh - copy jars from WEB-INF/lib to lib in distro so that 
sharelib can be installed
- Remove unnecessary dependencies from the server module
- Fix licenses in error 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'.
- change default oozie.http.hostname to 0.0.0.0 so that Oozie listens on all 
available network interface(s)


TODOs:
- Even more code reviews if possible
- Update Oozie Documentation in 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 
  

Re: Review Request 52399: OOZIE-2666 Support embedding Jetty into Oozie

2016-11-09 Thread Robert Kanter

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




core/src/main/java/org/apache/oozie/util/ConfigUtils.java (line 113)


"oozie.https.enabled" should be a constant



core/src/main/resources/oozie-default.xml (line 2493)


I would add someting like "Most users won't need to change this setting 
from the default value."



server/pom.xml (line 43)


If you specify the dependencies also in the root pom, you don't need the 
 in this pom.  That ensures we use the same versions of each 
dependency across all modules (except in cases where we specifically don't want 
to, like Spark dependencies).



server/pom.xml (line 299)


?



server/src/main/java/org/apache/oozie/server/EmbeddedOozieServer.java (line 109)


These should be constants



server/src/main/java/org/apache/oozie/server/HttpConfigurationWrapper.java 
(line 41)


These should be constants



server/src/main/java/org/apache/oozie/server/JspHandler.java (line 62)


We usually format the { on the same line as the if 
statement.  e.g.

if (scratchDir.exists()) {




server/src/main/java/org/apache/oozie/server/JspHandler.java (lines 136 - 137)


Will this prevent Oozie from working with Java 7?  The current minimum 
version is 7, unless we want to change that for Oozie 5.  Though that should 
probably be a separate JIRA.

Is there any way to get this to automatically come from the build somehow?  
We already have these defined in the root pom:

1.7
1.7
1.7
`



server/src/main/java/org/apache/oozie/server/SSLServerConnectorFactory.java 
(line 103)


These should all be constants



server/src/main/java/org/apache/oozie/server/ServletMapper.java (line 52)


Is there an easy way to keep all the stuff in here in sync with the similar 
mappings defined in the FilterMapper class?  I can imagine it would be 
easy to overlook one of the two places when creating a new Servlet.

If that can't be done in a clean/simple way, then I think it's fine if we 
just put a comment in each place saying to update the other place when making 
changes.



server/src/main/java/org/apache/oozie/server/guice/JettyServerProvider.java 
(line 42)


Should be a constant.



server/src/main/java/org/apache/oozie/server/guice/JspHandlerProvider.java 
(line 41)


constant



server/src/main/java/org/apache/oozie/server/guice/ServicesProvider.java (line 
27)


Is it possible for this to be called twice somehow?


- Robert Kanter


On Nov. 8, 2016, 10:50 p.m., Attila Sasvari wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52399/
> ---
> 
> (Updated Nov. 8, 2016, 10:50 p.m.)
> 
> 
> Review request for oozie, András Piros, Peter Cseh, Peter Bacsko, and Robert 
> Kanter.
> 
> 
> Repository: oozie-git
> 
> 
> Description
> ---
> 
> 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 

Re: Review Request 52399: OOZIE-2666 Support embedding Jetty into Oozie

2016-11-09 Thread András Piros

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


Ship it!




Ship It!

- András Piros


On Nov. 8, 2016, 10:50 p.m., Attila Sasvari wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52399/
> ---
> 
> (Updated Nov. 8, 2016, 10:50 p.m.)
> 
> 
> Review request for oozie, András Piros, Peter Cseh, Peter Bacsko, and Robert 
> Kanter.
> 
> 
> Repository: oozie-git
> 
> 
> Description
> ---
> 
> 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.)
> -setHost should be called on server connectors to bind to specific network 
> interface(s) (e.g. 0.0.0.0)
>  
> Note: we cannot get rid of the Eclipse jdt compiler for compiling JSP (see 
> https://github.com/eclipse/jetty.project/issues/706)
> 
> 
> Diffs
> -
> 
>   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 
>   

Re: Review Request 52399: OOZIE-2666 Support embedding Jetty into Oozie

2016-10-26 Thread Attila Sasvari

---
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 
  

Re: Review Request 52399: OOZIE-2666 Support embedding Jetty into Oozie

2016-10-26 Thread Peter Bacsko


> On okt. 26, 2016, 11:01 de, Peter Bacsko wrote:
> > Ship It!

Looks pretty good, especially the Guice enhancements.


- Peter


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


On okt. 25, 2016, 3:42 du, Attila Sasvari wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52399/
> ---
> 
> (Updated okt. 25, 2016, 3:42 du)
> 
> 
> Review request for oozie, András Piros, Peter Cseh, Peter Bacsko, and Robert 
> Kanter.
> 
> 
> Repository: oozie-git
> 
> 
> Description
> ---
> 
> 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. 
>
> 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:
> - More code reviews
> - Update Oozie Documentation
> - Add more tests if needed
>  
> Cannot get rid of the Eclipse jdt compiler for compiling JSP (see 
> https://github.com/eclipse/jetty.project/issues/706)
> 
> 
> Diffs
> -
> 
>   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 83a1d4254787c2a810e9db37a5d1433b96e01986 
>   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/HttpConfigurationWrapper.java 
> PRE-CREATION 
>   server/src/main/java/org/apache/oozie/server/JspHandler.java PRE-CREATION 
>   server/src/main/java/org/apache/oozie/server/OozieFilterMapper.java 
> PRE-CREATION 
>   server/src/main/java/org/apache/oozie/server/OozieRewriteHandler.java 
> PRE-CREATION 
>   server/src/main/java/org/apache/oozie/server/OozieServletMapper.java 
> PRE-CREATION 
>   server/src/main/java/org/apache/oozie/server/SSLServerConnectorFactory.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/OozieGuiceModule.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/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: 

Re: Review Request 52399: OOZIE-2666 Support embedding Jetty into Oozie

2016-10-26 Thread Peter Bacsko

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


Ship it!




Ship It!

- Peter Bacsko


On okt. 25, 2016, 3:42 du, Attila Sasvari wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52399/
> ---
> 
> (Updated okt. 25, 2016, 3:42 du)
> 
> 
> Review request for oozie, András Piros, Peter Cseh, Peter Bacsko, and Robert 
> Kanter.
> 
> 
> Repository: oozie-git
> 
> 
> Description
> ---
> 
> 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. 
>
> 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:
> - More code reviews
> - Update Oozie Documentation
> - Add more tests if needed
>  
> Cannot get rid of the Eclipse jdt compiler for compiling JSP (see 
> https://github.com/eclipse/jetty.project/issues/706)
> 
> 
> Diffs
> -
> 
>   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 83a1d4254787c2a810e9db37a5d1433b96e01986 
>   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/HttpConfigurationWrapper.java 
> PRE-CREATION 
>   server/src/main/java/org/apache/oozie/server/JspHandler.java PRE-CREATION 
>   server/src/main/java/org/apache/oozie/server/OozieFilterMapper.java 
> PRE-CREATION 
>   server/src/main/java/org/apache/oozie/server/OozieRewriteHandler.java 
> PRE-CREATION 
>   server/src/main/java/org/apache/oozie/server/OozieServletMapper.java 
> PRE-CREATION 
>   server/src/main/java/org/apache/oozie/server/SSLServerConnectorFactory.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/OozieGuiceModule.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/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
> ---
> 
> - Tested basic 

Re: Review Request 52399: OOZIE-2666 Support embedding Jetty into Oozie

2016-10-26 Thread András Piros

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


Ship it!




Ship It!

- András Piros


On Oct. 25, 2016, 3:42 p.m., Attila Sasvari wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52399/
> ---
> 
> (Updated Oct. 25, 2016, 3:42 p.m.)
> 
> 
> Review request for oozie, András Piros, Peter Cseh, Peter Bacsko, and Robert 
> Kanter.
> 
> 
> Repository: oozie-git
> 
> 
> Description
> ---
> 
> 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. 
>
> 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:
> - More code reviews
> - Update Oozie Documentation
> - Add more tests if needed
>  
> Cannot get rid of the Eclipse jdt compiler for compiling JSP (see 
> https://github.com/eclipse/jetty.project/issues/706)
> 
> 
> Diffs
> -
> 
>   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 83a1d4254787c2a810e9db37a5d1433b96e01986 
>   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/HttpConfigurationWrapper.java 
> PRE-CREATION 
>   server/src/main/java/org/apache/oozie/server/JspHandler.java PRE-CREATION 
>   server/src/main/java/org/apache/oozie/server/OozieFilterMapper.java 
> PRE-CREATION 
>   server/src/main/java/org/apache/oozie/server/OozieRewriteHandler.java 
> PRE-CREATION 
>   server/src/main/java/org/apache/oozie/server/OozieServletMapper.java 
> PRE-CREATION 
>   server/src/main/java/org/apache/oozie/server/SSLServerConnectorFactory.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/OozieGuiceModule.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/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
> ---
> 
> - Tested basic 

Re: Review Request 52399: OOZIE-2666 Support embedding Jetty into Oozie

2016-10-25 Thread Attila Sasvari

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

(Updated Oct. 25, 2016, 3:42 p.m.)


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


Changes
---

Refactoring - use guice for dependency injection


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. 
   
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:
- More code reviews
- Update Oozie Documentation
- Add more tests if needed
 
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 83a1d4254787c2a810e9db37a5d1433b96e01986 
  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/HttpConfigurationWrapper.java 
PRE-CREATION 
  server/src/main/java/org/apache/oozie/server/JspHandler.java PRE-CREATION 
  server/src/main/java/org/apache/oozie/server/OozieFilterMapper.java 
PRE-CREATION 
  server/src/main/java/org/apache/oozie/server/OozieRewriteHandler.java 
PRE-CREATION 
  server/src/main/java/org/apache/oozie/server/OozieServletMapper.java 
PRE-CREATION 
  server/src/main/java/org/apache/oozie/server/SSLServerConnectorFactory.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/OozieGuiceModule.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/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
---

- 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 

Re: Review Request 52399: OOZIE-2666 Support embedding Jetty into Oozie

2016-10-25 Thread András Piros

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




server/src/main/java/org/apache/oozie/server/EmbeddedOozieServer.java (line 92)


TODO: use Guice for dependency injection and get rid of `setup()` method.



server/src/main/java/org/apache/oozie/server/EmbeddedOozieServer.java (lines 
145 - 161)


Should be put to separate class.



server/src/main/java/org/apache/oozie/server/EmbeddedOozieServer.java (line 214)


Could be done by Guice's `Injector`.



server/src/main/java/org/apache/oozie/server/OozieFilterMapper.java (lines 41 - 
49)


What is used in more than one places, e.g. `versions`, `v0` etc., can and 
should be put to constants.



server/src/main/java/org/apache/oozie/server/OozieServletMapper.java (lines 47 
- 50)


What is used in more than one places, e.g. `versions`, `v0` etc., can and 
should be put to constants.



server/src/main/java/org/apache/oozie/server/OozieServletMapper.java (lines 72 
- 77)


What is used in more than one places, e.g. `versions`, `v0` etc., can and 
should be put to constants.



webapp/src/main/webapp/WEB-INF/web.xml (lines 218 - 221)


Dead code, pls. remove.


- András Piros


On Oct. 24, 2016, 4:32 p.m., Attila Sasvari wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52399/
> ---
> 
> (Updated Oct. 24, 2016, 4:32 p.m.)
> 
> 
> Review request for oozie, András Piros, Peter Cseh, Peter Bacsko, and Robert 
> Kanter.
> 
> 
> Repository: oozie-git
> 
> 
> Description
> ---
> 
> 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. 
>
> 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:
> - More code reviews
> - Maven clean up
> - Packaging code clean up
> - Update Oozie Documentation
> - Add more tests if needed
> - Figure out how to get rid of the Eclipse jdt compiler for compiling JSP 
> (official documentation does not seem to work as expected for some reason)
> 
> 
> Diffs
> -
> 
>   bin/mkdistro.sh 1ccd495bd5d49446e91250fd71eca5a6a723524a 
>   core/src/main/conf/oozie-env.sh 390c955c0e9ef8b4c50226a4a50188d0b047af60 
>   core/src/main/java/org/apache/oozie/store/StoreStatusFilter.java 
> fb1db29cdfe1dbe37c8e2176079f39f841232ee3 
>   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 83a1d4254787c2a810e9db37a5d1433b96e01986 
>   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/HttpConfigurationWrapper.java 
> PRE-CREATION 
>   

Re: Review Request 52399: OOZIE-2666 Support embedding Jetty into Oozie

2016-10-24 Thread Attila Sasvari

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

(Updated Oct. 24, 2016, 4:32 p.m.)


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


Changes
---

Map and filter servlets from code

Fix eclude cipher suites
Add security constraints if HTTPS enabled


Repository: oozie-git


Description
---

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. 
   
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:
- More code reviews
- Maven clean up
- Packaging code clean up
- Update Oozie Documentation
- Add more tests if needed
- Figure out how to get rid of the Eclipse jdt compiler for compiling JSP 
(official documentation does not seem to work as expected for some reason)


Diffs (updated)
-

  bin/mkdistro.sh 1ccd495bd5d49446e91250fd71eca5a6a723524a 
  core/src/main/conf/oozie-env.sh 390c955c0e9ef8b4c50226a4a50188d0b047af60 
  core/src/main/java/org/apache/oozie/store/StoreStatusFilter.java 
fb1db29cdfe1dbe37c8e2176079f39f841232ee3 
  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 83a1d4254787c2a810e9db37a5d1433b96e01986 
  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/HttpConfigurationWrapper.java 
PRE-CREATION 
  server/src/main/java/org/apache/oozie/server/JspHandler.java PRE-CREATION 
  server/src/main/java/org/apache/oozie/server/OozieFilterMapper.java 
PRE-CREATION 
  server/src/main/java/org/apache/oozie/server/OozieRewriteHandler.java 
PRE-CREATION 
  server/src/main/java/org/apache/oozie/server/OozieServletMapper.java 
PRE-CREATION 
  server/src/main/java/org/apache/oozie/server/SSLServerConnectorFactory.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/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 
  webapp/src/main/webapp/WEB-INF/web.xml 
89f15f3f6df0d3f365c29467120e9de15c333665 

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


Testing
---

- 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 

Re: Review Request 52399: OOZIE-2666 Support embedding Jetty into Oozie

2016-10-21 Thread Robert Kanter

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




core/src/main/java/org/apache/oozie/store/StoreStatusFilter.java (lines 32 - 33)


Are these used here?



distro/src/main/bin/oozie-jetty-server.sh (line 37)


Tomcat?



server/pom.xml (line 43)


The  should only be in the root pom, and then all child poms just 
have the  and 



server/src/main/java/org/apache/oozie/server/EmbeddedOozieServer.java (line 43)


If you look at ConfigUtils#getOozieEffectiveUrl, it calls 
ServicesLoader#isSSLEnabled to construct some URLs with either the http 
scheme and port or the https scheme and port.  ServicesLoader is only 
used with Tomcat, so I think you'll need to update ConfigUtils to 
handle this correctly regardless of Jetty or Tomcat.



server/src/main/java/org/apache/oozie/server/EmbeddedOozieServer.java (line 50)


We usually just call this services



server/src/main/java/org/apache/oozie/server/EmbeddedOozieServer.java (line 54)


Construct



server/src/main/java/org/apache/oozie/server/SSLServerConnectorFactory.java 
(line 42)


Let's keep this in one place: oozie-default.xml



server/src/main/java/org/apache/oozie/server/SSLServerConnectorFactory.java 
(line 51)


Let's keep this in one place: oozie-default.xml



server/src/main/java/org/apache/oozie/server/SSLServerConnectorFactory.java 
(line 122)


setTrustStorePass()


- Robert Kanter


On Oct. 19, 2016, 9:43 p.m., Attila Sasvari wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52399/
> ---
> 
> (Updated Oct. 19, 2016, 9:43 p.m.)
> 
> 
> Review request for oozie, András Piros, Peter Cseh, Peter Bacsko, and Robert 
> Kanter.
> 
> 
> Repository: oozie-git
> 
> 
> Description
> ---
> 
> 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. 
>
> 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:
> - More code reviews
> - Maven clean up
> - Packaging code clean up
> - Update Oozie Documentation
> - Add more tests if needed
> - Figure out how to get rid of the Eclipse jdt compiler for compiling JSP 
> (official documentation does not seem to work as expected for some reason)
> 
> 
> Diffs
> -
> 
>   bin/mkdistro.sh 1ccd495bd5d49446e91250fd71eca5a6a723524a 
>   core/src/main/conf/oozie-env.sh 390c955c0e9ef8b4c50226a4a50188d0b047af60 
>   core/src/main/java/org/apache/oozie/store/StoreStatusFilter.java 
> fb1db29cdfe1dbe37c8e2176079f39f841232ee3 
>   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 

Re: Review Request 52399: OOZIE-2666 Support embedding Jetty into Oozie

2016-10-19 Thread Attila Sasvari

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

(Updated Oct. 19, 2016, 9:43 p.m.)


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


Changes
---

Fix errors introduced by previous patch (java bin was not set correctly, shell 
script errors)


Repository: oozie-git


Description
---

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. 
   
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:
- More code reviews
- Maven clean up
- Packaging code clean up
- Update Oozie Documentation
- Add more tests if needed
- Figure out how to get rid of the Eclipse jdt compiler for compiling JSP 
(official documentation does not seem to work as expected for some reason)


Diffs (updated)
-

  bin/mkdistro.sh 1ccd495bd5d49446e91250fd71eca5a6a723524a 
  core/src/main/conf/oozie-env.sh 390c955c0e9ef8b4c50226a4a50188d0b047af60 
  core/src/main/java/org/apache/oozie/store/StoreStatusFilter.java 
fb1db29cdfe1dbe37c8e2176079f39f841232ee3 
  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 83a1d4254787c2a810e9db37a5d1433b96e01986 
  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/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/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/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 

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


Testing
---

- 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


Thanks,

Attila Sasvari



Re: Review Request 52399: OOZIE-2666 Support embedding Jetty into Oozie

2016-10-15 Thread Attila Sasvari

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

(Updated Oct. 15, 2016, 2:44 p.m.)


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


Repository: oozie-git


Description
---

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. 
   
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:
- More code reviews
- Maven clean up
- Packaging code clean up
- Update Oozie Documentation
- Add more tests if needed
- Figure out how to get rid of the Eclipse jdt compiler for compiling JSP 
(official documentation does not seem to work as expected for some reason)


Diffs (updated)
-

  bin/mkdistro.sh 1ccd495bd5d49446e91250fd71eca5a6a723524a 
  core/src/main/conf/oozie-env.sh 390c955c0e9ef8b4c50226a4a50188d0b047af60 
  core/src/main/java/org/apache/oozie/store/StoreStatusFilter.java 
fb1db29cdfe1dbe37c8e2176079f39f841232ee3 
  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 83a1d4254787c2a810e9db37a5d1433b96e01986 
  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/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/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/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 

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


Testing
---

- 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


Thanks,

Attila Sasvari



Re: Review Request 52399: OOZIE-2666 Support embedding Jetty into Oozie

2016-10-15 Thread Attila Sasvari


> On Oct. 15, 2016, 12:11 p.m., András Piros wrote:
> > server/src/main/java/org/apache/oozie/server/JspHandler.java, line 67
> > 
> >
> > Why do you think it's necessary?

otherwise Findbugs reports unsafe usage.
http://findbugs.sourceforge.net/bugDescriptions.html#UI_INHERITANCE_UNSAFE_GETRESOURCE


- Attila


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


On Oct. 15, 2016, 1:12 p.m., Attila Sasvari wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52399/
> ---
> 
> (Updated Oct. 15, 2016, 1:12 p.m.)
> 
> 
> Review request for oozie, András Piros, Peter Cseh, Peter Bacsko, and Robert 
> Kanter.
> 
> 
> Repository: oozie-git
> 
> 
> Description
> ---
> 
> 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. 
>
> 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:
> - More code reviews
> - Maven clean up
> - Packaging code clean up
> - Update Oozie Documentation
> - Add more tests if needed
> - Figure out how to get rid of the Eclipse jdt compiler for compiling JSP 
> (official documentation does not seem to work as expected for some reason)
> 
> 
> Diffs
> -
> 
>   core/src/main/conf/oozie-env.sh 390c955c0e9ef8b4c50226a4a50188d0b047af60 
>   core/src/main/java/org/apache/oozie/store/StoreStatusFilter.java 
> fb1db29cdfe1dbe37c8e2176079f39f841232ee3 
>   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 83a1d4254787c2a810e9db37a5d1433b96e01986 
>   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/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/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/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 
> 
> Diff: https://reviews.apache.org/r/52399/diff/
> 
> 
> Testing
> ---
> 
> - 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 

Re: Review Request 52399: OOZIE-2666 Support embedding Jetty into Oozie

2016-10-15 Thread Attila Sasvari


> On Oct. 6, 2016, 11:04 p.m., Robert Kanter wrote:
> > distro/src/main/bin/oozie-jetty-server.sh, line 187
> > 
> >
> > Can we set this up in such that there is no war file when using Jetty?

Created new maven profile, distro assembly and adjuseted scripts to not do 
anything with war if we build with the default profile (that is jetty).


- Attila


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


On Oct. 15, 2016, 1:12 p.m., Attila Sasvari wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52399/
> ---
> 
> (Updated Oct. 15, 2016, 1:12 p.m.)
> 
> 
> Review request for oozie, András Piros, Peter Cseh, Peter Bacsko, and Robert 
> Kanter.
> 
> 
> Repository: oozie-git
> 
> 
> Description
> ---
> 
> 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. 
>
> 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:
> - More code reviews
> - Maven clean up
> - Packaging code clean up
> - Update Oozie Documentation
> - Add more tests if needed
> - Figure out how to get rid of the Eclipse jdt compiler for compiling JSP 
> (official documentation does not seem to work as expected for some reason)
> 
> 
> Diffs
> -
> 
>   core/src/main/conf/oozie-env.sh 390c955c0e9ef8b4c50226a4a50188d0b047af60 
>   core/src/main/java/org/apache/oozie/store/StoreStatusFilter.java 
> fb1db29cdfe1dbe37c8e2176079f39f841232ee3 
>   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 83a1d4254787c2a810e9db37a5d1433b96e01986 
>   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/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/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/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 
> 
> Diff: https://reviews.apache.org/r/52399/diff/
> 
> 
> Testing
> ---
> 
> - 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 
> - 

Re: Review Request 52399: OOZIE-2666 Support embedding Jetty into Oozie

2016-10-15 Thread Attila Sasvari

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

(Updated Oct. 15, 2016, 1:12 p.m.)


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


Changes
---

Adjust oozie-setup.sh with jetty related things


Repository: oozie-git


Description
---

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. 
   
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:
- More code reviews
- Maven clean up
- Packaging code clean up
- Update Oozie Documentation
- Add more tests if needed
- Figure out how to get rid of the Eclipse jdt compiler for compiling JSP 
(official documentation does not seem to work as expected for some reason)


Diffs (updated)
-

  core/src/main/conf/oozie-env.sh 390c955c0e9ef8b4c50226a4a50188d0b047af60 
  core/src/main/java/org/apache/oozie/store/StoreStatusFilter.java 
fb1db29cdfe1dbe37c8e2176079f39f841232ee3 
  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 83a1d4254787c2a810e9db37a5d1433b96e01986 
  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/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/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/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 

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


Testing
---

- 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


Thanks,

Attila Sasvari



Re: Review Request 52399: OOZIE-2666 Support embedding Jetty into Oozie

2016-10-15 Thread András Piros

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




distro/pom.xml (line 115)


What about `${distro.tomcat.descriptor}`?



distro/src/main/bin/oozie-setup.sh (line 190)


I'd use rather `eq` here for `integer` comparison:

http://tldp.org/LDP/abs/html/comparison-ops.html



distro/src/main/bin/oozied.sh (line 43)


I'd use `eq` here for `integer` comparison.



distro/src/main/bin/oozied.sh (line 54)


I'd use `eq` here for `integer` comparison.



server/src/main/java/org/apache/oozie/server/EmbeddedOozieServer.java (line 82)


`catch (final NumberFormatException nfe) {...}`



server/src/main/java/org/apache/oozie/server/EmbeddedOozieServer.java (line 89)


`catch (final NumberFormatException nfe) {...}`



server/src/main/java/org/apache/oozie/server/HttpConfigurationWrapper.java 
(line 40)


`catch (final NumberFormatException nfe) {...}`



server/src/main/java/org/apache/oozie/server/HttpConfigurationWrapper.java 
(line 41)


`catch (final NumberFormatException nfe) {...}`



server/src/main/java/org/apache/oozie/server/JspHandler.java (line 67)


Why do you think it's necessary?



server/src/main/java/org/apache/oozie/server/SSLServerConnectorFactory.java 
(lines 61 - 62)


`this.sslContextFactory = Preconditions.checkNotNull(sslContextFactory, 
"sslContextFactory is null");`



core/src/main/conf/oozie-env.sh (line 25)


I'd use rather `eq` here for `integer` comparison:

http://tldp.org/LDP/abs/html/comparison-ops.html



distro/src/main/bin/oozie-sys.sh (line 198)


I'd use rather `eq` here for `integer` comparison:

http://tldp.org/LDP/abs/html/comparison-ops.html



distro/src/main/bin/oozie-sys.sh (line 226)


I'd use rather `eq` here for `integer` comparison:

http://tldp.org/LDP/abs/html/comparison-ops.html



distro/src/main/bin/oozie-sys.sh (line 235)


I'd use rather `eq` here for `integer` comparison:

http://tldp.org/LDP/abs/html/comparison-ops.html



distro/src/main/bin/oozie-sys.sh (line 251)


I'd use `neq` here for `integer` comparison.



distro/src/main/bin/oozie-tomcat-server.sh (line 58)


I'd use `neq` here for `integer` comparison.


- András Piros


On Oct. 15, 2016, 11:30 a.m., Attila Sasvari wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52399/
> ---
> 
> (Updated Oct. 15, 2016, 11:30 a.m.)
> 
> 
> Review request for oozie, András Piros, Peter Cseh, Peter Bacsko, and Robert 
> Kanter.
> 
> 
> Repository: oozie-git
> 
> 
> Description
> ---
> 
> 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. 
>
> 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:
> - More code reviews
> - Maven 

Re: Review Request 52399: OOZIE-2666 Support embedding Jetty into Oozie

2016-10-15 Thread Attila Sasvari

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

(Updated Oct. 15, 2016, 11:30 a.m.)


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


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. 
   
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:
- More code reviews
- Maven clean up
- Packaging code clean up
- Update Oozie Documentation
- Add more tests if needed
- Figure out how to get rid of the Eclipse jdt compiler for compiling JSP 
(official documentation does not seem to work as expected for some reason)


Diffs
-

  core/src/main/conf/oozie-env.sh 390c955c0e9ef8b4c50226a4a50188d0b047af60 
  core/src/main/java/org/apache/oozie/store/StoreStatusFilter.java 
fb1db29cdfe1dbe37c8e2176079f39f841232ee3 
  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 83a1d4254787c2a810e9db37a5d1433b96e01986 
  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/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/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/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 

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


Thanks,

Attila Sasvari



Re: Review Request 52399: OOZIE-2666 Support embedding Jetty into Oozie

2016-10-15 Thread Attila Sasvari

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

(Updated Oct. 15, 2016, 11:08 a.m.)


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


Changes
---

Do not require from the user to specify environment vairable (e.g. 
OOZIE_USE_TOMCAT=1) - start web server based on maven profile
Fix find bugs erros in EmbeddedOozieServer


Repository: oozie-git


Description
---

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).

New functionality
- 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 ciphers can be configured via system properties and 
environment variables. Precedence: system properties, environment variables, 
default values
   
Changes in existing code
- Excluded jetty 6 dependencies from core and updated tests accordingly  

Packaging
- 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 set an environment 
variable (e.g. OOZIE_USE_TOMCAT=1).

TODO:
- Add more tests
- Add more documentation
- Code cleanup + refactoring in packaging and core parts
- Maven clean up
- Allow to tune more Jetty settings (for example threadpool)
- More security measures (e.g. protect against clickjacking, CSRF, etc.)
- Update Oozie Documentation


Diffs (updated)
-

  core/src/main/conf/oozie-env.sh 390c955c0e9ef8b4c50226a4a50188d0b047af60 
  core/src/main/java/org/apache/oozie/store/StoreStatusFilter.java 
fb1db29cdfe1dbe37c8e2176079f39f841232ee3 
  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 83a1d4254787c2a810e9db37a5d1433b96e01986 
  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/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/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/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 

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


Testing
---

- 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, server starts without SSL settings 
- If oozie.ssl.enabled is specified, 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


Thanks,

Attila Sasvari



Re: Review Request 52399: OOZIE-2666 Support embedding Jetty into Oozie

2016-10-14 Thread Attila Sasvari

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

(Updated Oct. 14, 2016, 1:02 p.m.)


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


Changes
---

Do not copy/extract oozie.war in distro, do not set CATALINA settings if using 
jetty


Repository: oozie-git


Description
---

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).

New functionality
- 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 ciphers can be configured via system properties and 
environment variables. Precedence: system properties, environment variables, 
default values
   
Changes in existing code
- Excluded jetty 6 dependencies from core and updated tests accordingly  

Packaging
- 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 set an environment 
variable (e.g. OOZIE_USE_TOMCAT=1).

TODO:
- Add more tests
- Add more documentation
- Code cleanup + refactoring in packaging and core parts
- Maven clean up
- Allow to tune more Jetty settings (for example threadpool)
- More security measures (e.g. protect against clickjacking, CSRF, etc.)
- Update Oozie Documentation


Diffs (updated)
-

  core/src/main/conf/oozie-env.sh 390c955c0e9ef8b4c50226a4a50188d0b047af60 
  core/src/main/java/org/apache/oozie/store/StoreStatusFilter.java 
fb1db29cdfe1dbe37c8e2176079f39f841232ee3 
  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/oozied.sh a869c3da177c863a068f2af45c7bca9d5cb771ac 
  pom.xml 83a1d4254787c2a810e9db37a5d1433b96e01986 
  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/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/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/TestSSLServerConnectorFactory.java 
PRE-CREATION 
  src/main/assemblies/distro-jetty.xml PRE-CREATION 
  src/main/assemblies/distro.xml 1ffbfd6d2ba33b390999e9094cbb336fbce45c21 

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


Testing
---

- 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, server starts without SSL settings 
- If oozie.ssl.enabled is specified, 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


Thanks,

Attila Sasvari



Re: Review Request 52399: OOZIE-2666 Support embedding Jetty into Oozie

2016-10-13 Thread Attila Sasvari

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

(Updated Oct. 13, 2016, 9:53 p.m.)


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


Repository: oozie-git


Description
---

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).

New functionality
- 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 ciphers can be configured via system properties and 
environment variables. Precedence: system properties, environment variables, 
default values
   
Changes in existing code
- Excluded jetty 6 dependencies from core and updated tests accordingly  

Packaging
- 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 set an environment 
variable (e.g. OOZIE_USE_TOMCAT=1).

TODO:
- Add more tests
- Add more documentation
- Code cleanup + refactoring in packaging and core parts
- Maven clean up
- Allow to tune more Jetty settings (for example threadpool)
- More security measures (e.g. protect against clickjacking, CSRF, etc.)
- Update Oozie Documentation


Diffs (updated)
-

  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/oozied.sh a869c3da177c863a068f2af45c7bca9d5cb771ac 
  pom.xml 83a1d4254787c2a810e9db37a5d1433b96e01986 
  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/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/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/TestSSLServerConnectorFactory.java 
PRE-CREATION 
  src/main/assemblies/distro.xml 1ffbfd6d2ba33b390999e9094cbb336fbce45c21 

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


Testing
---

- 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, server starts without SSL settings 
- If oozie.ssl.enabled is specified, 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


Thanks,

Attila Sasvari



Re: Review Request 52399: OOZIE-2666 Support embedding Jetty into Oozie

2016-10-13 Thread Attila Sasvari

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

(Updated Oct. 13, 2016, 6:35 p.m.)


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


Repository: oozie-git


Description
---

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).

New functionality
- 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 ciphers can be configured via system properties and 
environment variables. Precedence: system properties, environment variables, 
default values
   
Changes in existing code
- Excluded jetty 6 dependencies from core and updated tests accordingly  

Packaging
- 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 set an environment 
variable (e.g. OOZIE_USE_TOMCAT=1).

TODO:
- Add more tests
- Add more documentation
- Code cleanup + refactoring in packaging and core parts
- Maven clean up
- Allow to tune more Jetty settings (for example threadpool)
- More security measures (e.g. protect against clickjacking, CSRF, etc.)
- Update Oozie Documentation


Diffs (updated)
-

  core/src/main/java/org/apache/oozie/util/Instrumentation.java 
fa1e92a0f1fadfb66c5e66fea5f26f57579080e7 
  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/oozied.sh a869c3da177c863a068f2af45c7bca9d5cb771ac 
  pom.xml 704a29f4e4805e3e08c2a547b2a375f6b1b2 
  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/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/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/TestSSLServerConnectorFactory.java 
PRE-CREATION 
  src/main/assemblies/distro.xml 1ffbfd6d2ba33b390999e9094cbb336fbce45c21 

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


Testing
---

- 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, server starts without SSL settings 
- If oozie.ssl.enabled is specified, 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


Thanks,

Attila Sasvari



Re: Review Request 52399: OOZIE-2666 Support embedding Jetty into Oozie

2016-10-13 Thread Attila Sasvari

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

(Updated Oct. 13, 2016, 6:27 p.m.)


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


Changes
---

rebase


Repository: oozie-git


Description
---

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).

New functionality
- 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 ciphers can be configured via system properties and 
environment variables. Precedence: system properties, environment variables, 
default values
   
Changes in existing code
- Excluded jetty 6 dependencies from core and updated tests accordingly  

Packaging
- 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 set an environment 
variable (e.g. OOZIE_USE_TOMCAT=1).

TODO:
- Add more tests
- Add more documentation
- Code cleanup + refactoring in packaging and core parts
- Maven clean up
- Allow to tune more Jetty settings (for example threadpool)
- More security measures (e.g. protect against clickjacking, CSRF, etc.)
- Update Oozie Documentation


Diffs (updated)
-

  core/src/main/java/org/apache/oozie/util/Instrumentation.java 
fa1e92a0f1fadfb66c5e66fea5f26f57579080e7 
  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/oozied.sh a869c3da177c863a068f2af45c7bca9d5cb771ac 
  pom.xml 704a29f4e4805e3e08c2a547b2a375f6b1b2 
  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/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/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/TestSSLServerConnectorFactory.java 
PRE-CREATION 
  src/main/assemblies/distro.xml 1ffbfd6d2ba33b390999e9094cbb336fbce45c21 

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


Testing
---

- 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, server starts without SSL settings 
- If oozie.ssl.enabled is specified, 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


Thanks,

Attila Sasvari



Re: Review Request 52399: OOZIE-2666 Support embedding Jetty into Oozie

2016-10-13 Thread Attila Sasvari


> On Oct. 3, 2016, 4:27 p.m., Peter Bacsko wrote:
> > distro/src/main/bin/oozied.sh, line 115
> > 
> >
> > Is this TODO still relevant?

It is.


- Attila


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


On Oct. 13, 2016, 2:17 p.m., Attila Sasvari wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52399/
> ---
> 
> (Updated Oct. 13, 2016, 2:17 p.m.)
> 
> 
> Review request for oozie, András Piros, Peter Cseh, Peter Bacsko, and Robert 
> Kanter.
> 
> 
> Repository: oozie-git
> 
> 
> Description
> ---
> 
> 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).
> 
> New functionality
> - 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 ciphers can be configured via system properties and 
> environment variables. Precedence: system properties, environment variables, 
> default values
>
> Changes in existing code
> - Excluded jetty 6 dependencies from core and updated tests accordingly  
> 
> Packaging
> - 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 set an 
> environment variable (e.g. OOZIE_USE_TOMCAT=1).
> 
> TODO:
> - Add more tests
> - Add more documentation
> - Code cleanup + refactoring in packaging and core parts
> - Maven clean up
> - Allow to tune more Jetty settings (for example threadpool)
> - More security measures (e.g. protect against clickjacking, CSRF, etc.)
> - Update Oozie Documentation
> 
> 
> Diffs
> -
> 
>   core/src/main/java/org/apache/oozie/util/Instrumentation.java 
> fa1e92a0f1fadfb66c5e66fea5f26f57579080e7 
>   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/oozied.sh a869c3da177c863a068f2af45c7bca9d5cb771ac 
>   pom.xml 704a29f4e4805e3e08c2a547b2a375f6b1b2 
>   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/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/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/TestSSLServerConnectorFactory.java
>  PRE-CREATION 
>   src/main/assemblies/distro.xml 1ffbfd6d2ba33b390999e9094cbb336fbce45c21 
> 
> Diff: https://reviews.apache.org/r/52399/diff/
> 
> 
> Testing
> ---
> 
> - 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, server starts without SSL 
> settings 
> - If oozie.ssl.enabled is specified, 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
> 
> 
> Thanks,
> 
> Attila Sasvari
> 
>



Re: Review Request 52399: OOZIE-2666 Support embedding Jetty into Oozie

2016-10-13 Thread Attila Sasvari


> On Oct. 6, 2016, 11:04 p.m., Robert Kanter wrote:
> > distro/src/main/bin/oozie-jetty-server.sh, lines 40-61
> > 
> >
> > IMO, we should move as many of these as possible to oozie-default/site. 
> >  We had a bunch of these as JVM properties before because of Tomcat and 
> > other reasons, but it would be good to have them all in the same place as 
> > other config properties.  At the very least, the https/ssl ones (the other 
> > ones are probably out of scope for this JIRA).

Because the way Services and ConfigurationService classes are constructed we 
still need to pass some properties as system properties:

  jetty_opts="-Doozie.home.dir=${OOZIE_HOME}";
  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.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}";

ConfigurationService is initialized by passing in a Services object (that is 
initialized)
However, oozie home needs to be known in Services init, so we cannot get it 
from ConfigurationService (that depends on Services).
Similarly Log4j properties are used in Services' init(). 

In my opinion, Services and ConfigurationService would benefit a lot from code 
clean up / refactoring. It is out of scope of this task I believe.


- Attila


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


On Oct. 13, 2016, 2:17 p.m., Attila Sasvari wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52399/
> ---
> 
> (Updated Oct. 13, 2016, 2:17 p.m.)
> 
> 
> Review request for oozie, András Piros, Peter Cseh, Peter Bacsko, and Robert 
> Kanter.
> 
> 
> Repository: oozie-git
> 
> 
> Description
> ---
> 
> 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).
> 
> New functionality
> - 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 ciphers can be configured via system properties and 
> environment variables. Precedence: system properties, environment variables, 
> default values
>
> Changes in existing code
> - Excluded jetty 6 dependencies from core and updated tests accordingly  
> 
> Packaging
> - 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 set an 
> environment variable (e.g. OOZIE_USE_TOMCAT=1).
> 
> TODO:
> - Add more tests
> - Add more documentation
> - Code cleanup + refactoring in packaging and core parts
> - Maven clean up
> - Allow to tune more Jetty settings (for example threadpool)
> - More security measures (e.g. protect against clickjacking, CSRF, etc.)
> - Update Oozie Documentation
> 
> 
> Diffs
> -
> 
>   core/src/main/java/org/apache/oozie/util/Instrumentation.java 
> fa1e92a0f1fadfb66c5e66fea5f26f57579080e7 
>   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/oozied.sh a869c3da177c863a068f2af45c7bca9d5cb771ac 
>   pom.xml 704a29f4e4805e3e08c2a547b2a375f6b1b2 
>   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/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/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/TestSSLServerConnectorFactory.java
>  PRE-CREATION 
>   src/main/assemblies/distro.xml 1ffbfd6d2ba33b390999e9094cbb336fbce45c21 
> 
> Diff: https://reviews.apache.org/r/52399/diff/
> 
> 
> 

Re: Review Request 52399: OOZIE-2666 Support embedding Jetty into Oozie

2016-10-13 Thread Attila Sasvari


> On Oct. 6, 2016, 11:04 p.m., Robert Kanter wrote:
> > distro/src/main/bin/oozie-jetty-server.sh, line 1
> > 
> >
> > Please run all new/updated shell scripts through shellcheck 
> > (https://www.shellcheck.net/).  It finds various problems and best practice 
> > violations (kind of like findbugs).  You can even install it on your Mac 
> > with Homebrew or MacPorts.

done, 3 false positive warnings remained
  ${JAVA_BIN} ${JETTY_OPTS} org.apache.oozie.server.EmbeddedOozieServer >> 
"${JETTY_OUT}" 2>&1 &
  ^-- SC2086: Double quote to prevent globbing and word splitting.


In distro/src/main/bin/oozie-jetty-server.sh line 111:
  ${JAVA_BIN} ${JETTY_OPTS} org.apache.oozie.server.EmbeddedOozieServer
  ^-- SC2086: Double quote to prevent globbing and word splitting.


In distro/src/main/bin/oozie-jetty-server.sh line 140:
kill -0 "$(cat ${JETTY_PID_FILE})" >/dev/null 2>&1
   ^-- SC2086: Double quote to prevent globbing and word 
splitting.

if I double quote, I cannot start the server because system properties and 
others are not passed in an expected way to java.
It is also true for the existing oozie.d.sh script


- Attila


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


On Oct. 13, 2016, 2:17 p.m., Attila Sasvari wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52399/
> ---
> 
> (Updated Oct. 13, 2016, 2:17 p.m.)
> 
> 
> Review request for oozie, András Piros, Peter Cseh, Peter Bacsko, and Robert 
> Kanter.
> 
> 
> Repository: oozie-git
> 
> 
> Description
> ---
> 
> 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).
> 
> New functionality
> - 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 ciphers can be configured via system properties and 
> environment variables. Precedence: system properties, environment variables, 
> default values
>
> Changes in existing code
> - Excluded jetty 6 dependencies from core and updated tests accordingly  
> 
> Packaging
> - 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 set an 
> environment variable (e.g. OOZIE_USE_TOMCAT=1).
> 
> TODO:
> - Add more tests
> - Add more documentation
> - Code cleanup + refactoring in packaging and core parts
> - Maven clean up
> - Allow to tune more Jetty settings (for example threadpool)
> - More security measures (e.g. protect against clickjacking, CSRF, etc.)
> - Update Oozie Documentation
> 
> 
> Diffs
> -
> 
>   core/src/main/java/org/apache/oozie/util/Instrumentation.java 
> fa1e92a0f1fadfb66c5e66fea5f26f57579080e7 
>   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/oozied.sh a869c3da177c863a068f2af45c7bca9d5cb771ac 
>   pom.xml 704a29f4e4805e3e08c2a547b2a375f6b1b2 
>   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/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/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/TestSSLServerConnectorFactory.java
>  PRE-CREATION 
>   src/main/assemblies/distro.xml 1ffbfd6d2ba33b390999e9094cbb336fbce45c21 
> 
> Diff: https://reviews.apache.org/r/52399/diff/
> 
> 
> Testing
> ---
> 
> - 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, server starts 

Re: Review Request 52399: OOZIE-2666 Support embedding Jetty into Oozie

2016-10-13 Thread Attila Sasvari


> On Oct. 3, 2016, 4:27 p.m., Peter Bacsko wrote:
> > server/pom.xml, line 26
> > 
> >
> > +1, I'd remove versions tags here

all other mvn properties have ".version" suffix


> On Oct. 3, 2016, 4:27 p.m., Peter Bacsko wrote:
> > server/src/main/java/org/apache/oozie/server/EmbeddedOozieServer.java, 
> > lines 79-80
> > 
> >
> > Extract strings to constants like "oozie.http.port", "OOZIE_HTTP_PORT", 
> > etc

These strings are used only once. Therefore I think it is not necessary.


> On Oct. 3, 2016, 4:27 p.m., Peter Bacsko wrote:
> > server/src/main/java/org/apache/oozie/server/JspHandler.java, lines 51-60
> > 
> >
> > extract properties to constant

These strings are used only once. Therefore I think it is not necessary


> On Oct. 3, 2016, 4:27 p.m., Peter Bacsko wrote:
> > server/src/test/java/org/apache/oozie/server/TestEmbeddedOozieServer.java, 
> > line 54
> > 
> >
> > extract property

"oozie.ssl.enabled" is used only once. Therefore I think it is not necessary


- Attila


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


On Oct. 13, 2016, 2:17 p.m., Attila Sasvari wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52399/
> ---
> 
> (Updated Oct. 13, 2016, 2:17 p.m.)
> 
> 
> Review request for oozie, András Piros, Peter Cseh, Peter Bacsko, and Robert 
> Kanter.
> 
> 
> Repository: oozie-git
> 
> 
> Description
> ---
> 
> 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).
> 
> New functionality
> - 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 ciphers can be configured via system properties and 
> environment variables. Precedence: system properties, environment variables, 
> default values
>
> Changes in existing code
> - Excluded jetty 6 dependencies from core and updated tests accordingly  
> 
> Packaging
> - 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 set an 
> environment variable (e.g. OOZIE_USE_TOMCAT=1).
> 
> TODO:
> - Add more tests
> - Add more documentation
> - Code cleanup + refactoring in packaging and core parts
> - Maven clean up
> - Allow to tune more Jetty settings (for example threadpool)
> - More security measures (e.g. protect against clickjacking, CSRF, etc.)
> - Update Oozie Documentation
> 
> 
> Diffs
> -
> 
>   core/src/main/java/org/apache/oozie/util/Instrumentation.java 
> fa1e92a0f1fadfb66c5e66fea5f26f57579080e7 
>   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/oozied.sh a869c3da177c863a068f2af45c7bca9d5cb771ac 
>   pom.xml 704a29f4e4805e3e08c2a547b2a375f6b1b2 
>   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/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/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/TestSSLServerConnectorFactory.java
>  PRE-CREATION 
>   src/main/assemblies/distro.xml 1ffbfd6d2ba33b390999e9094cbb336fbce45c21 
> 
> Diff: https://reviews.apache.org/r/52399/diff/
> 
> 
> Testing
> ---
> 
> - 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 

Re: Review Request 52399: OOZIE-2666 Support embedding Jetty into Oozie

2016-10-13 Thread Attila Sasvari

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

(Updated Oct. 13, 2016, 2:17 p.m.)


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


Repository: oozie-git


Description
---

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).

New functionality
- 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 ciphers can be configured via system properties and 
environment variables. Precedence: system properties, environment variables, 
default values
   
Changes in existing code
- Excluded jetty 6 dependencies from core and updated tests accordingly  

Packaging
- 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 set an environment 
variable (e.g. OOZIE_USE_TOMCAT=1).

TODO:
- Add more tests
- Add more documentation
- Code cleanup + refactoring in packaging and core parts
- Maven clean up
- Allow to tune more Jetty settings (for example threadpool)
- More security measures (e.g. protect against clickjacking, CSRF, etc.)
- Update Oozie Documentation


Diffs (updated)
-

  core/src/main/java/org/apache/oozie/util/Instrumentation.java 
fa1e92a0f1fadfb66c5e66fea5f26f57579080e7 
  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/oozied.sh a869c3da177c863a068f2af45c7bca9d5cb771ac 
  pom.xml 704a29f4e4805e3e08c2a547b2a375f6b1b2 
  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/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/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/TestSSLServerConnectorFactory.java 
PRE-CREATION 
  src/main/assemblies/distro.xml 1ffbfd6d2ba33b390999e9094cbb336fbce45c21 

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


Testing
---

- 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, server starts without SSL settings 
- If oozie.ssl.enabled is specified, 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


Thanks,

Attila Sasvari



Re: Review Request 52399: OOZIE-2666 Support embedding Jetty into Oozie

2016-10-13 Thread Attila Sasvari


> On Oct. 6, 2016, 11:04 p.m., Robert Kanter wrote:
> > server/src/main/java/org/apache/oozie/server/JspHandler.java, line 51
> > 
> >
> > This typically points to /tmp right?  In a long running Oozie Server, 
> > might we run into problem where the OS cleans this up?

Yes, it is /tmp typically on a Linux system. On my Mac, however, it is 
/var/folders/9q/f8p_r6gj0wbck49_dc092q_mgp/T/embedded-jetty-jsp

Note: this is intended for temporary data. See 
https://github.com/jetty-project/embedded-jetty-jsp
"A sub directory in this temp directory will be automatically added by the JSP 
implementation for loading the compiled JSP classes."

So I do not think it will cause problems, it is only for compiling JSP classes. 
By default, /tmp is cleared upon every OS boot (assuming TMPTIME is set 0).

I tested what happens on my Mac, if I rm -rf 
/var/folders/9q/f8p_r6gj0wbck49_dc092q_mgp/T/embedded-jetty-jsp => it 
recreates the embedded-jetty-jsp directory. 


By the way, I followed jetty's reference example here: 
https://github.com/jetty-project/embedded-jetty-jsp/blob/master/src/main/java/org/eclipse/jetty/demo/Main.java#L135


- Attila


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


On Oct. 13, 2016, 1:37 p.m., Attila Sasvari wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52399/
> ---
> 
> (Updated Oct. 13, 2016, 1:37 p.m.)
> 
> 
> Review request for oozie, András Piros, Peter Cseh, Peter Bacsko, and Robert 
> Kanter.
> 
> 
> Repository: oozie-git
> 
> 
> Description
> ---
> 
> 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).
> 
> New functionality
> - 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 ciphers can be configured via system properties and 
> environment variables. Precedence: system properties, environment variables, 
> default values
>
> Changes in existing code
> - Excluded jetty 6 dependencies from core and updated tests accordingly  
> 
> Packaging
> - 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 set an 
> environment variable (e.g. OOZIE_USE_TOMCAT=1).
> 
> TODO:
> - Add more tests
> - Add more documentation
> - Code cleanup + refactoring in packaging and core parts
> - Maven clean up
> - Allow to tune more Jetty settings (for example threadpool)
> - More security measures (e.g. protect against clickjacking, CSRF, etc.)
> - Update Oozie Documentation
> 
> 
> Diffs
> -
> 
>   core/src/main/java/org/apache/oozie/util/Instrumentation.java 
> fa1e92a0f1fadfb66c5e66fea5f26f57579080e7 
>   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/oozied.sh a869c3da177c863a068f2af45c7bca9d5cb771ac 
>   pom.xml 704a29f4e4805e3e08c2a547b2a375f6b1b2 
>   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/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/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/TestSSLServerConnectorFactory.java
>  PRE-CREATION 
>   src/main/assemblies/distro.xml 1ffbfd6d2ba33b390999e9094cbb336fbce45c21 
> 
> Diff: https://reviews.apache.org/r/52399/diff/
> 
> 
> Testing
> ---
> 
> - 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, server starts without SSL 
> settings 
> - 

Re: Review Request 52399: OOZIE-2666 Support embedding Jetty into Oozie

2016-10-13 Thread Attila Sasvari

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

(Updated Oct. 13, 2016, 1:37 p.m.)


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


Changes
---

- Remove admin port from jetty script
- Addressing review comments in tests


Repository: oozie-git


Description
---

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).

New functionality
- 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 ciphers can be configured via system properties and 
environment variables. Precedence: system properties, environment variables, 
default values
   
Changes in existing code
- Excluded jetty 6 dependencies from core and updated tests accordingly  

Packaging
- 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 set an environment 
variable (e.g. OOZIE_USE_TOMCAT=1).

TODO:
- Add more tests
- Add more documentation
- Code cleanup + refactoring in packaging and core parts
- Maven clean up
- Allow to tune more Jetty settings (for example threadpool)
- More security measures (e.g. protect against clickjacking, CSRF, etc.)
- Update Oozie Documentation


Diffs (updated)
-

  core/src/main/java/org/apache/oozie/util/Instrumentation.java 
fa1e92a0f1fadfb66c5e66fea5f26f57579080e7 
  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/oozied.sh a869c3da177c863a068f2af45c7bca9d5cb771ac 
  pom.xml 704a29f4e4805e3e08c2a547b2a375f6b1b2 
  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/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/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/TestSSLServerConnectorFactory.java 
PRE-CREATION 
  src/main/assemblies/distro.xml 1ffbfd6d2ba33b390999e9094cbb336fbce45c21 

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


Testing
---

- 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, server starts without SSL settings 
- If oozie.ssl.enabled is specified, 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


Thanks,

Attila Sasvari



Re: Review Request 52399: OOZIE-2666 Support embedding Jetty into Oozie

2016-10-07 Thread Attila Sasvari

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

(Updated Oct. 7, 2016, 2:59 p.m.)


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


Changes
---

- Make configurable
- HTTP request / response header size 
- thread pool size
- Remove jetty opts that are defined in oozie-default.xml (i.e. not required to 
be set via system properties)
- Add HttpConfigurationWrapper


Repository: oozie-git


Description
---

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).

New functionality
- 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 ciphers can be configured via system properties and 
environment variables. Precedence: system properties, environment variables, 
default values
   
Changes in existing code
- Excluded jetty 6 dependencies from core and updated tests accordingly  

Packaging
- 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 set an environment 
variable (e.g. OOZIE_USE_TOMCAT=1).

TODO:
- Add more tests
- Add more documentation
- Code cleanup + refactoring in packaging and core parts
- Maven clean up
- Allow to tune more Jetty settings (for example threadpool)
- More security measures (e.g. protect against clickjacking, CSRF, etc.)
- Update Oozie Documentation


Diffs (updated)
-

  core/src/main/java/org/apache/oozie/util/Instrumentation.java 
fa1e92a0f1fadfb66c5e66fea5f26f57579080e7 
  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/oozied.sh a869c3da177c863a068f2af45c7bca9d5cb771ac 
  pom.xml 704a29f4e4805e3e08c2a547b2a375f6b1b2 
  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/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/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/TestSSLServerConnectorFactory.java 
PRE-CREATION 
  src/main/assemblies/distro.xml 1ffbfd6d2ba33b390999e9094cbb336fbce45c21 

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


Testing
---

- 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, server starts without SSL settings 
- If oozie.ssl.enabled is specified, 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


Thanks,

Attila Sasvari



Re: Review Request 52399: OOZIE-2666 Support embedding Jetty into Oozie

2016-10-07 Thread Attila Sasvari

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

(Updated Oct. 7, 2016, 7:18 a.m.)


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


Changes
---

Fixes according to review comments:
- rename oozie.ssl to oozie.https, 
- added ShutdownHook to stop oozie services.


Repository: oozie-git


Description
---

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).

New functionality
- 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 ciphers can be configured via system properties and 
environment variables. Precedence: system properties, environment variables, 
default values
   
Changes in existing code
- Excluded jetty 6 dependencies from core and updated tests accordingly  

Packaging
- 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 set an environment 
variable (e.g. OOZIE_USE_TOMCAT=1).

TODO:
- Add more tests
- Add more documentation
- Code cleanup + refactoring in packaging and core parts
- Maven clean up
- Allow to tune more Jetty settings (for example threadpool)
- More security measures (e.g. protect against clickjacking, CSRF, etc.)
- Update Oozie Documentation


Diffs (updated)
-

  core/src/main/java/org/apache/oozie/util/Instrumentation.java 
fa1e92a0f1fadfb66c5e66fea5f26f57579080e7 
  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/oozied.sh a869c3da177c863a068f2af45c7bca9d5cb771ac 
  pom.xml 704a29f4e4805e3e08c2a547b2a375f6b1b2 
  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/JspHandler.java PRE-CREATION 
  server/src/main/java/org/apache/oozie/server/SSLServerConnectorFactory.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/TestSSLServerConnectorFactory.java 
PRE-CREATION 
  src/main/assemblies/distro.xml 1ffbfd6d2ba33b390999e9094cbb336fbce45c21 

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


Testing
---

- 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, server starts without SSL settings 
- If oozie.ssl.enabled is specified, 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


Thanks,

Attila Sasvari



Re: Review Request 52399: OOZIE-2666 Support embedding Jetty into Oozie

2016-10-06 Thread Robert Kanter

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




core/src/main/java/org/apache/oozie/util/Instrumentation.java (line 783)


Why is this change needed?



core/src/main/resources/oozie-default.xml (line 2514)


I think we should make these property names consistent.  Some start with 
oozie.ssl and some start with oozie.https but they're all related.

I'd vote for oozie.https given that (a) we're using http(s) for everything 
and (b) ssl is technically outdated in favor of tls, though they're often used 
interchangebly; with oozie.https we don't have to think about that :)



distro/pom.xml (lines 116 - 128)


What is this for?



distro/src/main/bin/oozie-jetty-server.sh (line 1)


Please run all new/updated shell scripts through shellcheck 
(https://www.shellcheck.net/).  It finds various problems and best practice 
violations (kind of like findbugs).  You can even install it on your Mac with 
Homebrew or MacPorts.



distro/src/main/bin/oozie-jetty-server.sh (lines 40 - 61)


IMO, we should move as many of these as possible to oozie-default/site.  We 
had a bunch of these as JVM properties before because of Tomcat and other 
reasons, but it would be good to have them all in the same place as other 
config properties.  At the very least, the https/ssl ones (the other ones are 
probably out of scope for this JIRA).



distro/src/main/bin/oozie-jetty-server.sh (line 187)


Can we set this up in such that there is no war file when using Jetty?



server/pom.xml (line 26)


Leave off the  in this pom, and instead define them all in the 
root pom.



server/src/main/assemblies/empty.xml (lines 9 - 11)


Whitespace



server/src/main/java/org/apache/oozie/server/EmbeddedOozieServer.java (lines 46 
- 47)


Should these be configurable?  IIRC, we had to increase one of these in 
Tomcat at one point for some reason.



server/src/main/java/org/apache/oozie/server/EmbeddedOozieServer.java (line 84)


We now typically get the Configuration by doing 
ConfigurationService.get("property-name")



server/src/main/java/org/apache/oozie/server/EmbeddedOozieServer.java (line 136)


It would be good to do a services.destroy() when shutting down because many 
Services have some sort of cleanup or disconnect that they do.



server/src/main/java/org/apache/oozie/server/JspHandler.java (line 51)


This typically points to /tmp right?  In a long running Oozie Server, might 
we run into problem where the OS cleans this up?


- Robert Kanter


On Oct. 6, 2016, 10:09 p.m., Attila Sasvari wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52399/
> ---
> 
> (Updated Oct. 6, 2016, 10:09 p.m.)
> 
> 
> Review request for oozie, András Piros, Peter Cseh, Peter Bacsko, and Robert 
> Kanter.
> 
> 
> Repository: oozie-git
> 
> 
> Description
> ---
> 
> 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).
> 
> New functionality
> - 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 ciphers can be configured via system properties and 
> environment variables. Precedence: system properties, environment variables, 
> default values
>
> Changes in existing code
> - Excluded jetty 6 dependencies from core and updated tests accordingly  
> 
> Packaging
> - 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 set an 
> environment variable (e.g. OOZIE_USE_TOMCAT=1).
> 
> TODO:
> - Add more tests
> - Add more documentation
> - Code cleanup + refactoring in packaging and core parts
> - Maven clean up
> - Allow to tune more Jetty settings (for example threadpool)
> - More security measures (e.g. protect against clickjacking, CSRF, etc.)
> - 

Re: Review Request 52399: OOZIE-2666 Support embedding Jetty into Oozie

2016-10-06 Thread Attila Sasvari

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

(Updated Oct. 6, 2016, 10:09 p.m.)


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


Changes
---

Main changes 
* Use ConfigurationService to get SSL settings
- add properties oozie-default.xml
- adjust tests and oozie script
* Refactor: rename some properties
* Run TestEmbeddedOozieServer MockitoJUnitRunner.class)
* Fix version of jetty-plus maven dependency


Repository: oozie-git


Description
---

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).

New functionality
- 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 ciphers can be configured via system properties and 
environment variables. Precedence: system properties, environment variables, 
default values
   
Changes in existing code
- Excluded jetty 6 dependencies from core and updated tests accordingly  

Packaging
- 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 set an environment 
variable (e.g. OOZIE_USE_TOMCAT=1).

TODO:
- Add more tests
- Add more documentation
- Code cleanup + refactoring in packaging and core parts
- Maven clean up
- Allow to tune more Jetty settings (for example threadpool)
- More security measures (e.g. protect against clickjacking, CSRF, etc.)
- Update Oozie Documentation


Diffs (updated)
-

  core/src/main/java/org/apache/oozie/util/Instrumentation.java 
fa1e92a0f1fadfb66c5e66fea5f26f57579080e7 
  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/oozied.sh a869c3da177c863a068f2af45c7bca9d5cb771ac 
  pom.xml 704a29f4e4805e3e08c2a547b2a375f6b1b2 
  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/JspHandler.java PRE-CREATION 
  server/src/main/java/org/apache/oozie/server/SSLServerConnectorFactory.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/TestSSLServerConnectorFactory.java 
PRE-CREATION 
  src/main/assemblies/distro.xml 1ffbfd6d2ba33b390999e9094cbb336fbce45c21 

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


Testing
---

- 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, server starts without SSL settings 
- If oozie.ssl.enabled is specified, 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


Thanks,

Attila Sasvari



Re: Review Request 52399: OOZIE-2666 Support embedding Jetty into Oozie

2016-10-04 Thread Attila Sasvari

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

(Updated Oct. 4, 2016, 2:42 p.m.)


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


Changes
---

Only download tomcat if  maven profile 'tomcat' is specified
Jetty script fixes
Refactoring


Repository: oozie-git


Description
---

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).

New functionality
- 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 ciphers can be configured via system properties and 
environment variables. Precedence: system properties, environment variables, 
default values
   
Changes in existing code
- Excluded jetty 6 dependencies from core and updated tests accordingly  

Packaging
- 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 set an environment 
variable (e.g. OOZIE_USE_TOMCAT=1).

TODO:
- Add more tests
- Add more documentation
- Code cleanup + refactoring in packaging and core parts
- Maven clean up
- Allow to tune more Jetty settings (for example threadpool)
- More security measures (e.g. protect against clickjacking, CSRF, etc.)
- Update Oozie Documentation


Diffs (updated)
-

  core/src/main/java/org/apache/oozie/util/Instrumentation.java 
fa1e92a0f1fadfb66c5e66fea5f26f57579080e7 
  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/oozied.sh a869c3da177c863a068f2af45c7bca9d5cb771ac 
  pom.xml 704a29f4e4805e3e08c2a547b2a375f6b1b2 
  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/JspHandler.java PRE-CREATION 
  server/src/main/java/org/apache/oozie/server/SSLServerConnectorFactory.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/TestSSLServerConnectorFactory.java 
PRE-CREATION 
  src/main/assemblies/distro.xml 1ffbfd6d2ba33b390999e9094cbb336fbce45c21 

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


Testing
---

- 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, server starts without SSL settings 
- If oozie.ssl.enabled is specified, 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


Thanks,

Attila Sasvari



Re: Review Request 52399: OOZIE-2666 Support embedding Jetty into Oozie

2016-10-03 Thread Peter Bacsko

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




core/src/main/java/org/apache/oozie/util/Instrumentation.java (line 787)


Check white spaces here.



distro/src/main/bin/oozie-jetty-server.sh (line 109)


I think we should also print an error if Jetty cannot not be started for 
whatever reason



distro/src/main/bin/oozie-jetty-server.sh (line 167)


Can't we just use a single if?



distro/src/main/bin/oozied.sh (line 101)


Inconsistent use of "test"



distro/src/main/bin/oozied.sh (line 110)


Check for white spaces



distro/src/main/bin/oozied.sh (line 115)


Is this TODO still relevant?



server/pom.xml (line 26)


+1, I'd remove versions tags here



server/src/main/assemblies/empty.xml (line 9)


Booo, trailing spaces :)



server/src/main/java/org/apache/oozie/server/EmbeddedOozieServer.java (line 63)


Minor: I'd be paranoid and null-check all incoming dependencies here.



server/src/main/java/org/apache/oozie/server/EmbeddedOozieServer.java (lines 79 
- 80)


Extract strings to constants like "oozie.http.port", "OOZIE_HTTP_PORT", etc



server/src/main/java/org/apache/oozie/server/JspHandler.java (lines 51 - 60)


extract properties to constant



server/src/main/java/org/apache/oozie/server/SSLServerConnectorFactory.java 
(line 46)


Minor: don't we have an enum somehwere for these protocols?



server/src/main/java/org/apache/oozie/server/SSLServerConnectorFactory.java 
(line 49)


Minor: add line-feed before constructor & null-check the factory



server/src/main/java/org/apache/oozie/server/SSLServerConnectorFactory.java 
(line 62)


Why capitals for OOZIE_HTTPS_PORT ?



server/src/main/resources/checkstyle.xml (line 35)


Mind the formatting



server/src/test/java/org/apache/oozie/server/TestEmbeddedOozieServer.java (line 
54)


extract property



server/src/test/java/org/apache/oozie/server/TestSSLServerConnectorFactory.java 
(line 38)


If this runs as a JUnit4 test then you can use a MockitoJunitRunner.

See:

http://site.mockito.org/mockito/docs/current/org/mockito/runners/MockitoJUnitRunner.html



server/src/test/java/org/apache/oozie/server/TestSSLServerConnectorFactory.java 
(line 51)


Extract "42"



server/src/test/java/org/apache/oozie/server/TestSSLServerConnectorFactory.java 
(line 73)


This list should be also accessible from a static variable. Or at least 
extract it to a constant in the test class.


- Peter Bacsko


On szept. 30, 2016, 3:34 du, Attila Sasvari wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52399/
> ---
> 
> (Updated szept. 30, 2016, 3:34 du)
> 
> 
> Review request for oozie, András Piros, Peter Cseh, Peter Bacsko, and Robert 
> Kanter.
> 
> 
> Repository: oozie-git
> 
> 
> Description
> ---
> 
> 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).
> 
> New functionality
> - 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 ciphers can be configured via system properties and 
> environment variables. Precedence: system properties, environment variables, 
> default values
>
> Changes in existing code
> - Excluded jetty 6 dependencies from core and updated tests accordingly  
> 
> Packaging
> - 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 set an 
> 

Re: Review Request 52399: OOZIE-2666 Support embedding Jetty into Oozie

2016-10-03 Thread András Piros

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




core/src/main/java/org/apache/oozie/util/Instrumentation.java (line 783)


XLog.format() creates only a String that is not used.



core/src/main/java/org/apache/oozie/util/Instrumentation.java (line 784)


Dead code, pls. remove.



distro/src/main/bin/oozie-jetty-server.sh (line 21)


setup_jetty_log_and_pid()



distro/src/main/bin/oozie-jetty-server.sh (lines 29 - 34)


Can be extracted to a method: check_and_set_env_var()



distro/src/main/bin/oozie-jetty-server.sh (lines 69 - 71)


I'd rather extract the conditions to one variable called isPidPresent, 
making the three ifs way more readable.



distro/src/main/bin/oozie-jetty-server.sh (line 146)


RETRY_COUNT



distro/src/main/bin/oozie-jetty-server.sh (line 150)


${RETRY_COUNT}



distro/src/main/bin/oozie-jetty-server.sh (line 167)


I think neither the variable FORCE nor this condition is not needed since 
${FORCE} always evaluates to 0.



distro/src/main/bin/oozie-jetty-server.sh (lines 181 - 184)


Extract method check_and_create_webapp() instead of comment.



pom.xml (line 105)


What about jetty.version instead?



server/pom.xml (line 26)


Either I'd put also the jetty.version property here instead of the parent 
pom.xml (if the jetty dependencies are used only from oozie-server artifact), 
or I'd put the dependencies' versions to parent pom.xml and omit those here (if 
the jetty dependencies are used not only from oozie-server artifact).



server/pom.xml (lines 350 - 376)


Formatting issue.



server/pom.xml (line 375)


Is that a version string we should also extract?



server/src/main/java/org/apache/oozie/server/EmbeddedOozieServer.java (line 44)


Why not private?



server/src/main/java/org/apache/oozie/server/EmbeddedOozieServer.java (lines 79 
- 80)


You can go ahead w/ Integer.getInteger(String, int).



server/src/main/java/org/apache/oozie/server/EmbeddedOozieServer.java (lines 79 
- 101)


Why not use a Builder pattern here as in:

https://github.com/iluwatar/java-design-patterns/tree/master/builder



server/src/main/java/org/apache/oozie/server/EmbeddedOozieServer.java (lines 87 
- 88)


You can go ahead w/ Integer.getInteger(String, int).



server/src/main/java/org/apache/oozie/server/EmbeddedOozieServer.java (lines 
105 - 111)


Does it not belong to a nested class / to another class instead?



server/src/main/java/org/apache/oozie/server/EmbeddedOozieServer.java (line 107)


Extract constant value.



server/src/main/java/org/apache/oozie/server/EmbeddedOozieServer.java (line 108)


Extract constant value.



server/src/main/java/org/apache/oozie/server/EmbeddedOozieServer.java (lines 
114 - 115)


Integer.getInteger(String)



server/src/main/java/org/apache/oozie/server/EmbeddedOozieServer.java (lines 
128 - 134)


Should it be part of a unit test instead? Who will call it?



server/src/main/java/org/apache/oozie/server/JspHandler.java (lines 51 - 60)


What about this one instead:


https://docs.oracle.com/javase/7/docs/api/java/io/File.html#createTempFile(java.lang.String,%20java.lang.String,%20java.io.File)



server/src/main/java/org/apache/oozie/server/JspHandler.java (line 85)


Extract to constant field w/ Javadoc.



server/src/main/java/org/apache/oozie/server/JspHandler.java (line 106)


Lists.newArrayList() or new ArrayList<>()



server/src/main/java/org/apache/oozie/server/SSLServerConnectorFactory.java 

Re: Review Request 52399: OOZIE-2666 Support embedding Jetty into Oozie

2016-09-30 Thread Attila Sasvari

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

(Updated Sept. 30, 2016, 10:45 a.m.)


Review request for oozie, Peter Cseh, Peter Bacsko, and Robert Kanter.


Changes
---

Refactor oozied.sh - move jetty related things to new script file


Repository: oozie-git


Description
---

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).

New functionality
- 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 ciphers can be configured via system properties and 
environment variables. Precedence: system properties, environment variables, 
default values
   
Changes in existing code
- Excluded jetty 6 dependencies from core and updated tests accordingly  

Packaging
- 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 set an environment 
variable (e.g. OOZIE_USE_TOMCAT=1).

TODO:
- Add more tests
- Add more documentation
- Code cleanup + refactoring in packaging and core parts
- Maven clean up
- Allow to tune more Jetty settings (for example threadpool)
- More security measures (e.g. protect against clickjacking, CSRF, etc.)
- Update Oozie Documentation


Diffs (updated)
-

  core/src/main/java/org/apache/oozie/util/Instrumentation.java 
fa1e92a0f1fadfb66c5e66fea5f26f57579080e7 
  distro/src/main/bin/oozie-jetty-server.sh PRE-CREATION 
  distro/src/main/bin/oozied.sh a869c3da177c863a068f2af45c7bca9d5cb771ac 
  pom.xml 704a29f4e4805e3e08c2a547b2a375f6b1b2 
  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/JspHandler.java PRE-CREATION 
  server/src/main/java/org/apache/oozie/server/SSLServerConnectorFactory.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/TestSSLServerConnectorFactory.java 
PRE-CREATION 
  src/main/assemblies/distro.xml 1ffbfd6d2ba33b390999e9094cbb336fbce45c21 

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


Testing
---

- 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, server starts without SSL settings 
- If oozie.ssl.enabled is specified, 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


Thanks,

Attila Sasvari



Re: Review Request 52399: OOZIE-2666 Support embedding Jetty into Oozie

2016-09-30 Thread Attila Sasvari

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

(Updated Sept. 30, 2016, 9:27 a.m.)


Review request for oozie, Peter Cseh, Peter Bacsko, and Robert Kanter.


Changes
---

Change Jetty version to 9.2.19.v20160908 because Jetty 9.3 requires Java 8 (see 
http://www.eclipse.org/jetty/documentation/current/what-jetty-version.html); no 
code changes were needed


Repository: oozie-git


Description
---

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).

New functionality
- 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 ciphers can be configured via system properties and 
environment variables. Precedence: system properties, environment variables, 
default values
   
Changes in existing code
- Excluded jetty 6 dependencies from core and updated tests accordingly  

Packaging
- 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 set an environment 
variable (e.g. OOZIE_USE_TOMCAT=1).

TODO:
- Add more tests
- Add more documentation
- Code cleanup + refactoring in packaging and core parts
- Maven clean up
- Allow to tune more Jetty settings (for example threadpool)
- More security measures (e.g. protect against clickjacking, CSRF, etc.)
- Update Oozie Documentation


Diffs (updated)
-

  core/src/main/java/org/apache/oozie/util/Instrumentation.java 
fa1e92a0f1fadfb66c5e66fea5f26f57579080e7 
  distro/src/main/bin/oozie-sys.sh 97d55a2b69c34ede007d4f65cdfc66f1ac2cfd13 
  distro/src/main/bin/oozied.sh a869c3da177c863a068f2af45c7bca9d5cb771ac 
  pom.xml 704a29f4e4805e3e08c2a547b2a375f6b1b2 
  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/JspHandler.java PRE-CREATION 
  server/src/main/java/org/apache/oozie/server/SSLServerConnectorFactory.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/TestSSLServerConnectorFactory.java 
PRE-CREATION 
  src/main/assemblies/distro.xml 1ffbfd6d2ba33b390999e9094cbb336fbce45c21 

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


Testing
---

- 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, server starts without SSL settings 
- If oozie.ssl.enabled is specified, 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


Thanks,

Attila Sasvari