[
https://issues.apache.org/jira/browse/KNOX-784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16684310#comment-16684310
]
Kevin Risden commented on KNOX-784:
-----------------------------------
New patch uses the topology name. Tested that multiple topologies with requests
going through create separate metrics implementations. When a topology is
removed (deleting the topology xml) the metrics are also removed. It looks like
the connection manager is being closed correctly as well.
Side note: One of the weird thing that came out of this for me is that each
topology has a separate connection manager. This means that we could
potentially configure max connections per route per topology instead of at the
gateway-site location. Which would make it easier to increase if necessary.
> java.lang.IllegalArgumentException: A metric named
> org.apache.http.conn.HttpClientConnectionManager.available-connections
> already exists
> -----------------------------------------------------------------------------------------------------------------------------------------
>
> Key: KNOX-784
> URL: https://issues.apache.org/jira/browse/KNOX-784
> Project: Apache Knox
> Issue Type: Bug
> Reporter: Nishant Bangarwa
> Assignee: Kevin Risden
> Priority: Major
> Fix For: 1.3.0
>
> Attachments: KNOX-784.patch
>
>
> Facing this error on latest trunk version -
> {code:java}
> Caused by: java.lang.IllegalArgumentException: A metric named
> org.apache.http.conn.HttpClientConnectionManager.available-connections
> already exists
> at com.codahale.metrics.MetricRegistry.register(MetricRegistry.java:91)
> at
> com.codahale.metrics.httpclient.InstrumentedHttpClientConnectionManager.<init>(InstrumentedHttpClientConnectionManager.java:63)
> at
> com.codahale.metrics.httpclient.InstrumentedHttpClientConnectionManager.<init>(InstrumentedHttpClientConnectionManager.java:49)
> at
> com.codahale.metrics.httpclient.InstrumentedHttpClientConnectionManager.<init>(InstrumentedHttpClientConnectionManager.java:41)
> at
> com.codahale.metrics.httpclient.InstrumentedHttpClientConnectionManager.<init>(InstrumentedHttpClientConnectionManager.java:36)
> at
> org.apache.hadoop.gateway.services.metrics.impl.instr.InstrHttpClientBuilderProvider.getInstrumented(InstrHttpClientBuilderProvider.java:41)
> at
> org.apache.hadoop.gateway.services.metrics.impl.instr.InstrHttpClientBuilderProvider.getInstrumented(InstrHttpClientBuilderProvider.java:36)
> at
> org.apache.hadoop.gateway.services.metrics.impl.DefaultMetricsService.getInstrumented(DefaultMetricsService.java:128)
> at
> org.apache.hadoop.gateway.dispatch.DefaultHttpClientFactory.createHttpClient(DefaultHttpClientFactory.java:67)
> at
> org.apache.hadoop.gateway.dispatch.GatewayDispatchFilter.init(GatewayDispatchFilter.java:75)
> at
> org.apache.hadoop.gateway.GatewayFilter$Holder.getInstance(GatewayFilter.java:362){code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)