[
https://issues.apache.org/jira/browse/RANGER-1287?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15829984#comment-15829984
]
Ankita Sinha commented on RANGER-1287:
--------------------------------------
This is causing issue in Ranger KMS startup. Have you tested it? I am reopening
the issue. Since the code is common for Ranger Admin and Ranger KMS, only after
successful testing of both components in regular and SSL mode, it is
recommended to commit the change. My suggestion is to create a consolidated
patch for EmbeddedServer refactoring changes.
> Remove code duplication from Java method EmbeddedServer.start()
> ---------------------------------------------------------------
>
> Key: RANGER-1287
> URL: https://issues.apache.org/jira/browse/RANGER-1287
> Project: Ranger
> Issue Type: Improvement
> Components: admin
> Affects Versions: 0.7.0
> Reporter: Qiang Zhang
> Assignee: Qiang Zhang
> Priority: Minor
> Labels: patch
> Fix For: 0.7.0
>
> Attachments:
> 0001-RANGER-1287-Remove-code-duplication-from-EmbeddedSer.patch
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> In java class
> incubator-ranger\embeddedwebserver\src\main\java\org\apache\ranger\server\tomcat\EmbeddedServer.java,
> there is some code duplication in method start().
> 1.The following code is repeated twice, should remove one of them.
> {code}
> valve.setRotatable(true);
> {code}
> 2.The following code is repeated three times which can be refactored.
> {code}
> try{
> server.start();
> server.getServer().await();
> shutdownServer();
> }catch (LifecycleException e) {
> LOG.severe("Tomcat Server failed to start:" + e.toString());
> e.printStackTrace();
> }catch (Exception e) {
> LOG.severe("Tomcat Server failed to start:" + e.toString());
> e.printStackTrace();
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)