[
https://issues.apache.org/jira/browse/HADOOP-13597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15717586#comment-15717586
]
John Zhuge commented on HADOOP-13597:
-------------------------------------
Could have used [Decorator
Pattern|https://en.wikipedia.org/wiki/Decorator_pattern] to design a wrapper to
log configuration access:
{code}
interface ConfigurationAccess {
String get(String name);
String getInt(String name, int defaultValue);
}
class Configuration implements ConfigurationAccess {
...
}
class LoggedConfigurationAccess {
LoggedConfigurationAccess(conf, log) {
this.conf = conf;
this.log = log;
}
String get(String name) {
String value = conf.get(name);
log.info(..., name, value);
return value;
}
String getInt(String name, int defaultValue) {
String value = conf.getInt(name, defaultValue);
log.info(..., name, value, defaultValue);
return value;
}
}
{code}
A little downsize though: {{LoggedConfigurationAccess#getInt}} will log 2
messages because {{Configuration#getInt}} calls
{{LoggedConfigurationAccess#get}}.
> Switch KMS from Tomcat to Jetty
> -------------------------------
>
> Key: HADOOP-13597
> URL: https://issues.apache.org/jira/browse/HADOOP-13597
> Project: Hadoop Common
> Issue Type: New Feature
> Components: kms
> Affects Versions: 2.6.0
> Reporter: John Zhuge
> Assignee: John Zhuge
> Attachments: HADOOP-13597.001.patch, HADOOP-13597.002.patch
>
>
> The Tomcat 6 we are using will reach EOL at the end of 2017. While there are
> other good options, I would propose switching to {{Jetty 9}} for the
> following reasons:
> * Easier migration. Both Tomcat and Jetty are based on {{Servlet
> Containers}}, so we don't have change client code that much. It would require
> more work to switch to {{JAX-RS}}.
> * Well established.
> * Good performance and scalability.
> Other alternatives:
> * Jersey + Grizzly
> * Tomcat 8
> Your opinions will be greatly appreciated.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]