[
https://issues.apache.org/jira/browse/HBASE-12894?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15567190#comment-15567190
]
Guang Yang commented on HBASE-12894:
------------------------------------
Thanks [~stack] for the review.
{quote}
Suggest these defines go into the REST module rather than up into HConstants.
They are only used in REST module? If so, yeah, keep them local:
{quote}
Yeah that are only being used by the REST module, and they are in the
_hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/Constants.java_, is that
the right place for REST constants?
{quote}
How is this provided now? JacksonProvider.java
{quote}
It is being registered explicitly by the following code (in RESTServer.java):
{code}
ResourceConfig application = new ResourceConfig().
packages("org.apache.hadoop.hbase.rest").register(Jackson1Feature.class);
ServletHolder sh = new ServletHolder(new ServletContainer(application));
{code}
This is recommended by the [jersey Jackson1
example|https://github.com/jersey/jersey/blob/2.23.2/examples/json-jackson1/src/main/java/org/glassfish/jersey/examples/jackson1/MyApplication.java#L62],
it is also straightforward to switch to Jackson2 by just register the
JacksonFeature class.
{quote}
Do we need to shade jetty? If an old jetty on our CLASSPATH, we going to get
messed up?
{quote}
Jetty 6 is in different package so there should be no conflicts between Jetty 6
and Jetty 9. The jersey 2.x and servlet 3.x are a bit more concerning. What we
do is to exclude those dependencies from Hadoop artifacts, it works for our
setup, but I am not sure of the preference here.
> Upgrade Jetty to 9.2.6
> ----------------------
>
> Key: HBASE-12894
> URL: https://issues.apache.org/jira/browse/HBASE-12894
> Project: HBase
> Issue Type: Improvement
> Components: REST
> Affects Versions: 0.98.0
> Reporter: Rick Hallihan
> Assignee: Guang Yang
> Labels: MicrosoftSupport
> Fix For: 2.0.0
>
> Attachments: HBASE-12894_Jetty9_v0.patch, HBASE-12894_Jetty9_v1.patch
>
>
> The Jetty component that is used for the HBase Stargate REST endpoint is
> version 6.1.26 and is fairly outdated. We recently had a customer inquire
> about enabling cross-origin resource sharing (CORS) for the REST endpoint and
> found that this older version does not include the necessary filter or
> configuration options, highlighted at:
> http://wiki.eclipse.org/Jetty/Feature/Cross_Origin_Filter
> The Jetty project has had significant updates through versions 7, 8 and 9,
> including a transition to be an Eclipse subproject, so updating to the latest
> version may be non-trivial. The last update to the Jetty component in
> https://issues.apache.org/jira/browse/HBASE-3377 was a minor version update
> and did not require significant work. This update will include a package
> namespace update so there will likely be a larger number of required changes.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)